@id6tm/madr-tools
v1.2.1
Published
Manage markdown architecture decision records
Readme
madr-tools
Small CLI for managing Markdown ADRs (Architectural Decision Records).
It creates a local ADR directory, writes new numbered records from a template, and regenerates a README.md index for the ADR folder.
Install
npm install --save-dev @id6tm/madr-toolsUsage
Initialize ADRs
madr initThis creates:
.madrrc.jsonwith the ADR directory pathdocs/adr/TEMPLATE.md.teradocs/adr/README.md
Create an ADR
madr new "Use Postgres for relational data"This creates the next numbered Markdown file, renders the template values, and refreshes the ADR index. When existing ADRs are present, the CLI asks whether the new ADR supersedes any of them.
To skip the prompt and supersede ADRs directly, pass one or more ADR numbers:
madr new --supersede 1,2 "Replace database decision"This updates the superseded ADR status lines to link to the new ADR.
Regenerate the Index
madr syncUse this after manually editing ADR files. The index is already regenerated automatically when you run madr new.
Export the Bundled Template
madr export-templateThis overwrites TEMPLATE.md.tera with the template shipped in the current madr version.
