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 | Release Spotlight Action | Releases

GCA 0.9.0 Overview

Developer-owned, local-first Git memory engine and read-only anti-hallucination MCP server — never a manager surveillance dashboard or commit/LOC leaderboard. GCA separates verifiable Git repository facts (LANDED / RELEASED vs AUTHORED_ONLY / REVERTED) from optional LLM phrasing so your weekly updates, shareable Engineering Wrapped cards, Brag Documents, resumes, and open-source release notes stay 100% evidence-backed.

The 0.9.0 release adds shareable anti-vanity public artifacts on top of the zero-friction developer memory loop and MCP 2.0 stack:

  • 10-Second Zero-Friction Recaps (gca recap --open): Run in any Git repo with zero setup — auto-detects local git config user.email, auto-indexes .gca/, separates LANDED+RELEASED from AUTHORED_ONLY, and opens a zero-CDN interactive HTML report.
  • Anti-Vanity Engineering Wrapped (gca wrapped & gca portfolio wrapped): Generate shareable 1200×630 SVG cards (--theme dark|light), offline interactive HTML, and Markdown showing monthly delivery rhythm and engineering difficulty while explicitly excluding unmerged & reverted noise — with --privacy strict anonymization so private-repo engineers can share safely.
  • Turnkey Open-Source Release Spotlight (gca spotlight + action.yml): Drop-in GitHub Composite Action that auto-detects the latest two release tags, summarizes evidence-backed milestones (EV-xxx), and acknowledges contributors alphabetically with zero rankings.
  • Pure-Stdlib Read-Only MCP 2.0 & Claim Auditor (gca audit, gca serve --mcp, gca outcome, gca brag): Audit existing resume/weekly drafts line-by-line (gca audit --file resume.md --open), expose 8 workspace-sandboxed tools (including gca_audit_claims), 4 built-in prompts, 2 sanitized resources, and ready-to-install plugins for Claude Code (integrations/claude-plugin/), Cursor (integrations/cursor/), and Agent Skills (integrations/agent-skill/) — zero extra runtime dependencies, zero source diffs or emails leaked.

GCA Anti-Hallucination Claim Audit Demo

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

Why GCA vs. Asking an LLM Directly Over git log?

Capability Raw LLM over git log GCA (0.9.0)
Delivered vs. unmerged branches Often conflated Strictly separates LANDED+RELEASED vs AUTHORED_ONLY
Reverted commits & merge noise Counted as shipped work REVERTED isolated into rework; patch-ID deduplication
Multi-email & multi-repo merging Manual / double-counted Deterministic identity normalization & <repoKey>:EV-xxx
Fabricated metrics / claims Frequent hallucinations Claim ceilings (pure Git never unlocks LED) + signed outcomes.yml
Privacy & public sharing Sends raw diffs to cloud Local-first SQLite, zero-CDN HTML/SVG, --privacy strict anonymization

GCA Anti-Hallucination Pipeline

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

# Export a shareable, anti-vanity Engineering Wrapped card (public or strict private-repo mode)
gca wrapped --year 2026 --format svg --output wrapped.svg
gca wrapped --year 2026 --privacy strict --format svg --output wrapped-private.svg

# Audit an existing resume or weekly update draft line-by-line (catches unmerged/reverted/LED/unbacked metrics)
gca audit . --file resume.md --open

# Generate an unranked Open-Source Release Spotlight across your latest two tags
gca spotlight . --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

AI Coding Agent Plugins & MCP 2.0 Distribution

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.

Advanced CLI Reference (Indexing, Portfolio, Structural Observations, Team Assessment & Providers)

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.9.0

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.9.0
File Size Uploaded Provenance Actions
git_contribution_analyzer-0.9.0.tar.gz 733.6 kB Without provenance Details for git_contribution_analyzer-0.9.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.1 MB

Release files / git_contribution_analyzer-0.9.0.tar.gz

Download URL git_contribution_analyzer-0.9.0.tar.gz
Size 733.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0f65d780d50f8043e3a19cde8fd8334098d1f6a9f4c63f2db871a55555a78d42
BLAKE2b-256 checksum
How to use checksums
fdfed2801b7712f18b7295ee0002de60804a937915697805d7665305c9dcab27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","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.9.0-py3-none-any.whl

Download URL git_contribution_analyzer-0.9.0-py3-none-any.whl
Size 342.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b17777aa0ddf42dbb418328c5a6711aeac749745e0aece69dbd5a916eb0baf03
BLAKE2b-256 checksum
How to use checksums
a4f8631e05215530ec24f761fc1b1d3487c2786e177258fc311cd253f7c77686
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","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.9.0

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