Audit trail for AI-written code

git blame tells you who.
Whyline tells you why.

Whyline records what AI agents change in your codebase: the prompt, the files, the commit and the agent. Run whyline blame on a line to see why it exists, or search and export the timeline for your team.

Example output
$ whyline blame src/orders.ts:2
src/orders.ts:2  const amount_cents = Math.round(order.total * 100);
  a7394e0b · claude-code · dev@example.com · 10/7/2026, 11:10:20 AM
  add orders

  Prompt:
    store money as integer cents
Output of a real whyline blame run against a local demo repository.

What gets recorded

Every event ties a change to the reason for it. What each source captures is listed here, and nothing more.

Prompts

The text of each prompt you submit in Claude Code. You can turn text capture off; the fact that a prompt happened is still recorded.

Edits

Each file Claude Code changes with Edit, Write, MultiEdit or NotebookEdit, with the file path.

Commits

For any agent or person: the commit hash, author email, message and changed files, plus the agent when the commit message names one.

Every event also has a timestamp, an agent name and a kind (prompt, edit or commit). See all event fields.

Which agents are covered

Claude Code, Cursor, Codex and Gemini CLI send prompts and edits through their hooks. Every other agent is recorded when it commits, if its commit message says which agent wrote it.

SourcePromptsEditsCommitsHow
Claude CodeYesYesYesThe Claude Code plugin, plus the git hook for commits
Cursor, Codex CLI, Gemini CLIYesYesYesThe agent's own hooks (setup), plus the git hook for commits
Copilot, Aider, Devin, WindsurfNoNoYesThe git hook, when the commit message has a Co-Authored-By:, AI-Agent: or Assisted-by: trailer naming the agent
Anything else, or no trailerNoNoYes, as agent noneThe git hook

The agent has to write the trailer itself. Whyline reads commit messages; it does not look inside those agents. See AI commit trailers explained.

How it works

Hooks capture events, a workspace stores them, and you ask why from the terminal or the dashboard.

  1. Capture

    Agent hooks and a git post-commit hook send events to your workspace. They never block the agent or the commit.

  2. Store

    Events live in a workspace behind an API key, on the hosted site or on a server you run yourself.

  3. Ask why

    whyline blame file:line finds the commit behind a line and prints its agent, author and prompt. The dashboard has a searchable timeline and CSV export.

Read the full walkthrough or see everything that is built today. New to this? Start with how to track AI-generated code in git.

Install

Whyline is installed from GitHub. Requires Node.js 22.13 or newer.

pnpm add -g github:Gauravkumar6617/whyline
# or: npm install -g github:Gauravkumar6617/whyline
whyline login --url https://whyline.wrklyst.com --key wl_...