@ast-bro/cli
Fast, AST-based code-navigation and log-squeezing toolkit — downloads the binary on install
pinned to #18430faupdated 2 months ago
Ask your AI client: “install mcps/ast-bro-cli”.
Requires the metahub MCP server installed in your client. Set up MCP.
mh install mcps/ast-bro-climetahub onboarded this repo on the author's behalf.
If you own github.com/aeroxy/ast-bro on GitHub, claim the listing to take over publishing. Your claim preserves the existing eval history and badges; only the curator label is replaced with verified-publisher on your next publish.
Stars
215
Last commit
2 months ago
Latest release
published
- #ast
- #ast-bro
- #ast-outline
- #call-graph
- #code-navigation
- #code-outline
- #coding-agent
- #dependency-graph
- #llm
- #mcp
- #semantic-search
- #squeeze
- #tree-sitter
What this server exposes
Surfaces parsed from this server's source at publish time.
Launches: ast-bro, ast-outline, sb
Automated checks the publisher passed at publish time — structure, docs, safety, and whether the artifact behaves as claimed.18430fa· 2 months ago
Behavioral checks haven't run yet: the sandbox couldn't execute this artifact (it may need credentials we don't provide, or an unsupported build). An environment limit, not a verdict.
Kind-specific
2 passed2 warningsMCP: @modelcontextprotocol/sdk in dependencieswarn
No @modelcontextprotocol/sdk dependency declared
Run `npm i @modelcontextprotocol/sdk` so consumers can audit your stack.
MCP: ESM packagewarn
package.json missing "type": "module"
Modern MCP servers are ESM. Add `"type": "module"` unless you have a CJS-only reason.
MCP: launch path
bin: ast-bro, ast-outline, sb
MCP: server surface
0 tools
Release history
1- releasecurrent18430fawarn2 months ago
Contents
npm installer for ast-bro — a fast, AST-based code-navigation toolkit for source files (shape, public API, dep & call graphs, hybrid semantic search, structural rewrite, MCP server). Downloads the pre-built Rust binary on install.
Formerly
@ast-outline/cli. Same project under a new scope (theast-outlinename became overloaded after the tool grew beyond outlining). Theast-outlinecommand is still installed as a thin proxy that forwards toast-bro, so existing scripts keep working.
Install
npm install -g @ast-bro/cli
This installs three commands, all forwarding to the same binary:
ast-bro— canonical namesb— short alias (same tool, fewer keystrokes)ast-outline— backward-compat shim
Usage
# Map the structure of a file (signatures + line ranges, no bodies)
ast-bro map src/player.rs
# Show the exact source of a specific method
ast-bro show Player.cs TakeDamage
# Compact digest of a whole module
ast-bro digest src/services/
# True public API (resolves pub use / __all__ re-exports)
ast-bro surface .
# Find all implementations of a type
ast-bro implements IDamageable src/
# Dependency graph
ast-bro deps src/auth.rs --depth 2
ast-bro reverse-deps src/auth.rs
ast-bro cycles
# Call graph (AST-accurate)
ast-bro callers TakeDamage
ast-bro callees Player.TakeDamage
# Hybrid BM25 + dense semantic search
ast-bro search "how does login work"
# Find semantically similar code
ast-bro find-related src/auth/login.rs:42
# AST-aware structural search and rewrite (with metavariables)
ast-bro run -p '$FUNC($$$)' -l rust
ast-bro run -p 'foo($A)' -r 'bar($A)' --write # apply to disk
On first run, the CLI downloads the pre-built binary for your platform from GitHub releases and caches it locally.
| Platform | Cache directory |
|---|---|
| macOS | ~/Library/Caches/ast-bro-<version>/ |
| Linux | ~/.cache/ast-bro-<version>/ |
Supported Platforms
| Platform | Status |
|---|---|
| macOS ARM64 | Pre-built binary available |
| Other platforms | Build from source (see below) |
For unsupported platforms, build from source:
cargo install ast-bro
What is ast-bro?
ast-bro is a fast, AST-based code-navigation toolkit built for LLM coding agents and humans. It uses tree-sitter via ast-grep to parse source files and provide:
- File shape —
map/digest/showfor signatures with line ranges (95% token savings vs reading full files) - True public API —
surfaceresolves re-export graphs across Rust, Python, TypeScript, and more - Dependency graph —
deps/reverse-deps/cycles/graphfor import analysis - Call graph —
callers/calleeswith AST accuracy across 14 languages - Semantic search — hybrid BM25 + dense embeddings via
searchandfind-related - Structural rewrite —
runfor AST-aware pattern matching with metavariables (find + replace) - MCP server — every command exposed as an MCP tool for LLM agents
Supports Rust, Python, TypeScript, JavaScript, Java, C#, C++, Kotlin, Scala, Go, PHP, Ruby, SQL, and Markdown.
Links
- ast-bro source code
- PyPI package (Python installer)
- crates.io (Rust library)
License
Reviews
No reviews yet. Be the first.
Related
Context7
Up-to-date code docs for any prompt
Caveman
MCP proxy that compresses prose fields (tool descriptions, etc.) using caveman rules. Same accuracy, fewer context tokens.
Open Webui
Open WebUI
mh install mcps/ast-bro-cli