Open-source DeepWiki alternative - generate comprehensive wiki documentation for any codebase
Project description
RepoWiki
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=sk-xxx
# or
repowiki config set api_key sk-xxx
# 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
Features
Wiki Generation
Automatically generates structured documentation for any codebase:
- Project overview — what it does, tech stack, setup instructions
- Module documentation — purpose, key files, relationships, important functions
- Architecture diagrams — auto-detected architecture type with Mermaid visualizations
- Reading guide — "start here" path based on PageRank file importance ranking
Multiple Output Formats
- Markdown — directory of
.mdfiles, ready to commit to your repo - JSON — structured data for API consumption or custom rendering
- HTML — self-contained single file, share with anyone (Mermaid diagrams included)
Web Interface
Three-column wiki viewer with sidebar navigation, Mermaid diagram rendering, and an AI-powered Q&A chat about the codebase.
CLI-First Design
Everything works from the terminal. No Docker, no database server, no web browser required.
repowiki scan . # generate wiki
repowiki scan . -f html --open # open in browser
repowiki scan . -l zh # Chinese output
repowiki chat . # ask questions (coming soon)
repowiki config list # show configuration
Supported Languages
Python, JavaScript, TypeScript, Go, Rust, Java, Kotlin, C/C++, C#, Ruby, PHP, Swift, Dart, Vue, Svelte, and 30+ more.
Supported LLM Providers
Powered by litellm, RepoWiki works with 100+ LLM providers:
| Provider | Model | Alias |
|---|---|---|
| Anthropic | Claude Opus 4.6 | opus |
| Anthropic | Claude Sonnet 4.6 | claude |
| OpenAI | GPT-5.4 | gpt |
| OpenAI | GPT-5.4 Mini | gpt-mini |
| Gemini 3.1 Pro | gemini |
|
| Gemini 2.5 Flash | gemini-flash |
|
| DeepSeek | DeepSeek V3.2 | deepseek |
| Alibaba | Qwen3.5 Plus | qwen |
| Moonshot | Kimi K2.6 | kimi |
| Zhipu | GLM-5 | glm |
| MiniMax | M2.7 | minimax |
repowiki config set model deepseek # use alias
repowiki scan . -m gpt # or pass 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 and generated files, detect languages and entry points
- Graph — Parse import statements across 6 languages, build a dependency graph, 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
License
MIT
Project details
Release history Release notifications | RSS feed
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.1.0.tar.gz.
File metadata
- Download URL: repowiki-0.1.0.tar.gz
- Upload date:
- Size: 70.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c34a1b1792209f8c756fbb31f126608de2a37231361dab101f6c718e03806ebd
|
|
| MD5 |
02582812d6ea63c8b529dfe21a246459
|
|
| BLAKE2b-256 |
8fba246b670584155b751ffb6373b61b011a66d2c9d3d89c2adc4c56f579b27f
|
Provenance
The following attestation bundles were made for repowiki-0.1.0.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.1.0.tar.gz -
Subject digest:
c34a1b1792209f8c756fbb31f126608de2a37231361dab101f6c718e03806ebd - Sigstore transparency entry: 1315650171
- Sigstore integration time:
-
Permalink:
he-yufeng/RepoWiki@a6f8722b13542ae4778e59c2f01c2f2223c1f58e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/he-yufeng
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a6f8722b13542ae4778e59c2f01c2f2223c1f58e -
Trigger Event:
release
-
Statement type:
File details
Details for the file repowiki-0.1.0-py3-none-any.whl.
File metadata
- Download URL: repowiki-0.1.0-py3-none-any.whl
- Upload date:
- Size: 40.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3afa41422cb736027b0a58de1b102c5d61cef35e57b9b037dad73204139f5447
|
|
| MD5 |
99de280c261c1e5acf3112d901de617f
|
|
| BLAKE2b-256 |
d3826bcddf99ecf027818b85a7bbc8a9ecea23709538a158f5cb85221b247397
|
Provenance
The following attestation bundles were made for repowiki-0.1.0-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.1.0-py3-none-any.whl -
Subject digest:
3afa41422cb736027b0a58de1b102c5d61cef35e57b9b037dad73204139f5447 - Sigstore transparency entry: 1315650280
- Sigstore integration time:
-
Permalink:
he-yufeng/RepoWiki@a6f8722b13542ae4778e59c2f01c2f2223c1f58e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/he-yufeng
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a6f8722b13542ae4778e59c2f01c2f2223c1f58e -
Trigger Event:
release
-
Statement type: