Go CLI · project:. · package sources · AST-Graph Engine indexes

searchable source context for ai agents

repobridge indexes the current repository with project:., resolves dependency sources, and gives AI agents stable graph context for symbols, structure, framework routes, and call investigation.

Install CLI curl -fsSL https://raw.githubusercontent.com/agentsw0rk/repobridge/main/install.sh | bash
repobridge
$ repobridge status --cwd . project:. Indexed the current project without writing .repobridge-graph into the repo   $ repobridge search --cwd . project:. "kind:function name:NewRootCommand" function NewRootCommand internal/cli/root.go:181   $ repobridge scan --cwd . --fetch --limit 10 Fetched dependency sources and queued AST indexing   $ repobridge search react@19.0.0 "calls:createRoot" function render src/client/ReactDOMRoot.js:92   $ repobridge search github.com/acme/service "kind:route path:/login" route POST /login AuthController.kt:12   $ repobridge callees maven:org.jetbrains.kotlin:kotlin-stdlib@2.0.20 commonMain/kotlin/collections/ArrayList.kt --edge contains file commonMain/kotlin/collections/ArrayList.kt contains kotlin.collections.ArrayList
project:. · subtrees
deps · repos
AST nodes · routes
contains edges
Go · Java · Kotlin
C# · JS · TS
Python · Rust
npm · PyPI · crates.io
Maven · NuGet

Quick start

Index the project before the agent starts guessing.

Turn the current repository, selected subtrees, manifests, lockfiles, and imports into graph references an AI agent skill can search locally.

skill-driven agent context workflow
repobridge install-agent --target codex --version v0.6.0
repobridge install-agent --target codex --dry-run

# Used by the installed repobridge skill
repobridge status --cwd . project:.
repobridge path --cwd . project:.
repobridge path --cwd . project:./internal/cli
repobridge search --cwd . project:. "kind:function name:NewRootCommand"
repobridge context --cwd . project:. "scan command dependency detection flow" --budget small

repobridge scan --cwd . --json
repobridge scan --cwd . --fetch --limit 10

repobridge search react@19.0.0 "kind:function calls:createRoot"
repobridge search maven:org.jetbrains.kotlin:kotlin-stdlib@2.1.0 "lang:kotlin kind:function"
repobridge search github.com/meltwater/kotlin-compose@953e574e6fb15018ba3be02afdc6cbfe068601d8 "lang:kotlin calls:exec"
repobridge search github.com/acme/service "kind:route path:/login"
repobridge search github.com/acme/web "kind:component_route path:/settings"

repobridge status github.com/meltwater/kotlin-compose@953e574e6fb15018ba3be02afdc6cbfe068601d8
repobridge files github.com/meltwater/kotlin-compose@953e574e6fb15018ba3be02afdc6cbfe068601d8 --path src --limit 10
repobridge node github.com/meltwater/kotlin-compose@953e574e6fb15018ba3be02afdc6cbfe068601d8 up --source-lines 12
repobridge callees maven:org.jetbrains.kotlin:kotlin-stdlib@2.0.20 commonMain/kotlin/collections/ArrayList.kt --edge contains

repobridge callers github.com/meltwater/kotlin-compose@953e574e6fb15018ba3be02afdc6cbfe068601d8 exec --include-unresolved
repobridge callers github.com/acme/service AuthController.login --depth 1
repobridge callees github.com/meltwater/kotlin-compose@953e574e6fb15018ba3be02afdc6cbfe068601d8 findDockerCompose --depth 2
repobridge callees maven:org.jetbrains.kotlin:kotlin-stdlib@2.0.20 be0e02a37d825e799fa669f4577829b23229936d --edge contains --limit 20

repobridge context github.com/meltwater/kotlin-compose@953e574e6fb15018ba3be02afdc6cbfe068601d8 "findDockerCompose exec flow" --budget small
repobridge context github.com/acme/service "POST /login" --budget small
repobridge explore github.com/meltwater/kotlin-compose@953e574e6fb15018ba3be02afdc6cbfe068601d8 "DockerComposeContainer up" --budget large --depth 2
Give the agent evidence, not a wall of matching lines.

RepoBridge searches the AST graph and returns symbols, calls, routes, files, and line numbers as compact structured context. The same investigations with broad text search produce larger snippets that the model still has to interpret.

49.5-83.3% fewer estimated tokens
Search task RepoBridge est. tokens rg est. tokens Reduction
Find Kotlin up function 224 444 49.5%
Find functions calling exec 928 2,575 64.0%
Find functions calling ps 320 1,310 75.6%
Find findDockerCompose 96 576 83.3%

Core features

Built for source-aware AI agents.

