Litho

Cyan and blue geometric logo on a dark navy background, next to a monospace wordmark

A Markdown architecture wiki drafted from source code

Litho, published on crates.io as deepwiki-rs, is a Rust CLI that sets a team of LLM agents on a repository and gets Markdown architecture documentation back. The README pitches it as a "DeepWiki-like" generator and frames the output around the C4 model. deepwiki-rs -p ./my-project fills ./litho.docs with a project overview, the architecture and its modules, the main workflows, deep-dive pages per topic and the exposed interfaces, illustrated with Mermaid diagrams. Projects that contain SQL get a sixth document on the database.

Two models per run, eight providers, a year-long cache

  • The pipeline has four stages: preprocessing pulls out structure and dependencies, research agents map the system context, domain modules, workflows and boundaries, editor agents write the documents, and a last pass repairs invalid Mermaid diagrams.
  • --model-efficient handles routine calls, while --model-powerful takes the complex reasoning and is the fallback when the cheaper model fails.
  • Eight providers are supported: OpenAI, Anthropic, Gemini, Mistral, DeepSeek, Moonshot, OpenRouter and Ollama. With Ollama on the same machine, the code stays local.
  • LLM responses are cached in .litho/cache for a full year (8,760 hours), so a rerun does not pay twice for the same calls. --force-regenerate wipes that cache.
  • PDFs, Markdown, SQL, OpenAPI specs and plain text can feed the analysis. Each category (architecture, database, API, ADR...) reaches only the agents assigned to it.
  • A SQL Server project (.sqlproj) or plain SQL files produce 6.Database-Overview.md, with tables, views, stored procedures and an entity-relationship diagram. The 1.5.0 release notes single out SQL Server and data warehouse projects.
  • --target-language picks one of eight output languages. English is the default.

Hard dependency on mermaid-fixer, new work going to Terrain

Litho will not start without mermaid-fixer. Since a commit dated April 18, 2026, the CLI exits at launch when mermaid-fixer, another MIT tool by the same author, is missing, and the error message says to run cargo install mermaid-fixer. The README's install section never mentions it. That second program also calls Litho's powerful model to repair the diagrams.

Rust 1.85 or newer, and no Linux binary. The README asks for Rust 1.70+, but Cargo.toml declares the Rust 2024 edition, which shipped with Rust 1.85. Release 1.6.0 has no binaries attached, and earlier releases only carried Windows x64 and macOS ARM builds.

The defaults point at ModelScope. src/config.rs sets the API base URL to api-inference.modelscope.cn with two Qwen models, so provider, URL and models need setting before the first run. ReAct mode is on by default and lets the agents open project files themselves through tool calls. --disable-preset-tools switches it off.

Go is on the README's list but has no extractor. Only Rust, Python, Java, Kotlin, C#, Swift, PHP, JavaScript, TypeScript, React, Vue and Svelte get dependency and interface extraction. Go, C, C++, Ruby and Dart files are scanned without it. By default Litho reads only Git-tracked files, minus tests and anything over 512 KB.

Active development has moved to Terrain. The README now opens on Terrain, an MIT project the same author started in June 2026. It builds on Litho and adds a knowledge base kept in sync with the code, which agents such as Claude Code or Codex read over ACP, while Litho stays "the fast, focused C4 doc generator". Litho 1.6.0, released September 13, 2026, is mostly new CLI flags and fixes, and its last commit landed the next day. Terrain, still at 0.9.x, was getting commits on October 25, 2026. With no watch mode for source code, Litho only brings its docs up to date when it runs again, locally or in CI.