AI writes your code. clue remembers why.
Every AI commit gets a structured reasoning entry — what was explored, what decisions were made, and why. Zero extra API calls.
Website · GitHub · MIT License
50 commits. Zero context.
Your AI wrote 3,000 lines across a dozen files. The commit messages say "refactor auth" and "fix tests." Three months from now, nobody — including the AI — will remember why.
One command. Full story.
clue log enriches every commit with the reasoning that drove it — what files were explored, what decisions were made, and whether tests passed on the first try.
087b1fd feat: add secret resolver trait and env_file backend
│ Secret resolution after policy eval — pipeline step 4
│ Explored: config.rs, error.rs, Cargo.toml
│ Tests: ✓ 2/2 Decisions: 3 Risks: 1
│
d4e1a09 chore: update dependencies
│
clue show opens the complete reasoning behind a single commit — the "why" that the diff can't tell you, the files that were read but not changed, and the trade-offs that were considered.
clue blame <file> annotates code with inline reasoning from each commit:
087b1fd │ 1 │ use super::{ResolvedSecret, SecretResolver};
087b1fd │ 2 │ use crate::config::{BackendConfig, ResolverConfig};
│ │
│ │ ℹ Pipeline step 4 — secret resolution after policy eval
│ │
087b1fd │ 7 │ pub struct EnvFileResolver {
087b1fd │ 8 │ secrets: HashMap<String, String>,
│ │
│ │ ℹ Decision: Read file once at construction into HashMap,
│ │ not on every resolve() call
│ │
Two commands. You're done.
npm install -g @getclue/cliThen initialize in your project:
clue initEvery AI-assisted commit automatically captures its reasoning. No config. No setup. It just works.
Every commit gets a .clue/<hash>.md file — YAML frontmatter for metadata (files changed, test results, fix cycles) and markdown sections for the reasoning (why, explored, decisions, risks). Plain text, version controlled, readable without any tooling.
clue init installs a Claude Code skill and a PreToolUse hook. The skill tells Claude to write a reasoning entry before every commit. The hook blocks the commit if no entry exists. Zero extra LLM calls — it costs ~500 tokens from Claude's existing session context.
Two storage backends: git-commit keeps entries in-repo so they travel with the code, or folder stores them in ~/.clue/ if you prefer to keep your repo clean. Install per-project or globally with --user. Works with existing repos — commits before clue are simply skipped.
| Command | Description |
|---|---|
clue init |
Set up clue in current project |
clue log [-n COUNT] |
Enriched git log with reasoning summaries |
clue show <hash> |
Full reasoning for a specific commit |
clue blame <file> |
Enriched git blame with inline annotations |
clue stats |
Aggregate metrics — coverage, success rate, fix cycles |
clue explored |
Files the AI reads most as reference |
clue failures |
Commits that required fix-up cycles before passing |
clue store [hash] |
Store pending blame entry (default: HEAD) |
clue init # project-level (default)
clue init --user # user-level (~/.claude/)
clue init --backend folder # store entries outside the repoBackends:
- git-commit (default) — entries live in
.clue/and are committed to git. Reasoning travels with the code. - folder — entries stored in
~/.clue/(or custom path). No extra commits. Good for personal use across many repos.
Shows recent commits with reasoning summaries inline. Commits without entries are shown plain. clue's own storage commits are filtered out.
Renders the full reasoning entry for a commit — why, decisions, explored files, test results, and risks — in your terminal with markdown formatting.
Like git blame, but annotates code blocks with the reasoning from each commit's entry. See exactly why each section of code was written.
Project-wide metrics: what percentage of commits have entries, first-attempt test pass rate, fix cycles, most explored files, and riskiest commits.
Shows which files the AI reads most often as reference material, with read vs. write counts. Useful for identifying core files and implicit dependencies.
Lists commits where tests failed before passing, with details on what went wrong. Surfaces patterns in AI mistakes.
Does this cost extra tokens? Minimal. ~500 output tokens per commit. The skill runs at commit time when Claude already has full context — no extra API calls.
Does it work without Claude Code?
The CLI reads .clue/ files regardless of how they were created. You can write entries by hand, generate them with another tool, or use any LLM that can follow the format.
Should I commit .clue/ to git?
Yes — that's the point. The reasoning travels with the code so anyone reading it later can understand the decisions. With the git-commit backend, this happens automatically.
Does it work with existing projects?
Yes. Run clue init in any git repo. Future AI commits will have entries. Past commits won't — clue log and clue blame gracefully handle commits without entries.
What if I use both AI and manual commits?
The hook only activates inside Claude Code sessions. Manual commits are unaffected. clue log shows all commits but only annotates the ones with entries.
MIT — Built with clue itself.