npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

depresearch

v0.0.6

Published

Research any open-source repo without leaving your project.

Readme

depresearch

Research any open-source repo without leaving your project.

The Problem

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 "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.

Works as a sub-agent

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 "how does X work in <repo-url>"
    │       ├── clones the repo
    │       ├── research agent reads source code
    │       └── returns walkthrough
    └── continues working on your project

How It Works

dpr "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.

Install

npm install -g depresearch

Requires Node.js 20+ and an OpenRouter API key.

Setup

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>

Usage

# Research a feature in a specific repo
dpr "how does the streaming response work in https://github.com/mckaywrigley/chatbot-ui"

# Stream response tokens in real-time
dpr "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 "how does zod z.infer work internally"

# Change the AI model
dpr config set model openrouter/google/gemini-3-flash-preview

What You Get Back

The 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.

Configuration

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 |

Tech Stack

| Component | Technology | |---|---| | CLI framework | citty | | AI agent | Mastra (in-process, no server) | | LLM provider | OpenRouter | | Bundler | tsup | | Monorepo | Turborepo + Bun |

Development

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 dev

License

MIT