Complete reference for all 10 Homer commands.
All commands accept:
| Flag | Description |
|---|---|
-v, -vv, -vvv |
Increase verbosity (info, debug, trace) |
-q |
Quiet mode (errors only) |
--help |
Show help |
--version |
Show version |
You can also set RUST_LOG for fine-grained control: RUST_LOG=homer_core=debug homer update.
First-time full analysis of a repository.
homer init [OPTIONS] [PATH]
| Argument | Default | Description |
|---|---|---|
PATH |
. |
Path to git repository |
| Flag | Type | Default | Description |
|---|---|---|---|
--depth |
string | standard |
Analysis depth: shallow, standard, deep, full |
--languages |
string | — | Comma-separated language list (e.g., rust,python) |
--no-github |
flag | — | Skip GitHub API extraction |
--no-llm |
flag | — | Skip LLM-powered analysis |
--db-path |
path | — | Custom database location |
--config |
path | .homer/config.toml |
Config file path |
# Initialize with defaults
homer init
# Fast analysis of a large repo
homer init --depth shallow /path/to/monorepo
# Only Rust and Python, no GitHub
homer init --languages rust,python --no-github
# Custom database location
homer init --db-path /shared/homer-data/project.db- Fails if
.homer/already exists — usehomer updateto refresh an existing database - Creates
.homer/config.tomland.homer/homer.db - Database path priority:
--db-path>HOMER_DB_PATHenv >.homer/homer.db - Exit code 0 on success; non-zero on failure
Incremental update after new commits.
homer update [OPTIONS] [PATH]
| Argument | Default | Description |
|---|---|---|
PATH |
. |
Path to git repository |
| Flag | Type | Default | Description |
|---|---|---|---|
--force |
flag | — | Full re-extraction (clears all checkpoints) |
--force-analysis |
flag | — | Recompute all analysis, keep extraction |
--force-semantic |
flag | — | Refresh only LLM-derived semantic analyses |
# Incremental update (only new commits)
homer update
# Full re-extraction from scratch
homer update --force
# Keep extracted data, recompute all metrics
homer update --force-analysis
# Only refresh LLM summaries (after model upgrade, for example)
homer update --force-semantic- The git extractor processes only commits since the last checkpoint
- Structure/document/prompt extractors skip when checkpoints match git HEAD
- Graph extractor processes files changed since
graph_last_sha --force-semanticclears SemanticSummary, DesignRationale, and InvariantDescription results- Exits with code 10 if pipeline completed with non-fatal errors
Show database stats, checkpoints, and artifact status.
homer status [PATH]
| Argument | Default | Description |
|---|---|---|
PATH |
. |
Path to git repository |
homer statusDisplays:
- Database path and size (formatted as B/KB/MB)
- Node counts by kind (sorted descending)
- Edge counts by kind (sorted descending)
- Total analysis results
- Checkpoints (
git_last_sha,graph_last_sha— first 12 chars) - Pending commits since last checkpoint
- Whether
AGENTS.mdexists and its file size
Query metrics for a file, function, or module.
homer query [OPTIONS] <ENTITY>
| Argument | Description |
|---|---|
ENTITY |
File path, function name, or qualified name to query |
| Flag | Type | Default | Description |
|---|---|---|---|
--path |
path | . |
Path to git repository |
--format |
string | text |
Output format: text, json, markdown (or md) |
--include |
string | all |
Comma-separated sections: summary, metrics, callers, callees, history, all |
--depth |
integer | 1 |
Graph traversal depth for callers/callees (BFS) |
# Query a file
homer query src/store/sqlite.rs
# Query a function with call graph depth 2
homer query "validate_token" --depth 2
# JSON output with specific sections
homer query src/main.rs --format json --include metrics,callers
# Markdown output for documentation
homer query src/auth/ --format markdown- Composite salience (score and classification)
- PageRank (score and rank)
- HITS (hub and authority scores)
- Change frequency (total, 30/90/365-day windows)
- Contributor concentration (bus factor)
- Stability classification
- Community assignment
- Callers and callees (with BFS at
--depth) - Recent modification history (up to 20 commits)
Explore graph analysis: rankings, communities, and visualizations.
homer graph [OPTIONS]
| Flag | Type | Default | Description |
|---|---|---|---|
--path |
path | . |
Path to git repository |
--type |
string | call |
Graph type: call, import, combined |
--metric |
string | salience |
Metric: pagerank, betweenness, hits, salience |
--top |
integer | 20 |
Number of top entities to show |
--list-communities |
flag | — | List all detected communities |
--community |
integer | — | Show members of a specific community ID |
--format |
string | text |
Output format: text, json, dot, mermaid |
# Top 20 files by composite salience
homer graph
# Top 10 by PageRank
homer graph --metric pagerank --top 10
# Bridge nodes (betweenness centrality)
homer graph --metric betweenness --top 10
# Export as Graphviz DOT
homer graph --metric salience --format dot > salience.dot
dot -Tsvg salience.dot -o salience.svg
# Export as Mermaid diagram
homer graph --metric pagerank --format mermaid
# List all communities
homer graph --list-communities
# View members of community 3
homer graph --community 3--communitytakes precedence over--list-communities, which takes precedence over metric ranking- Long entity names (>50 chars) are truncated in text output
dotformat produces a Graphviz digraph;mermaidproduces agraph LR
Compare architectural state between two git refs.
homer diff [OPTIONS] <REF1> <REF2>
| Argument | Description |
|---|---|
REF1 |
Start reference (tag, branch, or SHA) |
REF2 |
End reference (tag, branch, SHA, or HEAD) |
| Flag | Type | Default | Description |
|---|---|---|---|
--path |
path | . |
Path to git repository |
--format |
string | text |
Output format: text, json, markdown |
--include |
string | all | Comma-separated sections: topology, centrality, communities, coupling |
# What changed architecturally in the last 10 commits?
homer diff HEAD~10 HEAD
# Compare two releases
homer diff v1.0 v2.0
# Markdown output for PR descriptions
homer diff main feature-branch --format markdown
# Only topology and centrality
homer diff v1.0 v2.0 --include topology,centrality- topology — File counts (added/modified/deleted/renamed), changed file list
- centrality — High-salience files touched (salience > 0.3)
- coupling — Low bus factor files (bus_factor <= 1), affected modules
- communities — Community labels affected by the changes
Run specific renderers to regenerate artifacts.
homer render [OPTIONS] [PATH]
| Argument | Default | Description |
|---|---|---|
PATH |
. |
Path to git repository |
| Flag | Type | Default | Description |
|---|---|---|---|
--format |
string | — | Comma-separated renderer names to run |
--all |
flag | — | Run all 6 renderers |
--exclude |
string | — | Comma-separated renderers to exclude (used with --all) |
--output-dir |
path | repo root | Output directory for artifacts |
--dry-run |
flag | — | Show what would be generated without writing |
--diff |
flag | — | Show diff between existing artifacts and new output |
--merge / --no-merge |
bool | true |
Merge with <!-- homer:preserve --> blocks (default: merge) |
agents-md, module-ctx, risk-map, skills, topos-spec, report
# Re-render just AGENTS.md
homer render --format agents-md
# Render all artifacts
homer render --all
# All except module context
homer render --all --exclude module-ctx
# Preview what would change
homer render --all --dry-run
# Show diff against existing files
homer render --format agents-md --diff
# Overwrite everything (ignore preserve markers)
homer render --all --no-merge- Renderer priority:
--all>--format> configrenderers.enabled --mergeis enabled by default —<!-- homer:preserve -->blocks in existing files are kept--diffshows the merge result compared to the existing file
Create, list, or delete graph snapshots.
homer snapshot [PATH] <COMMAND>
| Argument | Default | Description |
|---|---|---|
PATH |
. |
Path to git repository |
Create a named snapshot of the current graph state.
homer snapshot create v1.0-baseline
homer snapshot create pre-refactorList all snapshots with their ID, label, creation time, and node/edge counts.
homer snapshot listOutput columns: ID, LABEL, CREATED, NODES, EDGES
Delete a snapshot by label.
homer snapshot delete pre-refactor- Auto snapshots are created by the pipeline based on
[graph.snapshots]config - Manual snapshots created here are in addition to auto snapshots
- Snapshots enable
homer diffcomparisons and temporal analysis
CI gate: fail if any file exceeds a risk threshold.
homer risk-check [OPTIONS] [PATH]
| Argument | Default | Description |
|---|---|---|
PATH |
. |
Path to git repository |
| Flag | Type | Default | Description |
|---|---|---|---|
--threshold |
float | 0.7 |
Risk score threshold (0.0–1.0); fail if any file exceeds this |
--filter |
string | — | Only check files whose name contains this pattern |
--format |
string | text |
Output format: text or json |
The risk score (0.0–1.0, capped) combines:
- Salience × 0.4
- Bus factor: +0.30 if ≤ 1, +0.15 if ≤ 2
- Change frequency: +0.30 if > 20 changes, +0.20 if > 10, +0.10 if > 5
# Default threshold (0.7)
homer risk-check
# Stricter threshold
homer risk-check --threshold 0.5
# Only check auth files
homer risk-check --filter src/auth/
# JSON output for CI parsing
homer risk-check --format json --threshold 0.6- 0 — All files below threshold
- Non-zero — One or more files exceed threshold (designed for CI gating)
Start the MCP server for AI agent integration.
homer serve [OPTIONS]
| Flag | Type | Default | Description |
|---|---|---|---|
--path |
path | . |
Path to git repository |
--transport |
string | from config | Transport type (stdio only) |
# Start on stdio (for MCP client integration)
homer serve
# Specify the repo path
homer serve --path /path/to/project- Only
stdiotransport is supported - Falls back to
[mcp]config section, then defaults tostdio - See MCP Integration for setup guides
- Getting Started — First run walkthrough
- Configuration — Full config reference
- MCP Integration — AI tool integration
- Cookbook — Common workflow recipes