create-adr is a small CLI that generates ADR files under docs/adr/ at the
target repository root.
From any repository root (after npm publish):
npx create-adr "Use URI path versioning for public APIs"or:
bunx create-adr "Use URI path versioning for public APIs"With explicit title/path flags:
npx create-adr --title "Use URI path versioning for public APIs" --path /path/to/repositorybunx create-adr --title "Use URI path versioning for public APIs" --path /path/to/repositoryThe command creates:
docs/adr/if missingdocs/adr/0001-your-title.md(or next sequence)
The generated file includes:
- ADR title (
# ADR-XXXX: ...) - status (
proposed) - date (
YYYY-MM-DD) - context
- decision
- consequences (expected improvements and identified downsides)
- alternatives considered
- links
Install dependencies:
npm installBuild CLI output with tsdown:
npm run buildRun tests:
bun run testRun lint and formatting checks:
bun run lint
bun run format:checkRun locally without publishing:
node ./bin/create-adr.js "Use URI path versioning for public APIs" --path /path/to/repositoryBefore publishing:
- Update version in
package.json. - Run
npm run build. - Run
bun run lint. - Run
bun run format:check. - Run
bun run test. - Validate package contents:
npm pack
- Authenticate with npm:
npm login
- Publish:
npm publish
After publish, teams can run both npx create-adr ... and bunx create-adr ....