Report & history
Read attribution from the git notes Blamely writes on every commit.
report — one commit
blamely report HEAD
blamely report a1b2c3dPrints a detailed attribution view for the commit: by-tool breakdown, per-file listing, and each added/deleted line tagged with its author type, tool, model, and generation type.
commit 1f123481
branch: master
message: add authentication middleware
coding time: 47m 12s
AI lines: 13
human lines: 6
files: 3
by tool:
claude 12 lines model=claude-opus-4-6 tokens(in=4200 out=890)
cursor 1 lines model=composer-2.5
rondam-filename4.txt [ADDED] +10 -0
L1 add AI cursor composer-2.5 chat
L2 add AI cursor composer-2.5 chat
...
rondam-filename.txt [MODIFIED] +6 -0
L7 add Human - -
...report --html — browser dashboard
blamely report HEAD --htmlRenders the same commit attribution as a self-contained dark-theme HTML dashboard and opens it in your default browser. The file is a single static HTML document (HTML + inline SVG, no JavaScript framework and no network calls), so it opens, prints, and shares anywhere.
The dashboard shows:
- AI vs Human donut with line counts and the top model.
- Changes — added / deleted / net, split by AI and human.
- Generation breakdown —
chat,completion,cli,humanbars, plus suggested-vs-kept acceptance. - Token usage — input, output, cache read / write.
- Coding time for the commit.
- Per-file detail with each attributed line-range (
L12-40→claude · model · chat). - Leaderboard of contributors and models.
By default the file is written to a temp path (<tmp>/blamely-report-<sha>.html) and the path is printed:
Report written to /tmp/blamely-report-1f1234810abc.html| Flag | Effect |
|---|---|
--html | Render the HTML dashboard and open it in the browser |
--out, -o <path> | Write to this path instead of a temp file (only with --html) |
--no-open | Write the file but don’t launch the browser (only with --html) |
blamely report HEAD --html -o report.html # write to ./report.html and open it
blamely report HEAD --html --no-open -o ci.html # write only — useful in CI / headlessThe path is always printed, even when the browser launch fails (e.g. headless servers).
report --html dashboard, drawn from a sample commit.Open the full example Machine-readable output
There is no --json flag. The canonical machine-readable form is the per-commit git note itself, which is already JSON — read it directly with git:
git notes --ref=blamely show HEADSee Reading the JSON note directly below for the schema. Pipe it through jq for scripting:
git notes --ref=blamely show HEAD | jq '.totals'stats — deep single-commit view
blamely stats HEAD
blamely stats a1b2c3dSimilar to report but with extra fields: AI-wait time, per-tool token totals, suggested vs accepted lines, and the by_gen_type breakdown (chat, completion, cli, human).
Defaults to HEAD when no SHA is provided.
history — aggregate across commits
blamely history
blamely history --since 7d
blamely history --since 30d
blamely history --since 1y
blamely history --allScans all noted commits in the current repo and prints aggregate totals: AI vs human share, per-tool line counts, token usage, and total coding time across the window.
| Flag | Default | Effect |
|---|---|---|
--since | 30d | Time window (Nd days, Nh hours, 1y) |
--all | off | Include every tracked repo, not just the current one |
Reading the JSON note directly
The note for any commit is plain JSON attached via git notes:
git notes --ref=blamely show HEADThe schema includes:
| Field | Description |
|---|---|
totals.ai_lines | Lines attributed to any AI tool |
totals.human_lines | Lines typed by the developer |
totals.deleted_lines | Lines removed (always counted as human) |
by_tool | Per-tool: lines, model, tokens, suggested vs accepted |
by_gen_type | chat / completion / cli / human breakdown |
files[].lines | Attribution ranges: start, end, type, author_type, tool, model, gen_type |
conversation | Last few user/assistant turns from the AI session (Claude Code, Cursor) |
Colors
Disable ANSI colors globally:
NO_COLOR=1 blamely report HEADNext
- CLI commands — full command reference.
- How it works — where the data comes from.
- Excluding files — keep build outputs out of reports.
Something unclear or wrong? Tell us.