β¦βββββββββββββ β¬βββ¬ββ¬βββββββ β β¦βββ€ ββββ ββ β©βββ¬ββ βββ β¬ββ€ β©ββββββ΄ βββββββ΄βββ΄ββ΄βββββββCross-repo intelligence CLI
Research, plan, and ship features that span multiple repositories.
You're building a feature that touches 3 repos β a backend API, a frontend app, and a shared library. You need to:
- Understand how auth works across all of them
- Plan which files to create/modify in each repo
- Catch that the backend returns
snake_casebut the frontend expectscamelCase - Find out the event names don't match between producer and consumer
You'd normally spend hours reading code across repos, mentally mapping dependencies, and discovering conflicts mid-implementation.
RepoBridge does this in seconds.
| Feature | Description |
|---|---|
| Ask | Ask questions about your codebase with full cross-repo context. Concise answers with repo/file citations. |
| Plan | Generate detailed implementation plans with per-file tasks, dependency ordering, and cross-cutting concerns. Auto-exports a structured markdown report. |
| Discuss | Multi-phase cross-repo analysis β each repo is analyzed individually, then cross-referenced for conflicts with severity ratings and resolution suggestions. |
| Index | Scans repos for file trees, API routes, exports, events, auth patterns, and env vars. Feeds this as context to AI. |
# From npm (recommended)
npm install -g repobridge
# Or try without installing
npx repobridge
# Or from source
git clone https://github.com/AlameerAshraf/RepoBridge.git
cd RepoBridge
npm install && npm run build && npm link# Launch interactive mode
repobridgeInside the session:
repobridge > init my-platform
repobridge:my-platform > add
repo 1 > /path/to/backend
repo 2 > /path/to/frontend
choice (1/2) > 2
repobridge:my-platform > ask "How does authentication flow from frontend to backend?"
repobridge:my-platform > plan "Add Stripe billing with usage-based pricing"
repobridge:my-platform > discuss "API contract for billing endpoints"
RepoBridge is model-agnostic. Switch providers with one command:
config --provider anthropic # Claude (default)
config --provider openai --model gpt-4o # OpenAI
config --provider deepseek --model deepseek-chat --base-url https://api.deepseek.com/v1
config --provider gemini --model gemini-2.0-flash
config --provider ollama --model llama3.1 # Local, no API key needed
| Provider | Default Model | Auth |
|---|---|---|
anthropic |
claude-sonnet-4-20250514 |
ANTHROPIC_API_KEY |
openai |
gpt-4o |
OPENAI_API_KEY |
gemini |
gemini-2.0-flash |
GEMINI_API_KEY |
ollama |
llama3.1 |
None (local) |
Any OpenAI-compatible API works via --provider openai --base-url <url> (DeepSeek, Groq, Together, Azure, etc.)
| Command | Description |
|---|---|
init <name> |
Create a new project |
projects |
List all projects |
use <name> |
Switch active project |
leave |
Deactivate current project |
delete [name] |
Delete a project (with confirmation) |
status |
Project dashboard β repos, file/route counts, plans, discussions, AI provider |
| Command | Description |
|---|---|
add [path-or-url] |
Guided flow to add repos (minimum 2 required). Supports local paths and GitHub URLs. Auto-indexes on add. |
index |
Re-index all repos in the active project |
| Command | Description |
|---|---|
ask "<question>" |
Ask anything about your repos. Concise, direct answers with key file citations. Session auto-saved with model info. |
plan "<feature>" |
Generate a cross-repo implementation plan. Per-file tasks with details, dependencies, and concerns. Exports markdown report. |
discuss [feature] |
Three-phase cross-repo analysis: per-repo deep analysis β cross-reference for conflicts β validation pass. Each conflict includes severity reasoning and a resolution suggestion. |
| Command | Description |
|---|---|
sessions |
List saved sessions with date, model, and question |
sessions load <id> |
Replay a past session (supports partial ID match) |
sessions delete <id> |
Delete a saved session |
config |
View/change AI provider and model |
Discuss mode is RepoBridge's core feature. It finds integration conflicts before you write code.
repobridge:my-app > discuss "Add real-time notifications"
How it works:
- Analysis phase β Each repo is analyzed individually by the AI, grounded in actual code. The AI examines API contracts, data models, auth patterns, events, and naming conventions.
- Cross-reference phase β All repo analyses are compared in a single pass to identify concrete conflicts with code evidence from both sides.
- Validation phase β If conflicts are found, a final pass validates them, removes false positives, and catches anything missed.
Each conflict includes:
- What's wrong β detailed description citing specific files/endpoints in both repos
- Severity β high/medium/low with reasoning (based on actual impact, not just type)
- Resolution β specific suggested fix
Conflict types detected:
| Type | Example |
|---|---|
endpoint_mismatch |
Backend serves /api/users, frontend calls /users |
field_naming |
Backend returns created_at, frontend expects createdAt |
auth_contract |
Backend expects Bearer token, frontend sends session cookie |
event_mismatch |
Producer emits user.created, consumer listens for user_created |
response_shape |
Backend returns { data: [...] }, frontend expects { results: [...] } |
schema_mismatch |
Backend has email as required, frontend form treats it as optional |
A full markdown report is saved to ~/.repobridge/projects/<name>/discussions/<id>-discussion.md.
Every plan command generates a structured markdown report at ~/.repobridge/projects/<name>/plans/<id>-plan.md:
# Implementation Plan
> **Add Stripe billing with usage-based pricing**
| | |
|---|---|
| **Project** | my-platform |
| **Repos** | 2 |
| **Tasks** | 14 |
| **Blockers** | 3 (1 high) |
## backend
### 1. + CREATE `src/models/Subscription.ts`
Subscription model with Stripe integration
- Fields: id, userId, stripeCustomerId, plan, status, currentPeriodEnd
- Stripe webhook handler for subscription.updated events
> **Depends on:** `src/models/User.ts`
### 2. ~ MODIFY `src/routes/index.ts`
Register billing routes
- Add /api/billing/* route group
- Apply auth middleware to all billing endpoints
...Run repobridge with no arguments to enter a persistent interactive session:
$ repobridge
β¦βββββββββββββ β¬βββ¬ββ¬βββββββ
β β¦βββ€ ββββ ββ β©βββ¬ββ βββ β¬ββ€
β©ββββββ΄ βββββββ΄βββ΄ββ΄βββββββ
Interactive mode. Type 'help' for commands, 'exit' to quit.
repobridge > init my-app
repobridge:my-app > add
repobridge:my-app > ask "How does the API handle auth?"
repobridge:my-app > plan "Add user notifications"
repobridge:my-app > discuss
repobridge:my-app > status
repobridge:my-app > exit
All commands work the same as one-off CLI calls. The prompt shows your active project.
Everything is stored locally. No cloud, no telemetry.
~/.repobridge/
βββ config.json β active project + AI provider config
βββ repos/ β cloned GitHub repos
βββ projects/
βββ <project-name>/
βββ config.json β repos list + metadata
βββ index/
β βββ <repo>.json β indexed repo context
βββ sessions/
β βββ <id>.json β saved Q&A sessions (with model info)
βββ plans/
β βββ <id>.json β plan data
β βββ <id>-plan.md β generated markdown report
βββ discussions/
βββ <id>.json β discussion results + conflicts
βββ <id>-discussion.md β generated markdown report
src/
βββ index.ts β CLI entry point (commander + REPL)
βββ commands/
β βββ init.ts β Project creation
β βββ projects.ts β List projects
β βββ use.ts / leave.ts β Switch/deactivate project
β βββ add.ts β Guided repo adding flow
β βββ index.ts β Repo indexing
β βββ ask.ts β AI Q&A with streaming
β βββ plan.ts β Plan generation + markdown export
β βββ discuss.ts β Three-phase cross-repo discussion
β βββ delete.ts β Project deletion
β βββ sessions.ts β Session management (list, load, delete)
β βββ status.ts β Project dashboard
β βββ config.ts β AI provider configuration
β βββ repl.ts β Interactive session loop
βββ lib/
β βββ ai.ts β AI orchestration (ask, plan, discuss prompts)
β βββ discuss.ts β Discussion engine (analyze, cross-reference, validate)
β βββ indexer.ts β Repo scanning (files, routes, exports, events)
β βββ storage.ts β Data types + file I/O
β βββ prompt.ts β Shared readline with EOF handling
β βββ providers/
β βββ base.ts β LLMProvider interface
β βββ index.ts β Provider factory
β βββ anthropic.ts β Claude (via SDK)
β βββ openai.ts β OpenAI-compatible (native fetch)
β βββ gemini.ts β Google Gemini (native fetch)
β βββ ollama.ts β Ollama local (native fetch)
βββ ui/
βββ theme.ts β Layout system, boxes, tables, icons
βββ markdown.ts β Terminal markdown renderer
| Variable | Required | Description |
|---|---|---|
ANTHROPIC_API_KEY |
If using Anthropic | Claude API key |
OPENAI_API_KEY |
If using OpenAI | OpenAI API key |
GEMINI_API_KEY |
If using Gemini | Google AI API key |
Ollama requires no API key. Keys can also be set via config --api-key.
- Node.js >= 18
- npm
npm testCI runs build + tests on every push and PR to main.
MIT
Stop reading code across 5 repos. Let them talk to each other.