{"id":"d03d9739-05b9-4cd8-a006-35c773a2d6ba","slug":"whichrepo","kind":"mcp","name":"whichrepo","summary":"Local-first task router for microservices, polyrepos, monorepos, and coding agents.","owner":"smallshellctw","repoUrl":"https://github.com/smallshellctw/whichrepo","license":"MIT","licenseTier":"permissive","trust":"community","stars":1,"match":null,"fewStars":true,"format":"mcp","createdAt":"2026-09-22T14:41:10.000Z","addedAt":"2026-10-21T09:43:55.106Z","logoUrl":"https://avatars.githubusercontent.com/u/332375313?v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["productivity"],"tags":["coding-agents","developer-tools","golang","local-first","microservices","monorepo","polyrepo","tree-sitter"],"runtime":"go","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-21T10:40:21.610Z","sample":false,"url":"https://conduits.dev/tools/whichrepo","language":"Go","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"<div align=\"center\">\n\n# WhichRepo\n\n**Describe the task. Find the repo. Show the evidence.**\n\nLanguage-agnostic, local-first task routing for microservices, polyrepos, monorepos, and coding agents.\n\n[![CI](https://github.com/smallshellctw/whichrepo/actions/workflows/ci.yml/badge.svg)](https://github.com/smallshellctw/whichrepo/actions/workflows/ci.yml)\n[![Release](https://img.shields.io/github/v/release/smallshellctw/whichrepo)](https://github.com/smallshellctw/whichrepo/releases)\n[![License: MIT](https://img.shields.io/badge/license-MIT-22c55e.svg)](LICENSE)\n\n[30-second start](#30-second-start) · [Install](#install) · [Install with AI](#install-with-an-ai-agent) · [Agents](#coding-agent-integration) · [Languages](#language-support) · [FAQ](docs/faq.md) · [中文](README.zh-CN.md)\n\n</div>\n\n![WhichRepo signal-map dashboard](assets/whichrepo-dashboard.png)\n\nCoding agents can edit code once they have the right context. In a workspace with dozens of services, the expensive first question is often: **which repositories should own this task?**\n\nWhichRepo indexes the workspace locally, ranks the likely repositories, follows cross-service dependencies, and shows the evidence behind every result. It works without an account, API key, network connection, Go, Node.js, Python, Java, or a database server.\n\n```text\n\"Add retry limits to checkout webhooks\"\n                  │\n                  ▼\n         primary: payments-api\n         related: webhook-worker\n        evidence: internal/webhooks/retry.go\n```\n\n## Install\n\n### macOS and Linux\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/smallshellctw/whichrepo/main/scripts/install.sh | sh\n```\n\n### Windows PowerShell\n\n```powershell\nirm https://raw.githubusercontent.com/smallshellctw/whichrepo/main/scripts/install.ps1 | iex\n```\n\nThe installers download the matching release asset and verify its SHA-256 checksum. No language runtime is installed or required. You can also download a binary directly from [GitHub Releases](https://github.com/smallshellctw/whichrepo/releases) or run the GHCR image.\n\nDevelopers building from source can use `make build`; end users do not need Go. See the complete [installation guide](docs/install.md).\n\n### Install with an AI agent\n\nOpen [`AI_INSTALL.md`](AI_INSTALL.md), replace the workspace path in its prompt, and paste it into Codex, Claude Code, Cursor, OpenCode, or Gemini CLI. The agent uses the checksum-verifying installer, initializes the workspace, configures detected MCP clients, and verifies tool calls without editing source code.\n\n## 30-second start\n\nPoint WhichRepo at the directory that contains your services:\n\n```bash\nwhichrepo init ~/code/commerce-platform\ncd ~/code/commerce-platform\nwhichrepo \"Add retry limits to checkout webhooks\"\n```\n\nOpen the local signal-map dashboard:\n\n```bash\nwhichrepo dashboard --open\n```\n\nRefresh after repositories or manifests change:\n\n```bash\nwhichrepo index\n```\n\nThe SQLite index lives in the OS cache directory and is managed automatically. There is no database to install or keep running.\n\n## Why WhichRepo?\n\n- **Microservice-aware** — identifies the primary repository and related services instead of returning one fuzzy match.\n- **Language-agnostic** — understands package manifests, workspace references, imports, and syntax across mixed-language systems.\n- **Evidence-backed** — returns matching paths, symbols, aliases, package identities, and dependency signals.\n- **Local by default** — SQLite + BM25, no telemetry, no source upload, and no required API key.\n- **Agent-native** — stdio MCP and a bundled skill for Codex, Claude Code, Cursor, OpenCode, and Gemini CLI.\n- **One binary** — CLI, MCP server, language analyzers, SQLite, and the React dashboard ship together.\n- **Optional AI decision layer** — Jev via Vercel, TypeSafe, or OpenRouter with classified errors and local fallback.\n\n## Language support\n\n| Ecosystem | Project discovery | Dependency extraction | Syntax-aware evidence |\n| --- | --- | --- | --- |\n| Go | `go.mod`, `go.work` | modules + imports | Tree-sitter |\n| JavaScript / TypeScript | `package.json`, npm/pnpm/yarn workspaces | packages + imports | Tree-sitter |\n| Python | `pyproject.toml`, `requirements.txt` | distributions + imports | Tree-sitter |\n| Java / Kotlin | Maven and Gradle | modules + dependencies + imports | Tree-sitter for Java |\n| Rust | `Cargo.toml`, Cargo workspaces | crates + `use` | Tree-sitter |\n| .NET | `.sln`, `.csproj`, `.fsproj`, `.vbproj` | project/package references | Tree-sitter for C# |\n| PHP | `composer.json` | Composer packages + namespaces | Tree-sitter |\n| Ruby | `Gemfile`, gemspec | gems + `require` | Tree-sitter |\n\nTree-sitter runs through a pure-Go runtime, so release binaries remain static and cross-platform with `CGO_ENABLED=0`. Indexed source extensions without syntax support still participate in local text retrieval. See [language support](docs/languages.md) and the [analyzer extension contract](docs/analyzers.md).\n\n## Coding-agent integration\n\nMCP tools: `route_task`, `refresh_index`, `list_projects`, and `workspace_status`.\n\nAutomatically configure every detected supported client:\n\n```bash\nwhichrepo setup auto --workspace /path/to/workspace\n```\n\nPreview changes first with `--dry-run`. Cursor configuration is backed up before modification.\n\nCodex:\n\n```bash\ncodex mcp add whichrepo -- whichrepo mcp --workspace /path/to/workspace\n```\n\nClaude Code:\n\n```bash\nclaude mcp add whichrepo --scope user -- whichrepo mcp --workspace /path/to/workspace\n```\n\nCursor (`~/.cursor/mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"whichrepo\": {\n      \"command\": \"/absolute/path/to/whichrepo\",\n      \"args\": [\"mcp\", \"--workspace\", \"/path/to/workspace\"]\n    }\n  }\n}\n```\n\nRestart the client after adding the server. Client-specific examples are in [`docs/integrations`](docs/integrations/).\n\n## Dashboard\n\nThe embedded Dashboard binds only to `127.0.0.1` and includes:\n\n- **Router** — task-to-repository signal map and evidence.\n- **Repositories** — languages, package identities, dependencies, and index coverage.\n- **Evaluation** — reproducible Top-1/Top-3 routing benchmarks.\n- **Settings & Privacy** — provider state and the exact remote payload boundary.\n\nCLI, Dashboard, and MCP use the same routing engine and result schema.\n\n## Configuration\n\nCommit shared metadata as `.whichrepo.yaml`:\n\n```yaml\nversion: 1\nworkspace:\n  name: commerce-platform\n  exclude: [archive-*, tmp-*]\nprojects:\n  payments-api:\n    path: services/payments-api\n    description: Checkout, payments, and webhook endpoints\n    aliases: [checkout, payments, webhooks]\n```\n\nKeep personal or private aliases in `.whichrepo.local.yaml`, which should remain untracked.\n\n`whichrepo init` writes all optional settings with defaults. Inspect the merged result and its sources with:\n\n```bash\nwhichrepo config show\nwhichrepo config paths\nwhichrepo config defaults\nwhichrepo config validate\n```\n\nConfiguration precedence is defaults → `.whichrepo.yaml` → `.whichrepo.local.yaml` → environment variables → CLI flags. See the complete [configuration reference](docs/configuration.md) and its editor-friendly [JSON Schema](configs/whichrepo.schema.json).\n\n| Environment variable | Purpose |\n| --- | --- |\n| `WHICHREPO_WORKSPACE` | Workspace root |\n| `WHICHREPO_DB` | SQLite index path |\n| `WHICHREPO_CONFIG` | Explicit configuration path |\n| `WHICHREPO_PROVIDER` | `local`, `jev-vercel`, `jev-typesafe`, or `jev-openrouter` |\n| `WHICHREPO_PROVIDER_URL` | Override the provider endpoint |\n| `WHICHREPO_MODEL` | Override the provider model |\n| `WHICHREPO_PROVIDER_TIMEOUT` | Override the provider HTTP timeout |\n\n## Optional Jev routing\n\nLocal routing is the default. Jev is an optional re-ranker:\n\n```bash\nexport WHICHREPO_PROVIDER=jev-vercel\nexport AI_GATEWAY_API_KEY=\"...\"\nwhichrepo \"Add retry limits to checkout webhooks\"\n```\n\nAuthentication, billing, rate-limit, timeout, and availability failures are reported separately and fall back to local results. Remote providers receive task text, candidate summaries, and redacted evidence—not complete source files.\n\n## Reproducible evaluation\n\nThe included fixture contains Go, TypeScript, Python, Java, Rust, C#, PHP, and Ruby services:\n\n```bash\nwhichrepo index --workspace ./examples/polyrepo \\\n  --config ./examples/polyrepo/.whichrepo.yaml \\\n  --db /tmp/whichrepo-demo.db\n\nwhichrepo eval --workspace ./examples/polyrepo \\\n  --config ./examples/polyrepo/.whichrepo.yaml \\\n  --db /tmp/whichrepo-demo.db \\\n  --dataset benchmarks/starter.jsonl\n```\n\nCurrent 100-task local baseline: **79% Top-1, 95% Top-3**. The benchmark and every fixture are public and run without a model API. See the [methodology and limits](docs/benchmarks.md).\n\n## Privacy\n\n- Source files and the SQLite index stay on the local machine.\n- Known credentials, environment files, private keys, generated code, and dependency directories are excluded.\n- There is no default telemetry.\n- Routing evidence is not authorization to edit, commit, deploy, or access production systems.\n\nSee [SECURITY.md](SECURITY.md) for the threat model.\n\n## Development\n\nOnly contributors need Go and Node.js:\n\n```bash\nmake test\nmake web\nmake build\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md), [good first contributions](docs/good-first-issues.md), [troubleshooting](docs/troubleshooting.md), [CHANGELOG.md](CHANGELOG.md), and [ROADMAP.md](ROADMAP.md).\n\n## License\n\nMIT\n"}