CLI reference

Report & history

Read attribution from the git notes Blamely writes on every commit.

report — one commit

terminal
blamely report HEAD
blamely report a1b2c3d

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

terminal
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

terminal
blamely report HEAD --html

Renders 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, human bars, 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:

terminal
Report written to /tmp/blamely-report-1f1234810abc.html
FlagEffect
--htmlRender 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-openWrite the file but don’t launch the browser (only with --html)
terminal
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 / headless

The path is always printed, even when the browser launch fails (e.g. headless servers).

blamely report HEAD --html Illustrative preview
Blamely report“Add user authentication middleware”1f123481maindeveloper@blamely.ai2h ago
Attribution
72%AI authored
AI 18 lines Human 7 linesclaude-opus-4-6
Changes
+25 added−4 deleted21 net
AI added18Human added7AI deleted1Human deleted3
Generation
chat12cli4completion2human7
accepted 86% · 21 suggested → 18 kept
Files 3 changedsrc/auth/middleware.goclaude 12+14−0src/auth/middleware_test.gocursor 4+8−1README.md—+3−3
The top of a 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:

terminal
git notes --ref=blamely show HEAD

See Reading the JSON note directly below for the schema. Pipe it through jq for scripting:

terminal
git notes --ref=blamely show HEAD | jq '.totals'

stats — deep single-commit view

terminal
blamely stats HEAD
blamely stats a1b2c3d

Similar 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

terminal
blamely history
blamely history --since 7d
blamely history --since 30d
blamely history --since 1y
blamely history --all

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

FlagDefaultEffect
--since30dTime window (Nd days, Nh hours, 1y)
--alloffInclude 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:

terminal
git notes --ref=blamely show HEAD

The schema includes:

FieldDescription
totals.ai_linesLines attributed to any AI tool
totals.human_linesLines typed by the developer
totals.deleted_linesLines removed (always counted as human)
by_toolPer-tool: lines, model, tokens, suggested vs accepted
by_gen_typechat / completion / cli / human breakdown
files[].linesAttribution ranges: start, end, type, author_type, tool, model, gen_type
conversationLast few user/assistant turns from the AI session (Claude Code, Cursor)

Colors

Disable ANSI colors globally:

terminal
NO_COLOR=1 blamely report HEAD

Next

Something unclear or wrong? Tell us.