# adrs

> Command-line tools for working with Architecture Decision Records

Latest version **0.1.3** (published 2022-05-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install adrs
pnpm add adrs
yarn add adrs
bun add adrs
```

Provides the command `adrs`.

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2022-05-31 |
| First published | 2022-05-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10.0 |
| Dependencies | 16 |
| Unpacked size | 364.2 KB |
| Known vulnerabilities | 0 (+4 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Usama Sulaiman |
| Maintainers | usamasulaiman |
| Keywords | async, templates, ava, await, boilerplate, conventional-changelog, ES6, ES7, library, javascript-modules, node, nyc, rollup, starter, template, tree-shaking, tslint, typedoc, typescript, typings |

## Links

- npm: https://www.npmjs.com/package/adrs
- Repository: https://github.com/usamasulaiman/adr
- Homepage: https://github.com/usamasulaiman/adr#readme
- Issues: https://github.com/usamasulaiman/adr/issues
- npm.io page: https://npm.io/package/adrs

## Dependencies (16)

- [walk](https://npm.io/package/walk.md) ^2.3.14
- [sharp](https://npm.io/package/sharp.md) ^0.30.4
- [table](https://npm.io/package/table.md) ^5.4.1
- [tslib](https://npm.io/package/tslib.md) ^2.0.0
- [colors](https://npm.io/package/colors.md) ^1.3.3
- [mkdirp](https://npm.io/package/mkdirp.md) ^1.0.4
- [moment](https://npm.io/package/moment.md) ^2.24.0
- [inquirer](https://npm.io/package/inquirer.md) ^7.1.0
- [markdown](https://npm.io/package/markdown.md) ^0.5.0
- [commander](https://npm.io/package/commander.md) ^5.1.0
- [lru-cache](https://npm.io/package/lru-cache.md) ^5.1.1
- [walk-sync](https://npm.io/package/walk-sync.md) ^2.1.0
- [remarkable](https://npm.io/package/remarkable.md) ^2.0.1
- [markdown-toc](https://npm.io/package/markdown-toc.md) ^1.2.0
- [find-in-files](https://npm.io/package/find-in-files.md) ^0.5.0
- [open-in-editor](https://npm.io/package/open-in-editor.md) ^2.2.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 0.1.3 (latest) — 2022-05-31
- 0.1.2 — 2022-05-31
- 0.1.1 — 2022-05-31
- 0.1.0 — 2022-05-31

## README

ADR - Architecture Decision Records
===


Forked from [https://github.com/phodal/adr](https://github.com/phodal/adr), but with multi-template support instead of multi-language

Inspired by [https://github.com/npryce/adr-tools](https://github.com/npryce/adr-tools), but supported Windows.
ADR Blogpost: [Documenting Architecture Decisions](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions)

A good material about [Architecture decision record](https://github.com/joelparkerhenderson/architecture_decision_record)

**Features**

 - Supported Windows, GNU/Linux, Mac OS
 - **report for PM, BA**: html, csv, json
- multi-template support
 - generate markdown toc（see in [docs/adr](/docs/adr) ）
 - status logs
 - status query
 - better list view
 - compatible adr-tools
 - custom templates: add a `template.md` file in the save path

Install
---

1. install

```
npm install -g adr
```

2. init

```
adr init <template>
```

e.x: ``adr init madr``

Options available for templates are
```
basic
alexandrian
madr
planguage
tree_akerman
business_case
```

### new

```bash
adr new <decision>
```

e.x: ``adr new "create project"``. It will open the new file with your config [editor](#config)

### list

```bash
adr list
```

result:

```
╔══════════════════════════════════════╤══════════════╤═══════════════════╗
║ Decision                             │ Last Modified│ Last Status       ║
╟──────────────────────────────────────┼──────────────┼───────────────────╢
║ 1. Using ADR in project              │ 2017-11-26   │ 2017-11-26        ║
╟──────────────────────────────────────┼──────────────┼───────────────────╢
║ 2. Adding template support           │ 2017-11-26   │ 2017-11-25        ║
╟──────────────────────────────────────┼──────────────┼───────────────────╢
║ 3. Extending reporting               │ 2017-11-26   │ 2017-11-24        ║
╚══════════════════════════════════════╧══════════════╧═══════════════════╝
```

### generate toc

```bash
adr generate toc
```

results:

```markdown
# Architecture Decision Records

* [1. Using ADR in project](001-using_adr_in_project.md)
* [2. Adding template support](002-adding_template_support.md)
* [3. Extending reporting](003-extending_reporting.md)
```

### generate graph

```
adr generate graph
```


### update filename by title

```
adr update
```

### decisions change logs

```
adr logs <index>
```

e.x. ``adr logs 9``

```
╔════════════╤══════════╗
║  -         │    -     ║
╟────────────┼──────────╢
║ 2017-11-23 │ proposed ║
╟────────────┼──────────╢
║ 2017-11-24 │ accepted ║
╚════════════╧══════════╝
```

### export adr

support: json, csv, html, markdown

```
adr export <type>
```

e.x. ``adr export csv``

```
Index, Decision, Last modified, Last status
1, Using ADR in project, 2017-11-26, 2017-11-26 completed
2, Adding template support, 2017-11-26, 2017-11-25 completed
3, Extending reporting, 2017-11-26, 2017-11-24 completed
```

### search adr

```
adr search <keyword>
```

e.x. ``adr search test``

```
╔══════════════════════╤══════════════════════╗
║ Decision             │ Last updated, state  ║
╟──────────────────────┼──────────────────────╢
║ 19.added e2e test    │ 2017-11-28 proposed  ║
╟──────────────────────┼──────────────────────╢
║ 10. write unit tests │ 2017-11-26 completed ║
╚══════════════════════╧══════════════════════╝
```

Config
---

current:
 
  - **template**, template
  - **path**, save path
  - **digits**, the index length, e.x. digits:3 001-index.md
  - **prefix**, the prefix of files, e.x. adr-0001
  - **editor**, the editor to open file, e.x. code, [more information](https://github.com/lahmatiy/open-in-editor#editor), and you can also use the editor by setting the program path, such as `/System/Applications/TextEdit.app/Contents/MacOS/TextEdit`

example config: 

```
{
  "path":"doc/adr/",
  "template":"madr",
  "prefix": "",
  "digits": 4,
  "editor": "code"
}
```

License
---
  This code is distributed under the MIT license. See `LICENSE` in this directory.

---
_Source: https://npm.io/package/adrs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
