@ast-outline/cli
v2.1.0
Published
Fast, AST-based code-navigation toolkit — downloads the binary on install
Maintainers
Readme
@ast-outline/cli
CLI installer for ast-outline — a fast, AST-based code-navigation toolkit for source files. Downloads the pre-built Rust binary on install.
Install
npm install -g @ast-outline/cliUsage
# Map the structure of a file (signatures + line ranges, no bodies)
ast-outline map src/player.rs
# Show the exact source of a specific method
ast-outline show Player.cs TakeDamage
# Compact digest of a whole module
ast-outline digest src/services/
# True public API (resolves pub use / __all__ re-exports)
ast-outline surface .
# Find all implementations of a type
ast-outline implements IDamageable src/
# Dependency graph
ast-outline deps src/auth.rs --depth 2
ast-outline reverse-deps src/auth.rs
ast-outline cycles
# Call graph (AST-accurate)
ast-outline callers TakeDamage
ast-outline callees Player.TakeDamage
# Hybrid BM25 + dense semantic search
ast-outline search "how does login work"
# Find semantically similar code
ast-outline find-related src/auth/login.rs:42On 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-outline/ |
| Linux | ~/.cache/ast-outline/ |
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-outlineWhat is ast-outline?
ast-outline 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 - MCP server — every command exposed as an MCP tool for LLM agents
Supports Rust, Python, TypeScript, JavaScript, Java, C#, Kotlin, Scala, Go, PHP, Ruby, SQL, and Markdown.
Links
- ast-outline source code
- PyPI package (Python installer)
- crates.io (Rust library)