repobridge turns local project paths, dependency packages, and repository snapshots into searchable graph context.

Index local project sources

Use project:., project:./path, or project:/absolute/path to analyze the current repository or a focused subtree without copying source files.

project:.statuscontext

Scan dependency context

Detect dependency source specs from manifests, lockfiles, and imports before the repobridge skill guides an AI agent through code work.

scan--json--no-imports

Fetch dependency sources

Resolve package metadata and fetch matching source repositories or source archives as read-only reference material.

npmPyPIcrates.io MavenNuGet

Search AST-Graph Engine indexes

Query project and cached dependency graphs by symbol name, node kind, path, language, framework route, and function calls.

searchkind:routecomponent_route

Navigate source structure

Use persisted contains edges to move from files and modules to classes, functions, methods, fields, properties, imports, and nested types.

containskind:filekind:module

Index framework routes

Store server and client routes from Spring, Express, React Router, FastAPI, Flask, Django, Gin, chi, gorilla/mux, ASP.NET, Axum, actix, and Rocket.

handlesroutes_tomiddleware

Inspect graph evidence

Use status, files, and node to check graph freshness, list indexed files, and cite exact symbols with optional source lines.

statusfilesnode

Trace call relationships

Use callers, callees, and impact to follow call, route handler, import, middleware, and containment edges.

callerscallees--edge contains

Build agent context

Use context and explore to return bounded entry points, relationships, snippets, related files, warnings, and stats for a task.

contextexplorebudget

Install agent skills

Use install-agent to install the bundled RepoBridge skill for Codex, Claude, Cursor, or opencode with dry-run and print-only modes.

install-agent--dry-run--print-config

Agent setup

Install the skill before the agent reaches for text search.

install-agent writes RepoBridge skill files for the selected agent target.

skill installation commands
repobridge install-agent --target codex --version v0.6.0
repobridge install-agent --target claude --version v0.6.0
repobridge install-agent --target all --dry-run
repobridge install-agent --target codex --print-config

Supported inputs

One CLI shape across projects, registries, and hosts.

Use project: for local source, package prefixes for non-npm registries, and repository specs for Git hosts.

Type Examples Behavior
Local project project:., project:./internal/cli, project:/Users/me/app Indexes a local path directly. Graph data lives under REPOBRIDGE_HOME/projects, so the working tree stays clean.
npm react, react@19.0.0, @scope/pkg@1.2.3 Default registry. Without a version, repobridge can use a locally detected project version.
PyPI pypi:requests, pypi:requests==2.32.3 Reads PyPI metadata and normalizes repository sources.
crates.io crates:serde, cargo:serde@1.0.217 Uses crates.io metadata and matching Git references.
Maven maven:org.jetbrains.kotlin:kotlin-stdlib@2.1.0 Prefers source JARs, falls back to SCM metadata, and indexes Java/Kotlin source graphs.
NuGet nuget:Newtonsoft.Json@13.0.3, dotnet:Serilog@3.1.1 Reads .nuspec repository metadata and fetches the matching Git source.
Repositories vercel/next.js, github.com/vercel/next.js Resolves supported GitHub, GitLab, and Bitbucket repositories.

CLI reference

Small command surface, predictable output.

The commands are optimized for scripting, cache management, and agent workflows.

scan

Finds dependency source specs in a project and can fetch them for agent context.

--cwd · --json · --fetch · --limit

path <spec...>

Fetches sources on cache miss and prints absolute local paths. For project:, it resolves the local path without network access.

--cwd · --verbose

fetch <spec...>

Preloads package or repository sources into the cache. For project:, it validates the source path and queues graph indexing.

--cwd · --quiet

search <spec> <query>

Searches project, dependency, or repository AST graphs, including framework route, handler, and component route nodes, rebuilding missing or stale graph data when needed.

--json · --limit · --kind · --lang · --calls

status · files · node

Inspects graph health, indexed files, and individual symbols with optional source line output.

--json · --path · --source-lines · --no-sync-index

callers · callees · impact

Traverses call, route handler, containment, and impact relationships from the stored AST graph with deterministic, compact output.

--depth · --edge · --limit · --include-unresolved · --json

context · explore

Builds focused or broad task context with entry points, graph relationships, source snippets, related files, warnings, and stats.

--budget · --limit · --depth · --json

install-agent

Installs the bundled RepoBridge skill for Codex, Claude, Cursor, opencode, or all targets.

--target · --version · --dry-run · --print-config

agent reference commands
repobridge status --cwd . project:.
repobridge path --cwd . project:.
repobridge path --cwd . project:./internal/cli
repobridge search --cwd . project:. "kind:function name:NewRootCommand"
repobridge context --cwd . project:. "scan command dependency detection flow" --budget small

