Automatic
Say “save context” or “I’m switching” — the agent does the rest. No commands to memorize.
git-scoped session state
Save where you left off. Resume in any AI tool — Claude Code, Cursor, Codex — on the same repo and branch, automatically.
AI coding sessions have no memory between tools. context0 stores compact checkpoints in
local SQLite, scoped to your git repo and branch. With MCP configured, the agent saves and resumes automatically — no commands to run, nothing to learn.
Say “save context” or “I’m switching” — the agent does the rest. No commands to memorize.
No cloud, no account, no signup. Data stays on your machine at ~/.context0/context0.db.
Context key is repo_root + branch — each branch stays completely isolated.
Set it up once. After that, just say “save context” or “I’m switching” — the agent handles everything. No commands to run, no docs to read.
curl -fsSL https://raw.githubusercontent.com/SyedSibtainRazvi/context0/main/install.sh | sh
Windows: download the .zip from Releases and add the binary to your PATH.
context0 init-rules
Writes CLAUDE.md, .cursor/rules/context0.mdc, and AGENTS.md into the current project.
# Claude Code (run once in terminal)
claude mcp add context0 context0 mcp-server
# Cursor / Codex — use full path (editors don't inherit PATH)
# First run: which context0
# Then add to ~/.cursor/mcp.json or ~/.codex/config.json:
{
"mcpServers": {
"context0": {
"command": "/Users/your-username/.local/bin/context0",
"args": ["mcp-server"]
}
}
}
See the MCP setup section below for per-tool details.
Save and resume manually from any terminal. No config needed.
context0 save --done "wired auth middleware" --next "fix integration tests"
Resume: context0 resume · context0 resume --json
Write a checkpoint for the current repo + branch.
context0 save \
--done "implemented OAuth flow" \
--next "add refresh token logic" \
--blockers "waiting on API key" \
--tests "cargo test auth::" \
--files src/auth.rs --files src/middleware.rs
Print the latest checkpoint for the current repo + branch.
context0 resume
context0 resume --json
Show recent checkpoints in reverse chronological order.
context0 log --limit 20
Run MCP over stdio so tools can read/write context directly.
context0 mcp-server
Install agent rule files for Claude Code, Cursor, and Codex. Run once per project.
context0 init-rules
Delete all checkpoints for the current repo + branch.
context0 clear
Generate shell completions for bash, zsh, or fish.
context0 completions zsh >> ~/.zshrc
context0 completions bash >> ~/.bashrc
context0 completions fish > ~/.config/fish/completions/context0.fish
Add context0 mcp-server to your editor’s MCP config. The agent then calls
get_context, save_context, and list_context automatically.
claude mcp add context0 context0 mcp-server
Run once in any terminal. Claude Code resolves the binary from your PATH automatically.
{
"mcpServers": {
"context0": {
"command": "/Users/your-username/.local/bin/context0",
"args": ["mcp-server"]
}
}
}
File: ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Cursor doesn’t inherit your shell PATH — use the full binary path.
Run which context0 to find yours, then restart Cursor.
{
"mcpServers": {
"context0": {
"command": "/Users/your-username/.local/bin/context0",
"args": ["mcp-server"]
}
}
}
File: ~/.codex/config.json · Use the full path from which context0.
~/.context0/context0.db
context0 --db /path/to/custom.db resume
context0 --repo /path/to/repo --branch feature/x resume
Useful in monorepos or scripts running outside the target directory.