-
Install:
pip install -e . -
Configure (copy
env.exampleto.env):GH_TOKENorGITHUB_TOKEN– required for private repos and labelingOPENAI_API_KEY– for--provider openaiANTHROPIC_API_KEY– for--provider anthropic
-
Verify:
complexity-cli verify-settings
# Fetch and analyze last 14 days
complexity-cli batch-analyze --all-repos --days 14 -o complexity-report.csv --provider anthropiccomplexity-cli export-labels --org myorg --since 2024-01-01 --until 2024-12-31 -o complexity-report.csvIf you have an old complexity-report.csv with only pr_url, complexity, author:
complexity-cli migrate-csvAfter the first run, subsequent batch-analyze or export-labels only fetches new PRs (merged after the latest in CSV):
# Fetches only PRs merged after your latest CSV row
complexity-cli batch-analyze --all-repos --days 7 -o complexity-report.csvTo force a full re-fetch:
complexity-cli batch-analyze --all-repos --days 90 -o complexity-report.csv --overwritecomplexity-cli generate-reports -i complexity-report.csv -o reportsOutput: 17 PNG files in reports/ (e.g. 01-complexity-volume-over-time.png).
Copy teams.yaml.example to teams.yaml and map repos to teams:
owner/repo: "Platform"
other-org/backend: "Backend"Reports that group by team will use these mappings.