Automatically capture and document architectural decisions as you code.
Stop losing track of important architectural decisions. cADR analyzes your code changes with LLMs and generates comprehensive ADRs automatically, keeping your documentation in sync with your code.
- Never miss a decision: Automatically detects architecturally significant changes
- Stay in flow: Works with your existing Git workflow, never blocks commits
- AI-powered documentation: Generates comprehensive ADRs in MADR format
- Smart and fast: Analyzes only what matters with configurable ignore patterns
Get cADR running in under 2 minutes:
# Install
npm install -g cadr-cli
# Set your API key (choose one)
export OPENAI_API_KEY="sk-your-api-key-here"
# OR
export GEMINI_API_KEY="your-api-key-here"
# Navigate to your Git repository
cd /path/to/your/repo
# Initialize configuration
cadr init
# Make some changes, then analyze
cadr analyzeβ Full Quick Start Guide with Examples
- π€ LLM-Powered Analysis - OpenAI and Gemini integration to detect architecturally significant changes
- π Automated ADR Generation - Generates comprehensive Markdown ADRs following the MADR template format
- β‘ Git Integration - Analyzes staged changes, uncommitted changes, or commit ranges
- Quick Start Guide - Get started in 5 minutes
- Usage Guide - Detailed command reference and configuration
- ADR Generation - How automatic ADR creation works
- MADR Template - ADR format reference
- Contributing Guide - How to contribute to cADR
- Development Setup - Set up your local dev environment
- Testing Guide - Running and writing tests
npm install -g cadr-clicadr --version
# Output: cADR version 0.0.1 (core: 0.0.1)For more installation options and configuration, see the Usage Guide.
cADR is configured via cadr.yaml in your project root. Run cadr init to create it interactively, or create it manually:
provider: openai
analysis_model: gpt-4
api_key_env: OPENAI_API_KEY
timeout_seconds: 15
ignore_patterns:
- node_modules/**
- "*.test.ts"
- dist/**Supported Providers:
- OpenAI: All OpenAI chat models
- Gemini: All Google Gemini models
Specify any model name supported by your chosen provider. See the Usage Guide for all configuration options.
When cADR detects an architecturally significant change, it generates a comprehensive ADR including:
- Context and Problem Statement - Why the decision was needed
- Decision Drivers - Key factors influencing the choice
- Considered Options - Alternative approaches evaluated
- Decision Outcome - The chosen approach and detailed rationale
- Consequences - Both positive and negative impacts
Generated ADRs follow the MADR (Markdown Architectural Decision Records) format with sequential numbering.
π Learn More About ADR Generation β
We welcome contributions! Whether you're fixing bugs, adding features, or improving documentation:
- Read the Contributing Guide
- Set up your Development Environment
- Check out the Testing Guide
- Submit a Pull Request
- π Documentation - Comprehensive guides and references
- π Report Issues - Found a bug?
- π¬ Discussions - Questions and ideas
- π Changelog - What's new in each release
This project is licensed under the MIT License - see the LICENSE file for details.
Quick Start β’ Usage Guide β’ Contributing β’ Development
Made with β€οΈ by the cADR team