Quick start

1. Install

pip install codegenome

2. Analyze your project

Change into any repository you want to map:

cd ~/projects/my-app
codegenome analyze .

Expected output includes node and edge counts. Data is written to .genome/.

3. Open the TUI

codegenome tui

The Textual dashboard lets you browse the graph, run builds, and manage workspace paths. See Terminal UI.

4. Export for sharing

codegenome export --format html --path .
codegenome export --format json --path .

Exports land in .genome/exports/.

5. (Optional) Live watch mode

Rebuild the graph as files change and broadcast the live graph over your local network:

codegenome evolve --live --lan .

See Watch & live graph.

6. (Optional) Connect an AI agent

  1. Ensure the graph exists (codegenome analyze .).
  2. Start MCP: codegenome mcp-start (stdio) or use the legacy HTTP server — MCP server.
  3. Install client config: python -m codegenome.installer --db-path "$(pwd)/.genome/watcher.db" --client cursor
  4. Generate rules: codegenome rules --client cursor .

Full walkthrough: Cursor + MCP setup.

Cheat sheet

GoalCommand
Build graphcodegenome analyze .
Interactive UIcodegenome tui
Export HTMLcodegenome export --format html --path .
Live watch + UIcodegenome evolve --live --lan .
Agent rulescodegenome rules --client all .
MCP (stdio)codegenome mcp-start