</> RIP Docs
★ Stars Star on GitHub
Repository Intelligence Platform

Production docs for codebase intelligence.

RIP turns repositories into queryable knowledge graphs, semantic indexes, architecture maps, and AI-ready context packages. Use it from the CLI, REST API, Context Gateway, Flutter app, VS Code, and MCP-aware coding agents.

No documentation sections match your search.

Quickstart #

Edit this page

The core loop is intentionally short: install the CLI, initialize a repository, index it, then ask questions. Indexing creates the graph and vector data used by every analysis command.

01 InstallInstall `repo` through pip, a standalone installer, or source checkout.
02 InitCreate `.repo-intel/config.toml` and record project settings.
03 IndexParse files, extract entities and relationships, and build search data.
04 QueryUse search, trace, impact, dependencies, explain, metrics, and architecture.
05 IntegrateConnect API, Flutter, Gateway, VS Code, or MCP agents.
pip install repo-intelligence==0.1.0

cd path\to\your\project
repo init --project-name "My Awesome Project"
repo index -v

repo search "authentication flow"
repo trace UserService --depth 8
repo impact UserService
repo explain "how login works" --diagram --tree --deps
repo architecture
repo onboard --output ONBOARDING.md
What `repo index` does: discovers source files, parses Tree-sitter entities, extracts calls/imports/ownership/inheritance, writes graph data, generates semantic embeddings, and stores project-scoped metadata.

Installation paths #

Edit this page
PyPI

Developer CLI

Fastest path for engineers who already have Python. Install with pip and verify with `repo --help`.

Installer

Zero configuration

Use OS-specific installers when users do not want to manage Python, venvs, or dependencies directly.

Source

Contributor setup

Clone the repository, install dependencies with `uv sync`, and start Docker only when server mode is needed.

Apps

VS Code and Flutter

Use editor and mobile surfaces after the RIP server is reachable and API keys are configured.

# Contributor setup
git clone https://github.com/pratiksingh1702/RIP.git
cd RIP
uv sync
docker compose up -d
uv run repo --help

Runtime modes #

Edit this page

Runtime-aware commands accept `--mode auto|server|local`. Local mode is for offline single-developer analysis. Server mode is required for REST, Flutter, Gateway, WebSockets, remote Git indexing, shared indexes, and concurrent users.

CapabilityLocal modeServer mode
Storage`.repo-intel/local/` SQLite, graph JSON, vector JSONNeo4j, Qdrant, Postgres, Redis
OfflineYesNo
CLI and MCPSupportedSupported
REST, Flutter, GatewayUnavailableAvailable
Remote Git indexingUnavailableAvailable
repo doctor . --mode local
repo index . --mode local
repo explain PaymentService --mode local --no-llm --tree --deps

docker compose up -d
uv run repo serve --mode server --host 0.0.0.0 --port 8000

Configuration #

Edit this page

Configuration priority is command-line options first, environment variables second, and `.repo-intel/config.toml` third. Local mode works with no server config; server mode needs service URLs and credentials.

[graph]
neo4j_uri = "bolt://localhost:7687"
neo4j_user = "neo4j"
neo4j_password = "your-password"

[search]
qdrant_host = "localhost"
qdrant_port = 6333
embedding_model = "BAAI/bge-small-en-v1.5"

[storage]
postgres_url = "postgresql+asyncpg://user:pass@localhost:5433/db"
redis_url = "redis://localhost:6379"

[llm]
primary_provider = "ollama"
primary_model = "qwen2.5-coder:7b"
ollama_host = "http://localhost:11434"
repo config
repo config --get llm.primary_provider
repo config --set llm.primary_provider=openai
repo explain "how auth works" --no-llm --tree --deps

CLI overview #

Edit this page

Every `repo` command accepts `-v` / `--verbose`. Verbose mode prints detailed runtime logs and writes `.repo-intel/logs/<command>-YYYYMMDD-HHMMSS.log` when a target repository is available.

Indexing

`repo init`, `repo index`, `repo status`, and `repo git-index` create and inspect indexed repository data.

Analysis

`repo search`, `trace`, `impact`, `dependencies`, `explain`, `architecture`, `metrics`, `dead-code`, and `onboard` answer codebase questions.

Operations

`repo serve`, `projects`, `use`, `delete`, `config`, `api-keys`, and `doctor` manage runtime, projects, auth, and diagnostics.

Indexing commands #

Edit this page

repo init

Initialize `.repo-intel/` configuration for a repository and set project isolation defaults.

repo init [repo_path] --project-name billing-api
repo init C:\path\to\project --project-name flutter-app --qdrant-strategy payload_filter
--project-name
Human-readable project name.
--isolation
Enable project isolation filters. Default is enabled.
--qdrant-strategy
`payload_filter` or `collection_per_project`.

repo index

Build or refresh graph and semantic indexes for a repository.

repo index . -v
repo index --incremental
repo index --smart
repo index --watch
repo index C:\path\to\project --languages python,typescript
--smart
Index git-changed, staged, untracked, and deleted source files.
--incremental
Index changed files instead of full rebuild.
--languages
Comma-separated language filter.
--watch
Watch files and re-index automatically.

repo status

Check whether a repository is initialized and indexed.

repo status
repo status C:\path\to\project

repo git-index

Server-mode remote Git indexing. Use `--subdir lib` to index only a Flutter app's `lib` folder rather than the whole repository.

repo git-index https://github.com/pratiksingh1702/flutter_music_app.git \
  --folder-name flutter_music_app_lib \
  --project-name flutter_music_app_lib \
  --subdir lib \
  --branch main

Analysis commands #

Edit this page

repo search

Semantic search for code by behavior or concept.

repo search "database queries" --language python --limit 50
repo search "login flow" --project 3f2f-project-id

repo trace

Trace call graph paths from an entry point.

repo trace main --depth 20 --format json
repo trace BaseParser --explain

repo impact

Find downstream files and symbols that may be affected by a change.

repo impact PythonParser
repo impact core/parser/base.py --format json

repo dependencies

Inspect file-level importers, imports, contained symbols, and dependency graph.

repo dependencies type_provider.dart
repo dependencies auth_service.dart --project 3f2f-project-id --limit 50

repo explain

Explain architecture with graph context, diagrams, tree views, dependency tables, and optional LLM narration.

repo explain "how login works" --diagram --tree --deps
repo explain "how auth works" --no-llm --tree --deps
repo explain PythonParser --provider google --model gemini-2.5-flash

repo architecture / metrics / onboard / dead-code

Generate system diagrams, risk metrics, onboarding guides, and unused-code candidates.

repo architecture --format mermaid
repo metrics --module core.parser --top-risk 10
repo onboard --output ONBOARDING.md
repo dead-code --type functions --format json

Projects and API keys #

Edit this page

Projects isolate graph and vector results. API keys protect server access and can be used by Flutter, REST clients, and integrations.

Project selection

repo projects
repo use 3f2f-project-id
repo use 3f2f-project-id --repo-path C:\path\to\project
repo search "something" --project 3f2f-project-id

API key management

repo api-keys list
repo api-keys create "Flutter App" --description "For mobile app" --expires-in 365
repo api-keys revoke 2
Project access: server requests use `Authorization: Bearer <api-key>`. The server can expose open projects to valid keys and still enforce project-scoped operations where required.

Server and maintenance #

Edit this page

repo serve

Start the RIP API server for REST, Flutter, Gateway, WebSockets, remote Git indexing, and shared indexes.

docker compose up -d
repo serve --host 0.0.0.0 --port 8080
uv run repo serve --mode server --host 0.0.0.0 --port 8000

repo delete

Clear indexed data. Prefer `--project` for targeted cleanup.

repo delete --project d93fcec0-9811-538a-be5c-fc5be577ec5a --yes
repo delete --yes --no-storage
repo delete --mode local --yes

repo config / doctor

Inspect config and diagnose provider selection.

repo config --get llm.primary_provider
repo config --set llm.primary_provider=openai
repo doctor . --mode local
repo doctor . --mode server

Gateway commands #

Edit this page

The Context Gateway has its own `gateway` CLI. It starts the Gateway HTTP server, reports source health, manages source toggles, and prints MCP configuration for agents.

cd gateway
uv run gateway start
uv run gateway status
uv run gateway sources list
uv run gateway sources enable github
uv run gateway sources disable jira
uv run gateway mcp config
uv run gateway mcp-server
gateway start
Starts the Gateway FastAPI server using configured host, port, and debug values.
gateway status
Prints host, port, version, debug state, and source availability.
gateway sources
Lists, enables, or disables configured data sources for the process.
gateway mcp config
Prints an MCP server configuration block for agents.
gateway mcp-server
Runs the Gateway MCP stdio server.

Authentication #

Edit this page

RIP server routes are protected with bearer tokens. Create API keys from the CLI or API, then pass them in the `Authorization` header.

Authorization: Bearer rip_xxxxxxxxxxxxxxxxxxxxx

RIP REST API #

Edit this page

The RIP API mirrors the core CLI surfaces for apps and integrations. Responses are wrapped in the server envelope where applicable.

MethodEndpointPurpose
POST/indexStart indexing for a repository path.
GET/index/statusRead index status.
GET/searchSemantic code search.
GET/trace/{symbol}Trace call graph paths.
GET/impact/{symbol}Analyze downstream impact.
POST/explainGenerate graph-backed explanations.
GET/architectureReturn architecture diagram or structure.
GET/metricsReturn complexity, coupling, and risk metrics.
GET/dead-codeFind unused functions/classes.
POST/git/indexStart remote Git indexing.
GET/git/status/{job_id}Read remote Git indexing job status.
GET/runtime/statusInspect runtime provider state.

Projects API #

Edit this page

Project endpoints expose indexed repositories and metadata to server-mode clients such as Flutter, dashboards, and integrations.

MethodEndpointPurpose
GET/projects/List projects visible to the authenticated key.
GET/projects/{project_id}Read one project's metadata.
DELETE/projects/{project_id}Delete a project and associated indexed metadata.
curl -H "Authorization: Bearer $RIP_API_KEY" http://127.0.0.1:8000/projects/

