Architecture Decision Records (ADR) management for git repositories using git notes.
git-adr is a command-line tool that integrates Architecture Decision Record management directly into your git workflow. Unlike file-based ADR tools, git-adr stores ADRs in git notes, making them:
- Non-intrusive: No files cluttering your repository
- Portable: Travel with your git history
- Linkable: Associate decisions with specific commits
- Searchable: Full-text search across all decisions
- Syncable: Push/pull ADRs like regular git content
Pre-built binaries are available for all platforms - no Python required:
# macOS/Linux (auto-detects platform)
curl -sSL https://raw.githubusercontent.com/zircote/git-adr/main/script/install-binary.sh | bash
# Or install to ~/.local/bin (no sudo)
curl -sSL https://raw.githubusercontent.com/zircote/git-adr/main/script/install-binary.sh | bash -s -- --local
# Specific version
curl -sSL https://raw.githubusercontent.com/zircote/git-adr/main/script/install-binary.sh | bash -s -- v0.1.0Or download manually from GitHub Releases:
| Platform | Download |
|---|---|
| macOS ARM64 (M1/M2/M3) | git-adr-macos-arm64.tar.gz |
| macOS Intel | git-adr-macos-x86_64.tar.gz |
| Linux x86_64 | git-adr-linux-x86_64.tar.gz |
| Windows x86_64 | git-adr-windows-x86_64.zip |
brew tap zircote/tap
brew install git-adrThis automatically installs shell completions and keeps git-adr updated with brew upgrade.
pip install git-adrOr with uv:
uv tool install git-adr# AI-powered features (drafting, suggestions, Q&A)
pip install "git-adr[ai]"
# Wiki synchronization (GitHub/GitLab)
pip install "git-adr[wiki]"
# Document export (DOCX format)
pip install "git-adr[export]"
# All features
pip install "git-adr[all]"Enable tab completion for your shell:
# Automatic installation (detects your shell)
git-adr --install-completion
# Or manually for specific shells
git-adr --show-completion bash >> ~/.bashrc
git-adr --show-completion zsh >> ~/.zshrc
git-adr --show-completion fish > ~/.config/fish/completions/git-adr.fishMan pages are included in GitHub releases. Download and install:
# Download from release (replace VERSION)
curl -L https://github.com/zircote/git-adr/releases/download/vVERSION/git-adr-man-pages-VERSION.tar.gz | \
sudo tar -xzf - -C /usr/local/share/man/
# Then use
man git-adr
man git-adr-newOr build from source:
git clone https://github.com/zircote/git-adr.git
cd git-adr
make install-man # Requires pandoc# Interactive setup (recommended) - prompts for template, hooks, and CI
git adr init
# Or non-interactive with specific options
git adr init --template madr --install-hooks --setup-github-ci
# Create a new ADR (opens editor)
git adr new "Use PostgreSQL for primary database"
# List all ADRs
git adr list
# Show a specific ADR
git adr show 20240115-use-postgresql
# Search ADRs
git adr search "database"
# ADRs sync automatically on push (if hooks installed)
# Or sync manually:
git adr sync push| Option | Description |
|---|---|
--template <format> |
Set ADR format (madr, nygard, y-statement, etc.) |
--install-hooks |
Install pre-push hooks for automatic sync |
--setup-github-ci |
Generate GitHub Actions workflows |
--no-input |
Skip all interactive prompts |
See Hooks Guide for detailed hooks documentation.
| Command | Description |
|---|---|
git adr init |
Initialize ADR tracking in repository |
git adr new <title> |
Create a new ADR |
git adr list |
List all ADRs with filtering options |
git adr show <id> |
Display an ADR with formatting |
git adr edit <id> |
Edit an existing ADR |
git adr search <query> |
Full-text search across ADRs |
git adr link <adr-id> <commit> |
Associate an ADR with commits |
git adr supersede <old-id> <title> |
Create ADR that supersedes another |
git adr log |
Show git log with ADR annotations |
| Command | Description |
|---|---|
git adr attach <adr-id> <file> |
Attach diagram/image to an ADR |
git adr artifacts <adr-id> |
List artifacts attached to an ADR |
git adr artifact-get <sha256> |
Extract an artifact to a file |
git adr artifact-rm <adr-id> <sha256> |
Remove an artifact |
| Command | Description |
|---|---|
git adr stats |
Quick ADR statistics summary |
git adr report |
Generate detailed analytics report |
git adr metrics |
Export metrics for dashboards (JSON/Prometheus) |
| Command | Description |
|---|---|
git adr export |
Export ADRs to files (markdown, json, html, docx) |
git adr import |
Import ADRs from file-based storage |
git adr convert <id> |
Convert an ADR to different format |
| Command | Description |
|---|---|
git adr sync push |
Push ADR notes to remote |
git adr sync pull |
Pull ADR notes from remote |
| Command | Description |
|---|---|
git adr config --list |
List all configuration |
git adr config <key> <value> |
Set configuration value |
git adr config --get <key> |
Get configuration value |
| Command | Description |
|---|---|
git adr onboard |
Interactive onboarding wizard for new team members |
Requires
pip install "git-adr[ai]"
Configure your AI provider:
# Set provider (openai, anthropic, google, ollama)
git adr config adr.ai.provider openai
# Set API key (environment variable)
export OPENAI_API_KEY="your-key"
# or
export ANTHROPIC_API_KEY="your-key"
export GOOGLE_API_KEY="your-key"| Command | Description |
|---|---|
git adr ai draft |
AI-guided ADR creation with interactive elicitation |
git adr ai suggest <id> |
Get AI suggestions to improve an ADR |
git adr ai summarize |
Generate natural language summary of decisions |
git adr ai ask "<question>" |
Ask questions about ADRs in natural language |
# AI-assisted drafting
git adr ai draft "Choose a message queue"
# Get improvement suggestions
git adr ai suggest 20240115-use-postgresql
# Summarize recent decisions
git adr ai summarize --format slack
# Ask questions
git adr ai ask "Why did we choose PostgreSQL?"Requires
pip install "git-adr[wiki]"
Sync ADRs with GitHub or GitLab wikis:
# Initialize wiki sync
git adr wiki init --provider github --repo owner/repo
# Sync ADRs to wiki
git adr wiki syncConfiguration is stored in git config (local or global):
| Key | Description | Default |
|---|---|---|
adr.namespace |
Notes namespace | adr |
adr.template |
Default template format | madr |
adr.editor |
Editor command override | $EDITOR |
adr.ai.provider |
AI provider (openai, anthropic, google, ollama) | - |
adr.ai.model |
AI model name | Provider default |
adr.ai.temperature |
AI temperature (0.0-1.0) | 0.7 |
# Set local config
git adr config adr.template madr
# Set global config
git adr config --global adr.editor "code --wait"
# List all config
git adr config --listADRs follow the MADR format:
---
id: 20240115-use-postgresql
title: Use PostgreSQL for primary database
date: 2024-01-15
status: accepted
tags: [database, infrastructure]
---
## Context and Problem Statement
We need to choose a database for our application...
## Decision Drivers
* Performance requirements
* Team expertise
* Operational complexity
## Considered Options
* PostgreSQL
* MySQL
* MongoDB
## Decision Outcome
Chosen option: "PostgreSQL", because...
### Consequences
#### Good
- ACID compliance
- Rich feature set
#### Bad
- Requires more operational expertisegit-adr uses git notes to store ADRs, which provides:
- No file pollution: ADRs live in git's notes refs, not in your working tree
- Full git integration: Push, pull, merge like regular git content
- Commit association: Link decisions to the commits that implement them
- History preservation: ADR history is preserved in git
Notes are stored under:
refs/notes/adr- ADR contentrefs/notes/adr-index- Search indexrefs/notes/adr-artifacts- Binary attachments
# Clone the repository
git clone https://github.com/zircote/git-adr.git
cd git-adr
# Install dependencies with uv
uv sync --all-extras
# Run tests
uv run pytest
# Run with coverage
uv run pytest --cov=src/git_adr --cov-report=term-missing# Format code
uv run ruff format .
# Lint and fix
uv run ruff check . --fix
# Type check
uv run mypy src
# Security scan
uv run bandit -r src/
# Dependency audit
uv run pip-auditsrc/git_adr/
βββ __init__.py # Package exports
βββ cli.py # Main CLI entry point
βββ core/ # Core functionality
β βββ adr.py # ADR data models
β βββ config.py # Configuration management
β βββ git.py # Git operations wrapper
β βββ notes.py # Git notes management
β βββ index.py # Search index
β βββ templates.py # ADR templates
βββ commands/ # CLI command implementations
β βββ basic.py # Core commands (new, list, show, etc.)
β βββ ai_cmds.py # AI-powered commands
β βββ wiki.py # Wiki sync commands
β βββ export.py # Export/import commands
βββ ai/ # AI service integration
β βββ service.py # LLM provider abstraction
βββ wiki/ # Wiki providers
β βββ service.py # GitHub/GitLab wiki sync
βββ formats/ # Format converters
βββ docx.py # DOCX export
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests and linting (
uv run pytest && uv run ruff check .) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - see LICENSE for details.
A Claude Code skill for AI-assisted ADR management. Turn natural language into properly formatted ADRs.
- Instant ADR creation: Describe a decision, get a formatted ADR
- Six professional formats: MADR, Nygard, Y-Statement, Alexandrian, Business Case, Planguage
- Git-native storage: ADRs in git notes, not files cluttering your repo
- Direct execution: Claude runs
git adrcommands, not just generates markdown
# Method 1: Copy from repository
cp -r skills/git-adr ~/.claude/skills/
# Method 2: Download from release
curl -LO https://github.com/zircote/git-adr/releases/download/vX.Y.Z/git-adr-X.Y.Z.skill
unzip git-adr-X.Y.Z.skill -d ~/.claude/skills/You: "We decided to use PostgreSQL because it has better JSON support"
Claude: I'll create that ADR for you.
> git adr new "Use PostgreSQL for primary database"
Created ADR: 20251216-use-postgresql-for-primary-database
For full documentation, see docs/git-adr-skill.md.