Skip to main content

Git Contribution Analyzer

PyPI version Python versions CI License: Apache-2.0

简体中文 | Live Interactive HTML Demo | Installation | MCP 2.0 Guide | Releases

GCA 0.8.0 Overview

GCA is a local, evidence-backed Git contribution analysis tool with a zero-friction gca CLI, a zero-extra-dependency read-only MCP 2.0 Server (tools, prompts & resources), a local Brag Document & Verified Outcomes ledger, self-contained interactive HTML reports, and an optional cross-platform gca-gui desktop application. It separates deterministic repository facts from rule-based and LLM-assisted interpretation.

The 0.8.0 release completes the daily-to-annual developer memory loop and AI agent ecosystem:

  • 10-Second Zero-Friction Recaps (gca recap --open): Run directly inside any Git repo with zero setup — GCA auto-detects local git config user.email, auto-initializes or incrementally syncs .gca/, defaults to a 7-day window (today, yesterday, 7d, 14d, 30d, week, month, quarter), separates LANDED+RELEASED from AUTHORED_ONLY, and opens an offline interactive HTML report in your browser.
  • Brag Document & Verified Outcomes Ledger (gca outcome & gca brag): Record verified business/performance metrics linked to real EV-xxx / <repoKey>:EV-xxx evidence IDs (with offline existence verification), auto-load them during gca resume, and export quarterly or annual Brag Documents (--year 2026, --quarter 2026-Q3, --format html --open).
  • Read-Only Stdlib MCP 2.0 Server (gca serve --mcp + gca install-agent): Expose 7 privacy-safe tools (now supporting both single repositories and multi-repo portfolios with auto-inferred local identity), 4 built-in MCP Prompts (standup-recap, weekly-report, brag-doc, audit-resume-claims), and 2 read-only MCP Resources to Antigravity, Claude Code, OpenAI Codex, and Cursor with zero extra third-party runtime dependencies.
  • Self-Contained Interactive HTML & Aligned Desktop GUI (--format html & gca-gui): Zero-CDN single-file HTML exports with light/dark theme toggle, SVG charts, search/group filters, clickable evidence drawer, and PDF print styles — now fully aligned inside the gca-gui desktop workbench (Recap & Brag page, Outcomes ledger, and HTML export).

Live Demo Gallery | MCP 2.0 Guide | Open-Source Spotlight Action | Contributing | Security | Code of Conduct

GCA Anti-Hallucination Pipeline

Why GCA vs. Raw LLM Prompts?

Capability Raw LLM over git log GCA (0.8.0)
Delivered vs. unmerged branches Often conflated Strictly separates LANDED+RELEASED vs AUTHORED_ONLY
Multi-email & multi-repo merging Manual / double-counted Deterministic identity normalization & <repoKey>:EV-xxx
Fabricated metrics / claims Frequent hallucinations Claim-strength ceilings + signed outcomes.yml + gca_verify_citations
Privacy & offline sharing Sends raw diffs to cloud Local-first SQLite, zero-CDN HTML, no source diffs or emails

10-Second Quick Start

Works out of the box on macOS, Linux, and Windows (output language auto-detects your system locale; pass --language en-US or --language zh-CN to override):

# Run ephemerally in ANY local Git repo (auto-detects git user.email, auto-indexes .gca, opens HTML)
uvx --from git-contribution-analyzer gca recap --open

# Or install globally with pipx
pipx install git-contribution-analyzer
gca recap --window today
gca recap --window 7d --open

# Record a verified metric linked to Git evidence and export an annual Brag Document
gca outcome add --text "Cut checkout P95 latency from 420ms to 180ms" --source "benchmark-2026.md" --verified-by "tech-lead" --evidence EV-001
gca brag --year 2026 --open

# Preview or install read-only MCP 2.0 config for Antigravity / Codex / Claude / Cursor
gca install-agent --target antigravity --workspace .
gca install-agent --target antigravity --workspace . --apply

# Build the sanitized offline HTML & Markdown Live Demo Gallery locally
python scripts/build_public_demo.py --output dist/public-demo

Development

python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"
.\.venv\Scripts\gca.exe --help

Install and run the optional desktop application:

.\.venv\Scripts\python.exe -m pip install -e ".[dev,gui]"
.\.venv\Scripts\gca-gui.exe

For repository-local symbol search, impact analysis, and architecture visualization, see the CodeGraph and Understand-Anything guide.

Current CLI

# Initialize a repository-local workspace and build the first Git index.
gca init D:\path\to\repository

# Rebuild the deterministic Git index or synchronize new commits and changed refs.
gca index D:\path\to\repository --json
gca sync D:\path\to\repository --json

