Open-source DeepWiki alternative — generate comprehensive wiki documentation for any codebase from your terminal or browser.
The live demo is RepoWiki eating its own dog food: the wiki for this very repo, generated by repowiki scan . --site and served from GitHub Pages.
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
# scan a private GitHub repo (token never touches logs or errors)
GITHUB_TOKEN=ghp_xxx repowiki scan https://github.com/acme/private-repo
# generate self-contained HTML
repowiki scan ./my-project --format html --open
# start the web interface (wheels from PyPI ship the built UI)
pip install repowiki[web]
repowiki serve ./my-project # optionally preload a project
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.
- Cross-linked pages: a backticked symbol or file path that matches another wiki page becomes a link to it, as a relative
.mdlink in Markdown and as in-page navigation in the HTML export. Fenced code blocks stay untouched, and a name defined on several pages links to the first one. - Symbol index: a global index page collects every key symbol the analysis documents, grouped by kind and then by module, with each entry linking back to the module page that owns it. A project with no documented symbols skips the page.
- Incremental re-runs: the output directory keeps a
.repowiki-state.jsonmapping each page to the inputs that generated it, so re-scanning only regenerates pages whose source changed and deletes pages of removed modules. JSON and HTML exports skip the write entirely when nothing changed. Pass--fullto force a full rebuild. - 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).
- Static site publishing:
repowiki scan . --sitedrops a docsify loader (index.html+.nojekyll) into the Markdown export, so the output directory can go straight onto GitHub Pages. - Web viewer + terminal chat: a three-column browser UI, or
repowiki chat .for grounded Q&A in the terminal. Chat is multi-turn: the conversation so far goes into each prompt, so follow-up questions work in both the web UI and the CLI. The built-in TF-IDF index (no embeddings service) persists across runs and a second session on an unchanged repo starts warm. - CLI-first — no Docker, no database server, no browser required.
repowiki scan . # generate wiki
repowiki scan . --full # rebuild every page, ignoring incremental state
repowiki scan . -f html --open # open in browser
repowiki scan . -l zh # Chinese output
repowiki chat . # multi-turn Q&A about the code, remembers the session
repowiki map . # ranked repo map, zero LLM calls
repowiki map . --format json # prompt-ready ranked list for agents
repowiki scan . --site # markdown export plus a GitHub Pages-ready loader
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)
For private GitHub repositories, set GITHUB_TOKEN (or GH_TOKEN): the clone goes out authenticated and the token is used only inside the git invocation, never written to logs or error output.
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
│ │ └── state.py # Incremental regeneration state
│ ├── 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, pages link to each other, re-runs only regenerate the pages whose source changed, and scan --site exports a GitHub Pages-ready site. The next step is richer diagrams:
- 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.
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
Release files for repowiki 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| repowiki-0.4.1.tar.gz | 1.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| repowiki-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.1 MB
Release files / repowiki-0.4.1.tar.gz
| Download URL | repowiki-0.4.1.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d31aae1d9bccc32422b8a848aca09cc53e317a17c640a08da3788cc6869ee5b6
|
|
BLAKE2b-256 checksum How to use checksums |
189ed9dd1209a28ea998d21a25e9c1e44a75984ccbef6efb00b7fe50d1fde180
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency logRelease files / repowiki-0.4.1-py3-none-any.whl
| Download URL | repowiki-0.4.1-py3-none-any.whl |
|---|---|
| Size | 1.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
56728b12bbab8d375f5d092ad52b5dea7a9ffa0794f50bdf6cbab85cd3c99b06
|
|
BLAKE2b-256 checksum How to use checksums |
67fe31d5a31f530a887ef462165edb2011ccb83ee8380c3738def690a4f6fdff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency log