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.
npm install --save-dev @id6tm/madr-toolsmadr initThis creates:
.madrrc.jsonwith the ADR directory pathdocs/adr/TEMPLATE.md.teradocs/adr/README.md
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.
madr syncUse this after manually editing ADR files. The index is already regenerated automatically when you run madr new.
madr export-templateThis overwrites TEMPLATE.md.tera with the template shipped in the current madr version.