Drift adds a provenance layer to Git for AI-generated code. Every commit becomes an Intent — the prompt that produced the change, the model behind it, and the verification that approved it — signed, stored, and traceable months later.
The 30-second demo
git clone https://github.com/lilcipherx/drift.git && cd drift
npm install
bash scripts/seed-demo.sh && cd examples/demo-repo
node ../../packages/drift-cli/dist/cli.js blame src/auth.ts --function refreshToken
Real output:
src/auth.ts:16 (refreshToken)
Why:
Fix race condition in token refresh by de-duplicating in-flight refreshes
Generated by:
AGENT @ Drift Demo (model: claude-3-5-sonnet)
Intent:
did_910ac75de855a684937f8cc016976442
Commit:
fa20f02884a910f26e3f869ceaf6b89fa7e8207f signature: valid
Months from now, that function answers why it exists, who (or what) created it, and that the claim is cryptographically signed.
Install
Two ways to get the CLI + MCP server:
From a checkout (works today):
git clone https://github.com/lilcipherx/drift.git && cd drift
npm install
node packages/drift-cli/dist/cli.js --help
From npm (once the @drift/* packages are published):
npx -y @drift/cli --help # CLI
npx -y @drift/mcp # MCP server for agents
Per-harness install for 11 agents (Claude Code, Antigravity, Codex App/CLI,
Cursor, Factory Droid, Gemini CLI, GitHub Copilot CLI, Kimi Code, OpenCode,
Pi, VS Code): see docs/installation.md. The
GitHub Action runs
drift log/doctor/verify in CI and posts the PR summary comment.
60-second quickstart
cd /path/to/your/repo
node /abs/path/to/drift/packages/drift-cli/dist/cli.js init # 1. create .drift/
# … edit a file …
node /abs/path/to/drift/packages/drift-cli/dist/cli.js realize -p "Add login flow with validation" --agent --model claude-3-5-sonnet
node /abs/path/to/drift/packages/drift-cli/dist/cli.js status # 2. what's recorded?
node /abs/path/to/drift/packages/drift-cli/dist/cli.js blame src/auth.ts --function login # 3. why does this exist?
realize is git commit for the AI era: it rejects broken syntax before it
enters history (exit 2), redacts secrets from your prompt, computes an AST
delta, signs the intent, and commits with a Drift-Intent: trailer. The full
5-minute quickstart has the measured end-to-end walk.
On GitHub — the PR summary
When Drift is used in a repository, every pull request gets a compact provenance summary (posted by the GitHub App or the Action, updated in place — never spammed):
🤖 Drift intent summary
1 intent on this PR · 1 author
Intent
did_910a…Author:
claude-code(AGENT) · Model:claude-3-5-sonnet· Signature: ✍ Ed25519Add retry handling to the payment webhook with exponential backoff and a dead-letter queue for permanent failures.
File Change src/webhooks/payment.tsMODIFIED — add retryWebhook() with backoff src/webhooks/signature.tsMODIFIED — verify signature before enqueue src/webhooks/process.tsADDED — add processPaymentEvent() handler
Review the intent, not 2,000 lines of diff.
Why Drift?
Git tells you what changed — a text diff. As more code is generated by AI, reviewing thousands of lines of diff tells you nothing about why they exist, what the model was asked to do, or how the change was verified.
Drift records exactly that, at commit time:
- Intent — the prompt: what was asked and why.
- Provenance — who (human) or what (agent + model) produced it.
- Verification — the recorded command that approved it (
drift verify). - Signature — Ed25519-signed and content-addressed, so the record is
tamper-evident (
drift verify-intent). - Recovery — a crashed agent resumes from its last checkpoint
(
drift replay --checkout).
How it works
drift initcreates.drift/— a SQLite intent store, a config, and a per-repo Ed25519 key. Git history is never rewritten.drift realizestages, syntax-checks, redacts, AST-diffs, signs, stores the intent in.drift/objects/, and commits with aDrift-Intent:trailer.drift blame/drift contextmap any line or function back to the intent that created it.drift verifyre-runs the recorded verification command.drift doctorchecks store integrity and repairs orphans (--fix).
Deeper: docs/architecture.md (storage, crypto, the GitHub App) and docs/api.md (every command, flag, exit code and MCP tool).
Security & privacy
- Prompts never leak into git history by default.
[prompts] modein.drift/config.toml:commit-summary(default — full prompt only in the local, gitignored.drift/store; the commit carries a safeIntent:/Model:/Verification:summary),full(opt-in, legacy),none(prompt stored nowhere). - Secrets are redacted (AWS, OpenAI, GitHub, Slack, JWT, PEM, …) before any storage.
- Encryption at rest (optional):
[encryption] enabled = true+DRIFT_MASTER_KEY→ AES-256-GCM for prompts and agent state. - No telemetry, no network — the CLI works fully offline.
- Full threat model: SECURITY.md.
Contributing
Contributors welcome — see CONTRIBUTING.md, the good-first-issue list, and our Code of Conduct. Design decisions are tracked in docs/adrs.md.
Documentation: quickstart · installation · API reference · architecture · changelog
Verified live on Windows 11 (Node v24.18.0, 2026-08-06): fresh clone →
first drift blame in ~8.1 s, 10/10 checks pass, no registry 404; the packed
@drift/* chain answers the MCP handshake with all six tools in ~1 s — see
the measured tables.
License
MIT — see LICENSE. Security notes: SECURITY.md. Issues & releases: github.com/lilcipherx/drift.
No comments yet
Be the first to share your take.