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

dgrep

v0.2.2

Published

The Context CLI for AI Agents

Downloads

88

Readme

dgrep

The CLI for Docfork, the documentation index for AI coding agents. Search versioned library docs from the terminal.

npx dgrep

Install

npx dgrep            # run directly (recommended)
npm install -g dgrep # or install globally

Quick start

dgrep init                                                              # detect deps, write config
dgrep search "server-side rendering with App Router"                    # search tracked libraries
dgrep search "middleware redirect based on authentication" -l vercel/next.js  # search a specific library
dgrep read https://nextjs.org/docs/app/building-your-application/routing/middleware
dgrep setup                                                             # wire into Cursor, Claude Code, OpenCode

dgrep provisions keys automatically on first search. No API key required.

How it works

dgrep init detects your dependencies and writes .dgrep/config.json. After that, dgrep search resolves libraries locally — no setup step on every query.

Architecture details →

Commands

| Command | Description | | ------------------------ | ---------------------------------------------------------------- | | dgrep | Show status (runs init if not yet configured) | | dgrep init | Detect dependencies, resolve libraries, write config | | dgrep search <query> | Search documentation across tracked libraries | | dgrep read <url> | Fetch full content of a documentation page | | dgrep add <library> | Add a library to your stack | | dgrep remove <library> | Remove a library from tracking | | dgrep list | List tracked libraries | | dgrep setup | Install the Docfork MCP server in your IDE (Cursor, Claude Code, OpenCode) | | dgrep status | Show configuration and authentication state | | dgrep login | Log in to your Docfork account | | dgrep logout | Log out and clear credentials | | dgrep doctor | Diagnose setup and connectivity | | dgrep color [name] | Set CLI accent color |

Flags

Global

| Flag | Description | | ------------ | ---------------------------------- | | -y, --yes | Skip interactive prompts (CI mode) | | --json | Output as NDJSON | | --api-key | Override API key | | -h, --help | Show help | | --version | Show version |

Search

| Flag | Description | | --------------- | ----------------------------------------------- | | -l, --library | Library to search (repeatable) | | --limit | Max results (default: 10) | | --no-save | Don't remember this library for future searches |

Read

dgrep read accepts --tokens <n> to set the token budget (default: 20000).

Setup (MCP install)

| Flag | Description | | ------------ | --------------------------------------------- | | --cursor | Install Docfork MCP in Cursor | | --claude | Install Docfork MCP in Claude Code | | --opencode | Install Docfork MCP in OpenCode | | --all | Install in all detected agents |

Configuration

Project config: .dgrep/config.json

Created by dgrep init or dgrep add. Commit this to git so your team shares the same library set.

{
  "libraries": [
    { "identifier": "honojs/hono", "packages": ["hono"] },
    { "identifier": "facebook/react", "packages": ["react"] },
    { "identifier": "vercel/next.js", "packages": ["next"] }
  ]
}

Each entry maps a Docfork identifier to the npm packages that resolved to it.

User config: ~/.dgrep/config.json

API key and preferences. Created automatically on first search or by dgrep login. Do not commit this.

Agent usage

IDE agents call dgrep automatically after dgrep setup. For custom integrations, use --json for structured output:

dgrep search "server actions with forms" -l vercel/next.js --json --yes
dgrep read <url> --json

Privacy & telemetry

dgrep sends anonymous usage events — command name, success/failure, latency — so we can see which commands people use and where the CLI fails.

dgrep never sends query text, doc content, URLs, file paths, API keys, or cabinet names. The event schema and collector endpoint are open source; you can inspect the payload with any network tap.

Opt out any of three ways:

dgrep telemetry disable   # persist to ~/.dgrep/config.json
DO_NOT_TRACK=1            # session-wide, any CLI
DGREP_TELEMETRY=0         # dgrep-specific

Details: docfork.com/telemetry.

Links