# Inspect normalized identities and confirm an alias mapping.
gca identities list D:\path\to\repository --json
gca identities map D:\path\to\repository `
  --name "Old Name" `
  --email "old@example.com" `
  --person-name "Canonical Name" `
  --person-email "canonical@example.com" `
  --json

# Read workspace and index health as versioned JSON.
gca status D:\path\to\repository --json
gca doctor D:\path\to\repository --json

# Build and inspect an observation-only historical structural baseline.
gca structural rebuild D:\path\to\repository `
  --cutoff 2026-07-01T00:00:00Z `
  --time-strategy lifetime --json
gca structural status D:\path\to\repository --json
gca structural show D:\path\to\repository --baseline <baseline-id> --json
gca structural prune D:\path\to\repository --keep 8 --yes --json

# Generate deterministic contribution evidence without an LLM.
gca analyze D:\path\to\repository `
  --person alice@example.com `
  --since 2026-01-01 `
  --until 2026-06-30 `
  --no-llm `
  --json

# Analyze every indexed Git identity, including identities not yet confirmed.
gca analyze D:\path\to\repository --all --no-llm --json

# Assess completed workload and deterministic engineering difficulty.
gca assess D:\path\to\repository `
  --person alice@example.com `
  --person bob@example.com `
  --since 2026-01-01 `
  --no-llm `
  --json
gca assess D:\path\to\repository --all `
  --exclude-person ci@example.com `
  --no-llm --json

# Build calendar month trends; week and quarter are also supported.
gca assess D:\path\to\repository --all `
  --since 2025-01-01 --until 2026-12-31 `
  --period month --time-basis landed --no-llm --json

# Compare two historical work assessment runs.
gca runs compare <base-run-id> <target-run-id> D:\path\to\repository --json

# Generate evidence-backed resume candidates for one confirmed person.
gca resume D:\path\to\repository `
  --person alice@example.com `
  --target-role "Senior Backend Engineer" `
  --language en-US `
  --style concise `
  --max-bullets 6 `
  --no-llm `
  --json

# Inspect the built-in providers and test the selected provider.
gca providers list D:\path\to\repository --json
gca providers test D:\path\to\repository --json

# Inspect and replay persisted analysis runs.
gca runs list D:\path\to\repository --json
gca runs show <run-id> D:\path\to\repository --json

# Rebuild reports from a persisted run.
gca report D:\path\to\repository --run latest --format markdown
gca report D:\path\to\repository --run latest --format json --output report.json

# Remove only the repository-local .gca workspace.
gca uninit D:\path\to\repository --yes

# Manage and analyze a multi-repository portfolio.
gca portfolio init D:\path\to\portfolio --scan-root D:\path\to\repos --group core --json
gca portfolio status D:\path\to\portfolio --json
gca portfolio sync D:\path\to\portfolio --concurrency 4 --verbose --json
gca portfolio assess D:\path\to\portfolio --person alice@example.com --no-llm --format html --output summary.html --json
gca portfolio resume D:\path\to\portfolio --person alice@example.com --target-role "Backend Engineer" --no-llm --format html --output resume.html --json
gca portfolio recap D:\path\to\portfolio --person alice@example.com --window 7d --format html --output recap.html --json
gca portfolio verify D:\path\to\portfolio --run latest --resume-file resume.md --json

# Serve read-only MCP tools over stdio (workspace allowlist required).
gca serve --mcp --workspace D:\path\to\portfolio

Phase 2 indexes refs, commits, parent relationships, file changes, identities, stable patch IDs, target-branch reachability, release tags, cherry-picks, and reverts. The index is stored under the analyzed repository's .gca/ directory and is ignored locally through .git/info/exclude; GCA does not modify source files or Git history.

Git facts and the deterministic contribution analysis do not depend on an LLM. Analysis runs persist their parameters, Git baseline, rule version, Contribution Items, capability assessments, Evidence, and versioned report JSON. Phase 4 adds pluggable Mock, OpenAI-compatible, Anthropic, Ollama, Codex CLI, and Claude CLI providers for semantic summaries, capability explanations, and resume candidates. Providers cannot replace or modify deterministic facts.

LLM Providers

LLM use is disabled by default. Enable it in the analyzed repository's .gca/config.yml:

llm:
  enabled: true
  provider: openai-compatible
  model: gpt-4.1-mini
  baseUrl: https://api.openai.com/v1
  apiKeyEnv: GCA_LLM_API_KEY
  timeoutSeconds: 30.0
  maxRetries: 2
  allowFallbackToRules: true

Set the referenced environment variable outside the repository. Never put the key value in .gca/config.yml. CLI flags are intentionally not provided for key values.

gca analyze --no-llm is always offline and deterministic. With LLM enabled, every invocation records a request hash, Provider/model, Prompt/Schema versions, attempts, latency, status, error code, and cache-hit state. Prompts, API keys, Authorization headers, and source bodies are not stored. Provider failures produce a PARTIAL deterministic report when fallback is allowed; otherwise analyze exits with code 6 and persists a failed run.

The same Provider configuration is used by assess and resume. Work assessment uses the independent assessment-explanation-v1 task; resume generation uses resume-v1. Provider output cannot alter completion, size, difficulty, Evidence, or the deterministic claim-strength ceiling. With fallback enabled, assessment retains its deterministic result and resume retains its conservative template.

To reuse an authenticated coding CLI instead of an API key:

llm:
  enabled: true
  provider: codex-cli # or claude-cli
  model: configured-default
  executable: null # auto-discover, or set an absolute wrapper/executable path
  commandTimeoutSeconds: 300
  allowFallbackToRules: true

Command Providers run in an isolated temporary directory. Repository source is not made available to the agent: GCA passes only its minimized semantic task over stdin. Codex runs ephemerally with a read-only sandbox and MCP disabled; Claude runs without tools, MCP, Chrome, or session persistence. Existing CLI authentication and model-provider configuration are reused.

See doc/guides/provider-guide.md for all providers and environment precedence.

Index Semantics

  • AUTHORED_ONLY: the commit is indexed but is not reachable from the configured target branch.
  • LANDED: the commit is reachable from the target branch.
  • RELEASED: the commit is reachable from the target branch and at least one release tag.
  • REVERTED: a landed or released commit is linked to a landed revert commit.
  • Matching stable patch IDs link an authored-only cherry-pick source to delivered work without counting it as a second delivery.

Exact email and .mailmap mappings are deterministic. Fuzzy name matches are never merged automatically; use gca identities map to confirm ambiguous aliases.

Deterministic Analysis

gca analyze accepts either one confirmed Person through --person or every indexed Git identity through --all --no-llm. Project analysis deliberately keeps unconfirmed identities separate and emits identity warnings instead of silently merging or excluding them. Both modes support inclusive date/time, branch, release tag, path scope, and delivery-status filters.

Person and project reports contain separate technical and business summaries. Technical summaries cover modules, change types, and evidence-backed capability signals. Business domains are deterministically inferred from conventional commit scopes, issue keys, and module fallback clusters. They are labels for work areas, not claims about revenue, customer value, business ownership, or individual performance.

Analysis reports also expose versioned structural signals derived from commit-level path sets. Pairs require at least two repeated co-change commits; hotspots require at least two change commits and are ordered by change concentration plus repeated coupling. Merge commits, generated paths, binary-only changes, and duplicate patches are excluded. Structural signals are auditable repository observations and do not alter workload, difficulty, ranking, or performance conclusions.

Every Contribution Item and capability claim references an Evidence ID. Reports explicitly state that Git evidence does not prove business outcome, sole ownership, or employee value. Optional ranking uses published workload, difficulty, and delivery rules; commit and raw line counts do not directly determine the score.

Shared or system accounts require manual review. If one email is used by both a person and an automation identity, do not use the combined Person for individual performance conclusions.

Historical Structural Observations

gca structural rebuild materializes file-change frequencies and repeated file co-change relationships from local indexed Git history strictly before an exclusive cutoff. Baseline IDs include repository, branch, scope, cutoff and versioned rule configuration. Nonzero occurrences are retained so a low-frequency edge can cross a candidate threshold after later syncs. Lifetime, rolling-window and dual-window views are supported; coupling output includes conditional ratios, Jaccard and a hub penalty rather than treating every shared utility file as a dependency.

This surface is observation-only. It does not modify difficulty-rules-v1, workload, delivery, ranking, resume output or LLM context. New workspaces use the conservative community-baseline-v1 profile from .gca/config.yml; its automatic difficulty promotion switch is fixed to false. The profile is ready for observation-only use without project-specific human review. Empirical calibration and a repository-disjoint holdout are required only for a future rule that automatically changes individual difficulty. The feature uses local Git and SQLite only, with no Forge API or Hercules runtime dependency. The desktop Structure page exposes the same status, rebuild, show and prune operations.

structural:
  profile: community-baseline-v1
  timeStrategy: DUAL_WINDOW
  minimumBaselineCommits: 50
  hotspotPercentile: 0.95
  minimumCoChangeCount: 3
  minimumSubsetRatio: 0.8
  minimumJaccard: 0.3
  minimumHubPenalty: 0.5
  maximumContextPaths: 100
  rollingWindowDays: 365
  automaticDifficultyPromotion: false

