{"id":50696693,"url":"https://github.com/he-yufeng/RepoWiki","last_synced_at":"2026-06-26T07:00:34.262Z","repository":{"id":351690210,"uuid":"1211288569","full_name":"he-yufeng/RepoWiki","owner":"he-yufeng","description":"Open-source DeepWiki alternative — generate comprehensive wiki documentation for any codebase from terminal or browser","archived":false,"fork":false,"pushed_at":"2026-06-23T12:45:43.000Z","size":179,"stargazers_count":188,"open_issues_count":1,"forks_count":35,"subscribers_count":12,"default_branch":"main","last_synced_at":"2026-06-23T12:55:42.767Z","etag":null,"topics":["cli","deepwiki","documentation","llm","pagerank","python","react","wiki"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/repowiki/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/he-yufeng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-15T08:40:47.000Z","updated_at":"2026-06-23T12:46:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/he-yufeng/RepoWiki","commit_stats":null,"previous_names":["he-yufeng/repowiki"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/he-yufeng/RepoWiki","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/he-yufeng%2FRepoWiki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/he-yufeng%2FRepoWiki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/he-yufeng%2FRepoWiki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/he-yufeng%2FRepoWiki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/he-yufeng","download_url":"https://codeload.github.com/he-yufeng/RepoWiki/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/he-yufeng%2FRepoWiki/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34806448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-26T02:00:06.560Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","deepwiki","documentation","llm","pagerank","python","react","wiki"],"created_at":"2026-06-09T07:00:31.731Z","updated_at":"2026-06-26T07:00:34.250Z","avatar_url":"https://github.com/he-yufeng.png","language":"Python","funding_links":[],"categories":["Popular AI Tools"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"docs/banner.png\" alt=\"RepoWiki — generate wiki docs for any codebase\" width=\"100%\"\u003e\n\n[![PyPI](https://img.shields.io/pypi/v/repowiki.svg)](https://pypi.org/project/repowiki/)\n[![Python](https://img.shields.io/pypi/pyversions/repowiki.svg)](https://pypi.org/project/repowiki/)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\n[**Quick Start**](#quick-start) · [**How It Works**](#how-it-works) · [**Why RepoWiki?**](#why-repowiki) · [中文](README_CN.md)\n\n\u003c/div\u003e\n\n**Open-source DeepWiki alternative** — generate comprehensive wiki documentation for any codebase from your terminal or browser.\n\n## Why RepoWiki?\n\n| | DeepWiki | deepwiki-open | **RepoWiki** |\n|---|---------|--------------|-------------|\n| Deploy | SaaS only | Docker Compose | **`pip install repowiki`** |\n| Local repos | No | No | **Yes** |\n| CLI | No | No | **Yes** |\n| Web UI | Yes | Yes | **Yes** |\n| Export | Web only | Web only | **Markdown / JSON / HTML** |\n| Reading guide | No | No | **PageRank + guided path** |\n| Terminal Q\u0026A | No | No | **`repowiki chat`** |\n| Dependencies | N/A | Docker + PostgreSQL | **Python + SQLite** |\n\n## Quick Start\n\n```bash\npip install repowiki\n\n# set your API key (DeepSeek, OpenAI, Anthropic, etc.)\nexport DEEPSEEK_API_KEY=\u003cyour-api-key\u003e\n# or\nrepowiki config set api_key \u003cyour-api-key\u003e\n\n# scan a local project\nrepowiki scan ./my-project\n\n# scan a GitHub repo\nrepowiki scan https://github.com/pallets/flask\n\n# generate self-contained HTML\nrepowiki scan ./my-project --format html --open\n\n# start the web interface\npip install repowiki[web]\nrepowiki serve\n```\n\nRepoWiki 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.\n\n## Features\n\n### Wiki Generation\nAutomatically generates structured documentation for any codebase:\n- **Project overview** — what it does, tech stack, setup instructions\n- **Module documentation** — purpose, key files, relationships, important functions\n- **Architecture diagrams** — auto-detected architecture type with Mermaid visualizations\n- **Reading guide** — \"start here\" path based on PageRank file importance ranking\n- **Import-aware dependency map** — resolves Python package-relative imports and\n  JavaScript/TypeScript relative modules before ranking files\n- **Bundle-aware scanner** — skips minified JS/CSS and generated frontend chunks before they burn LLM context\n\n### Multiple Output Formats\n- **Markdown** — directory of `.md` files, ready to commit to your repo\n- **JSON** — structured data for API consumption or custom rendering\n- **HTML** — self-contained single file, share with anyone (Mermaid diagrams included)\n\n### Web Interface\nThree-column wiki viewer with sidebar navigation, Mermaid diagram rendering, and an AI-powered Q\u0026A chat about the codebase.\n\n### Terminal Chat\n`repowiki chat .` opens an interactive Q\u0026A in the terminal. It indexes the repo with built-in TF-IDF retrieval (no embeddings service, no extra dependencies), pulls the most relevant code for each question, and answers grounded in the actual files — citing paths and line ranges.\n\n### CLI-First Design\nEverything works from the terminal. No Docker, no database server, no web browser required.\n\n```bash\nrepowiki scan .                    # generate wiki\nrepowiki scan . -f html --open     # open in browser\nrepowiki scan . -l zh              # Chinese output\nrepowiki chat .                    # ask questions about the code (interactive)\nrepowiki config list               # show configuration\n```\n\n## Supported Languages\n\nPython, JavaScript, TypeScript, Go, Rust, Java, Kotlin, C/C++, C#, Ruby, PHP, Swift, Dart, Vue, Svelte, and 30+ more.\n\n## Supported LLM Providers\n\nPowered by [litellm](https://github.com/BerriAI/litellm), RepoWiki works with 100+ LLM providers:\n\n| Provider | Model | Alias |\n|----------|-------|-------|\n| Anthropic | Claude Opus 4.6 | `opus` |\n| Anthropic | Claude Sonnet 4.6 | `claude` |\n| OpenAI | GPT-5.4 | `gpt` |\n| OpenAI | GPT-5.4 Mini | `gpt-mini` |\n| Google | Gemini 3.1 Pro | `gemini` |\n| Google | Gemini 2.5 Flash | `gemini-flash` |\n| DeepSeek | DeepSeek V3.2 | `deepseek` |\n| Alibaba | Qwen3.5 Plus | `qwen` |\n| Moonshot | Kimi K2.6 | `kimi` |\n| Zhipu | GLM-5 | `glm` |\n| MiniMax | M2.7 | `minimax` |\n\n```bash\nrepowiki config set model deepseek    # use alias\nrepowiki scan . -m gpt                # or pass directly\n```\n\n## Configuration\n\nRepoWiki looks for config in this order:\n1. CLI flags (`-m`, `-l`, `-o`)\n2. Environment variables (`REPOWIKI_MODEL`, `REPOWIKI_API_KEY`)\n3. Config file (`~/.repowiki/config.json`)\n4. Provider-specific env vars (`DEEPSEEK_API_KEY`, `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`)\n\n## Project Structure\n\n```\nRepoWiki/\n├── src/repowiki/\n│   ├── cli.py              # Click CLI with scan/serve/chat/config commands\n│   ├── config.py           # Configuration management\n│   ├── core/\n│   │   ├── scanner.py      # File scanning with language detection\n│   │   ├── analyzer.py     # Multi-step LLM analysis pipeline\n│   │   ├── graph.py        # Dependency graph + PageRank\n│   │   ├── wiki_builder.py # Wiki page assembly\n│   │   ├── rag.py          # TF-IDF retrieval for Q\u0026A\n│   │   └── cache.py        # SQLite caching\n│   ├── llm/\n│   │   ├── client.py       # litellm async wrapper\n│   │   └── prompts.py      # Structured prompt templates\n│   ├── ingest/\n│   │   ├── local.py        # Local directory ingestion\n│   │   └── github.py       # Git clone with caching\n│   ├── export/\n│   │   ├── markdown.py     # Markdown directory export\n│   │   ├── json_export.py  # JSON export\n│   │   └── html.py         # Self-contained HTML export\n│   └── server/             # FastAPI web backend\n├── frontend/               # React + Vite + TailwindCSS\n├── pyproject.toml\n└── LICENSE\n```\n\n## How It Works\n\n![RepoWiki pipeline](docs/architecture.png)\n\n1. **Scan** — Walk the directory tree, filter out binaries, generated bundles, and oversized files, detect languages and entry points\n2. **Graph** — Resolve imports across 6 languages, including Python package-relative and\n   JavaScript/TypeScript relative modules, then run PageRank to rank file importance\n3. **Analyze** — Send file tree + key files to LLM in 4 structured passes (overview, modules, architecture, reading guide)\n4. **Cache** — Store results in SQLite keyed by content hash, skip unchanged files on re-scan\n5. **Export** — Assemble wiki pages with Mermaid diagrams and source links, output in chosen format\n\n## Development\n\n```bash\ngit clone https://github.com/he-yufeng/RepoWiki.git\ncd RepoWiki\n\n# backend\npython -m venv .venv \u0026\u0026 source .venv/bin/activate\npip install -e \".[dev,web]\"\n\n# frontend\ncd frontend \u0026\u0026 npm install \u0026\u0026 npm run dev\n\n# run backend\nrepowiki serve --port 8000\n```\n\n## Roadmap\n\nGeneration, the web interface, and the diagrams work. The next steps are about keeping a wiki fresh and better connected:\n\n- **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.\n- **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.\n- **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.\n- **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.\n\n## Related Projects\n\n- [**CodeJoust**](https://github.com/he-yufeng/CodeJoust) — once RepoWiki tells you *how* the repo works, CodeJoust helps you change it: race Claude Code, aider, Codex, and Gemini on the same bug in parallel git worktrees, auto-score by tests/cost/diff/time, merge the winner. `pip install codejoust`.\n- [**LiteBench**](https://github.com/he-yufeng/LiteBench) — one-command LLM/agent benchmark. HumanEval/GSM8K/MMLU/MATH-500 built in, plus YAML-defined custom tasks and a single-file HTML dashboard.\n- [**CoreCoder**](https://github.com/he-yufeng/CoreCoder) — Claude Code's architecture distilled to ~1,400 lines of Python, with 7 deep-dive architecture articles.\n- [**AnyCoder**](https://github.com/he-yufeng/AnyCoder) — practical terminal AI coding agent, 100+ model support via litellm.\n- [**GitSense**](https://github.com/he-yufeng/GitSense) — find open-source issues to work on and gauge how hard a repo is to contribute to.\n- [**RuleForge**](https://github.com/he-yufeng/RuleForge) — auto-generate AI assistant rules from a codebase.\n- [**CodeABC**](https://github.com/he-yufeng/CodeABC) — an AI code reader for non-programmers.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhe-yufeng%2FRepoWiki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhe-yufeng%2FRepoWiki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhe-yufeng%2FRepoWiki/lists"}