[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-76396":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":15,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":9,"pushedAt":9,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":14,"starSnapshotCount":14,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},76396,"CodeWiki","PorunC\u002FCodeWiki","PorunC","CodeWiki is a knowledge platform that analyzes repositories into AST graphs, builds GraphRAG indexes, and generates source-grounded developer wikis with FastAPI, React, and LiteLLM.",null,"Python",160,12,8,0,1,116,3.34,false,"main",true,[],"2026-06-12 02:03:41","# CodeWiki\n\n[简体中文](docs\u002FREADME.zh-CN.md)\n\nSingle-user CodeWiki platform for AST-based code graph analysis, GraphRAG retrieval,\nsource-grounded wiki generation, and LiteLLM-powered Q&A.\n\n## Current Scope\n\n- FastAPI backend with repository management, analysis runs, GraphRAG, wiki, ask, graph,\n  file, run, and settings APIs.\n- React\u002FVite frontend with repository management plus graph explorer, wiki reader,\n  ask, and settings pages.\n- AST-backed code graph extraction for Python, TypeScript\u002FTSX, JavaScript\u002FJSX, Java,\n  Go, Rust, C, C++, and C#.\n- Deterministic graph edges for imports, exports, definitions, inheritance,\n  implementations, calls, route handlers, source references, and configuration usage.\n- GraphRAG retrieval with source chunks, optional embeddings, community summaries,\n  and cached LLM runs.\n- DeepWiki-style wiki generation with catalog planning, detailed page generation,\n  source citations, automatic diagrams, multi-language translation, and incremental\n  updates.\n- Pure frontend wiki exports: interactive standalone HTML and Obsidian vault ZIP.\n- Design notes live in `docs\u002Fdesign.md`.\n\n## Installation\n\nInstall the Python package from PyPI:\n\n```bash\npip install codewiki\ncodewiki --help\n```\n\nStart CodeWiki after installation:\n\n```bash\ncodewiki serve\n```\n\nThen open `http:\u002F\u002F127.0.0.1:8000` for the Web UI. The Python package includes the\nbuilt frontend; a source checkout is only needed for frontend development with Vite.\n\nConfigure local environment variables with:\n\n```bash\ncodewiki config\ncodewiki config --set CODEWIKI_LLM__DEFAULT__MODEL=openai\u002Fgpt-4.1\ncodewiki config --profile qa --model openai\u002Fgpt-4.1 --api-key \"$OPENAI_API_KEY\"\ncodewiki config --list\n```\n\n## Wiki Workflow\n\n1. Register and analyze a repository.\n2. Build GraphRAG source chunks, optionally with embeddings.\n3. Generate a wiki catalog.\n4. Generate wiki pages from the catalog.\n5. Use update\u002Fregenerate flows when code changes.\n\nWiki pages are generated from deterministic graph facts and retrieved source chunks.\nThe page prompt enforces a gather\u002Fthink\u002Fwrite workflow and includes ReadFile evidence so\nthe model must stay close to real source files. Source references are validated before a\npage is promoted to `generated`; otherwise the page is saved as `draft` with validation\nerrors.\n\nMermaid diagrams are generated server-side from validated graph facts. Invalid diagrams\nare filtered out instead of failing the whole page, so a bad graph block should not turn\na good wiki page into a draft.\n\n## Wiki Languages\n\nThe base wiki language is generated first. Other languages are produced by translating\nthe base catalog and pages while preserving slugs, source references, code identifiers,\nlinks, and Markdown structure.\n\nSet configured translation languages in `.env`:\n\n```bash\nCODEWIKI_WIKI_BASE_LANGUAGE=en\nCODEWIKI_WIKI_TRANSLATION_LANGUAGES=zh\n```\n\nThe frontend wiki page has an English\u002FChinese language switch above the left catalog\nnavigation. If a requested non-base language is missing, the backend generates the base\nwiki first and then translates it.\n\n## Wiki Export\n\nThe frontend wiki toolbar can export the currently selected language as:\n\n- Interactive HTML: a standalone static page with catalog navigation, page switching,\n  rendered Markdown, source sections, related pages, and Mermaid rendering.\n- Obsidian vault: a ZIP containing Markdown pages, wiki links, source metadata, and\n  minimal `.obsidian` settings.\n\nExports are built entirely in the browser from already-loaded wiki data and do not\nrequire a backend export API.\n\n## LLM Configuration\n\nRun `codewiki config` or copy `.env.example` and fill in a default model profile:\n\n```bash\ncp .env.example .env\n```\n\nThe default profile is used for every task unless a task-specific profile overrides it.\nThis is the simplest \"use one model for everything\" setup:\n\n```bash\nCODEWIKI_LLM__MODE=sdk\nCODEWIKI_LLM__DEFAULT__MODEL=provider\u002Fstrong-coding-model\nCODEWIKI_LLM__DEFAULT__PROVIDER_TYPE=\nCODEWIKI_LLM__DEFAULT__ENDPOINT=\nCODEWIKI_LLM__DEFAULT__API_KEY=\nCODEWIKI_LLM__TIMEOUT_SECONDS=120\nCODEWIKI_LLM__MAX_RETRIES=3\nCODEWIKI_LLM__CACHE_ENABLED=true\n```\n\nEach LLM task can override model, provider type, endpoint, and API key:\n\n```bash\n# Fast\u002Fcheap catalog planning\nCODEWIKI_LLM__PROFILES__CATALOG__MODEL=\nCODEWIKI_LLM__PROFILES__CATALOG__PROVIDER_TYPE=\nCODEWIKI_LLM__PROFILES__CATALOG__ENDPOINT=\nCODEWIKI_LLM__PROFILES__CATALOG__API_KEY=\n\n# Strong source-grounded wiki page generation\nCODEWIKI_LLM__PROFILES__PAGE__MODEL=\nCODEWIKI_LLM__PROFILES__PAGE__PROVIDER_TYPE=\nCODEWIKI_LLM__PROFILES__PAGE__ENDPOINT=\nCODEWIKI_LLM__PROFILES__PAGE__API_KEY=\n\n# Translation\nCODEWIKI_LLM__PROFILES__TRANSLATION__MODEL=\nCODEWIKI_LLM__PROFILES__TRANSLATION__PROVIDER_TYPE=\nCODEWIKI_LLM__PROFILES__TRANSLATION__ENDPOINT=\nCODEWIKI_LLM__PROFILES__TRANSLATION__API_KEY=\n\n# Ask \u002F QA\nCODEWIKI_LLM__PROFILES__QA__MODEL=\nCODEWIKI_LLM__PROFILES__QA__PROVIDER_TYPE=\nCODEWIKI_LLM__PROFILES__QA__ENDPOINT=\nCODEWIKI_LLM__PROFILES__QA__API_KEY=\n\n# Embeddings, used when GraphRAG vector indexing is enabled\nCODEWIKI_LLM__PROFILES__EMBEDDING__MODEL=\nCODEWIKI_LLM__PROFILES__EMBEDDING__PROVIDER_TYPE=\nCODEWIKI_LLM__PROFILES__EMBEDDING__ENDPOINT=\nCODEWIKI_LLM__PROFILES__EMBEDDING__API_KEY=\n```\n\nProvider examples depend on LiteLLM. For OpenAI-compatible endpoints, set an endpoint\nand API key. For native LiteLLM providers, set `PROVIDER_TYPE` and model according to\nLiteLLM's provider naming.\n\nFailed LLM provider calls are recorded in `llm_run` with `status=error`; API responses\nreturn a `run_id` where possible so failures can be traced without exposing API keys.\n\n## Development\n\n```bash\n# Install backend and frontend dependencies\nmake install\n\n# Start FastAPI and Vite\nmake start\n\n# Stop local dev servers on the configured ports\nmake kill\n```\n\nDefault local URLs:\n\n- Backend: `http:\u002F\u002F127.0.0.1:8000`\n- Frontend: `http:\u002F\u002F127.0.0.1:5173`\n\nUseful checks:\n\n```bash\nmake lint\nmake test\nmake build\n```\n\n## CLI\n\n```bash\n# Register or inspect repositories\ncodewiki repos add . --name my-repo\ncodewiki repos list\ncodewiki repos scan .\n\n# Full analysis and GraphRAG\ncodewiki analyze .\ncodewiki graphrag build .\ncodewiki graphrag build . --embeddings\n\n# Symbol and graph intelligence\ncodewiki graph search \"AuthService\"\ncodewiki graph callers generate_page\ncodewiki graph impact GraphRAGRetriever\ncodewiki graph explore \"wiki page generation\"\ngit diff --name-only | codewiki graph affected --stdin\n\n# Wiki generation\ncodewiki wiki catalog .\ncodewiki wiki pages .\ncodewiki wiki update . --language en\ncodewiki wiki page overview .\n\n# Incremental graph update, with wiki regeneration enabled by default\ncodewiki update .\ncodewiki watch .\n\n# GraphRAG grounded Q&A\ncodewiki ask \"How does the main workflow fit together?\"\ncodewiki ask --repo my-repo \"Where are wiki pages generated?\"\n\n# MCP server for local AI assistants\ncodewiki mcp\n# or: codewiki-mcp\n```\n\nMost commands accept a repository id, id prefix, registered name, path, or Git URL.\nUse `--json` on CLI commands when machine-readable output is useful.\n\n## MCP Server\n\nCodeWiki can run as a local stdio MCP server so AI assistants can use the analyzed\nrepository graph and wiki as tools:\n\n```json\n{\n  \"mcpServers\": {\n    \"codewiki\": {\n      \"command\": \"codewiki\",\n      \"args\": [\"mcp\"],\n      \"env\": {\n        \"CODEWIKI_DATABASE_URL\": \"sqlite+aiosqlite:\u002F\u002F\u002F.\u002Fdata\u002Fcodewiki.sqlite3\"\n      }\n    }\n  }\n}\n```\n\nThe MCP server exposes tools for repository registration\u002Flisting, AST analysis,\nGraphRAG index building and retrieval, LLM-backed Q&A, graph search\u002Fexploration,\naffected-file analysis, and generated wiki page reads.\n\n## HTTP API Highlights\n\n| Method | Path | Purpose |\n|---|---|---|\n| `POST` | `\u002Fapi\u002Frepos\u002F{repo_id}\u002Fwiki\u002Fcatalog?language=en` | Generate a wiki catalog |\n| `POST` | `\u002Fapi\u002Frepos\u002F{repo_id}\u002Fwiki\u002Fpages\u002Fgenerate?language=en` | Generate all wiki pages |\n| `POST` | `\u002Fapi\u002Frepos\u002F{repo_id}\u002Fwiki\u002Fpages\u002Fupdate?language=en` | Incrementally update stale\u002Fmissing pages |\n| `POST` | `\u002Fapi\u002Frepos\u002F{repo_id}\u002Fwiki\u002Fpages\u002F{slug}\u002Fregenerate?language=en` | Regenerate one page |\n| `POST` | `\u002Fapi\u002Frepos\u002F{repo_id}\u002Fwiki\u002Ftranslate` | Translate catalog and pages |\n| `GET` | `\u002Fapi\u002Frepos\u002F{repo_id}\u002Fwiki?language=en` | Read the wiki catalog and pages |\n| `POST` | `\u002Fapi\u002Frepos\u002F{repo_id}\u002Fask` | Ask a GraphRAG-grounded question |\n| `GET` | `\u002Fapi\u002Frepos\u002F{repo_id}\u002Fgraph\u002Fsearch?q=...` | Search indexed symbols |\n| `GET` | `\u002Fapi\u002Frepos\u002F{repo_id}\u002Fgraph\u002Fcallers?symbol=...` | Find callers\u002Freferences |\n| `GET` | `\u002Fapi\u002Frepos\u002F{repo_id}\u002Fgraph\u002Fcallees?symbol=...` | Find callees\u002Freferences |\n| `GET` | `\u002Fapi\u002Frepos\u002F{repo_id}\u002Fgraph\u002Fimpact?symbol=...` | Analyze change impact |\n| `POST` | `\u002Fapi\u002Frepos\u002F{repo_id}\u002Fgraph\u002Fexplore` | Build grouped source exploration context |\n| `POST` | `\u002Fapi\u002Frepos\u002F{repo_id}\u002Fgraph\u002Faffected` | Find affected files\u002Ftests\u002Fwiki pages |\n\n## Supported AST Languages\n\n| Language | Parser | Extracted facts |\n|---|---|---|\n| Python | tree-sitter capture parser | imports, classes, functions, methods, decorators, calls, references, FastAPI-style endpoints |\n| TypeScript \u002F TSX | tree-sitter capture parser | imports\u002Fexports, classes, interfaces, type aliases, functions, methods, calls, route endpoints |\n| JavaScript \u002F JSX | tree-sitter capture parser | imports\u002Fexports, classes, functions, methods, calls, route endpoints |\n| Java | tree-sitter capture parser | package\u002Fimports, classes, interfaces, records, enums, methods, constructors, inheritance, implementations, Spring-style endpoints |\n| Go | tree-sitter capture parser | package\u002Fimports, structs, interfaces, type aliases, functions, receiver methods, calls, router-style endpoints |\n| Rust | tree-sitter capture parser | imports, structs, enums, traits, impls, functions, methods, calls |\n| C | tree-sitter capture parser | includes, structs, functions, calls |\n| C++ | tree-sitter capture parser | includes, classes, structs, functions, methods, inheritance, calls |\n| C# | tree-sitter capture parser | usings, namespaces, classes, interfaces, methods, inheritance, calls |\n\n## Notes\n\nThe core contract is that code facts come from deterministic scanners and AST parsers\nfirst. GraphRAG and LLM workflows consume those facts for retrieval, synthesis, and wiki\ngeneration rather than inventing structure.\n","CodeWiki 是一个基于抽象语法树（AST）的单用户代码图分析平台，支持GraphRAG检索、源码基础的维基生成以及由LiteLLM驱动的问答功能。其核心功能包括通过FastAPI后端管理和分析代码仓库，并利用React\u002FVite构建前端界面以展示代码图探索器和维基阅读器等页面；此外，它还能够从多种编程语言中提取代码图信息，并为这些图提供确定性的边定义。该平台适用于需要对项目进行深入理解和文档化的开发场景，特别是当团队希望自动化生成高质量的技术文档时。通过CodeWiki，用户可以轻松地注册并分析自己的代码库，进而自动生成包含引用验证的多语言维基页面。",2,"2026-06-11 03:55:00","CREATED_QUERY"]