Legacy flag CLI
Do not mix CLIs
Use either codegenome <subcommand> or python -m codegenome --flags. Mixing subcommands with legacy flags causes unrecognized arguments errors.
Invocation
python -m codegenome --help
Build & export
python -m codegenome --workspace . --build python -m codegenome --workspace . --build --full python -m codegenome --workspace . --build --export json html markdown graphml cypher obsidian
Watch & live graph
python -m codegenome --workspace . --build --watch --watch-debounce 10 python -m codegenome --workspace . --build --live-graph --live-graph-interval 60
MCP
python -m codegenome --workspace . --build --mcp --watch
Timeline queries
python -m codegenome --workspace . --dump-timeline python -m codegenome --workspace . --dump-timeline --node-id "file:src/main.py" python -m codegenome --workspace . --dump-changes --snapshot-from 1 --snapshot-to 3 python -m codegenome --workspace . --dump-churn --churn-limit 10
Flag reference
| Flag | Description |
|---|---|
--workspace PATH | Project root (default .) |
--build | Run graph build |
--full | Force full rebuild |
--watch | Debounced incremental rebuild |
--watch-debounce SECONDS | Default 30 |
--live-graph | Rebuild when file/line totals increase |
--live-graph-interval SECONDS | Default 30 |
--print-metrics | JSON file/line counts, exit |
--export FMT … | Export after build |
--db-path PATH | Custom timeline DB |
--mcp | HTTP MCP on 7331 after build |
--log-level LEVEL | DEBUG … ERROR |
--dump-timeline | Timeline JSON to stdout |
--dump-changes | Snapshot diff |
--dump-churn | Churn rankings |
--node-id ID | Filter timeline dump |
--snapshot-from/to ID | Change dump range |
--churn-file PATH | Filter churn |
--churn-limit N | Default 25 |
Requires at least one of: --build, --watch, --live-graph (unless query/metrics-only).