Installation

Requirements

Install from PyPI

pip install codegenome

Verify:

codegenome --help
python -c "import codegenome; print(codegenome.__version__)"

Virtual environment (recommended)

python -m venv .venv

# Windows PowerShell
.venv\Scripts\Activate.ps1
pip install codegenome

# macOS / Linux
source .venv/bin/activate
pip install codegenome

Editable install (development)

From the repository root:

python -m venv .venv
.venv\Scripts\Activate.ps1   # Windows
# source .venv/bin/activate  # macOS / Linux
pip install -e ".[dev]"

Run tests:

pytest

First graph build

Point Codegenome at the project you want to analyze (not necessarily the Codegenome repo itself):

cd /path/to/your-app
codegenome analyze .

Artifacts appear under .genome/. See Workspace artifacts.

Important

Commands like codegenome export and codegenome mcp-start require an existing graph. Always run codegenome analyze . first in that workspace.

Build tools for igraph

If python-igraph fails to install:

Next

Quick start · Cursor + MCP setup