# Rig constellation

> Local-first semantic knowledge graph of a codebase with an interactive map and MCP tools for coding agents.

Rig is an open-source, local-first tool from anikolabs that builds a semantic knowledge graph of a project, renders it as an interactive browser map, and exposes it to coding agents such as Claude Code, Cursor, Codex and opencode over MCP. Running one command indexes the code, opens the live map and wires the detected agent into the project. According to the README, everything runs on the user's machine with no API key and no upload.

## What It Is

Rig is a code-intelligence and agent-memory layer. It extracts files, symbols, calls, imports, tests and dependencies from TypeScript, TSX, JavaScript, JSX, Python and Markdown projects (plus manifests such as package.json and pyproject.toml) into a SQLite graph. Agents query that graph for callers, callees, impact analysis, critical paths and hubs instead of grepping and reading files. Search fuses exact names, keyword matches and on-device embeddings into a single ranking.

## Memory across sessions

Agents can attach waypoints (decisions, constraints, open questions), aliases, annotations and links to code, and these persist through re-indexing. If a symbol disappears, its memory is set aside and re-attached when it returns. For Claude Code, optional hooks use deterministic pattern matching over the transcript to capture agreed decisions, corrections, constraints and dead ends, then inject a short brief at session start. Agent-proposed links wait for human accept or reject on the map, and memory can be exported and imported as JSONL.

## Setup path

Run npx rig-constellation (or bunx) in a project directory. The command initializes .rig/, starts the map on a per-project local port, indexes the code and writes agent config files. rig install and rig uninstall add or remove the wiring per project or globally. Other commands include rig overview, rig query, rig sync, rig status, rig doctor and rig serve.

## Benchmarks and tradeoffs

The README reports benchmark results from a single model (Claude Haiku 5.5): session-2 success of 70% with waypoints versus 30% without on 20 two-session tasks. It also reports that for single questions grep alone used fewer tokens, with rig at 134% of grep-only tokens per question, so exact identifier lookups are better left to grep.

## Features
- Interactive live map of the codebase graph
- Caller, callee and impact analysis
- Hybrid search combining exact names, keywords and on-device embeddings
- Compact repository orientation map (rig_overview)
- Magnetic pull explainable related-code ranking
- Dependency intelligence for npm and Python
- Persistent waypoints and memory across sessions
- Automatic decision capture hooks for Claude Code
- Human review of agent-proposed links
- Memory export and import
- Concurrency-safe multi-agent access
- Local-only operation with no API key

## Integrations
Claude Code, Cursor, Codex CLI, opencode, MCP, OpenRouter, SQLite

## Platforms
WINDOWS, MACOS, LINUX, WEB, API, CLI

## Pricing
Open Source

## Version
v0.3.0

## Links
- Website: https://github.com/anikolabs/rig
- Repository: https://github.com/anikolabs/rig
- EveryDev.ai: https://www.everydev.ai/tools/rig-constellation
