Output Formats
axm-ast offers multiple output formats optimized for different consumers.
Detail Levels (describe)
Detailed (default)
Adds docstrings, parameter types, return types, and visibility indicators (🔓 public, 🔒 private). This is the default detail level.
Summary
Quick orientation. Shows module names, public function signatures, and class names.
Full
Everything: imports, variables, private symbols, decorators. Useful for complete documentation generation.
Compressed
AI-optimized format designed to fit large codebases into LLM context windows.
Includes:
- Module docstrings (first line only)
__all__exports- Public function signatures with first docstring line
- Class stubs with methods
- Relative imports (dependencies)
- Module-level constants
Excludes:
- Function bodies
- Absolute imports (e.g.,
from pathlib import Path) - Private symbols not in
__all__ - Multi-line docstrings
TOC (table of contents)
Ultra-lightweight overview returning only module names and symbol counts — no individual function or class details.
Includes:
- Module dotted name
- Module docstring (first sentence)
- Function count, class count, total symbol count
Excludes:
- Individual function/class details
- Signatures, parameters, imports, variables
Combine with --modules to filter:
Detail Levels (docs)
The docs command also supports progressive disclosure via --detail:
Full (default)
Returns complete content for README, mkdocs.yml, and all doc pages. Same as the original behavior.
TOC
Heading tree + line count per page (~500 tokens). Use this to decide which pages to drill into.
Summary
Headings + first sentence per section. A budget-friendly overview with enough context to identify stale sections.
Page filter
Combine any detail level with --pages to narrow the scope:
Flow Detail Levels (flows)
The flows command supports two detail levels via --detail:
Trace (default)
BFS traversal returning FlowStep objects with symbol name, module, depth, and call chain.
Source
Adds function source text to each FlowStep. Useful for full code-level tracing.
When --cross-module is enabled, the BFS also resolves imported symbols across package boundaries. See Cross-Module Resolution for the algorithm details.
Graph Formats
Text (default)
Mermaid
Paste directly into GitHub markdown or MkDocs:
JSON
JSON Output
Every command supports --json for machine-readable output. JSON output follows consistent conventions:
- Describe: Full module/function/class trees
- Graph: Adjacency list
{module: [dependencies]} - Context: Structured project metadata
- Impact: Callers, affected modules, tests, score
- Search/Callers: Symbol lists with location info