dwiki — Unofficial DeepWiki CLI
Disclaimer:
dwikiis an independent, third-party tool and is not affiliated with or endorsed by DeepWiki or Cognition AI. It wraps the publicly available DeepWiki MCP API. Use at your own risk.
dwiki is a command-line interface for querying DeepWiki
via the DeepWiki MCP server. DeepWiki indexes public
GitHub repositories and exposes their documentation through an MCP server. dwiki
makes that server accessible from your terminal and from coding-agent pipelines.
Installation
Or build from source:
# binary at: ./target/release/dwiki
Quick Start
# 1. Confirm the repo is indexed on DeepWiki
# 2. List all available wiki topics
# 3. Read a specific topic page
Command Reference
dwiki check <OWNER/REPO>
Verifies that a repository is indexed on DeepWiki by sending an HTTP GET
to https://deepwiki.com/<owner>/<repo>.
| Detail | Value |
|---|---|
| Exit code 0 | Repository is indexed — safe to proceed |
| Exit code 1 | Repository is not indexed (or unreachable) |
| MCP tool | (HTTP GET — not an MCP call) |
# INDEXED: tokio-rs/tokio is indexed on DeepWiki (200 OK)
# NOT_INDEXED: myorg/unindexed-repo is not indexed on DeepWiki (404 Not Found)
# exit code: 1
JSON output (--output json):
dwiki read <OWNER/REPO> [TOPIC]
| Variant | MCP tool called | Description |
|---|---|---|
dwiki read <repo> |
read_wiki_structure |
Lists all available documentation topics |
dwiki read <repo> <topic> |
read_wiki_contents |
Loads the full text of a specific topic page |
# List all topics
# Read a specific page (quote multi-word topics)
JSON output (topic list):
dwiki ask <OWNER/REPO> <QUESTION>
Calls the ask_question MCP tool. The response is AI-generated and grounded
in the repository's indexed documentation.
| Detail | Value |
|---|---|
| MCP tool | ask_question |
| Latency | 10–40 s (use --timeout 60 for complex queries) |
| Best for | Targeted questions, implementation details, debugging |
JSON output:
dwiki search <OWNER/REPO> <QUERY>
A convenience wrapper around ask_question that frames the request as a
keyword search, asking the model to enumerate all matching topics, functions,
modules, and documentation sections.
| Detail | Value |
|---|---|
| MCP tool | ask_question (search-oriented prompt) |
| Best for | Open-ended keyword exploration, symbol lookup |
Global Options
| Flag | Env var | Default | Description |
|---|---|---|---|
--url <URL> |
DEEPWIKI_URL |
https://mcp.deepwiki.com/mcp |
MCP server URL |
--token <TOKEN> |
DEEPWIKI_TOKEN |
(none) | Bearer token for private-repo endpoints |
--output text|json |
— | text |
Output format |
--timeout <SECONDS> |
— | 30 |
Request timeout in seconds |
All global options can be placed before or after the subcommand.
Configuration
Environment variables
# Override the MCP server URL (optional; default is the public DeepWiki server)
# Bearer token — required only for private-repo endpoints
Avoid passing --token as a shell argument to keep credentials out of
process lists and shell history. Use the environment variable instead.
Public repositories (no auth required)
Private repositories via Devin
JSON Output for Agents
All commands support --output json. This is the recommended mode for
coding agents and shell pipelines:
# Guard check before running expensive queries
result=
indexed=
[ ||
# Get topic list
|
# Ask a question and extract the answer
|
See AGENTS.md for the full agent workflow documentation, output schemas, and exit codes.
Versioning
This project uses CalVer with the scheme YYYY.M.PATCH:
| Segment | Meaning |
|---|---|
YYYY |
Full year (e.g. 2026) |
M |
Month without leading zero (e.g. 3 for March) |
PATCH |
Patch increment within the month, starting at 0 |
Example: 2026.3.0 is the first release of March 2026; a follow-up fix in the same month would be 2026.3.1.
License
MIT — see LICENSE.