Cli
cli
AXM-AST CLI entry point โ AST introspection for AI agents.
Usage::
axm-ast describe src/mylib
axm-ast describe src/mylib --detail detailed --json
axm-ast inspect src/mylib --symbol MyClass
axm-ast inspect src/mylib --symbol MyClass --source --json
axm-ast graph src/mylib --format mermaid
axm-ast search src/mylib --returns str
axm-ast version
callees(path='.', *, symbol, json_output=False)
Find all functions/methods called by a given symbol.
Source code in packages/axm-ast/src/axm_ast/cli.py
callers(path='.', *, symbol, json_output=False)
Find all call-sites of a given symbol across a package.
Source code in packages/axm-ast/src/axm_ast/cli.py
context(path='.', *, json_output=False, depth=None, slim=False)
Dump complete project context in one shot for AI agents.
Source code in packages/axm-ast/src/axm_ast/cli.py
dead_code(path='.', *, json_output=False, include_tests=False)
Detect dead (unreferenced) code in a Python package.
Source code in packages/axm-ast/src/axm_ast/cli.py
describe(path='.', *, detail='detailed', json_output=False, budget=None, rank=False, compress=False, modules=None)
Describe a Python package at the chosen detail level.
Source code in packages/axm-ast/src/axm_ast/cli.py
diff_cmd(refs, path='.', *, json_output=False)
Structural diff between two branches at symbol level.
Source code in packages/axm-ast/src/axm_ast/cli.py
docs(path='.', *, detail='full', pages_filter=None, json_output=False, tree_only=False)
Dump project documentation tree and content in one shot.
Source code in packages/axm-ast/src/axm_ast/cli.py
flows(path='.', *, trace=None, max_depth=5, cross_module=False, detail='trace', no_exclude_stdlib=False, json_output=False)
Detect entry points and trace execution flows.
Source code in packages/axm-ast/src/axm_ast/cli.py
820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 | |
graph(path='.', *, fmt='text', json_output=False)
Display the internal import/dependency graph.
Source code in packages/axm-ast/src/axm_ast/cli.py
impact(path='.', *, symbol, json_output=False, exclude_tests=False)
Analyze the impact of changing a symbol.
Source code in packages/axm-ast/src/axm_ast/cli.py
inspect(path='.', *, symbol=None, source=False, json_output=False)
Inspect a symbol by name across a package.
Operates on packages (not individual files). Supports dotted paths
like ClassName.method or module.symbol. Returns file path,
line numbers, and optionally source code โ matching MCP ast_inspect.
Source code in packages/axm-ast/src/axm_ast/cli.py
main()
search(path='.', *, name=None, returns=None, kind=None, inherits=None, json_output=False)
Search for symbols across a package with filters.