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.
Go CLI · project:. · package sources · AST-Graph Engine indexes
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.
curl -fsSL https://raw.githubusercontent.com/agentsw0rk/repobridge/main/install.sh | bash
Quick start
Turn the current repository, selected subtrees, manifests, lockfiles, and imports into graph references an AI agent skill can search locally.
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
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.
| 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
repobridge turns local project paths, dependency packages, and repository snapshots into searchable graph context.
Use project:., project:./path, or project:/absolute/path to analyze the current repository or a focused subtree without copying source files.
Detect dependency source specs from manifests, lockfiles, and imports before the repobridge skill guides an AI agent through code work.
Resolve package metadata and fetch matching source repositories or source archives as read-only reference material.
Query project and cached dependency graphs by symbol name, node kind, path, language, framework route, and function calls.
Use persisted contains edges to move from files and modules to classes, functions, methods, fields, properties, imports, and nested types.
Store server and client routes from Spring, Express, React Router, FastAPI, Flask, Django, Gin, chi, gorilla/mux, ASP.NET, Axum, actix, and Rocket.
Use status, files, and node to check graph freshness, list indexed files, and cite exact symbols with optional source lines.
Use callers, callees, and impact to follow call, route handler, import, middleware, and containment edges.
Use context and explore to return bounded entry points, relationships, snippets, related files, warnings, and stats for a task.
Use install-agent to install the bundled RepoBridge skill for Codex, Claude, Cursor, or opencode with dry-run and print-only modes.
Agent setup
install-agent writes RepoBridge skill files for the selected agent target.
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
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
The commands are optimized for scripting, cache management, and agent workflows.
scanFinds 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 · nodeInspects graph health, indexed files, and individual symbols with optional source line output.
--json · --path · --source-lines · --no-sync-index
callers · callees · impactTraverses call, route handler, containment, and impact relationships from the stored AST graph with deterministic, compact output.
--depth · --edge · --limit · --include-unresolved · --json
context · exploreBuilds focused or broad task context with entry points, graph relationships, source snippets, related files, warnings, and stats.
--budget · --limit · --depth · --json
install-agentInstalls the bundled RepoBridge skill for Codex, Claude, Cursor, opencode, or all targets.
--target · --version · --dry-run · --print-config
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
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.
Successful path, fetch, and scan --fetch calls start AST indexing without changing command output.
Tree-sitter parsers extract functions, methods, call references, and framework routes across Go, Java, Kotlin, C#, JavaScript, TypeScript, Python, and Rust.
Every indexed source file gets a stable file node. Package and namespace scopes become module nodes, and declarations are linked with contains edges.
Route annotations, router calls, JSX routes, URL patterns, and builder APIs create graph evidence so POST /login can lead straight to the handler.
search, graph inspection, and callgraph commands detect missing or stale graphs and rebuild them synchronously unless --no-sync-index is set.
status reports graph path and counts, files lists indexed files, and node returns one symbol with calls and optional source lines.
callers, callees, and impact walk stored graph edges with bounded depth, edge filters, limits, and unresolved call references.
context and explore apply small, medium, or large output budgets so agents receive focused evidence without oversized transcripts.
Workflows
Use repobridge when the agent needs the real implementation behind a framework API.
Run repobridge install-agent --target codex --version v0.6.0 so the agent learns to prefer RepoBridge graph commands over broad text search.
Run repobridge scan --cwd . --json to identify framework and library specs from manifests, lockfiles, and imports.
Run repobridge scan --cwd . --fetch --limit 10 to cache sources and start background AST indexing.
Run repobridge search <spec> "kind:route path:/login" or "kind:function calls:send" to get compact graph results.
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
Most problems are related to local tooling, host API limits, or version detection context.
git is not foundInstall git, make sure it is available on the PATH, then rerun the command.
Set GITHUB_TOKEN, GITLAB_TOKEN, or BITBUCKET_TOKEN through your environment.
Pass --cwd /path/to/project or provide the exact package version explicitly.
Run repobridge search, status, or a callgraph command without --no-sync-index; it rebuilds missing or stale AST graphs before returning results.