CodeWiki is an open-source, AI-powered documentation engine that transforms source code repositories into structured, hierarchical, and navigable technical documentation — automatically.
Built by Flamingo as part of the OpenFrame platform, CodeWiki is designed to eliminate the documentation bottleneck in software engineering. It turns messy, undocumented codebases into architecture-aware, LLM-generated documentation with zero manual effort.
CodeWiki combines multi-language static analysis with large language model reasoning to produce documentation that reflects your code's actual structure — not just its surface-level contents.
It answers the question: "How do I understand this codebase?" — for every repository, every language, every team.
flowchart TD
User["User (CLI or Web)"] --> CLI["CLI Core"]
User --> FE["Web Interface"]
CLI --> DG["Documentation Generator"]
FE --> DG
DG --> DA["Dependency Analysis"]
DG --> AO["Agent Orchestration"]
AO --> LLM["LLM Services"]
DA --> Graph["Dependency Graph"]
Graph --> DG
DG --> FileSystem["Generated Documentation"]
DG --> Metadata["metadata.json"]
LLM --> External["External LLM Providers"]
| Feature | Description |
|---|---|
| Multi-language support | Python, JavaScript, TypeScript, Java, C, C++, C#, PHP |
| AI-powered generation | LLM-generated documentation using Claude, GPT, or any OpenAI-compatible endpoint |
| Dependency graph analysis | AST-based static analysis builds accurate call graphs |
| Hierarchical documentation | Leaf-first, bottom-up documentation respecting module structure |
| CLI interface | One-command generation via codewiki generate |
| Web interface | FastAPI-based web app for team-wide usage |
| Git-native | Auto-creates documentation branches and commits |
| GitHub Pages ready | Generates a static index.html viewer |
| LLM-agnostic | Works with OpenAI, Anthropic, Azure, and OpenAI-compatible proxies |
| Context overflow protection | Synthetic module fallback prevents runaway LLM calls |
CodeWiki is built for:
- Software engineers who need to onboard quickly to unfamiliar codebases
- Technical leads who want living documentation that stays current with the code
- MSP operators using the OpenFrame platform who need automated documentation across client environments
- Open-source maintainers who want architecture docs without writing them manually
- DevOps and platform engineers integrating documentation into CI/CD pipelines
CodeWiki runs in a structured, multi-stage pipeline:
flowchart TD
Start["Start Job"] --> Analyze["Dependency Analysis"]
Analyze --> Cluster["Module Clustering (LLM)"]
Cluster --> LeafDocs["Generate Leaf Module Docs"]
LeafDocs --> ParentDocs["Generate Parent Module Docs"]
ParentDocs --> Overview["Generate Repository Overview"]
Overview --> Metadata["Write metadata.json"]
Metadata --> EndNode["END"]
- Dependency Analysis — AST-based parsing extracts classes, functions, and relationships across all files
- Module Clustering — An LLM groups related components into logical modules
- Leaf-first generation — Documentation is generated bottom-up: leaves first, then parents, then root
- Output — Structured Markdown files, a navigable
README.md, and optionally a GitHub Pages site
This staged approach ensures the LLM never receives the full repository context in a single call — keeping generation fast, affordable, and accurate.
CodeWiki provides two ways to generate documentation:
Ideal for local development, CI/CD pipelines, and scripting:
codewiki generateA FastAPI-based web UI for submitting any public GitHub repository and browsing generated documentation:
python -m codewiki.run_web_appCodeWiki is part of the OpenMSP open-source community.
- Community: OpenMSP Slack
- Platform: OpenMSP Community
- Source code: github.com/flamingo-stack/CodeWiki
- Flamingo: flamingo.run
- OpenFrame: openframe.ai
After reading this introduction:
- Review the Prerequisites to prepare your environment
- Follow the Quick Start to run CodeWiki in under 5 minutes
- Explore First Steps to learn key features after setup