axm-ast
Read-only source analysis for agents: Python and optional TypeScript/TSX extraction.
What it does
axm-ast provides structured static analysis of source files: definitions, imports, call sites and change-impact signals. Parsing does not execute the target code and does not guarantee complete runtime dependency resolution.
Quick Example
Text Only
$ axm-ast context src/mylib
📋 mylib
layout: src (16 modules, 151 functions, 9 classes)
python: >=3.12
🔧 Stack
cli: cyclopts models: pydantic tests: pytest
lint: ruff types: mypy packaging: hatchling
📦 Modules (ranked)
cli ★★★★★ (describe, inspect, graph, search...)
core.analyzer ★★★★☆ (analyze_package, build_import_graph...)
core.docs ★★★☆☆ (discover_docs, build_docs_tree...)
Features
- 🔬 Describe — Package introspection with
toc,names,summary,detailedlevels + compressed AI mode + PageRank ranking + module filtering - 📊 Graph — Import dependency visualization (text, Mermaid, JSON)
- 🔍 Search — Lexical symbol lookup by name, return type, kind, or base class
- 📞 Callers — Tree-sitter call-site detection: "who calls this function?"
- 📋 Context — One-shot project dump: stack, patterns, module ranking
- 💥 Impact — Change impact analysis: callers + graph + test mapping
- 💀 Dead code — Detect unreferenced symbols with smart exemptions (test callers, lazy imports, dict dispatch, entry points)
- 🔀 Diff — Structural branch diff at symbol level (added/modified/removed)
- 🏗️ Workspace — Multi-package workspace support (auto-detected;
graph --scope workspace, cross-packageimpact) - 📖 Docs — One-shot documentation tree dump with progressive disclosure (toc/summary/full) and page filtering
Scope
Python package analysis is the primary surface. Optional TypeScript/TSX extraction
requires the typescript extra and a Node project root. Workspace aggregation
is supported by specific tools; see scope and language limits.
The repository README
provides installation and development information; this page is the site home.