| Crates.io | deepwiki-rs |
| lib.rs | deepwiki-rs |
| version | 1.2.7 |
| created_at | 2025-09-06 12:58:48.903674+00 |
| updated_at | 2025-12-13 01:17:02.928941+00 |
| description | deepwiki-rs(also known as Litho) is a high-performance automatic generation engine for C4 architecture documentation, developed using Rust. It can intelligently analyze project structures, identify core components, parse dependency relationships, and leverage large language models (LLMs) to automatically generate professional architecture documentation. |
| homepage | |
| repository | https://github.com/sopaco/deepwiki-rs |
| max_upload_size | |
| id | 1827041 |
| size | 2,622,708 |
πͺπ» High-performance AI-driven intelligent document generator (DeepWiki-like) built with Rust
π Automatically generates high quality Repo-Wiki for any codebase
Litho is an AI-powered documentation generation engine that automatically analyzes your source code and generates comprehensive, professional architecture documentation in the C4 model format. No more manual documentation that falls behind code changes - Litho keeps your documentation perfectly in sync with your codebase.
Litho transforms raw code into beautifully structured documentation with context diagrams, container diagrams, component diagrams, and code-level documentation - all automatically generated from your source code.
Whether you're a developer, architect, or technical lead, Litho eliminates the burden of maintaining documentation and ensures your team always has accurate, up-to-date architectural information.
Transform your codebase into professional architecture documentation in minutes
| Before Litho | After Litho |
|---|---|
|
Manual Documentation
|
AI-Generated Documentation
|
π Litho automatically transforms your messy codebase into beautiful, professional documentation
π For:
β€οΈ Like Litho? Star it π or Sponsor Me! β€οΈ
Thanks to the kind people
Litho solves the common problem of outdated and incomplete technical documentation by automatically generating up-to-date architecture documentation from your source code. No more manual documentation that falls behind code changes - Litho keeps your documentation in sync with your codebase.
Litho is part of a broader ecosystem of tools designed to enhance developer productivity and documentation quality. The Litho Eco ecosystem includes complementary tools that work seamlessly with Litho to provide a complete documentation workflow:
Litho Book is a high-performance markdown reader built with Rust and Axum, specifically designed to provide an elegant interface for browsing documentation generated by Litho.
![]() |
![]() |
Litho Book serves as the ideal companion application for consuming documentation generated by Litho. The typical workflow is:
Mermaid Fixer is a high-performance AI-driven tool that automatically detects and fixes syntax errors in Mermaid diagrams within Markdown files.
Mermaid Fixer enhances the quality of documentation generated by Litho by automatically fixing syntax errors in Mermaid diagrams. This ensures that all architectural diagrams in your documentation are valid and render correctly.
![]() |
![]() |
Learn more about Mermaid Fixer
Litho's architecture is designed around a four-stage processing pipeline that transforms raw code into comprehensive documentation:
flowchart TD
A[Input: Source Code Repository] --> B[Phase 1: Preprocessing]
B --> C[Phase 2: Intelligent Research & Analysis]
C --> D[Phase 3: Documentation Generation]
D --> E[Phase 4: Verification & Enhancement]
E --> F[Output: High-Quality Technical Documentation]
subgraph Preprocessing Phase
B1[Code Scanning & Discovery]
B2[Multi-Language Syntax Analysis]
B3[Structure & Dependency Extraction]
B4[Code Insight Generation]
B5[Agent Memory Chunk Initialization]
B --> B1 --> B2 --> B3 --> B4 --> B5
end
subgraph Intelligent Research & Analysis Phase
C1[System Context Researcher]
C2[Domain Module Detector]
C3[Workflow Researcher]
C4[Boundary Analyzer]
C5[Key Module Insight Officer]
C6[Agent Memory Chunk Read/Write]
C7[ReAct Reasoning Loop]
C --> C1 --> C2 --> C3 --> C4 --> C5 --> C6 --> C7
end
subgraph Documentation Generation Phase
D1[Overview Documentation Editor]
D2[Architecture Documentation Editor]
D3[Workflow Documentation Editor]
D4[Boundary Documentation Editor]
D5[Key Module Editor]
D6[Agent Memory Chunk Reading]
D7[High-Quality Documentation Assembly]
D --> D1 --> D2 --> D3 --> D4 --> D5 --> D6 --> D7
end
subgraph Verification & Enhancement Phase
E1[Mermaid Syntax Verification]
E2[Documentation Integrity Check]
E3[Diagram Auto-Repair]
E4[Quality Report Generation]
E5[Final Documentation Output]
E --> E1 --> E2 --> E3 --> E4 --> E5
end
style B fill:#e3f2fd,stroke:#1976d2
style C fill:#f3e5f5,stroke:#7b1fa2
style D fill:#e8f5e8,stroke:#388e3c
style E fill:#fff3e0,stroke:#e65100
Litho begins by scanning your entire codebase to identify source files, extract metadata, and analyze project structure. This stage:
flowchart TD
A[Preprocessing Agent] --> B[Structure Extractor]
A --> C[Original Document Extractor]
A --> D[Code Analysis Agent]
A --> E[Relationship Analysis Agent]
B --> F[Project Structure]
C --> G[Original Document Materials]
D --> H[Core Code Insights]
E --> I[Code Dependencies]
F --> J[Store to Memory]
G --> J
H --> J
I --> J
In this AI-powered stage, Litho analyzes the code structure to understand the architectural intent:
flowchart TD
A[Research Orchestrator] --> B[SystemContext Researcher]
A --> C[Domain Module Detector]
A --> D[Architecture Researcher]
A --> E[Workflow Researcher]
A --> F[Key Module Insights]
B --> G[System Context Report]
C --> H[Domain Module Report]
D --> I[Architecture Analysis Report]
E --> J[Workflow Analysis Report]
F --> K[Module Deep Insights]
G --> Memory
H --> Memory
I --> Memory
J --> Memory
K --> Memory
Litho combines the analyzed information into a structured documentation format:
flowchart TD
A[Document Composer] --> B[Overview Editor]
A --> C[Architecture Editor]
A --> D[Module Insight Editor]
B --> E[Overview Document]
C --> F[Architecture Document]
D --> G[Module Documents]
E --> H[Document Tree]
F --> H
G --> H
H --> I[Disk Outlet]
I --> J[Output Directory]
The final stage ensures documentation quality and completeness:
Litho features a sophisticated modular architecture designed for high performance, extensibility, and intelligent analysis. The system implements a multi-stage workflow with specialized AI agents and comprehensive caching mechanisms.
graph LR
subgraph Input Phase
A[CLI Startup] --> B[Load Configuration]
B --> C[Scan Structure]
C --> D[Extract README]
end
subgraph Analysis Phase
D --> E[Language Parsing]
E --> F[AI-Enhanced Analysis]
F --> G[Store in Memory]
end
subgraph Reasoning Phase
G --> H[Orchestrator Startup]
H --> I[System Context Analysis]
H --> J[Domain Module Detection]
H --> K[Workflow Analysis]
H --> L[Key Module Insights]
I --> M[Store in Memory]
J --> M
K --> M
L --> M
end
subgraph Orchestration Phase
M --> N[Orchestration Hub Startup]
N --> O[Generate Project Overview]
N --> P[Generate Architecture Diagram]
N --> Q[Generate Workflow Documentation]
N --> R[Generate Module Insights]
O --> S[Write to DocTree]
P --> S
Q --> S
R --> S
end
subgraph Output Phase
S --> T[Persist Documents]
T --> U[Generate Summary Report]
end
Litho's architecture consists of several interconnected modules that work together to deliver seamless documentation generation:
The core processing flow follows a deterministic pipeline:
sequenceDiagram
participant Main as main.rs
participant Workflow as workflow.rs
participant Context as GeneratorContext
participant Preprocess as PreProcessAgent
participant Research as ResearchOrchestrator
participant Doc as DocumentationOrchestrator
participant Outlet as DiskOutlet
Main->>Workflow : launch(config)
Workflow->>Context : Create context (LLM, Cache, Memory)
Workflow->>Preprocess : execute(context)
Preprocess->>Context : Store project structure and metadata
Context-->>Workflow : Preprocessing complete
Workflow->>Research : execute_research_pipeline(context)
Research->>Research : Execute multiple research agents in parallel
loop Each Research Agent
Research->>StepForwardAgent : execute(context)
StepForwardAgent->>Context : Validate data sources
StepForwardAgent->>AgentExecutor : Call prompt or extract
AgentExecutor->>LLMClient : Initiate LLM request
LLMClient->>CacheManager : Check cache
alt Cache hit
CacheManager-->>LLMClient : Return cached result
else Cache miss
LLMClient->>LLM : Call LLM API
LLM-->>LLMClient : Return raw response
LLMClient->>CacheManager : Store result to cache
end
LLMClient-->>AgentExecutor : Return processed result
AgentExecutor-->>StepForwardAgent : Return result
StepForwardAgent->>Context : Store result to Memory
end
Research-->>Workflow : Research complete
Workflow->>Doc : execute(context, doc_tree)
Doc->>Doc : Call multiple composition agents to generate docs
Doc-->>Workflow : Documentation generation complete
Workflow->>Outlet : save(context)
Outlet-->>Workflow : Storage complete
Workflow-->>Main : Process finished
cargo install deepwiki-rs
git clone https://github.com/sopaco/deepwiki-rs.git
cd deepwiki-rs
cargo build --release
target/release directory.Litho provides a simple command-line interface to generate documentation from your codebase. For more configuration parameters, refer to the CLI Options Detail.
deepwiki-rs -p ./my-project -o ./docs
# Generate documentation in the target language.
deepwiki-rs --target-language en -p ./my-project
deepwiki-rs --target-language ja -p ./my-project
This command will:
./my-project./litho.docs directoryLitho supports several options for generating documentation:
# Generate documentation with default settings
deepwiki-rs skip certain processing stages in the generation workflow
deepwiki-rs --skip-preprocessing --skip-research
# Turn off ReAct Mode to avoid auto-scanning project files via tool-calls
deepwiki-rs -p ./src --disable-preset-tools --llm-api-base-url <your llm provider base-api> --llm-api-key <your api key> --model-efficient GPT-5-mini
# Set up both the efficient model and the powerful model simultaneously
deepwiki-rs -p ./src --model-efficient GPT-5-mini --model-poweruful GPT-5-Pro --llm-api-base-url <your llm provider base-api> --llm_api_key <your api key> --model-efficient GPT-5-mini
Litho generates a well-organized documentation structure:
project-docs/
βββ 1. Project Overview # Project overview, core functionality, technology stack
βββ 2. Architecture Overview # Overall architecture, core modules, module breakdown
βββ 3. Workflow Overview # Overall workflow, core processes
βββ 4. Deep Dive/ # Detailed technical topic implementation documentation
β βββ Topic1.md
β βββ Topic2.md
We welcome all forms of contributions! Report bugs or submit feature requests through GitHub Issues.
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)MIT. A copy of the license is provided in the LICENSE file.
π Help me develop this software better by sponsoring on GitHub
An experienced internet veteran, having navigated through the waves of PC internet, mobile internet, and AI applications. Starting from an individual mobile application developer to a professional in the corporate world, I possess rich experience in product design and research and development. Currently, I am employed at Kuaishou, focusing on the R&D of universal front-end systems and AI exploration.
GitHub: sopaco