
Every AI coding session starts blank. You re-explain your stack,
your current goals, your conventions. Across every tool — Cursor,
Claude Code, Codex, Windsurf. Every single time.
I built ctxpilot to fix this.
ctxpilot is a CLI and MCP server that automatically builds a
Living Context Document from your codebase and injects it into
every AI tool you use. A background daemon keeps it fresh after
every git commit.
Three commands to set up:
npm install -g @ctxpilot/ctxpilot
ctx init
ctx setup
ctx watch
Built the entire thing in about a week using Claude Code and
Codex as coding assistants. Started with a detailed MASTERPLAN.md
before writing a single line of code — architecture, tech stack,
command spec, AI prompts, everything.
Key technical decisions:
- MCP protocol for distribution — works with any MCP-compatible
client without custom integrations
- AI rewrite instead of bullet append — Claude rewrites the entire
LCD on every update, not just stacks new information
- Daemon watches .git/refs/heads/ — detects commits without
requiring git hooks
- Archive-first policy — nothing ever deleted, only archived to
.ctxpilot/archive/
Tested on a private React Native project. Fresh Codex session,
zero context pasted. Asked what the project was about.
Codex identified an exact bug — minimum cart quantity hardcoded
in multiple places with Math.max(quantity, 6) in cart.ts#L40.
That came from the LCD.
GitHub: github.com/fewknowme/ctxpilot
Website: fewknowme.github.io/ctxpilot
npm: @ctxpilot/ctxpilot
Open source, MIT. Feedback and PRs welcome.
1
4
0