repobridge scan --cwd . --json
repobridge scan --cwd . --fetch --limit 10
repobridge scan --cwd . --no-imports

repobridge path --cwd . react
repobridge path --cwd . github.com/spf13/cobra

repobridge search react@19.0.0 "kind:function calls:createRoot"
repobridge search pypi:requests==2.32.3 "calls:send lang:python"
repobridge search maven:org.jetbrains.kotlin:kotlin-stdlib@2.1.0 "lang:kotlin kind:function"
repobridge search github.com/acme/service "kind:route path:/login"
repobridge search github.com/acme/web "kind:component_route path:/settings"
repobridge search github.com/acme/api "kind:route lang:go path:/api/users"

repobridge status react@19.0.0
repobridge files react@19.0.0 --path packages/react-dom --limit 10
repobridge node react@19.0.0 createRoot --source-lines 20
repobridge callees maven:org.jetbrains.kotlin:kotlin-stdlib@2.0.20 commonMain/kotlin/collections/ArrayList.kt --edge contains

repobridge callers react@19.0.0 createRoot --depth 2
repobridge callers github.com/acme/service AuthController.login --depth 1
repobridge callees react@19.0.0 createRoot --include-unresolved
repobridge callees maven:org.jetbrains.kotlin:kotlin-stdlib@2.0.20 be0e02a37d825e799fa669f4577829b23229936d --edge contains --limit 20
repobridge impact react@19.0.0 createRoot --json

repobridge context react@19.0.0 "createRoot render flow" --budget small
repobridge context github.com/acme/service "POST /login" --budget small
repobridge explore github.com/vercel/next.js "AppRouter cache invalidation" --budget large --depth 2

repobridge install-agent --target codex --version v0.6.0
repobridge install-agent --target all --dry-run

AST-Graph Engine

Search behavior, not only text.

Dependency graph data is stored beside cached sources in .repobridge-graph/. Local project: graph data is stored under REPOBRIDGE_HOME/projects so working trees stay clean.

Background indexing

Successful path, fetch, and scan --fetch calls start AST indexing without changing command output.

asyncObjectBoxlocal

Language coverage

Tree-sitter parsers extract functions, methods, call references, and framework routes across Go, Java, Kotlin, C#, JavaScript, TypeScript, Python, and Rust.

gokotlinpythonrust

Structure containment

Every indexed source file gets a stable file node. Package and namespace scopes become module nodes, and declarations are linked with contains edges.

filemodulecontains

Framework routes

Route annotations, router calls, JSX routes, URL patterns, and builder APIs create graph evidence so POST /login can lead straight to the handler.

routehandlerhandles

Fresh results

search, graph inspection, and callgraph commands detect missing or stale graphs and rebuild them synchronously unless --no-sync-index is set.

stale check--no-sync-index

Graph inspection

status reports graph path and counts, files lists indexed files, and node returns one symbol with calls and optional source lines.

readystalesource-lines

Callgraph traversal

callers, callees, and impact walk stored graph edges with bounded depth, edge filters, limits, and unresolved call references.

depth--edgeunresolved

Context budgets

context and explore apply small, medium, or large output budgets so agents receive focused evidence without oversized transcripts.

smallmediumlarge

Workflows

Designed for AI-agent code investigations.

Use repobridge when the agent needs the real implementation behind a framework API.

01

Install the agent skill

Run repobridge install-agent --target codex --version v0.6.0 so the agent learns to prefer RepoBridge graph commands over broad text search.

02

Scan the project

Run repobridge scan --cwd . --json to identify framework and library specs from manifests, lockfiles, and imports.

03

Fetch reference sources

Run repobridge scan --cwd . --fetch --limit 10 to cache sources and start background AST indexing.

04

Search symbols and routes

Run repobridge search <spec> "kind:route path:/login" or "kind:function calls:send" to get compact graph results.

05

Build task context

Run repobridge context <spec> "task query" or repobridge explore <spec> "symbol flow" when the agent needs exact evidence with bounded snippets and graph relationships.

Troubleshooting

Common failure modes and fixes.

Most problems are related to local tooling, host API limits, or version detection context.

git is not found

Install git, make sure it is available on the PATH, then rerun the command.

API limits or private repositories

Set GITHUB_TOKEN, GITLAB_TOKEN, or BITBUCKET_TOKEN through your environment.

Wrong npm version

Pass --cwd /path/to/project or provide the exact package version explicitly.

Missing graph data

Run repobridge search, status, or a callgraph command without --no-sync-index; it rebuilds missing or stale AST graphs before returning results.