Introduction
vexp is a local-first context engine that reduces token consumption by 65–70% for any AI coding agent. Instead of passing entire files to the model, vexp analyzes your codebase with tree-sitter, builds an AST dependency graph, and returns only the relevant pivot nodes plus compact skeletons of supporting files.
The VS Code extension is the primary distribution for v1.0. It is fully self-contained: the Rust daemon (vexp-core) and the MCP server (vexp-mcp) are bundled inside the extension package — no external dependencies or manual npm install required.
How it works
Index
tree-sitter parses your source files and builds a SQLite graph stored in .vexp/index.db at the git root. Incremental file watcher keeps it up to date in real time.
Traverse
Given a natural-language task description, vexp identifies the most relevant pivot nodes via semantic search + graph traversal, ranking by centrality and relevance score.
Capsule
Pivot files are returned in full; supporting files are skeletonized (signatures + docstrings only). The result fits in the configured token budget — typically 8 000 tokens.
Installation
The extension is distributed exclusively through the VS Code Marketplace and runs on VS Code and all VS Code-based editors: Cursor, Windsurf, and any Electron fork that supports the VS Code extension API.
Install from the Extensions panel
Open the Extensions panel (Ctrl+Shift+X / ⌘⇧X), search for vexp, and click Install. The same steps apply in Cursor and Windsurf — both expose the standard VS Code Extensions panel.
npm install, or manual setup are required after installation.Platform support
| Platform | Architecture | Binary target |
|---|---|---|
| Linux | x64 | x86_64-unknown-linux-musl |
| Linux | arm64 | aarch64-unknown-linux-musl |
| macOS | x64 (Intel) | x86_64-apple-darwin |
| macOS | arm64 (Apple Silicon) | aarch64-apple-darwin |
| Windows | x64 | x86_64-pc-windows-gnu |
First Run
The extension activates automatically when you open a workspace containing TypeScript, JavaScript, Python, Go, or Rust files. On first activation it:
- Selects and verifies the correct native binary for your platform.
- Starts the
vexp-coreRust daemon. - Starts the
vexp-mcpMCP server on port 7821. - Checks for an existing
.vexp/index.dbin the git root. - If the index exists → runs an incremental sync (usually under 5 s).
If not → runs a full background index (progress bar visible in the status bar).
Workspace setup command
Run the setup command from the Command Palette to configure AI agents automatically. vexp detects which agents are present in your workspace and writes the appropriate config files.
> vexp: Setup Workspace
This generates agent-specific configuration files (e.g. .claude/CLAUDE.md, .cursor/rules, .windsurf/rules) that instruct the agent to call get_context_capsule before any code modification.
Status bar
The vexp status bar item is always visible at the bottom of the editor window:
◈ vexp: 34.8k nodes | ⟳ indexing...
◈ vexp: 34.8k nodes | ✓ ready
◈ vexp: error — click for details
Git hooks
On first run, vexp offers to install lightweight git hooks that keep .vexp/index.db in sync with commits. A VS Code notification lets you approve or decline. The hooks are simple shell scripts — they do not depend on Node or npm.
Configuration
All settings are accessible via File → Preferences → Settings (search for vexp) or directly in your settings.json.
| Setting | Type | Default | Description |
|---|---|---|---|
vexp.enabled | boolean | true | Enable or disable the extension entirely. |
vexp.maxContextTokens | number | 8000 | Maximum tokens per context capsule. Increase for larger models (e.g. 16000 for Claude Opus). |
vexp.skeletonDetail | "minimal" | "standard" | "detailed" | "standard" | Default skeleton detail level for supporting files. minimal ≈5%, standard ≈15%, detailed ≈30% of original token count. |
vexp.autoCommitIndex | boolean | true | Automatically include .vexp/index.db in git commits via the pre-commit hook. |
vexp.gitHooksInstall | boolean | true | Install git hooks for index synchronization on first run. |
vexp.multiRepo.enabled | boolean | true | Enable multi-repo workspace support (cross-repo graph queries). |
vexp.multiRepo.workspaceConfig | string | ".vexp/workspace.json" | Path to the workspace configuration file for multi-repo setups. |
vexp.mcpPort | number | 7821 | HTTP port for the MCP server. Change if 7821 conflicts with another service. |
vexp.logLevel | "error" | "warn" | "info" | "debug" | "warn" | Log verbosity for the vexp daemon. Set to "debug" when troubleshooting. |
vexp.telemetry.enabled | boolean | false | Opt in to anonymous usage telemetry (token savings %, latency averages). No code content is ever sent. |
Example settings.json
{ "vexp.maxContextTokens": 16000, "vexp.skeletonDetail": "detailed", "vexp.autoCommitIndex": true, "vexp.logLevel": "warn" }
Commands
All commands are available from the Command Palette (Ctrl+Shift+P / ⌘⇧P). Type vexp to filter.
vexp: Setup WorkspaceDetects installed AI agents and writes agent-specific MCP configuration files. Run this once after installing the extension in a new project.vexp: Generate Context Capsule for Current TaskOpens an input dialog where you describe your current task. vexp returns the most relevant code in a compact, token-efficient capsule.vexp: Show Impact Graph for Symbol at CursorAnalyzes the symbol under the cursor and shows all callers, importers, and transitive dependents. Useful before refactoring exported functions.vexp: Show File SkeletonGenerates and displays a skeleton of the current file — function signatures, class declarations, and type definitions without implementation bodies.vexp: Setup Multi-Repo WorkspaceInteractive wizard to configure a multi-repository workspace. Creates .vexp/workspace.json and configures cross-repo indexing.vexp: Force Re-indexDiscards the current index and runs a full re-index of all workspace files. Use when the incremental index appears out of sync.vexp: Configure WorkspaceOpens the workspace configuration UI where you can adjust index settings, excluded paths, and language preferences.vexp: Show Index StatusDisplays current index statistics: file count, node count, edge count, last indexed commit, and daemon uptime.Supported Languages
vexp uses tree-sitter grammars compiled to WASM and bundled directly in the Rust binary — no downloads at runtime.
| Language | Extensions | Coverage | Status |
|---|---|---|---|
| TypeScript | .ts | Full | v1.0 |
| JavaScript | .js, .mjs, .cjs | Full | v1.0 |
| TSX / JSX | .tsx, .jsx | Full | v1.0 |
| Python | .py | Full | v1.0 |
| Go | .go | Full | v1.0 |
| Rust | .rs | Full | v1.0 |
| Java | .java | Full | v1.1 |
| C# | .cs | Full | v1.1 |
| C | .c, .h | Full | v1.1 |
| C++ | .cpp, .hpp, .cc | Full | v1.1 |
| Ruby | .rb | Full | v1.1 |
| Bash | .sh | Full | v1.1 |
Supported Agents
When you run vexp: Setup Workspace, the extension scans for known AI agents in your workspace and automatically writes or patches their configuration files to register vexp as an MCP server.
| Agent | Config file generated | Transport |
|---|---|---|
| Claude Code | .claude/CLAUDE.md | stdio |
| Cursor | .cursor/rules | HTTP/SSE |
| Windsurf | .windsurf/rules | HTTP/SSE |
| GitHub Copilot | .vscode/mcp.json (patch) | HTTP/SSE |
| Continue.dev | .continue/config.json (patch) | HTTP/SSE |
| Augment | .augment/rules.md | HTTP/SSE |
| Zed | .zed/settings.json (patch) | stdio |
| Codex | .codex/config.json | stdio |
| Opencode | .opencode/config.json | stdio |
| Kilo Code | .kilocode/rules.md | HTTP/SSE |
| Kiro | .kiro/rules.md | HTTP/SSE |
| Antigravity | .antigravity/config.json | HTTP/SSE |
http://localhost:7821. Any MCP-compatible agent can connect using the standard HTTP + SSE transport.MCP Tools
vexp exposes 7 MCP tools. Your AI agent calls them automatically based on the instructions in the generated config file. You can also call them directly from the Command Palette for debugging.
get_context_capsule first before any code modification. It is the primary entry point and provides the most value.Returns the most relevant code for a given task — pivot files in full, supporting files as skeletons. Use this before any code change.
Parameters
querystringNatural-language description of the current task.reposstring[]= allLimit query to specific repo aliases (multi-repo only).max_tokensnumber= 8000Token budget for the capsule.pivot_depthnumber= 2Graph traversal depth from pivot nodes.include_testsboolean= falseInclude test files in the capsule.skeleton_detail"minimal"|"standard"|"detailed"= "standard"Detail level for supporting file skeletons.Shows all code that would break or be affected if a symbol changes. Use before refactoring exported functions or changing public APIs.
Parameters
symbol_fqnstringFully qualified name, e.g. src/auth/auth.ts::validateToken.depthnumber= 5Maximum traversal depth.cross_repoboolean= trueInclude cross-repo dependents.format"list"|"tree"|"mermaid"= "tree"Output format.Finds execution paths between two symbols — how data or control flows from A to B through the call graph.
Parameters
startstringFQN of the start symbol.endstringFQN of the end symbol.max_pathsnumber= 3Maximum number of paths to return.cross_repoboolean= trueAllow cross-repo traversal.Returns token-efficient skeletons of one or more files — signatures, class declarations, and type definitions without implementation bodies (70–90% token reduction).
Parameters
filesArray<{repo?: string; path: string}>Files to skeletonize.detail"minimal"|"standard"|"detailed"= "standard"Skeleton detail level.Returns current index statistics: file count, node count, edge count, daemon uptime, and indexing progress.
Special onboarding tool. Detects installed agents, generates config files, and returns a workspace.json template. Typically called once at project setup.
Submits type-resolved call edges captured from the VS Code Language Server. Supplements static analysis with runtime type information for higher-confidence call graphs.
Parameters
edgesArray<{caller: string, callee: string}>Array of caller/callee FQN pairs from the language server.Git Integration
vexp stores the index in .vexp/index.db at the git root and commits it alongside your source code. This means new team members get a pre-built index when they clone the repository — no waiting for a full re-index.
Directory structure
repo-root/
├── src/
└── .vexp/
├── index.db ← SQLite graph (binary, git-tracked)
├── index.db-wal ← in .gitignore
├── index.db-shm ← in .gitignore
├── manifest.json ← human-readable metadata
└── .gitattributes ← marks index.db as binaryGit hooks
vexp installs three lightweight hooks written in shell/Rust (no Node dependency):
| Hook | When it runs | What it does |
|---|---|---|
pre-commit | Before every commit | Flushes the WAL, optimizes the DB, updates manifest.json, and stages both files. |
post-merge | After git pull / git merge | Compares local vs remote manifest.json timestamps; adopts the newer index and re-indexes only the files changed in the merge. |
post-checkout | After git checkout / git switch | Loads the index for the new branch and re-indexes only the diff vs the previous branch. |
Merge conflicts on index.db
index.db is a binary file and cannot be merged line-by-line. vexp installs a custom git merge driver that automatically resolves conflicts:
- Takes the
index.dbfrom the branch with the more recentmanifest.jsontimestamp as the base. - Re-indexes only the files modified by the other branch.
- In the worst case, re-indexes the entire repository in the background — the merge never blocks.
Large repositories and Git LFS
For codebases with more than ~5 000 source files, index.db may exceed 100 MB. vexp automatically detects this and suggests enabling Git LFS for the file:
$ git lfs install
$ git lfs track ".vexp/index.db"
$ git add .gitattributes
Opting out of git integration
If you prefer not to commit the index, set vexp.autoCommitIndex and vexp.gitHooksInstall to false in settings, and add .vexp/ to your .gitignore. The extension will still work — each developer simply re-indexes on first open.
Multi-Repo Setup
vexp can index multiple repositories simultaneously and query across their boundaries. This is particularly useful for microservices, monorepos split across multiple git repositories, or frontend + backend pairs.
Setup wizard
Run vexp: Setup Multi-Repo Workspace from the Command Palette. The wizard creates a .vexp/workspace.json and registers each repository.
workspace.json format
{
"name": "my-project",
"version": "1",
"repos": [
{
"alias": "frontend",
"path": "/projects/my-project-frontend",
"languages": ["typescript"],
"role": "consumer"
},
{
"alias": "backend",
"path": "/projects/my-project-backend",
"languages": ["go"],
"role": "provider"
}
],
"cross_repo_links": [
{
"type": "openapi",
"source": "backend:src/api/openapi.yaml",
"consumer": "frontend:src/api/generated/"
}
]
}Cross-repo query
Once configured, MCP tools automatically traverse repository boundaries. Pass multiple repo aliases to target specific repositories:
get_context_capsule query: "Add the roles field to the user API response" repos: ["backend", "frontend"]
VS Code multi-root workspaces
vexp integrates natively with VS Code Multi-root Workspaces (.code-workspace files). When VS Code opens a multi-root workspace, vexp detects all folders, indexes them separately, and activates the cross-repo query engine automatically.
Cross-repo storage
Cross-repo relationship data is stored in ~/.vexp/registry.db — a SQLite database shared across all workspaces on the machine. Per-repo indexes remain in each repository's .vexp/index.db.
Troubleshooting
Extension not activating
vexp activates when the workspace contains supported source files (.ts, .py, .go, .rs, etc.) or an existing .vexp/manifest.json.
- Ensure the workspace folder contains at least one supported source file.
- Check the VS Code Output panel: select
vexpfrom the dropdown. - Try
vexp: Force Re-indexfrom the Command Palette.
> Developer: Open Extension Logs Folder
Index not updating
- Check the status bar — if it shows
indexing…, a full re-index is already running. - Run
vexp: Show Index Statusto see the current node count and last indexed commit. - If the daemon appears stuck, restart it via
vexp: Force Re-index.
Port 7821 already in use
Change the MCP server port in settings:
{
"vexp.mcpPort": 7822
}.claude/CLAUDE.md) will also need to be regenerated via vexp: Setup Workspace.Binary permission denied (macOS / Linux)
On first install, the Rust binary may not be executable. The extension sets the correct permissions automatically, but if you see a permission error:
# Locate the extension folder
$ ls ~/.vscode/extensions/vexp.vexp-*/binaries/
# Make the binary executable
$ chmod +x ~/.vscode/extensions/vexp.vexp-*/binaries/vexp-core-*
macOS Gatekeeper warning
vexp binaries are signed with an Apple Developer Certificate and notarized. If Gatekeeper blocks the binary, open System Preferences → Privacy & Security and click Allow next to the vexp entry.
Daemon crashes on startup
- Set
vexp.logLevelto"debug"and restart VS Code. - Check the Output panel for
vexp daemonlogs. - On Linux: ensure
/tmpis writable (the daemon uses a Unix socket there). - On Windows: ensure the named pipe namespace is accessible (no restrictive AppContainer policy).
AI agent not using vexp tools
- Verify the MCP server is running:
vexp: Show Index Status. - Re-run
vexp: Setup Workspaceto regenerate the agent config file. - For Claude Code: ensure the
.claude/CLAUDE.mdfile is in the project root and that Claude Code picks up MCP servers from that file. - For Cursor/Windsurf: check that the MCP extension is enabled in the editor settings and that the port matches
vexp.mcpPort.
vexp.mcpPort, always regenerate agent config files via vexp: Setup Workspace. Agent config files hardcode the port number.Index too large for git
For repositories with more than ~5 000 source files, index.db may exceed 100 MB. vexp will prompt you to enable Git LFS. If you want to opt out of committing the index entirely, see the Git Integration section.
Privacy & Security
Local-only by default
Your source code never leaves your machine. vexp runs entirely offline on every plan — Starter, Pro, Team, and Enterprise. Zero network calls, zero cloud dependencies.
Telemetry opt-in
Usage metrics (token savings %, average latency, language distribution) are only collected when vexp.telemetry.enabled is set to true. No code content is ever included.
Secrets detection
Files matching secrets patterns (.env*, *secret*, *credential*, API key patterns) are automatically excluded from indexing and cannot be included in context capsules.
Signed binaries
macOS binaries are signed and Apple-notarized. Windows binaries carry an Authenticode EV certificate. Linux binaries are verified via SHA-256 manifest at startup.
.vexp_ignore
Add a .vexp_ignore file (gitignore syntax) to exclude paths from indexing. This is always respected and cannot be overridden via API or settings.
Sandboxed daemon
The vexp-core daemon never executes user code. tree-sitter operates in parse-only mode — no eval, no code execution, no dynamic import.
.vexp_ignore example
# Exclude secrets and environment files .env* *.pem *.key secrets/ # Exclude generated code src/generated/ dist/ build/ # Exclude large data directories data/ fixtures/large/
Plans & Limits
vexp counts indexed nodes — not lines of code or file count. A node is a distinct symbol: function, class, method, interface, variable, or type alias. As a reference: the vexp codebase itself (~50 source files) generates ~500 nodes.
Starter
$0
3 core MCP tools. Try vexp on a personal project — no account required.
Pro
$19/mo
All 7 MCP tools, multi-repo workspace, intent detection, CodeLens.
Team
$29/user/mo
Shared workspace, priority paths, analytics. Flat per-seat pricing.
Enterprise
Custom
Self-hosted, SSO, audit log, custom exclusion policies, SHA-256 verification.
Starter plan paywall behavior
vexp never blocks you or loses data at the node limit. As you approach the limit:
- At 80% (1,600 nodes) — a non-blocking informational notification appears in the status bar.
- At 100% (2,000 nodes) — new files are still indexed but excess nodes are excluded from queries. Upgrade to Pro for 50,000 nodes and all 7 tools.
License & activation
Licenses are tied to your vexp account (email + device fingerprint). To authenticate:
> vexp: Configure Workspace → Sign in