whydid

Documentation

What whydid actually does, feature by feature — not a pitch, a reference. Everything here runs locally on your own machine; nothing described below requires whydid's own servers.

Start here

What whydid is

A local-first time machine for AI-assisted coding. It watches your project, turns meaningful changes into checkpoints with real AI-written explanations, and gives you a genuine way back — a full or selective restore, or a fork to try something different — whenever an AI coding session goes somewhere you didn’t want.

It is not version control. It runs alongside git (or without it) and fills a different gap: why a change happened, tied to the actual prompt that caused it, plus a safety net for the moments in between commits — the exact window where a bad AI-driven edit is hardest to undo cleanly.

The model

Checkpoints, not commits

Every state whydid records — the initial snapshot, each checkpoint, every restore and fork — is a node in a real branching graph, parented on whatever came before it. A restore doesn’t discard your current work to get there: it safety-snapshots what’s on disk right now, automatically, before touching anything, so the state you were just in is always still there as its own node.

Files are stored content-addressed and deduplicated — only a full manifest is kept periodically, with everything else stored as deltas, reconstructed exactly on demand. A 10,000-checkpoint project doesn’t mean 10,000 copies of every unchanged file.

Feature reference

Every feature, plainly explained

Timeline & AI annotations

Every meaningful change becomes a checkpoint on a real branching graph — not a flat log. Each one gets an AI-written summary, the reasoning behind it, key decisions, and a risk level (low/medium/high), generated from your actual prompt and the real diff.

Restore — full or selective

Jump back to any checkpoint's exact state. Every restore safety-snapshots your current disk first, automatically — nothing is ever silently overwritten. Selective restore lets you pull back just the files you need, leaving everything else you've built since exactly as it is.

Fork

Branch a new line of work from any past checkpoint without disturbing your current state — for trying an alternative approach without losing where you are now.

Milestones

Tag any checkpoint with a label of your own choosing — "v1 launch," "before pricing change" — so it stands out later, instead of getting buried among hundreds of routine ones.

Multi-agent session capture

Prompts and turns are captured automatically from Claude Code, and via lightweight hooks from Codex and Cursor — each turn linked to the exact checkpoint(s) it produced, so you can see which prompt caused which change.

Ask your project's history

A chat interface grounded in your project's real checkpoint history — "what did I do this week?", "why did we switch to Stripe?" — with citations linking back to the exact checkpoints it drew from. Bounded by a real retrieval window, not an all-knowing oracle: it answers from what's in the recorded history, and says so honestly when something isn't there.

CONTEXT.md hand-off files

whydid writes a CONTEXT.md next to the code it explains — real reasoning, committed to git like any other file. Any AI tool that opens the repo (a teammate's fresh Claude Code session, Codex, Cursor) reads it automatically. Nothing to import, nothing to maintain by hand.

Build in public drafts

Turns real session activity into a shareable progress-update draft for X or LinkedIn, grounded in what actually happened. whydid never posts anything on your behalf — it only drafts; you copy, edit, and post it yourself whenever you choose.

AI usage & budget alerts

Tracks exactly what whydid itself has spent calling your configured AI provider (checkpoint annotations, chat, build-in-public) — separate from your coding agent's own usage, which whydid never sees or meters. Set a monthly budget and get warned — in the dashboard and in your terminal — as you approach it. Purely informational: whydid never blocks a call or switches providers for you.

Settings & privacy controls

Choose exactly what's sent to your AI provider for annotations — your prompt, the diff, both, or neither. Configure your test command, context-file generation, and build-in-public defaults. Everything lives in .whydid/config.json — a plain file you can read or edit directly.

Terminal

CLI reference

whydid initSet up whydid in the current project and capture its initial state.
whydid checkpointManually create a checkpoint (usually automatic, on meaningful file changes).
whydid statusShow the current state, last checkpoint, and any AI budget warning.
whydid timelineList recorded checkpoints from the terminal.
whydid why <file>Show the AI explanation behind a file's most recent change.
whydid restore <id> [--only <paths>]Restore a full checkpoint, or just specific files from it.
whydid fork <id> <name>Branch a new line of work from a past checkpoint.
whydid milestone <id> <label>Tag a checkpoint as a milestone (or list all tagged ones with no arguments).
whydid daemon start|stop|statusManage the local dashboard's background process.
whydid recapA one-day or one-week summary of activity, risk, and test status.
whydid testRun your configured test command and attach the result to the current checkpoint.
whydid contextBackfill CONTEXT.md files from already-annotated history.
whydid exportExport your project's full recorded history as JSON, Markdown, or HTML.
whydid login <licenseKey>Activate whydid on this machine (2 devices per license).
whydid logoutDeactivate this machine, freeing its device slot.
whydid licenseShow local license status — no network call.
whydid resetStop the daemon, back up .whydid outside the project, and reinitialize — for recovering from an upgrade clash or corrupted local state.

Compatibility

Platforms & coding agents

macOS, Linux, and Windows are all supported — not assumed to work the same way and left untested. Machine identification, OS keychain storage, and file-watching have each been checked against real platform differences rather than ported once and hoped for: Windows, for instance, names Claude Code’s session folders differently than macOS does, and locks open files in ways POSIX doesn’t — whydid accounts for both rather than assuming one platform’s behavior everywhere.

whydid requires Node.js 24+ (or 23.4+) for its built-innode:sqlitesupport. If your default node resolves to something older, the CLI detects this at startup and tells you exactly what’s installed and how to fix it, rather than failing with an unrelated error.

Coding agent support, honestly tiered:

  • Claude Code — deepest integration. whydid reads Claude Code’s own local session transcripts directly: real prompts become real Sessions entries, checkpoints split exactly at prompt boundaries instead of waiting for a debounce timer, and a context-compaction event is detected and flagged (see Continuity in the dashboard).
  • Codex and Cursor — hook-based. whydid init installs a small, standard hook config for each (.codex/hooks.json, .cursor/hooks.json) that reports session/prompt/stop events through each tool’s own supported hook interface — the same Sessions view, the same prompt-to-checkpoint linking, without reading any private file format.
  • Any other AI coding tool, or plain manual edits — checkpointing, AI risk annotation, restore, fork, and diffs all work identically. whydid’s file watcher doesn’t care what made the change. What you won’t get without Claude Code, Codex, or Cursor specifically is prompt-level attribution — Sessions won’t show what you actually asked for, only what changed.
  • AGENTS.md, CLAUDE.md, and Cursor’s own rules file are installed by whydid init regardless of which agent you use, so any tool that reads project-level instructions picks up whydid’s CONTEXT.md convention automatically.

When something's off

Troubleshooting

A password/permission popup appeared when I ran a command

That’s your OS’s own credential store (macOS Keychain, Windows Credential Manager) asking to let whydid read your saved license — not a whydid password. It’s your own computer’s login password. Click Allow (or Always Allow) and the command continues normally.

The daemon won’t start, or I can’t reach the dashboard

If whydid’s preferred port is already taken by something else, it automatically falls back to a free one — the correct URL is always printed by whydid daemon start and whydid daemon status. If it still won’t come up, check .whydid/logs/daemon.log in your project for the real error.

Checkpoints are showing up, but no Sessions / prompts appear

This means the file watcher is working but session capture isn’t finding your agent’s transcript or hook events — see Platforms & agents above for which tools get this, and confirm whydid init actually ran in this exact project folder (hooks are installed per-project). This never blocks checkpointing itself — it only means checkpoints won’t show which prompt caused them.

Something’s acting strange after an upgrade, or feels corrupted

Run whydid reset. It stops any daemon still running for the project, moves your existing local history outside the project folder (nothing is ever deleted), and reinitializes fresh. If the backup turns out fine, you can safely remove it later — the command tells you exactly where it landed.

AI annotations aren’t being generated

Confirm a provider and API key are set in Settings, and that your monthly AI budget (if you set one) hasn’t been hit — whydid warns about this in the terminal and dashboard rather than failing silently. This is always optional: checkpoint, restore, and fork all work with no AI configured at all.

whydid --version shows an old version after upgrading

Usually a second, stale global install earlier on your PATH. Run which -a whydid to see every copy; if more than one shows up, remove the older one (e.g. npm uninstall -g whydid --prefix <that path>) and reinstall.

Still stuck? Email hello@whydid.dev — a real response, not a ticket queue.

Trust

Privacy & bring-your-own-key

Your source, history, and snapshots stay on your machine — whydid’s own servers never receive your code. The only network calls whydid ever makes are to your own configured Anthropic or OpenAI account, using your own API key, and only when generating an AI annotation, chat answer, or build-in-public draft.

You control exactly what’s sent for those calls — your prompt, the diff, both, or neither — in Settings. Unchanged source and your full repository are never sent, regardless of these settings. whydid never logs or transmits your API key itself.

No subscription

Pricing

A one-time Founder Lifetime license — $69, rising to $119 after launch — yours forever. No monthly fee, no seat count, no usage meter. Unlimited projects on one license, two device activations. Your only optional ongoing cost is your own LLM usage, billed to you directly by your provider, if you turn on AI annotations.

See pricing details →