{"id":49480007,"url":"https://github.com/andyhtran/deepwiki-by-cc","last_synced_at":"2026-04-30T22:02:29.178Z","repository":{"id":351668718,"uuid":"1172230778","full_name":"andyhtran/deepwiki-by-cc","owner":"andyhtran","description":"Generate comprehensive, navigable wikis for any GitHub repo or local codebase. Powered by Claudex (Claude Code or Codex CLI).","archived":false,"fork":false,"pushed_at":"2026-04-26T15:50:45.000Z","size":2393,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-26T17:26:26.149Z","etag":null,"topics":["ai","bun","claude","claude-code","codex","codex-cli","deepwiki","developer-tools","documentation","documentation-generator","llm","mcp","open-source","self-hosted","sveltekit","typescript","wiki"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/andyhtran.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-03-04T04:30:16.000Z","updated_at":"2026-04-26T15:50:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/andyhtran/deepwiki-by-cc","commit_stats":null,"previous_names":["andyhtran/deepwiki-by-cc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andyhtran/deepwiki-by-cc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyhtran%2Fdeepwiki-by-cc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyhtran%2Fdeepwiki-by-cc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyhtran%2Fdeepwiki-by-cc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyhtran%2Fdeepwiki-by-cc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andyhtran","download_url":"https://codeload.github.com/andyhtran/deepwiki-by-cc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyhtran%2Fdeepwiki-by-cc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32478162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ai","bun","claude","claude-code","codex","codex-cli","deepwiki","developer-tools","documentation","documentation-generator","llm","mcp","open-source","self-hosted","sveltekit","typescript","wiki"],"created_at":"2026-04-30T22:02:26.449Z","updated_at":"2026-04-30T22:02:29.168Z","avatar_url":"https://github.com/andyhtran.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DeepWiki\n\nGenerate comprehensive, navigable wikis for any GitHub repository or local codebase using Claude or Codex.\n\nPoint DeepWiki at a repo and it will clone it, scan the source files, generate a structured outline and per-page documentation with Mermaid diagrams, and serve the result as a browsable wiki — all in a few minutes.\n\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/andyhtran/deepwiki-by-cc)\n![License](https://img.shields.io/github/license/andyhtran/deepwiki-by-cc?style=flat-square)\n![Powered by Claudex](https://img.shields.io/badge/powered%20by-Claudex-8A5CF6?style=flat-square)\n\n[Features](#features) · [Prerequisites](#prerequisites) · [Quick Start](#quick-start) · [How It Works](#how-it-works) · [MCP Server](#mcp-server) · [Self-Hosting](#self-hosting-with-docker)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/deepwiki-home.png\" alt=\"DeepWiki home page with a URL input field and the list of previously generated wikis\" width=\"600\"\u003e\n\u003c/p\u003e\n\n## Features\n\n- **Claude or Codex** — pick between Claude Sonnet/Opus or Codex CLI (gpt-5.3-codex) per wiki, with streaming progress and configurable page concurrency.\n- **GitHub or local** — point at `owner/repo`, a full GitHub URL, or any local directory. `.gitignore`-aware scanning that filters out binaries, lock files, and generated code.\n- **Structured output** — AI-generated outline with sections and pages, rendered with Mermaid diagrams, syntax highlighting, sidebar navigation, and a per-page table of contents.\n- **Semantic retrieval** — optional embeddings with hybrid (file-scoped + global fallback) search, token-aware chunking, and a built-in ANN index. Falls back to full-file context if embedding fails.\n- **Versioned wikis** — keep multiple versions per repo, each tagged with the model and embedding config used to generate it. Switch between versions from the sidebar.\n- **Sync \u0026 resume** — pull latest commits and selectively regenerate only the pages affected by the diff. Resume picks up where interrupted runs left off.\n- **MCP server** — expose wikis to Claude Code and other MCP agents via stdio or Streamable HTTP transport, with keyword and semantic search tools.\n- **Self-hosted** — one-command Docker setup with persistent credential volumes, private-repo support via `GH_TOKEN`, and ~850 MB image footprint.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/deepwiki-by-cc.png\" alt=\"DeepWiki viewer showing a generated wiki with sidebar navigation, page content, and table of contents\" width=\"860\"\u003e\n  \u003cbr\u003e\n  \u003cem\u003eA generated wiki — sidebar navigation, per-page table of contents, Mermaid diagrams, and syntax-highlighted source references.\u003c/em\u003e\n\u003c/p\u003e\n\n## Prerequisites\n\n- [Bun](https://bun.sh) runtime\n- [Claude CLI](https://docs.anthropic.com/en/docs/claude-code) installed and authenticated (`claude` must be on your PATH) when using Claude models\n- [Codex CLI](https://developers.openai.com/codex/cli/) installed and authenticated (`codex` must be on your PATH) when using the Codex model\n- [Git](https://git-scm.com) and [GitHub CLI](https://cli.github.com) (`gh`) for cloning GitHub repos\n\n## Quick Start\n\n```bash\ngit clone https://github.com/andyhtran/deepwiki-by-cc.git\ncd deepwiki-by-cc\nbun install\nbun run dev\n```\n\nOpen [http://localhost:5173](http://localhost:5173), paste a GitHub URL (or `owner/repo`), and watch the wiki generate in real time.\n\n### Local repositories\n\nYou can also point DeepWiki at a local directory:\n\n```\n/path/to/your/project\n~/Code/my-project\n./relative/path\n```\n\n## How It Works\n\n1. **Clone \u0026 scan** — clones the repo (or reads a local directory), walks the file tree while respecting `.gitignore`, and filters out binaries, lock files, generated code, and minified bundles.\n2. **Generate outline** — sends the file tree and README to the selected generation model, which returns a structured wiki outline with sections, pages, and file assignments.\n3. **Generate pages** — each page is generated in parallel (configurable concurrency), with relevant source files injected as context. Mermaid diagrams are included where they help explain architecture or flow.\n4. **Serve** — the wiki is stored in SQLite and served through a SvelteKit app with syntax highlighting, Mermaid rendering, a sidebar navigation tree, and a table of contents.\n\n### Keeping wikis up to date\n\n- **Sync** — pulls latest commits and selectively regenerates only the pages affected by the diff. Page metadata (model, tokens, timing) is updated even when content doesn't change.\n- **Resume** — if generation is interrupted or individual pages fail, resume picks up where it left off.\n- **Regenerate** — full regeneration from scratch.\n\n### Version metadata\n\nEach wiki version records the generation model and embedding configuration that was active at creation time. When embeddings are enabled, the wiki stores the embedding model name and an endpoint fingerprint so that different embedding providers don't cross-contaminate search results. The version selector in the sidebar shows per-version stats and an \"emb\" indicator for embedding-enabled versions.\n\n## Settings\n\nVisit `/settings` in the UI to configure:\n\n| Setting | Default | Options |\n|---------|---------|---------|\n| Model | Claude Sonnet 4.6 | Sonnet 4.6, Opus 4.6, gpt-5.3-codex |\n| Parallel page limit | 2 | 1–5 |\n| Embeddings retrieval | Disabled | Optional OpenAI-compatible endpoint + model |\n\nWhen Codex is selected, DeepWiki uses `codex exec` with a fixed model (`gpt-5.3-codex`).\n\nWhen embeddings are enabled, DeepWiki indexes file chunks in SQLite and retrieves top semantic chunks for page generation context. Configure the embedding endpoint as a full URL (for example, `https://api.openai.com/v1/embeddings` or your proxy equivalent). Advanced retrieval/chunking controls stay collapsed in the UI and default to a low-touch profile (`topK=10`, `maxContextChars=16000`, `chunkSize=1200`, `chunkOverlap=200`). If embedding retrieval fails, it falls back to full-file context injection.\n\n### Retrieval Modes\n\nDeepWiki uses different retrieval strategies depending on the surface:\n\n| Surface | Default Mode | Top K | Max Context Chars | Description |\n|---------|-------------|-------|-------------------|-------------|\n| Generation | `constrained` | 10 | 16,000 | File-scoped retrieval using the page's assigned file paths |\n| MCP/Chat | `hybrid_auto` | 20 | 32,000 | Tries constrained first, falls back to global if results look weak |\n\nIn `hybrid_auto` mode, constrained retrieval runs first. If the results are detected as weak (too few chunks, low similarity scores, or flat score distribution), DeepWiki automatically falls back to a global search across all indexed chunks in the repository, then merges and deduplicates the results.\n\n**Weakness detection thresholds** (configurable in Settings \u003e Advanced):\n- Min chunks: 3 — triggers fallback if fewer chunks returned\n- Min context chars: 4,000 — triggers if total context is too short\n- Min top score: 0.3 — triggers if best match similarity is low\n- Min score gap: 0.05 — triggers if scores are too flat (no clear winner)\n\n**Token-aware chunking**: Chunks can be sized by token count instead of characters. When enabled (`tokenAware: true`), the chunker targets 700 tokens per chunk with 120 tokens of overlap, using the `cl100k_base` tokenizer.\n\n**ANN index**: An ANN (approximate nearest neighbor) index manifest is built per repo after embedding indexing. Currently backed by exact cosine scan over all embeddings; the interface is forward-compatible with native ANN backends (HNSW, etc.) for larger repos.\n\n## MCP Server\n\nDeepWiki includes an MCP server that exposes generated wikis to Claude Code and other MCP-compatible agents. This lets an AI agent query your project's wiki as context while working.\n\n### Stdio mode (local dev)\n\n```bash\n# Using the justfile\njust mcp-add\n\n# Or manually\nclaude mcp add deepwiki -s user -- bun /path/to/deepwiki-by-cc/src/mcp/server.ts\n```\n\n### HTTP mode (Docker / network access)\n\nWhen running in Docker, the MCP server starts automatically in HTTP mode on port 3001:\n\n```bash\n# Test the endpoint\ncurl http://localhost:3001/health\n\n# The MCP endpoint is at /mcp (Streamable HTTP transport)\n```\n\nYou can also run HTTP mode locally:\n\n```bash\nbun run mcp:http   # starts on port 3001 (override with MCP_PORT)\n```\n\n### Available tools\n\n| Tool | Answers |\n|------|---------|\n| `list_wikis` | Which wikis are indexed, and what's in each one? Catalog with per-section pageCount and pageId arrays. `verbose: true` adds descriptions and per-page contentChars. |\n| `list_pages` | What's the page outline for one specific wiki? Focused alternative to `list_wikis` when you already know the owner/repo. |\n| `get_wiki_pages` | Give me the markdown for these pages. Bulk fetch by `pageIds` and/or `sectionIds`. `mode` selects `full`, `no-diagrams` (strips mermaid), `summary`, `diagrams`, or `citations`. `maxCharsPerPage` for token budgeting. |\n| `search_wiki` | Which pages best match this query? `mode: \"semantic\"` (default, embedding similarity) or `\"lexical\"` (keyword). Omit `owner`+`repo` for cross-repo lexical search. |\n| `find_pages_mentioning` | Which wiki pages cite this source path? Reverse citation lookup against each page's source-file list. |\n\n## Self-Hosting with Docker\n\n```bash\ngit clone https://github.com/andyhtran/deepwiki-by-cc.git\ncd deepwiki-by-cc\ndocker compose up -d\n```\n\nThe web UI is served on port 8080 and the MCP HTTP server on port 3001.\n\n### Authenticate Claude CLI (one-time)\n\nThe app uses model CLIs under the hood (Claude and optional Codex). Log in once inside the container — credentials are persisted in a Docker volume so you won't need to do this again.\n\n```bash\ndocker compose exec deepwiki claude login\n```\n\nFollow the prompts to authenticate. Then verify it worked:\n\n```bash\ndocker compose exec deepwiki claude -p \"say hello\" --max-turns 1\n```\n\nIf you get a response, DeepWiki is ready at [http://localhost:8080](http://localhost:8080).\n\nIf you plan to use the Codex model, authenticate that CLI once as well:\n\n```bash\ndocker compose exec deepwiki codex login\n```\n\n### Private repositories (optional)\n\nTo generate wikis for private GitHub repos, create a `.env.docker` file:\n\n```bash\nGH_TOKEN=ghp_...\n```\n\nThen restart:\n\n```bash\ndocker compose up -d\n```\n\n### Resource usage\n\n| | Size |\n|---|---|\n| Docker image | ~850 MB (includes Node.js, Git, GitHub CLI, Claude CLI, Codex CLI) |\n| Memory at idle | ~30 MB |\n| Memory during generation | ~100–200 MB (varies with repo size and page concurrency) |\n\n### Rebuilding after updates\n\n```bash\ngit pull\ndocker compose up -d --build\n```\n\n## Development\n\n```bash\nbun run dev       # Start dev server\nbun test          # Run tests\nbun run lint      # Lint (Biome)\nbun run check     # Type check\nbun run build     # Production build\nbun run start     # Start production server (port 8080)\n```\n\n## Tech Stack\n\n- **Frontend**: SvelteKit 5, Mermaid, highlight.js\n- **Backend**: SvelteKit server routes, SQLite (better-sqlite3), background job queue\n- **AI**: Claude CLI and Codex CLI (subprocess with streaming JSON output)\n- **MCP**: `@modelcontextprotocol/sdk` with stdio and Streamable HTTP transports\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyhtran%2Fdeepwiki-by-cc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandyhtran%2Fdeepwiki-by-cc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyhtran%2Fdeepwiki-by-cc/lists"}