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
Download from GitHub Releases:
| Platform | Download |
|---|---|
| macOS ARM64 (M1/M2/M3/M4) | git-adr-aarch64-apple-darwin.tar.gz |
| macOS Intel | git-adr-x86_64-apple-darwin.tar.gz |
| Linux x86_64 | git-adr-x86_64-unknown-linux-gnu.tar.gz |
| Linux x86_64 (musl) | git-adr-x86_64-unknown-linux-musl.tar.gz |
| Linux ARM64 | git-adr-aarch64-unknown-linux-gnu.tar.gz |
| Windows x86_64 | git-adr-x86_64-pc-windows-msvc.zip |
brew tap zircote/tap
brew install git-adrcargo install git-adr# AI-powered features (drafting, suggestions)
cargo install git-adr --features ai
# Wiki synchronization (GitHub/GitLab)
cargo install git-adr --features wiki
# Document export (DOCX format)
cargo install git-adr --features export
# All features
cargo install git-adr --features allgit clone https://github.com/zircote/git-adr.git
cd git-adr
cargo build --release
# Binary at target/release/git-adr# Initialize ADR tracking in your repository
git adr init
# 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 ADR-0001
# Search ADRs
git adr search "database"
# Sync ADRs with remote
git adr sync --push| 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 rm <id> |
Remove an 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 |
| Command | Description |
|---|---|
git adr stats |
Quick ADR statistics summary |
git adr export |
Export ADRs to files (markdown, json, html, docx) |
git adr convert <id> |
Convert an ADR to different format |
| Command | Description |
|---|---|
git adr sync |
Sync ADRs with remote (push & fetch) |
git adr sync --push |
Push ADR notes to remote only |
git adr sync --pull |
Fetch ADR notes from remote only |
| Command | Description |
|---|---|
git adr config list |
List all configuration |
git adr config set <key> <value> |
Set configuration value |
git adr config get <key> |
Get configuration value |
Configuration is stored in git config (local or global):
| Key | Description | Default |
|---|---|---|
adr.prefix |
ADR ID prefix | ADR- |
adr.digits |
Number of digits in ADR ID | 4 |
adr.template |
Default template format | madr |
adr.format |
ADR format (nygard, madr, etc.) | nygard |
# Set configuration
git adr config set template madr
# Get configuration
git adr config get template
# List all config
git adr config listgit-adr supports multiple ADR formats:
The original ADR format by Michael Nygard.
# Use PostgreSQL for primary database
## Status
Accepted
## Context
We need to choose a database...
## Decision
We will use PostgreSQL...
## Consequences
- ACID compliance
- Rich feature setMarkdown Architectural Decision Records format.
# Use PostgreSQL for primary database
## Status
Accepted
## Context and Problem Statement
We need to choose a database...
## Decision Drivers
* Performance requirements
* Team expertise
## Considered Options
* PostgreSQL
* MySQL
* MongoDB
## Decision Outcome
Chosen option: "PostgreSQL", because...- Y-Statement: Concise one-sentence decision format
- Alexandrian: Pattern-based format with forces
- Business Case: MBA-style with cost-benefit analysis
git-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
Requires installation with
--features aiNote: AI features are not yet implemented in the Rust version. They are planned for a future release.
Requires installation with
--features wikiNote: Wiki synchronization is not yet implemented in the Rust version. It is planned for a future release.
git clone https://github.com/zircote/git-adr.git
cd git-adr
# Build
cargo build
# Run tests
cargo test
# Run with all features
cargo test --all-features
# Check lints
cargo clippy --all-targets --all-features
# Format
cargo fmtsrc/
βββ lib.rs # Library entry point
βββ main.rs # Binary entry point
βββ cli/ # CLI command implementations
β βββ mod.rs # CLI definition
β βββ init.rs # Initialize command
β βββ new.rs # New ADR command
β βββ ... # Other commands
βββ core/ # Core business logic
β βββ adr.rs # ADR data model
β βββ git.rs # Git operations
β βββ notes.rs # Git notes management
β βββ config.rs # Configuration
β βββ index.rs # Search index
β βββ templates.rs # ADR templates
βββ ai/ # AI features (optional)
βββ wiki/ # Wiki sync (optional)
βββ export/ # Export formats (optional)
Version 1.0 is a complete rewrite in Rust. The data format (git notes) is fully compatible, so your existing ADRs will work without changes. Some CLI flags may have changed - use git adr --help for current options.
To access the Python version:
# Checkout the Python version
git checkout python-final
# Or install the last Python release
pip install git-adr==0.3.0- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests and linting (
cargo test && cargo clippy) - 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.