Documentation

vexp VS Code Extension

Configuration guide, command reference, and troubleshooting for the vexp VS Code extension.

v1.1VS Code 1.85+12 languages · 12 agents
Overview

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

01

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.

02

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.

03

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.

Getting Started

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.

NoteThe extension is self-contained: the Rust daemon and the MCP server are bundled inside the package. No additional downloads, npm install, or manual setup are required after installation.

Platform support

PlatformArchitectureBinary target
Linuxx64x86_64-unknown-linux-musl
Linuxarm64aarch64-unknown-linux-musl
macOSx64 (Intel)x86_64-apple-darwin
macOSarm64 (Apple Silicon)aarch64-apple-darwin
Windowsx64x86_64-pc-windows-gnu
NoteBinaries are statically compiled — no GLIBC or system DLL dependencies. The correct binary for your platform is selected automatically from the extension package.
Setup

First Run

The extension activates automatically when you open a workspace containing TypeScript, JavaScript, Python, Go, or Rust files. On first activation it:

  1. Selects and verifies the correct native binary for your platform.
  2. Starts the vexp-core Rust daemon.
  3. Starts the vexp-mcp MCP server on port 7821.
  4. Checks for an existing .vexp/index.db in the git root.
  5. 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.

Command Palette

> 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:

Status bar states

◈ 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.

Reference

Configuration

All settings are accessible via File → Preferences → Settings (search for vexp) or directly in your settings.json.

SettingTypeDefaultDescription
vexp.enabledbooleantrueEnable or disable the extension entirely.
vexp.maxContextTokensnumber8000Maximum 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.autoCommitIndexbooleantrueAutomatically include .vexp/index.db in git commits via the pre-commit hook.
vexp.gitHooksInstallbooleantrueInstall git hooks for index synchronization on first run.
vexp.multiRepo.enabledbooleantrueEnable multi-repo workspace support (cross-repo graph queries).
vexp.multiRepo.workspaceConfigstring".vexp/workspace.json"Path to the workspace configuration file for multi-repo setups.
vexp.mcpPortnumber7821HTTP 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.enabledbooleanfalseOpt in to anonymous usage telemetry (token savings %, latency averages). No code content is ever sent.

Example settings.json

settings.json
{
  "vexp.maxContextTokens": 16000,
  "vexp.skeletonDetail": "detailed",
  "vexp.autoCommitIndex": true,
  "vexp.logLevel": "warn"
}
Reference

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.
Compatibility

Supported Languages

vexp uses tree-sitter grammars compiled to WASM and bundled directly in the Rust binary — no downloads at runtime.

LanguageExtensionsCoverageStatus
TypeScript.tsFullv1.0
JavaScript.js, .mjs, .cjsFullv1.0
TSX / JSX.tsx, .jsxFullv1.0
Python.pyFullv1.0
Go.goFullv1.0
Rust.rsFullv1.0
Java.javaFullv1.1
C#.csFullv1.1
C.c, .hFullv1.1
C++.cpp, .hpp, .ccFullv1.1
Ruby.rbFullv1.1
Bash.shFullv1.1
Compatibility

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.

AgentConfig file generatedTransport
Claude Code.claude/CLAUDE.mdstdio
Cursor.cursor/rulesHTTP/SSE
Windsurf.windsurf/rulesHTTP/SSE
GitHub Copilot.vscode/mcp.json (patch)HTTP/SSE
Continue.dev.continue/config.json (patch)HTTP/SSE
Augment.augment/rules.mdHTTP/SSE
Zed.zed/settings.json (patch)stdio
Codex.codex/config.jsonstdio
Opencode.opencode/config.jsonstdio
Kilo Code.kilocode/rules.mdHTTP/SSE
Kiro.kiro/rules.mdHTTP/SSE
Antigravity.antigravity/config.jsonHTTP/SSE
NoteAgents not listed above can still use vexp via the MCP HTTP endpoint at http://localhost:7821. Any MCP-compatible agent can connect using the standard HTTP + SSE transport.
Reference

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.

NoteAlways call get_context_capsule first before any code modification. It is the primary entry point and provides the most value.
get_context_capsule

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.
get_impact_graph

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.
search_logic_flow

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.
get_skeleton

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.
index_status

Returns current index statistics: file count, node count, edge count, daemon uptime, and indexing progress.

workspace_setup

Special onboarding tool. Detects installed agents, generates config files, and returns a workspace.json template. Typically called once at project setup.

submit_lsp_edges

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.
Advanced

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

.vexp/ layout
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 binary

Git hooks

vexp installs three lightweight hooks written in shell/Rust (no Node dependency):

HookWhen it runsWhat it does
pre-commitBefore every commitFlushes the WAL, optimizes the DB, updates manifest.json, and stages both files.
post-mergeAfter git pull / git mergeCompares local vs remote manifest.json timestamps; adopts the newer index and re-indexes only the files changed in the merge.
post-checkoutAfter git checkout / git switchLoads 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:

  1. Takes the index.db from the branch with the more recent manifest.json timestamp as the base.
  2. Re-indexes only the files modified by the other branch.
  3. 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 setup (auto-suggested by vexp)

$ 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.

Advanced

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

.vexp/workspace.json
{
  "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:

MCP tool call example
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.

Support

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 vexp from the dropdown.
  • Try vexp: Force Re-index from the Command Palette.
Open vexp logs

> 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 Status to 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:

settings.json
{
  "vexp.mcpPort": 7822
}
NoteAfter changing the port, restart VS Code so the extension restarts the MCP server. Agent config files (e.g. .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:

Fix binary permissions

# 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.logLevel to "debug" and restart VS Code.
  • Check the Output panel for vexp daemon logs.
  • On Linux: ensure /tmp is 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 Workspace to regenerate the agent config file.
  • For Claude Code: ensure the .claude/CLAUDE.md file 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.
WarningIf you change 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.

Security

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

.vexp_ignore
# Exclude secrets and environment files
.env*
*.pem
*.key
secrets/

# Exclude generated code
src/generated/
dist/
build/

# Exclude large data directories
data/
fixtures/large/
Plans

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

Nodes≤ 2,000
Repositories1
MCP tools3 core tools
Git persistence

3 core MCP tools. Try vexp on a personal project — no account required.

Pro

$19/mo

Nodes50,000
Repositories3
MCP toolsAll 7 tools
Git persistence

All 7 MCP tools, multi-repo workspace, intent detection, CodeLens.

Team

$29/user/mo

NodesUnlimited
RepositoriesUnlimited
MCP toolsAll 7 tools
Git persistence

Shared workspace, priority paths, analytics. Flat per-seat pricing.

Enterprise

Custom

NodesUnlimited
RepositoriesUnlimited
MCP toolsAll 7 tools
Git persistence

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:

Authenticate

> vexp: Configure Workspace → Sign in

NoteOffline grace period: 7 days. After 7 days without a license check, the extension falls back to Starter tier behavior. This applies only to Pro and Team plans.