API key management #

Edit this page
MethodEndpointPurpose
POST/api-keysCreate a new API key and return plaintext once.
GET/api-keysList key metadata: id, name, prefix, active state, expiry, last used, project id.
DELETE/api-keys/{api_key_id}Revoke an API key.
curl -X POST http://127.0.0.1:8000/api-keys \
  -H "Authorization: Bearer $RIP_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Flutter App","description":"Mobile access","expires_in":365}'

Gateway API #

Edit this page
MethodEndpointPurpose
GET/, /healthGateway health and source status.
POST/api/contextReturn a ranked context package for an agent task.
POST/api/validateValidate a proposed code change.
GET/api/sessions, /api/sessions/{id}List or fetch Gateway memory sessions.
GET/api/sourcesList sources such as RIP, GitHub, Jira, and Slack.
POST/api/sources/{source}/enableEnable a source for the Gateway process.
POST/api/sources/{source}/disableDisable a source for the Gateway process.
GET/api/metricsReturn basic Gateway metrics.
{
  "task": "Add audit logging to login",
  "token_budget": 6000,
  "sources": ["rip", "github"]
}

System architecture #

Edit this page
Interfaces

Human and agent surfaces

CLI, FastAPI, VS Code, Flutter, MCP, and Gateway all sit above the same indexed knowledge layer.

Core

Understanding engine

Parser, indexer, graph, search, analysis, LLM narration, and service orchestration turn code into queryable facts.

Storage

Local and server providers

Local mode uses files and SQLite. Server mode uses Neo4j, Qdrant, Postgres, and Redis.

Indexing pipeline #

Edit this page
DiscoverWalk source files and respect ignore rules.
ParseUse Tree-sitter language parsers.
ExtractBuild entities and relationships.
PersistWrite graph, vector, and metadata stores.
ServeExpose results through CLI, API, MCP, and apps.

Storage providers #

Edit this page
StoreLocal modeServer mode
MetadataSQLite in `.repo-intel/local/`Postgres
GraphNetworkX graph JSONNeo4j
VectorsLocal vector JSON payloadsQdrant
Gateway/cacheNot availableRedis-backed services

Project isolation #

Edit this page

Every indexed repository has a project identity. Graph nodes and vector payloads carry project IDs so search, trace, impact, explain, and API clients can stay scoped to the intended codebase.

Gateway overview #

Edit this page

The Context Gateway is server-mode only. It classifies the agent task, plans source retrieval, executes sources in parallel, ranks and compresses results, checks permissions, manages sessions, and returns a context package.

Gateway setup #

Edit this page
cd gateway
uv pip install -e .
cp .env.example .env
uv run alembic upgrade head
uv run gateway start
uv run gateway mcp config

Gateway sources #

Edit this page
SourceDefaultNotes
ripAlways enabledCore repository intelligence source.
githubOptionalRequires `GATEWAY_GITHUB_MCP_ENABLED` and token/config.
jiraOptionalRequires Jira URL/token and optional project key.
slackOptionalRequires Slack token/config.

Gateway operations #

Edit this page
docker compose up -d
.\.venv\Scripts\repo.exe serve --mode server
.\gateway\.venv\Scripts\gateway.exe start

curl http://127.0.0.1:8001/health
gateway status
Operational knobs: use `GATEWAY_SOURCE_TIMEOUT_SECONDS`, `GATEWAY_DEFAULT_MAX_TOKENS`, `GATEWAY_CIRCUIT_BREAKER_THRESHOLD`, and `GATEWAY_CIRCUIT_BREAKER_RESET_SECONDS` to tune retrieval behavior.

VS Code extension #

Edit this page

The VS Code extension is the editor-first interface. It exposes RIP Chat, context menu actions, architecture visualization, metrics, and index status monitoring.

Editor workflows #

Edit this page
Index this project
Explain how authentication works
Show architecture diagram
Trace UserService

Flutter app #

Edit this page

The Flutter app connects to a server-mode RIP backend. Use `repo serve --host 0.0.0.0` so the phone can reach the server over the local network, then provide the API key in the app setup flow.

Mobile commands #

Edit this page

The app mirrors server-backed workflows. Project surfaces use project metadata, and remote Git indexing can be triggered with the same `subdir` semantics as the CLI.

/index https://github.com/pratiksingh1702/flutter_music_app.git --folder flutter_music_app_lib --project-name flutter_music_app_lib --subdir lib --branch main
@ project-list

MCP overview #

Edit this page

RIP supports MCP so coding agents can ask for context, search, trace, impact, explain, and validation without guessing from raw files alone.

RIP MCP #

Edit this page

RIP MCP mirrors the documented CLI surface, including init, index, trace, impact, explain, search, projects, use, dead-code, onboard, architecture, metrics, serve, status, delete, and config tools.

Gateway MCP #

Edit this page
{
  "mcpServers": {
    "context-gateway": {
      "command": "gateway",
      "args": ["mcp-server"],
      "env": {
        "GATEWAY_RIP_MCP_CWD": "."
      }
    }
  }
}