sopaco/deepwiki-rs

Turn code into clarity. Generate accurate technical docs and AI-ready context in minutes—perfectly structured for human teams and intelligent agents.

Litho (deepwiki‑rs) – AI‑powered documentation generator written in Rust

What it does – Litho scans a whole source‑code repository, extracts the structure, comments and dependencies, then uses LLMs to turn that raw information into a complete set of architecture documents in the C4 model (context, container, component, code diagrams). The output is a ready‑to‑read wiki that stays in sync with the code.

Why it matters – Keeping technical documentation up‑to‑date is a chronic pain point for developers. Litho automates the whole pipeline, so teams spend less time writing markdown and more time coding. Because it runs as a Rust binary it can be fast and easily dropped into CI/CD pipelines.

Key features (as described in the README)

  • Four‑stage pipeline – preprocessing (code discovery & parsing), research (LLM‑driven architectural inference), documentation generation (C4 diagrams, markdown), verification/enhancement (Mermaid syntax fixing, integrity checks).
  • Multi‑language support – works with Rust, Python, Java, Go, C#, JavaScript and others.
  • External knowledge integration – you can mount extra docs (PDF, markdown, SQL) to enrich the analysis.
  • Database documentation – auto‑generates ER diagrams for SQL projects.
  • Git history analysis – tracks how the architecture evolves over time.
  • CI/CD ready – can be invoked on every commit to keep docs fresh.
  • Ecosystem tools
    • Litho Book: a Rust/Axum markdown viewer with Mermaid support and AI‑driven Q&A.
    • Mermaid Fixer: an AI‑assisted utility that scans markdown for broken Mermaid diagrams and repairs them.

How it works (pipeline overview)

  1. Preprocessing – the code scanner discovers files, parses syntax, extracts comments and builds a dependency graph.
  2. Research – specialized AI agents (system‑context researcher, domain‑module detector, workflow researcher, etc.) run a ReAct reasoning loop to infer architectural intent and produce intermediate reports.
  3. Documentation generation – editors assemble the C4 model diagrams, overview pages, module‑level docs and cross‑references into a hierarchical markdown tree.
  4. Verification & enhancement – Mermaid syntax is validated/fixed, completeness checks are run, and a final quality report is emitted.

Typical workflow

# Install the crate
cargo install deepwiki-rs

# Run Litho on a repository (example)
litho generate --repo /path/to/project --output docs/

The command produces a directory of markdown files and Mermaid diagrams that can be served directly or opened with Litho Book for a nicer UI.

Who should use it

  • Development teams that want automated, up‑to‑date architecture docs.
  • Open‑source maintainers looking for a low‑maintenance wiki.
  • Enterprises needing auditable documentation for compliance.

Related project – The README notes that Litho has been superseded by a newer project called Terrain, which adds a living map of the codebase for AI agents while keeping Litho as a fast C4 doc generator.


All details above are taken directly from the repository’s README; no additional features have been inferred.

Related

  • Project
  • Project
  • Project
  • Project
  • Project