| name | cm |
| description | Map symbols across codebases with codemapper (cm) — tree-sitter AST parsing for call graphs, callers/callees, and entrypoints. Use when exploring unknown code or tracing dependencies. |
| token_cost | 150 |
| related | ["retype","sg","grit"] |
| keywords | ["codemapper","cm","symbol","callers","callees","entrypoints"] |
codemapper (cm)
Maps symbols across your codebase using tree-sitter AST parsing. Everything runs in-memory — no databases. Supports Python, JavaScript/TypeScript, Rust, Java, Go, C, Swift, and Markdown.
Exploring an Unknown Codebase
Start with project overview, then drill down:
cm stats .
cm map . --level 2 --format ai
cm query <symbol>
cm inspect ./path/to/file
Finding a Bug
Trace the suspected code and its callers:
cm query <suspected_function> --show-body
cm callers <function>
cm trace <entry_point> <suspected_function>
cm tests <function>
Before Refactoring
Understand impact before changing:
cm callers <function>
cm callees <function>
cm tests <function>
cm since main --breaking
Understanding an API Surface
cm entrypoints .
cm implements <interface>
cm schema <DataClass>
Git History (requires a git repo)
cm diff main
cm since v1.0 --breaking
cm blame <symbol> ./file.rs
cm history <symbol>
Useful Flags
--format ai — compact output optimized for LLM context (recommended)
--show-body — include actual code, not just signatures
--exact — case-sensitive matching (default is fuzzy)
--no-cache — always reindex
Rules
- Always start with
cm stats . to understand project composition
- Use
--format ai for token-efficient LLM-friendly output
- Git commands (
since, blame, history) require a git repository
- Use
--no-cache to force reindex after structural changes