Work Assessment

gca assess separates completed (LANDED/RELEASED), pending (AUTHORED_ONLY), rework, and merge/integration activity. It reports SMALL, MEDIUM, LARGE, and XLARGE effective-change bands separately from ROUTINE, STANDARD, COMPLEX, and HIGH_RISK engineering difficulty. Merge diffs, matching patch IDs, generated/vendor/build output, lockfiles, and binary line counts do not create duplicate workload. Difficulty is based on versioned data, distributed-system, compatibility, impact, critical-domain, and delivery signals; raw line count cannot raise it.

--time-basis accepts authored, committed, merged, landed, and released. Landed time is the target branch first-parent integration point, merged time includes only work introduced by a merge commit, and released time is the tag creation time. --period week|month|quarter requires both boundaries and emits persisted trends, period-over-period deltas, and year-over-year deltas when the matching prior-year period is in range. Weeks start on Monday and partial boundary periods are marked. Offset-free --since and --until values use the host system time zone; explicit Z or numeric offsets remain authoritative, and calendar periods follow that local calendar. The Git index and SQLite query bindings remain normalized to UTC. Run gca index once after upgrading so old timestamps are rebuilt in UTC.

Assessment reports include technical and business summaries, Evidence IDs, rule versions, confidence, and gaps. Repeatable --rank-by enables dense dimension rankings. An explicit --ranking-config YAML can add a cohort-normalized weighted total; without it no total score is generated. These values are review aids, not performance ratings, working-hours estimates, compensation, or promotion recommendations. Persisted v2 runs can be exported with gca report --format csv; email is omitted unless --include-email is supplied.

Resume Generation

gca resume only accepts a confirmed Person and defaults to landed/released work. Every project summary and experience bullet references Contribution Item and Evidence IDs. Claim strength is limited to CONTRIBUTED, IMPLEMENTED, or LED; Git-only evidence never unlocks LED.

--no-llm generates a conservative template. Optional verified outcomes are loaded from a strict UTF-8 YAML file:

outcomes:
  - id: OUT-001
    text: API P95 latency reduced from 420ms to 180ms
    source: benchmark-report-2026-04.md
    verifiedBy: team-lead
    verifiedAt: 2026-04-20

Percentages, revenue, user growth, online performance, and similar result numbers are rejected unless the claim cites a verified outcome. Resume reports omit email addresses, other people, team rankings, and internal difficulty comparisons. The legacy semantic.resumeBullets field remains readable during 1.x but is deprecated; new integrations should use gca resume.

Quality Checks

.\.venv\Scripts\python.exe -m ruff check .
.\.venv\Scripts\python.exe -m mypy src
.\.venv\Scripts\python.exe -m pytest --cov=git_contribution_analyzer
.\.venv\Scripts\python.exe -m build

Documentation

Release CI builds wheel/sdist, CLI standalone and GUI standalone artifacts on Windows, Linux and macOS. The ordinary CI matrix also performs isolated wheel and repository lifecycle smoke tests.

Metadata

Release files for git-contribution-analyzer 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git-contribution-analyzer 0.8.1
File Size Uploaded Provenance Actions
git_contribution_analyzer-0.8.1.tar.gz 669.2 kB Without provenance Details for git_contribution_analyzer-0.8.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for git-contribution-analyzer 0.8.1
File Interpreter ABI Platform Actions
git_contribution_analyzer-0.8.1-py3-none-any.whl Python 3 none any Details for git_contribution_analyzer-0.8.1-py3-none-any.whl

Total release size: 967.2 kB

Release files / git_contribution_analyzer-0.8.1.tar.gz

Download URL git_contribution_analyzer-0.8.1.tar.gz
Size 669.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b58b5a7fe073c688e722353283cd3278b4ee7a5ba3d828a6726b997b8686eb64
BLAKE2b-256 checksum
How to use checksums
c6a5629a4a291ea19bef80d6962fd2bbf04acf2a643fbbac90cc59c2fe259c40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.11 {"installer":{"name":"uv","version":"0.13.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / git_contribution_analyzer-0.8.1-py3-none-any.whl

Download URL git_contribution_analyzer-0.8.1-py3-none-any.whl
Size 297.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
29da1ee922cc5ceeb911d3cda061e0b55970192f5c1be5a0e433fba9d28ae162
BLAKE2b-256 checksum
How to use checksums
3c08e30972c7c99d73ecb9488c345c73717cce2ae4c9d5ad72159a73199ca068
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.11 {"installer":{"name":"uv","version":"0.13.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for git-contribution-analyzer 0.8.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page