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

@qwadratic/deepwiki-cli

v0.1.0

Published

CLI for DeepWiki API — query, explore, and manage public GitHub repo documentation

Readme

deepwiki-cli

CLI for DeepWiki — query, explore, and manage public GitHub repo documentation from the terminal.

Built on reverse-engineered api.devin.ai endpoints. No auth required for public repos.

Install

npm install -g @qwadratic/deepwiki-cli

Or use directly with npx:

npx @qwadratic/deepwiki-cli query "How does routing work?" -r facebook/react

From source

git clone https://github.com/qwadratic/deepwiki-cli.git
cd deepwiki-cli
pnpm install
pnpm build

Commands

query

Ask a question about one or more repos.

# Fast mode (default)
deepwiki query "How does auth work?" -r facebook/react

# Multiple repos
deepwiki query "Compare routing approaches" -r facebook/react -r remix-run/react-router

# Deep research mode
deepwiki query "Explain the build system" -r vercel/next.js -m deep

# Codemap mode with Mermaid output
deepwiki query "Show the hooks execution flow" -r facebook/react -m codemap --mermaid

# Stream response as NDJSON
deepwiki query "What is React?" -r facebook/react --stream

# Thread follow-up (reuse query ID)
deepwiki query "Tell me more about that" -r facebook/react --id <previous-query-id>

Flags:

| Flag | Description | |------|-------------| | -r, --repo <repos...> | owner/repo to query (required, repeatable) | | -m, --mode <mode> | fast | deep | codemap (default: fast) | | -s, --stream | Stream response chunks as NDJSON via WebSocket | | -c, --context <text> | Additional context for the query | | --id <queryId> | Reuse query ID for thread follow-ups | | --no-summary | Disable summary generation | | --mermaid | Output Mermaid diagram (codemap mode only) |

get

Retrieve results of a previous query by ID.

deepwiki get <queryId>

status

Check if a repo is indexed.

deepwiki status facebook/react

list

Search for indexed repos.

deepwiki list react

warm

Pre-warm a repo's cache (throttled to once per 10 min server-side).

deepwiki warm facebook/react

Output

All commands output JSON to stdout. Errors go to stderr as JSON with exit code 1.

# Pipe to jq
deepwiki list react | jq '.indices[].repo_name'

# Save codemap as Mermaid
deepwiki query "Show data flow" -r org/repo -m codemap --mermaid > diagram.mmd

Modes

| Mode | Engine ID | Description | |------|-----------|-------------| | fast | multihop_faster | Multi-hop RAG, quick answers | | deep | agent | Agentic research loop, thorough investigation | | codemap | codemap | Structured code traces with file locations |

Environment Variables

| Variable | Default | Description | |----------|---------|-------------| | DEEPWIKI_API_URL | https://api.devin.ai | Override API base URL |

Why not use DeepWiki MCP?

The DeepWiki MCP exposes two tools: ask a question and retrieve a full wiki page. That covers the simplest use case but loses what makes DeepWiki actually useful — iterating on queries, switching between fast/deep/codemap modes, drawing code trace diagrams, and threading follow-up questions to narrow down an answer. This CLI reproduces that full workflow and makes it agent-friendly: a coding agent can warm a repo, check indexing status, query in codemap mode, pipe the result through jq, and follow up — all as composable shell commands.

Why not use existing deepwiki-cli?

The deepwiki-cli package on npm retrieves docs via the DeepWiki MCP SSE protocol. It adds an intermediate layer (MCP) between you and the API, supports only basic Q&A, and doesn't expose mode selection, codemap traces, streaming, or any of the management commands. This package calls the API directly.

MCP servers load all tool descriptions into the context window on every session. Popular ones consume 7-9% of the context before any work begins, and this overhead compounds on every turn. When a CLI already exists, wrapping it in MCP adds a protocol layer that costs tokens without adding capability.

LLMs already know standard CLI tools from training data. A CLI that outputs JSON to stdout is composable (| jq, | grep), needs no protocol negotiation, and lets agents pay the token cost only when they actually invoke the tool — not on every turn.

As Mario Zechner (pi-coding-agent) puts it: "Just like a lot of meetings could have been emails, a lot of MCPs could have been CLI invocations." His benchmarks show CLI tools run ~30% cheaper than equivalent MCP wrappers at the same success rate.

References:

Disclaimer

This tool uses reverse-engineered, undocumented API endpoints. It may break at any time if Cognition changes their API. No auth is required for public repos, but rate limits may apply. Use responsibly.