Skip to content

About

Who writes your commits: you, your AI agents, or your automation. Stats + SVG charts from GitHub or local git. Stdlib only.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

commit-pulse

Who writes your commits: you, your AI agents, or your automation?

commit-pulse collects every commit from a GitHub user or org (private repositories included) or from local git repositories. It sorts each commit with rules you write, then prints a summary and draws charts like these:

Commits per week, stacked by me, agents and automation

Every day as a GitHub-style heatmap

Commits by hour of day

Git graph of one agent change

These charts come from a real account: about 3 commits a week for most of 2026, then up to 358 a week once a team of AI agents started shipping. The story behind them is From 3 commits a week to 97 in a day.

  • No dependencies: Python 3.10+ standard library, plus the GitHub CLI or a GITHUB_TOKEN.
  • Private by default: repository names are hashed in the output, and author names, emails and messages are only used for classification, then dropped. The charts never show a repository name.
  • Works without GitHub: point it at local repositories (GitLab, Bitbucket, self-hosted, anything git).
  • Made for humans and for AI agents: see AGENTS.md. To do the same analysis by hand with git log, see docs/BY-HAND.md.

Quick start

git clone https://github.com/vaibhava17/commit-pulse && cd commit-pulse
cp examples/pulse.example.json pulse.json      # set owner, since, timezone and your rules

# 1. collect: GitHub (uses `gh auth login`, or GITHUB_TOKEN) ...
python3 -m commit_pulse collect --config pulse.json -o commits.json
#    ... or local repositories, any host
python3 -m commit_pulse collect --config pulse.json --local ~/code/repo-a ~/code/repo-b -o commits.json

# 2. summary (Markdown, or --json); --split compares before/after a date
python3 -m commit_pulse stats commits.json --split 2026-09-28

# 3. charts (SVG)
python3 -m commit_pulse charts commits.json -o charts --split 2026-09-28 --split-text "agents start →" \
    --hours-since 2026-10-01 --hour-notes '{"3": "nightly backup"}'

# 4. optional: a git-graph diagram of your workflow from a small JSON spec
python3 -m commit_pulse graph examples/agent-change.graph.json -o charts/git-graph.svg

Or install it: pip install . gives you a commit-pulse command.

Rules: telling humans from agents

Agents often commit through your account, so GitHub credits everything to you. What tells them apart is the git identity each machine commits with (user.name / user.email), or a message pattern. Rules are checked top to bottom and the first match wins:

"rules": [
  {"label": "automation", "message_regex": "^(nightly backup|daily batch:)"},
  {"label": "automation", "author_name_regex": "\\[bot\\]$"},
  {"label": "agents",     "author_name": ["my-agent-server"]},
  {"label": "me",         "author_name": ["Your Name", "yourname"]}
]
Field Matches
author_name, author_email, committer_name exact, case-insensitive (string or list)
author_name_regex, author_email_regex, committer_name_regex, message_regex regex search, case-insensitive (message = first line)
  • All the fields in one rule must match.
  • Merge commits get the label merge (counted separately, not charted); set "merge_label": "" to classify them like any other commit.
  • Anything unmatched gets default_label (other), which is not charted.

Tip: give your agent machines their own git config user.name, for example my-agent-server, and this becomes one exact rule. To find the identities in your history first:

git log --since=2026-01-01 --format='%an <%ae>' | sort | uniq -c | sort -rn | head -20

Output

commits.json is small and safe to share:

{"meta": {"source": "github", "owner": "...", "since": "...", "timezone": "+05:30", "repo_names_hashed": true, ...},
 "commits": [{"ts": "2026-11-23T14:02:11+05:30", "label": "agents", "repo": "r-3fa9c1"}, ...]}

stats --json gives totals and shares per label, the peak day and week, merges, and with --split a before/after comparison (weekly average and maximum, weeks with zero commits, median per active day).

Notes

  • GitHub mode:
    • It reads each repository's default branch, so unmerged branch work is not counted.
    • Forks are skipped unless include_forks is true.
    • Private repositories are included only when owner is the account you are logged in as.
  • Local mode: reads HEAD, or every branch with "all_branches": true.
  • Times: everything is shown in the timezone from your config.
  • Charts: each one carries its own dark background, so it reads the same on light and dark pages.

Tests

python3 -m unittest discover -s tests

License

MIT. See LICENSE.

About

Who writes your commits: you, your AI agents, or your automation. Stats + SVG charts from GitHub or local git. Stdlib only.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages