Research any open-source repo without leaving your project.
You're building an AI chat interface. You see someone on X share their open-source chat app with a slick streaming implementation, or a clever context window optimization, or a feature you want in your app.
Without agents: You go to their repo, read the source code, figure out how the feature works, then manually bring that knowledge back to your project.
With agents: You clone their repo, ask AI how the feature works, copy the response, paste it into the AI chat session that has your project context. Better, but still a lot of friction.
With depresearch: You run one command:
dpr research "how does the streaming implementation work in https://github.com/someone/cool-chat-app"You get back a walkthrough with file paths, code snippets, and enough context to act on it.
dpr is a CLI, so your coding agent (Cursor, Claude Code, OpenCode, etc.) can shell out to it directly. The agent gets back what it needs without having to clone and read through a foreign codebase itself.
Your coding agent
├── shells out: dpr research "how does X work in <repo-url>"
│ ├── clones the repo
│ ├── research agent reads source code
│ └── returns walkthrough
└── continues working on your project
You can install depresearch as an agent skill so your coding agent knows how to use it automatically:
npx skills add https://github.com/Quintui/depresearchOnce installed, your agent can call dpr on its own whenever it needs to research an external codebase — no manual prompting required.
dpr research "your question about a feature in <repo-url>"
│
▼
CLI loads config from ~/.depresearch/
│
▼
Mastra agent starts in-process (no server needed)
│
├── clones repo into ~/.depresearch/workspace/
├── reads source code, traces execution paths
│
▼
Detailed walkthrough printed to stdout
The agent runs entirely on your machine using Mastra. It clones repos into ~/.depresearch/workspace/, reads files, runs shell commands — all sandboxed away from your project directory.
npm install -g depresearchRequires Node.js 20+ and an OpenRouter API key.
dpr config set api-key <your-openrouter-key>Run dpr config to see all current settings:
Current configuration:
api-key sk-or-v1...a3f2
model openrouter/anthropic/claude-haiku-4.5
Usage:
dpr config set api-key <your-openrouter-key>
dpr config set model <model-id>
dpr config get <key>
# Research a feature in a specific repo
dpr research "how does the streaming response work in https://github.com/mckaywrigley/chatbot-ui"
# Stream response tokens in real-time
dpr research "how do they handle the AI context window in https://github.com/steven-tey/chathn" --stream
# It can also resolve repos by library name
dpr research "how does zod z.infer work internally"
# Change the AI model
dpr config set model openrouter/google/gemini-3-flash-previewThe research agent traces actual code paths and returns structured walkthroughs:
- Overview — What the feature does
- Key Files & Entry Points — The map of every file and export involved
- Implementation Walkthrough — Step-by-step code trace with generous snippets
- Interfaces & Types — Full type definitions, schemas, API contracts
- Dependencies & Config — External packages, env vars, setup needed
- Patterns & Gotchas — Non-obvious decisions, edge cases, tradeoffs
All responses include file paths with line numbers and code snippets so the output is self-contained — you don't need access to the repo afterward.
All config lives in ~/.depresearch/:
~/.depresearch/
├── .env # OPENROUTER_API_KEY=sk-or-...
├── config.json # { "model": "openrouter/anthropic/claude-haiku-4.5" }
├── mastra.db # Agent memory (conversation history)
└── workspace/ # Cloned repos live here
| Key | Description | Default |
|---|---|---|
api-key |
Your OpenRouter API key | (required) |
model |
AI model for the research agent (OpenRouter format) | openrouter/anthropic/claude-haiku-4.5 |
| Component | Technology |
|---|---|
| CLI framework | citty |
| AI agent | Mastra (in-process, no server) |
| LLM provider | OpenRouter |
| Bundler | tsup |
| Monorepo | Turborepo + Bun |
git clone https://github.com/kristianvtr/depresearch
cd depresearch
bun install
bun run build
# Link globally for local testing
cd apps/cli && npm link
# Watch mode (rebuilds on save)
cd apps/cli && bun run devMIT