Durable, versioned context for AI coding agents.
Keep architecture notes, tasks, prompts, change history, and file knowledge available across agent sessions — locally, through a CLI or over MCP.
Installation · Quick start · Agent setup · Development · Contributing
AI agents are good at working with the code in front of them, but their project knowledge is usually temporary. VContext gives that knowledge a durable home.
It runs locally, stores project data in SQLite, tracks immutable revisions, and exposes the same context through a human-friendly CLI and a Model Context Protocol (MCP) server.
- Context that survives sessions — save decisions, documentation, tasks, prompts, change notes, and path descriptions once.
- Built for agents and humans — use the interactive CLI, structured JSON, or one of 48 MCP tools.
- Versioned by default — inspect history, create branches and snapshots, compare changes, and merge context.
- Local-first — the daemon and project databases live on your machine.
- Agent-agnostic — configure Codex, Claude Code, or OpenCode with one command, or connect any MCP-compatible client.
- Automation-friendly — stable exit codes,
--json,--quiet,--yes, and no prompts when output is redirected.
Official releases are self-contained executables. Node.js, Bun, npm, and pnpm are not required.
curl -fsSL https://vcontext.dev/install.sh | bashThe installer chooses a writable directory on PATH or falls back to
~/.local/bin. It does not invoke sudo or modify shell configuration.
Run in PowerShell:
irm https://vcontext.dev/install.ps1 | iexVContext is installed under
%LOCALAPPDATA%\Programs\vcontext\bin and added to the user PATH.
curl -fsSL https://vcontext.dev/install.sh | bash -s -- --version v1.2.3PowerShell scripts executed through a pipe accept VCONTEXT_VERSION,
VCONTEXT_INSTALL_DIR, and VCONTEXT_FORCE=1.
| Platform | Architectures |
|---|---|
| Linux | x64, ARM64 |
| macOS | Intel, Apple Silicon |
| Windows | x64 |
Every release includes a vcontext-checksums.txt file. Download it with the
matching artifact from GitHub Releases
to verify an archive manually.
vcontext update --check
vcontext update
vcontext update --yes # non-interactiveThe standalone CLI verifies checksums and the staged binary before replacing
the current installation. Set VCONTEXT_NO_UPDATE_CHECK=1 to disable the
automatic daily update check.
Move into an existing Git repository and initialize VContext:
cd my-project
vcontext init my-project --description "My project" --path .The interactive setup will:
- register the project with the local daemon;
- connect VContext to Codex, Claude Code, or OpenCode;
- install reversible Git hooks when the directory is a Git repository.
Then start storing durable context:
# Render a compact context summary
vcontext give-context
# Record an architectural decision
vcontext doc add \
--title "Architecture" \
--content "The API uses TypeScript, Hono, and SQLite."
# Track work
vcontext task add \
--title "Add authentication" \
--description "Implement session-based login"
# Describe important paths
vcontext file-context upsert \
--path src/api \
--kind directory \
--description "HTTP routes and request validation"
# Record a meaningful change
vcontext change add --note "Added rate limiting to public endpoints"The daemon starts automatically when the CLI or MCP server needs it.
Run the interactive setup:
vcontext setupOr configure an agent explicitly:
# Shared, project-level configuration
vcontext setup --agent codex --scope local
vcontext setup --agent claude --scope local
vcontext setup --agent opencode --scope local
# Private configuration available to every project
vcontext setup --agent codex --scope globalLocal setup updates the agent's standard project file:
| Agent | Project configuration |
|---|---|
| Codex | .codex/config.toml |
| Claude Code | .mcp.json |
| OpenCode | opencode.json |
Existing settings and JSONC comments are preserved. The selected agent must
already be installed and available on PATH.
For scripts, vcontext init --agent <agent> defaults to local scope. A
non-interactive init without --agent still registers the project and
installs Git hooks, but skips MCP setup with an actionable warning.
VContext stores five kinds of agent knowledge:
| Entity | Purpose |
|---|---|
| Documents | Architecture, conventions, decisions, and long-form knowledge |
| Tasks | Work items with lifecycle status |
| Prompts | Project-specific reusable instructions |
| Change notes | A concise record of meaningful changes |
| File context | Descriptions attached to files and directories |
Every update creates an immutable revision. Public record_id values identify
the logical entity, while revision IDs identify a specific historical state.
Context evolves independently from source code while still following a Git-like workflow:
vcontext branch create feature/auth --from main
vcontext branch checkout feature/auth
vcontext doc update <record-id> \
--content "Authentication design…" \
--message "Document auth flow"
vcontext log --limit 20
vcontext diff --from branch:main --to branch:feature/auth
vcontext merge preview feature/auth --target main
vcontext merge apply feature/auth --target main --strategy sourceUse snapshots for immutable reads and branches for writes. Existing databases are migrated automatically when opened.
VContext can observe checkout, commit, merge, rewrite, and push events without blocking Git:
vcontext git hooks install
vcontext git hooks status
vcontext git hooks repair
vcontext git hooks uninstallInstallation is reversible. If a repository already has a custom
core.hooksPath, VContext dispatches to it and restores it on uninstall.
Run vcontext --help or vcontext <command> --help for the complete,
version-matched reference.
| Area | Commands |
|---|---|
| Setup | setup, init, projects, status, give-context |
| Context | doc, prompt, task, change, file-context |
| Versioning | branch, snapshot, log, diff, merge, checkout |
| Cloud and sync | auth, identity, remote, clone, fetch, pull, push, sync |
| System | daemon, git hooks, migration, mcp, update |
Human-readable output is the default:
vcontext statusFor scripts:
vcontext status --json
vcontext projects --quiet
vcontext update --yes--jsonwrites machine-readable success output.--quietsuppresses successful output and cannot be combined with--json.- Errors go to stderr; JSON errors use an
{ "error": { ... } }envelope. --yesaccepts confirmations in non-interactive environments.--no-colorandNO_COLORdisable styling.--verboseorVCONTEXT_DEBUG=1enables diagnostics.
The MCP server runs over stdio with:
vcontext mcpIt exposes 48 backwards-compatible tools for project discovery, context,
documents, prompts, tasks, change notes, file context, branches, snapshots,
diffs, merges, and migration inspection. Tool names are prefixed with
vcontext_.
Read-only MCP resources include:
vcontext://projectsvcontext://project/{slug}/statusvcontext://project/{slug}/branch/{branch}/contextvcontext://project/{slug}/snapshot/{snapshotId}vcontext://project/{slug}/document/{recordId}
Canonical MCP inputs use project_slug, record_id, and snapshot_id.
Reads can target a branch or snapshot; writes target branches and may include
a revision message.
The daemon stores its registry and project databases under ~/.vcontext/.
Each project database is protected by a checksum-tracked migration gate before
normal CLI, MCP, or internal access is allowed.
vcontext migration status
vcontext migration list
vcontext migration pending
vcontext migration run --to <version>Backup-required migrations retain backups inside the project's
migration-backups/ directory. Migration inspection is available through
read-only MCP tools; agents cannot execute migrations through MCP.
- Node.js 22
- pnpm 9
- Bun 1.3.x for native release builds and standalone smoke tests
Clone and build the monorepo:
git clone https://github.com/VeguiDev/vcontext.git
cd vcontext
pnpm install
pnpm buildRun the development CLI:
pnpm vcontext-dev --helpFor a global development command:
pnpm vcontext-dev:link
vcontext-dev --helpDevelopment state is isolated under ~/.vcontext-dev. Override it with
VCONTEXT_DEV_HOME. If daemon source changes while the development daemon is
running, stop it with vcontext-dev daemon stop; the next command starts the
rebuilt daemon.
pnpm lint
pnpm check-types
pnpm testapps/
cli/ CLI, MCP entrypoint, and standalone runtime
deamon/ Local daemon and HTTP API
landing/ vcontext.dev website
packages/
daemon-client/ Shared daemon client
vcontext-core/ Runtime primitives
vcontext-mcp/ MCP schemas, tools, and API
versioning-contract/ Shared versioning contracts
tools/
vcontext-dev/ Incremental development launcher
Issues and pull requests are welcome.
- Search existing issues before opening a new one.
- Fork the repository and create a focused branch.
- Add or update tests for behavior changes.
- Run
pnpm lint,pnpm check-types, andpnpm test. - Open a pull request describing the problem, approach, and verification.
For large changes, open an issue first so the design can be discussed before implementation.
Pushes to master run CI and the release workflow. Published versions use the
package semantic version plus the GitHub Actions run number, for example
0.1.1+123, and include native artifacts for all supported platforms.
Manual release workflows build by default; publishing must be explicitly enabled. macOS binaries remain unsigned until the optional signing and notarization secrets are configured.
Remove the installed executable:
- macOS/Linux:
~/.local/bin/vcontextor the custom installation path. - Windows:
%LOCALAPPDATA%\Programs\vcontext\bin\vcontext.exe.
User data under ~/.vcontext/ is intentionally retained. Remove it separately
only if you also want to delete all local VContext projects and configuration.