Step 1: Install
pip install roam-code
pip install "roam-code[mcp]" # optional MCP support
Requires Python 3.9+. Also works with pipx install roam-code and uv tool install roam-code.
Tutorial
Zero to a working structural index in 10 minutes, then through the daily workflows: impact analysis, safety checks, and agent integration.
pip install roam-code
pip install "roam-code[mcp]" # optional MCP support
Requires Python 3.9+. Also works with pipx install roam-code and uv tool install roam-code.
cd /path/to/repo
roam init
Creates .roam/index.db, fitness rules, and a CI workflow.
roam context UserService
roam impact UserService
roam retrieve "where does login validate sessions"
Get ranked reading order and blast radius before changing code. roam retrieve returns budget-bounded spans ranked by personalised PageRank, clone signal, and lexical match.
roam preflight UserService
roam health
Checks complexity, coupling, test impact, and architecture risk.
git diff | roam critique
# clones-not-edited check + blast-radius caller count
# Exit 5 on high-severity findings — gate-able in CI.
For the killer clones-not-edited check, run roam clones --persist once to populate the clone tables.
roam fleet plan "split the auth refactor across 4 agents" \
--n-agents 4 --adapter composio \
--output .roam-fleet.json
Graph-aware partition (Louvain + co-change + PageRank anchors) emits a .roam-fleet.json envelope consumable by Composio Agent Orchestrator, GitHub Copilot CLI /fleet, or any raw fleet runtime.
roam taint
roam cga emit --include-taint --sign --key cosign.key
roam cga verify .roam/attestations/<sha>.intoto.json
Emits an in-toto v1 statement with the roam-code.dev/CodeGraph/v1 predicate type — Merkle root over symbol fingerprints, edge bundle digest, and (with --include-taint) OpenVEX-shaped reachability claims. Cosign signing optional; skips gracefully when the binary is missing.
roam ask "is it safe to delete UserSession"
roam ask "where does login validate sessions"
roam ask --list
roam ask classifies a free-form question and dispatches the right composition of preflight/retrieve/critique/fleet/understand. No need to memorise the 202-command surface.
roam understand
roam search auth
roam symbol src/auth/service.py
roam impact auth_login
roam preflight auth_login
roam test-gaps --changed
pytest fixtures depend on each other through their parameter names. The relationship is invisible to call-graph analysis, so renaming a low-level fixture can break tests several files away with no edge to follow. roam pytest-fixtures materialises the chain.
roam pytest-fixtures # project summary
roam pytest-fixtures user # what depends on `user`
roam pytest-fixtures --unused # orphaned fixtures
roam impact db # blast radius traverses fixture edges
roam check-rules
roam rules --rules-dir rules/community
roam health --gate
roam mcp-setup claude-code
roam mcp --list-tools
ROAM_MCP_PRESET=core roam mcp
Minimal gate pipeline:
roam init
roam check-rules --severity error
roam --sarif health --gate
roam --json test-gaps --changed
Use --sarif output for Code Scanning annotations and --json envelopes for stable machine parsing.
| Symptom | Command | Expected fix |
|---|---|---|
| Command says index missing | roam init |
Creates/refreshes .roam/index.db |
| Environment diagnostics unclear | roam doctor |
Shows PASS/FAIL checks with remediation hints |
| MCP client cannot see tools | roam mcp --list-tools |
Verifies server + current preset/tool exposure |
| Rule results too noisy | roam check-rules --profile ai-code-review |
Applies tuned thresholds and severities |