CLI tool to assist in writing architecture decision records as markdown files and keeping them organized
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-26 11:43:04 +01:00
.claude feature: rename ai commands 2026-07-03 21:37:56 +02:00
.codex/skills feature: rename ai commands 2026-07-03 21:37:56 +02:00
.cursor/rules feature: rename ai commands 2026-07-03 21:37:56 +02:00
.forgejo/workflows test: e2e tests 2026-07-23 09:08:21 +02:00
.gemini feature: rename ai commands 2026-07-03 21:37:56 +02:00
.github feature: rename ai commands 2026-07-03 21:37:56 +02:00
.opencode feature: rename ai commands 2026-07-03 21:37:56 +02:00
cmd feature: handle co-existing frontmatter with different tools 2026-10-14 17:28:00 +02:00
config feature: configurable home directory 2026-07-22 13:27:07 +02:00
e2e feature: handle co-existing frontmatter with different tools 2026-10-14 17:28:00 +02:00
internal feature: improve status update 2026-10-15 10:48:07 +02:00
openspec feature: improve status update 2026-10-15 10:48:07 +02:00
.gitignore merged 2026-07-11 19:23:59 +02:00
.goreleaser.yaml build: fix goreleaser config 2026-07-21 08:49:44 +02:00
go.mod feature: formatted (colored) output for show command 2026-06-29 21:10:58 +02:00
go.sum feature: formatted (colored) output for show command 2026-06-29 21:10:58 +02:00
LICENSE doc: added license 2026-07-06 13:42:11 +02:00
main.go project setup 2026-06-28 21:57:04 +02:00
README.md feature: handle co-existing frontmatter with different tools 2026-10-14 17:28:00 +02:00

adr-tools

A cross-platform CLI for managing Architecture Decision Records as Markdown files.

Features

  • Create and manage ADRs with global sequential numbering (ADR-NNNN)
  • Flat or hierarchical organization - files at root level or grouped in category subdirectories
  • BYO templates - Go text/template based, with built-in Nygard, MADR, and Minimal templates
  • Auto-updated indexes - index.json (machine) + README.md (human), rebuilt on every mutation
  • Rich metadata - YAML front matter with id, title, status, date, category, tags, and cross-references
  • Tag management - add, remove, and filter by arbitrary tags
  • Nygard status lifecycle - Proposed -> Accepted -> Deprecated / Superseded
  • Single binary - no runtime dependencies, works on macOS, Linux, Windows

Installation

Go install

go install codeberg.org/halimath/adr-tools@latest

Homebrew

brew install halimath/tap/adr

Codeberg Releases

Download the latest binary for your platform from the releases page.

Quick Start

# Initialize a new ADR store
adr init --strategy flat --path docs/adr

# Create a new ADR
adr new "Use PostgreSQL for Primary Storage"

# List all ADRs
adr list

# Show an ADR
adr show 0001

# Change status
adr status 0001 Accepted

# Accept an ADR (shorthand for status <id> Accepted)
adr accept 0001

# Add a tag
adr tag add 0001 storage

# Rebuild index
adr index

Front Matter

adr-tools shares the YAML front matter of an ADR with users and other tools:

  • id, title, status and date are owned by adr-tools and always set by it.
  • category, tags, supersedes and superseded_by are only written when a command changes them (e.g. adr move, adr tag, adr deprecate --superseded-by).
  • All other keys are preserved with their values, order and comments. Their YAML formatting (indentation, quoting, flow or block style) may be normalized.

Templates may start with a front matter block. It is rendered with the same data as the rest of the template and becomes the base of the new ADR's front matter; adr-tools adds its own keys to it. Example .adr/templates/custom.md:

---
author: jdoe
slug: adr-{{.ID}}
tags: [architecture]
---
# {{.Title}}

## Context

adr new "Use PostgreSQL" --template custom creates:

---
id: "0002"
title: Use PostgreSQL
status: Proposed
date: "2026-10-14"
author: jdoe
slug: adr-0002
tags: [architecture]
---
# Use PostgreSQL

## Context

Status

Early development. See openspec/changes/adr-cli/ for the current change proposal, design, specs, and task list.

License

Copyright (c) 2026 Alexander Metzner.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.