Open-source DeepWiki alternative — generate comprehensive wiki documentation for any codebase from your terminal or browser.
Why RepoWiki?
| DeepWiki | deepwiki-open | RepoWiki | |
|---|---|---|---|
| Deploy | SaaS only | Docker Compose | pip install repowiki |
| Local repos | No | No | Yes |
| CLI | No | No | Yes |
| Web UI | Yes | Yes | Yes |
| Export | Web only | Web only | Markdown / JSON / HTML |
| Reading guide | No | No | PageRank + guided path |
| Terminal Q&A | No | No | repowiki chat |
| Dependencies | N/A | Docker + PostgreSQL | Python + SQLite |
Quick Start
pip install repowiki
# set your API key (DeepSeek, OpenAI, Anthropic, etc.)
export DEEPSEEK_API_KEY=<your-api-key>
# or
repowiki config set api_key <your-api-key>
# scan a local project
repowiki scan ./my-project
# scan a GitHub repo
repowiki scan https://github.com/pallets/flask
# generate self-contained HTML
repowiki scan ./my-project --format html --open
# start the web interface
pip install repowiki[web]
repowiki serve
RepoWiki respects .gitignore and .repowikiignore during scans. It also skips common local secret files such as .env, .env.local, .npmrc, .pypirc, and SSH private keys by default.
Features
- Structured wiki — project overview, per-module docs, auto-detected architecture with Mermaid diagrams, and a PageRank "start here" reading path.
- Import-aware ranking — resolves Python and JS/TS imports before ranking files, and skips minified/generated bundles so they don't burn LLM context.
- Three output formats — a Markdown directory to commit, structured JSON, or a self-contained HTML file to share (diagrams included).
- Web viewer + terminal chat — a three-column browser UI, or
repowiki chat .for grounded Q&A in the terminal (built-in TF-IDF retrieval, no embeddings service). - CLI-first — no Docker, no database server, no browser required.
repowiki scan . # generate wiki
repowiki scan . -f html --open # open in browser
repowiki scan . -l zh # Chinese output
repowiki chat . # interactive Q&A about the code
repowiki map . # ranked repo map, zero LLM calls
repowiki map . --format json # prompt-ready ranked list for agents
Languages & Models
Detects Python, JavaScript, TypeScript, Go, Rust, Java, Kotlin, C/C++, C#, Ruby, PHP, Swift, and 30+ more. Any of litellm's 100+ providers works — pick one with an alias or pass it directly:
repowiki config set model deepseek # deepseek / claude / gpt / gemini / qwen / kimi / glm ...
repowiki scan . -m gpt # or pass a model directly
Configuration
RepoWiki looks for config in this order:
- CLI flags (
-m,-l,-o) - Environment variables (
REPOWIKI_MODEL,REPOWIKI_API_KEY) - Config file (
~/.repowiki/config.json) - Provider-specific env vars (
DEEPSEEK_API_KEY,OPENAI_API_KEY,ANTHROPIC_API_KEY)
Project Structure
RepoWiki/
├── src/repowiki/
│ ├── cli.py # Click CLI with scan/serve/chat/config commands
│ ├── config.py # Configuration management
│ ├── core/
│ │ ├── scanner.py # File scanning with language detection
│ │ ├── analyzer.py # Multi-step LLM analysis pipeline
│ │ ├── graph.py # Dependency graph + PageRank
│ │ ├── wiki_builder.py # Wiki page assembly
│ │ ├── rag.py # TF-IDF retrieval for Q&A
│ │ └── cache.py # SQLite caching
│ ├── llm/
│ │ ├── client.py # litellm async wrapper
│ │ └── prompts.py # Structured prompt templates
│ ├── ingest/
│ │ ├── local.py # Local directory ingestion
│ │ └── github.py # Git clone with caching
│ ├── export/
│ │ ├── markdown.py # Markdown directory export
│ │ ├── json_export.py # JSON export
│ │ └── html.py # Self-contained HTML export
│ └── server/ # FastAPI web backend
├── frontend/ # React + Vite + TailwindCSS
├── pyproject.toml
└── LICENSE
How It Works
- Scan — Walk the directory tree, filter out binaries, generated bundles, and oversized files, detect languages and entry points
- Graph — Resolve imports across 6 languages, including Python package-relative and JavaScript/TypeScript relative modules, then run PageRank to rank file importance
- Analyze — Send file tree + key files to LLM in 4 structured passes (overview, modules, architecture, reading guide)
- Cache — Store results in SQLite keyed by content hash, skip unchanged files on re-scan
- Export — Assemble wiki pages with Mermaid diagrams and source links, output in chosen format
Development
git clone https://github.com/he-yufeng/RepoWiki.git
cd RepoWiki
# backend
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev,web]"
# frontend
cd frontend && npm install && npm run dev
# run backend
repowiki serve --port 8000
Roadmap
Generation, the web interface, and the diagrams work. The next steps are about keeping a wiki fresh and better connected:
- Incremental re-generation — regenerate only the pages whose source changed since the last run, so updating a wiki on a large repo isn't a full rebuild every time.
- Cross-reference links — link a symbol mentioned on one module page to the page where it's defined, so the wiki reads like connected docs instead of isolated pages.
- More diagram types — a call graph and a data-flow view alongside the dependency graph, since the analysis already walks imports and could surface more.
- Publish to a static site — a one-command export to a GitHub Pages-ready site, so a generated wiki can live as a project's docs, not just a local file.
Related Projects
If RepoWiki helped you find your way around a codebase, a few other things I've built:
- CoreCoder — want to understand how a coding agent really works? Read the whole ~1k-line engine end to end, not a black box.
- FindJobs-Agent — stop sifting job boards by hand: it ranks postings against your resume and runs mock interviews.
- ContractGuard — catch the risky clauses before you sign: it reads contracts and flags the dangerous bits.
- GitSense — want to contribute to open source? It finds issues worth your time and gauges whether your PR will get merged.
- CodeABC — understand any codebase even if you don't code, built for non-programmers.
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file repowiki-0.3.2.tar.gz.
File metadata
- Download URL: repowiki-0.3.2.tar.gz
- Upload date:
- Size: 156.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54ab918275fe47ce1a7941a2ed159b634b02ce5b59f95c873698d63741fd20a1
|
|
| MD5 |
689443261547f23f7eed3333bf72defe
|
|
| BLAKE2b-256 |
0135462a2edc0ec508930160b979191c7f1b2a8b32dbfea3ef587381f5435b09
|
Provenance
The following attestation bundles were made for repowiki-0.3.2.tar.gz:
Publisher:
publish.yml on he-yufeng/RepoWiki
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
repowiki-0.3.2.tar.gz -
Subject digest:
54ab918275fe47ce1a7941a2ed159b634b02ce5b59f95c873698d63741fd20a1 - Sigstore transparency entry: 2490345680
- Sigstore integration time:
-
Permalink:
he-yufeng/RepoWiki@3ff478043f1fb76e5fc4006f4058ddecbc79ec26 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/he-yufeng
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3ff478043f1fb76e5fc4006f4058ddecbc79ec26 -
Trigger Event:
release
-
Statement type:
File details
Details for the file repowiki-0.3.2-py3-none-any.whl.
File metadata
- Download URL: repowiki-0.3.2-py3-none-any.whl
- Upload date:
- Size: 47.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f65dcc7411df1a22ff6e9018e6ddb40d592718c917e08df82edb0751cca8752
|
|
| MD5 |
fae319a88b553ff2982cc3b406df48ee
|
|
| BLAKE2b-256 |
3d184a868d72dde2e20fe2b991779130253faf300a9f4ff7b26971c03451faf9
|
Provenance
The following attestation bundles were made for repowiki-0.3.2-py3-none-any.whl:
Publisher:
publish.yml on he-yufeng/RepoWiki
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
repowiki-0.3.2-py3-none-any.whl -
Subject digest:
9f65dcc7411df1a22ff6e9018e6ddb40d592718c917e08df82edb0751cca8752 - Sigstore transparency entry: 2490345730
- Sigstore integration time:
-
Permalink:
he-yufeng/RepoWiki@3ff478043f1fb76e5fc4006f4058ddecbc79ec26 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/he-yufeng
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3ff478043f1fb76e5fc4006f4058ddecbc79ec26 -
Trigger Event:
release
-
Statement type: