Hierarchical Map-Reduce Wiki Generator

Code Reducer

A lightweight, high-performance command-line tool written in Go that automatically generates developer-friendly documentation wikis for extensive repositories using local LLMs via Ollama.

Go Version Ollama Support 100% Private License: MIT
Quality Gate Status Coverage Bugs Vulnerabilities Code Smells Technical Debt Duplicated Lines (%) Security Rating Reliability Rating Maintainability Rating Lines of Code

Key Features

Recursive synthesis & incremental caching

Hierarchical Map-Reduce Pipeline

Recursively breaks codebase synthesis into structured Map and Reduce phases to document arbitrary repo sizes within strict context limits.

Private & Local LLMs

Zero cloud dependencies or API costs. Leverages local Ollama instances (e.g. ornith:9b, gemma4:26b) to keep code private.

Customizable & Multilingual

Tailor extraction steps, synthesis prompts, Mermaid diagram rules, and output language (--language) directly via .code-reducer.yaml.

Enterprise Security Sandbox

Hardened filesystem guards featuring bottom-up symlink traversal checks, atomic process locking, and TOCTOU-safe atomic file writing.

Smart Incremental Updates

Uses SHA256 file hashing, fact-diff short-circuiting, and top-level summary checks to skip redundant directory and global re-synthesis.

BM25 Search & Deterministic Wiki

Built-in search and read CLI commands with source-path boosting, plus automatic Mermaid sanitization, link repair, and index generation.

Resource Efficiency & VRAM Footprint

Optimized for local consumer GPUs

Designed specifically for developer workstations and local GPU acceleration, Code-Reducer operates efficiently within consumer hardware constraints. Operating with a 15,000 token context window (15K) under Ollama, VRAM consumption remains stable at approximately 6.5 GB:

VRAM Usage

Documentation

Architecture, caching & CLI reference

Explore the documentation guides below to learn more about Code-Reducer's design, configuration, and workflows: