LLM Wiki — Auto-generate knowledge base from code & docs. CGC code intelligence, Q&A chat, knowledge graph, drift detection.
Project description
Wiki-Forge
Auto-generate knowledge base from code & documents.
Wiki-Forge indexes your codebase and documents into a structured, interlinked wiki — then lets you query it via Web UI, CLI, or AI agents (Claude Desktop, Cursor).
Features
| Feature | Description |
|---|---|
| Code-to-Doc | Auto-generate wiki from source code (19 languages) |
| Document Ingestion | PDF, DOCX, PPTX, HTML, Markdown → wiki pages |
| Q&A Chat | Ask questions in natural language, get answers with citations |
| Knowledge Graph | Interactive graph visualization (Sigma.js) |
| Drift Detection | Auto-detect code ↔ wiki contradictions (7 types) |
| MCP Server | Claude Desktop / Cursor integration (5 tools) |
| Multi-Project | Unified wiki across multiple repos |
| CGC Engine | Rust-accelerated code intelligence (Tree-sitter + KuzuDB) |
Quick Start
Install
# Full install (recommended)
pip install "wiki-forge[all]"
# Or minimal (CLI only, no server/MCP)
pip install wiki-forge
1. Index a codebase
cd my-project
# Free index (CGC only, no LLM cost)
wiki-forge init --cgc --no-llm
# Full wiki generation (uses LLM ~$0.04)
export GEMINI_API_KEY=your-key
wiki-forge init --cgc
2. Query
wiki-forge query "how does authentication work?"
3. Web UI
wiki-forge serve --port 5757
# Open http://localhost:5757/wiki/
4. AI Agent (Claude Desktop / Cursor)
{
"mcpServers": {
"wiki-forge": {
"url": "http://localhost:5757/mcp/sse"
}
}
}
Install Options
pip install "wiki-forge[all]" # Everything
pip install "wiki-forge[server]" # Web UI + REST API
pip install "wiki-forge[cgc]" # CGC Rust code intelligence
pip install "wiki-forge[mcp]" # MCP server (Claude/Cursor)
pip install "wiki-forge[converters]" # PDF, DOCX, PPTX converters
CLI Commands
| Command | Description | LLM? |
|---|---|---|
wiki-forge init [--cgc] |
Index repo + generate wiki | Yes |
wiki-forge init --cgc --no-llm |
CGC index only (free) | No |
wiki-forge update [--cgc] |
Incremental update (changed files only) | Yes |
wiki-forge query "question" |
Q&A against wiki | Yes |
wiki-forge serve |
Start Web UI + API server | No |
wiki-forge mcp |
Start MCP server (stdio) | No |
wiki-forge list |
List registered vaults | No |
wiki-forge register |
Register vault in global registry | No |
wiki-forge ingest doc.md |
Ingest a document | Yes |
wiki-forge lint |
Check wiki health (broken links, orphans) | No |
wiki-forge drift ./src |
Detect code ↔ wiki contradictions | Partial |
wiki-forge unify -p a:./a -p b:./b |
Merge multi-repo wikis | Yes |
Code Intelligence (CGC)
Wiki-Forge uses CodeGraphContext (MIT) for code analysis:
- 19 languages: Python, TypeScript, JavaScript, Rust, Go, Java, C/C++, C#, Ruby, PHP, Kotlin, Scala, Swift, Dart, Haskell, Elixir, Perl, and more
- Rust-accelerated: Tree-sitter parsing via Rust native extension
- Call graph: Function → function call edges (1,000-20,000+ per project)
- Operational params: Auto-extracts cron schedules, timeouts, config values
Performance
| Repo | Files | Parse | Write | Resolve | Total | Edges |
|---|---|---|---|---|---|---|
| Python backend (300 files) | 300 | 1.0s | 7.3s | 3.4s | 11.6s | 11,927 |
| Next.js frontend (300 files) | 300 | 3.0s | 4.6s | 1.5s | 9.1s | 5,731 |
| Large TS monorepo (1220 files) | 1220 | 16s | 28s | 27s | 71s | 49,958 |
Docker
# Build
docker build -t wiki-forge \
--build-context cgc=/path/to/CodeGraphContext .
# Run
docker run -d -p 5757:5757 \
-v ./workspaces:/workspaces \
-e GEMINI_API_KEY=your-key \
wiki-forge
Or with docker-compose:
docker-compose up -d
open http://localhost:5757/wiki/
MCP Tools (for AI Agents)
| Tool | Description | LLM Cost |
|---|---|---|
list_vaults |
List all available projects | Free |
search_pages |
BM25 keyword search | Free |
read_page |
Read raw wiki page content | Free |
get_context |
Get ranked pages for a question (AI synthesizes locally) | Free |
query_wiki |
Full Q&A with LLM synthesis | ~$0.001 |
Claude Desktop Config
{
"mcpServers": {
"wiki-forge": {
"url": "http://your-server:5757/mcp/sse"
}
}
}
Claude Code Skill
# Install /wiki slash command globally
curl -sL https://raw.githubusercontent.com/tinhthanh/llm-wiki/main/scripts/install-skills.sh | bash
# Usage in Claude Code
/wiki "how does the auth module work?"
Document Converters
| Format | Engine | License |
|---|---|---|
| pdf_oxide | MIT/Apache-2.0 | |
| DOCX | markitdown | MIT |
| PPTX | markitdown | MIT |
| XLSX | markitdown | MIT |
| HTML | markitdown | MIT |
| PDF (alternative) | pdfplumber | MIT |
All converters are MIT-licensed — safe for commercial SaaS.
Architecture
wiki-forge/
├── src/llm_wiki/ ← Python backend
│ ├── cli.py ← 17 CLI commands
│ ├── server.py ← FastAPI (REST + SSE + MCP)
│ ├── mcp_server.py ← MCP tools (5 tools)
│ ├── code/cgc_bridge.py ← CGC Rust engine bridge
│ └── pipeline/
│ ├── ingest.py ← Document ingestion (2-step LLM)
│ ├── ingest_code.py ← Code-to-Doc (5 phases)
│ ├── query.py ← Q&A (BM25 + graph re-ranking)
│ ├── drift.py ← Drift detection (7 types)
│ └── lint.py ← Wiki health check
├── web/ ← React frontend (Vite + Tailwind)
├── workspaces/ ← Wiki data (markdown flat files)
├── docs/
│ ├── USER_GUIDE.md ← End-user guide (Dev + BO)
│ ├── DEVELOPER_GUIDE.md ← Developer guide
│ └── PROPOSAL.md ← Architecture proposal
├── Dockerfile ← Multi-stage (Rust + Node + Python)
└── docker-compose.yml ← One-command deployment
Cost Estimate
| Operation | LLM Calls | Cost (Gemini Flash Lite) |
|---|---|---|
| Index 300 files (code-to-doc) | ~25 | ~$0.04 |
| 1 Q&A query | 1 | ~$0.001 |
| Ingest 1 document | 2 | ~$0.002 |
| CGC code index | 0 | $0 (free) |
| Search / Browse / Graph | 0 | $0 (free) |
Documentation
- USER_GUIDE.md — End-user guide for Dev + BO teams
- DEVELOPER_GUIDE.md — Internal developer guide
- PROPOSAL.md — Architecture & solution proposal
License
MIT — free for commercial use.
Dependencies: All production dependencies are MIT/BSD/Apache-2.0 licensed.
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 wiki_forge-1.2.0.tar.gz.
File metadata
- Download URL: wiki_forge-1.2.0.tar.gz
- Upload date:
- Size: 93.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed9c2be71da33bbff096f50496a465b5a8549171c314e2184dddabe3b329e3df
|
|
| MD5 |
2bda1f859cec0bef05e951432bb46ae7
|
|
| BLAKE2b-256 |
accbe669bb9a48f35a5cc705cdaa518eacd4f74fb870b5ea38bf51afde093beb
|
File details
Details for the file wiki_forge-1.2.0-py3-none-any.whl.
File metadata
- Download URL: wiki_forge-1.2.0-py3-none-any.whl
- Upload date:
- Size: 2.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
183f1f65b7de8c6fef74e7d633d68ce9efac7853695e5d08d322f6a0d22203bd
|
|
| MD5 |
cd87ac62274e99096c6667f6d0484908
|
|
| BLAKE2b-256 |
1b4fc4b87e965de98238acdec6c2bfcae28aedcba43ac7dc198ed1120b9f82dd
|