---
title: "coding.sh blame · coding.sh docs"
description: "git blame with the agent session that wrote each line. Every option of coding.sh blame, from its own --help."
canonical: https://coding.sh/docs/cli/blame
human_url: https://coding.sh/docs/cli/blame
markdown_url: https://coding.sh/docs/cli/blame.md
agents_url: https://coding.sh/agents.md
llms_url: https://coding.sh/llms.txt
updated: 2026-11-11
---

# coding.sh blame

git blame with the agent session that wrote each line. Every option of coding.sh blame, from its own --help.

coding.sh blame --help

```
coding.sh blame <PATH[:LINE[-END]]> [options]

  git blame with the agent session that wrote each line

Arguments
  path[:line[-end]]  A file in the repo, optionally one line or a range (src/app.ts:40-60)

Options
  --rev <REV>     Blame the file as of this commit (default: HEAD)
  --repo <DIR>    A directory in the git repository (default: the current one)
  --since <WHEN>  Match only commits after this time (default: the first captured session in the repo)
  --fresh         Wait for every pending capture to be ingested (default: answer after 1.5 s)

Examples
  coding.sh blame src/app.ts
  coding.sh blame src/app.ts:40-60
  coding.sh blame src/app.ts --json

Notes
  Each line shows the commit that last changed it and, when a captured session wrote that line, the session and agent; '-' means no session did. Matching works as in coding.sh attribution.
  --json: {root, rev, path, unattributed, sessions, lines: [{line, commit, text, sessionId?, agent?, model?, confidence?, method?}]}.
```

[All commands](https://coding.sh/docs/cli) · [Global options](https://coding.sh/docs/cli#global)

To set coding.sh up for a user, follow the agent workflow at [/agents.md](https://coding.sh/agents.md).
