DocLoom
✨ What is DocLoom?
DocLoom is a powerful documentation generator that transforms your scattered technical materials into professional, branded documents. By combining structured templates with AI assistance, it produces consistent, high-quality documentation that's ready to print, share, and iterate.
🎯 Key Features
- 🎨 Professional Templates - Pre-built templates for architecture visions, technical debt summaries, and reference architectures
- 🤖 AI-Powered Generation - Intelligent content generation using OpenAI, Azure, Claude, or local LLMs
- 📚 Multi-Source Processing - Ingest Markdown, text files, PDFs, and other documents as source material
- 🔍 Smart Content Assembly - Automatically extracts and organizes relevant information from your sources
- 📊 Structured Output - Generates beautiful HTML with embedded styles and JSON sidecars for traceability
- 🔧 Flexible Configuration - YAML configs, environment variables, and CLI flags for complete control
- 🚀 Production Ready - Battle-tested with comprehensive test coverage and CI/CD pipeline
- 🐳 Docker Support - Run anywhere with our official Docker images
- 🔬 C# Code Analysis - Built-in Go-native C# analyzer with no external dependencies (NEW!)
🚀 Quick Start
Get up and running in 30 seconds:
# Install via Go
go install github.com/karolswdev/docloom/cmd/docloom@latest
# Or download the latest binary
curl -L https://github.com/karolswdev/docloom/releases/latest/download/docloom_$(uname -s)_$(uname -m).tar.gz | tar xz
sudo mv docloom /usr/local/bin/
# Generate your first document
export OPENAI_API_KEY="your-api-key"
docloom generate --type architecture-vision --source ./docs --out my-vision.html
# Open the result
open my-vision.html # macOS
# xdg-open my-vision.html # Linux
# start my-vision.html # Windows
That's it! You've just created a professional architecture vision document.
📖 Table of Contents
📦 Installation
Binary Releases
Download pre-built binaries for your platform from our GitHub Releases.
Linux/macOS
# Download the latest release (replace VERSION and PLATFORM)
VERSION=$(curl -s https://api.github.com/repos/karolswdev/docloom/releases/latest | grep tag_name | cut -d '"' -f 4)
PLATFORM=$(uname -s)_$(uname -m)
curl -L "https://github.com/karolswdev/docloom/releases/download/${VERSION}/docloom_${PLATFORM}.tar.gz" | tar xz
# Move to PATH
sudo mv docloom /usr/local/bin/
# Verify installation
docloom --version
Windows
Download the .zip file from the releases page, extract it, and add to your PATH.
Docker
# Pull the latest image
docker pull ghcr.io/karolswdev/docloom:latest
# Run with your local files
docker run --rm \
-v $(pwd):/workspace \
-e OPENAI_API_KEY="$OPENAI_API_KEY" \
ghcr.io/karolswdev/docloom:latest generate \
--type architecture-vision \
--source /workspace/docs \
--out /workspace/output.html
From Source
Requires Go 1.22 or later:
# Clone and build
git clone https://github.com/karolswdev/docloom.git
cd docloom
make build
# Install to $GOPATH/bin
make install
# Or use go install directly
go install github.com/karolswdev/docloom/cmd/docloom@latest
📄 Templates
Available Templates
DocLoom ships with professional templates ready to use:
- Architecture Vision - Document system architecture, decisions, and roadmap
- Technical Specification - Detailed technical documentation with requirements
- Simple Documentation - Clean, general-purpose template
Templates are located in the templates/ directory. Each template includes:
- HTML structure with data-field placeholders
- Professional CSS styling
- YAML configuration with field schemas
- AI analysis prompts for intelligent generation
Using Templates
# Use built-in template
docloom generate --type architecture-vision --source ./docs --out output.html
# Use custom template directory
docloom generate --template-dir ./my-templates --type custom --source ./docs --out output.html
Creating Custom Templates
- Create a new directory in
templates/
- Add
template.html with data-field placeholders
- Add
style.css for styling
- Add
template.yaml for configuration (optional)
See templates/README.md for a complete guide on creating custom templates.
🔧 Usage
Basic Commands
# Show help and available commands
docloom --help
# Display version information
docloom version
# List available templates
docloom templates list
# Show detailed template information
docloom templates describe architecture-vision
Generating Documents
# Basic generation with environment variable API key
export OPENAI_API_KEY="your-api-key"
docloom generate \
--type architecture-vision \
--source ./project-docs \
--out architecture.html
# Using multiple source directories
docloom generate \
--type technical-debt-summary \
--source ./docs --source ./issues --source ./notes.md \
--out debt-report.html
# With specific model and temperature
docloom generate \
--type reference-architecture \
--source ./specs \
--model gpt-4 \
--temperature 0.3 \
--out reference.html
Dry Run Mode
Preview what DocLoom will do without making API calls:
# See the assembled prompt and selected source chunks
docloom generate \
--type architecture-vision \
--source ./docs \
--out output.html \
--dry-run
# Combine with verbose mode for maximum detail
docloom generate \
--type architecture-vision \
--source ./docs \
--out output.html \
--dry-run \
--verbose
Using Research Agents
Research Agents are external programs that analyze your code and produce documentation artifacts before the main generation process:
# Run a research agent before generating documentation
docloom generate \
--agent code-analyzer \
--source ./src \
--type technical-report \
--out analysis.html
# Pass parameters to the agent
docloom generate \
--agent research-agent \
--source ./project \
--agent-param "depth=3" \
--agent-param "include_tests=true" \
--type architecture-vision \
--out vision.html
# List available agents
docloom agents list
# Show details about a specific agent
docloom agents describe code-analyzer
Advanced Usage
# Force overwrite existing files
docloom generate \
--type architecture-vision \
--source ./docs \
--out output.html \
--force
# Using Azure OpenAI
docloom generate \
--type architecture-vision \
--source ./docs \
--model gpt-35-turbo \
--base-url https://myinstance.openai.azure.com \
--api-key "azure-key" \
--out output.html
# Using local LLM (Ollama, LocalAI, etc.)
docloom generate \
--type architecture-vision \
--source ./docs \
--model llama2 \
--base-url http://localhost:11434/v1 \
--api-key "unused" \
--out output.html
# With configuration file
docloom generate \
--config ./docloom.yaml \
--type architecture-vision \
--source ./docs \
--out output.html
🤖 Research Agents
DocLoom supports Research Agents - external programs that can analyze your codebase and generate specialized documentation. Agents can be written in any language and are discovered automatically from designated directories.
Agent Management Commands
# List all available agents
docloom agents list
# Show detailed information about an agent
docloom agents describe <agent-name>
Example Output
$ docloom agents list
NAME DESCRIPTION
---- -----------
code-analyzer Analyzes code complexity and patterns
api-documenter Generates API documentation from source
security-scanner Identifies security vulnerabilities
$ docloom agents describe code-analyzer
Agent: code-analyzer
API Version: v1
Kind: ResearchAgent
Description: Analyzes code complexity and patterns
Runner:
Command: python3
Args:
- /agents/code_analyzer.py
Parameters:
- Name: language
Type: string
Description: Programming language to analyze
Required: true
- Name: max_depth
Type: integer
Description: Maximum analysis depth
Required: false
Default: 3
Adding Custom Agents
Agents are defined using YAML files with a .agent.yaml extension. Place them in:
.docloom/agents/ - Project-specific agents
~/.docloom/agents/ - User-wide agents
See docs/agents/schema.md for the complete agent definition schema.
Claude Code CLI Agent
DocLoom includes a powerful C# analysis agent powered by the Claude Code CLI (cc-cli). This agent performs deep analysis of C# repositories using the Claude LLM.
Installation
The Claude Code CLI must be installed separately:
# Build from source
cd tools/claude-code-cli
go build -o cc-cli
# Add to PATH or copy to a location in PATH
sudo cp cc-cli /usr/local/bin/
# Or install with go install (when released)
go install github.com/karolswdev/docloom/tools/claude-code-cli@latest
Usage
# Use the csharp-cc-cli agent with generate command
docloom generate \
--type architecture-vision \
--source /path/to/csharp/project \
--agent csharp-cc-cli \
--out architecture.html
Configuration
Set your Claude API key:
export CLAUDE_API_KEY="your-api-key"
The agent will analyze your C# codebase and generate comprehensive artifacts including:
- Project overview and architecture
- API documentation
- Technical debt analysis
- Security insights
- Recommendations for improvement
⚙️ Configuration
DocLoom supports flexible configuration through multiple sources (in precedence order):
- CLI flags - Direct command-line arguments
- Environment variables -
DOCLOOM_ prefixed variables
- Configuration file - YAML configuration
- Defaults - Built-in sensible defaults
Configuration File
Create a docloom.yaml:
# Model configuration
model: gpt-4
base_url: https://api.openai.com/v1
temperature: 0.7
max_retries: 3
# Template configuration
template_dir: ./custom-templates
# Output configuration
force: false
# Operational configuration
verbose: false
dry_run: false
Use with: docloom generate --config docloom.yaml ...
Environment Variables
| Variable |
Description |
Default |