{"id":19231087,"url":"https://github.com/phodal/adr","last_synced_at":"2025-05-16T05:07:19.572Z","repository":{"id":26884372,"uuid":"111624106","full_name":"phodal/adr","owner":"phodal","description":"Architecture Decision Records in Node.js with Reporter, supported Windows, GNU/Linux, macOS - 轻量级架构决策记录工具","archived":false,"fork":false,"pushed_at":"2024-08-30T01:19:53.000Z","size":3152,"stargazers_count":267,"open_issues_count":7,"forks_count":52,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-08T15:06:20.755Z","etag":null,"topics":["adr","architecture-decision","architecture-decision-records","architecture-doc","architecture-guidelines","architecture-visualization","decision-records"],"latest_commit_sha":null,"homepage":"https://phodal.github.io/adr/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phodal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-22T02:02:30.000Z","updated_at":"2025-03-21T15:49:05.000Z","dependencies_parsed_at":"2024-06-18T13:44:54.886Z","dependency_job_id":"0aafea2f-82de-4e12-a35a-e41cf2955e71","html_url":"https://github.com/phodal/adr","commit_stats":{"total_commits":473,"total_committers":16,"mean_commits":29.5625,"dds":0.08879492600422834,"last_synced_commit":"7da409755f2718d486a69208321deddd4a552114"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phodal%2Fadr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phodal%2Fadr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phodal%2Fadr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phodal%2Fadr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phodal","download_url":"https://codeload.github.com/phodal/adr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253497503,"owners_count":21917697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adr","architecture-decision","architecture-decision-records","architecture-doc","architecture-guidelines","architecture-visualization","decision-records"],"created_at":"2024-11-09T15:41:31.809Z","updated_at":"2025-05-16T05:07:14.553Z","avatar_url":"https://github.com/phodal.png","language":"TypeScript","funding_links":[],"categories":["Decision Records (ADR/RFC)","TypeScript"],"sub_categories":["Design Patterns"],"readme":"ADR - Architecture Decision Records（轻量级架构决策记录工具）\n===\n\n\u003e ADR - Architecture Decision Records（轻量级架构决策记录工具）\n\n[![Build Status](https://travis-ci.org/phodal/adr.svg?branch=master)](https://travis-ci.org/phodal/adr) [![codecov.io](https://codecov.io/github/phodal/adr/coverage.svg?branch=master)](https://codecov.io/github/phodal/adr?branch=master)  [![Maintainability](https://api.codeclimate.com/v1/badges/5cd05f9857e0a2031ba1/maintainability)](https://codeclimate.com/github/phodal/adr/maintainability)\n\n[![Markdown Improve](https://img.shields.io/badge/markdown--improve-Phodal-blue.svg)](https://github.com/phodal/markdown-improve) [![node](https://img.shields.io/node/v/adr.svg)](https://www.npmjs.com/package/adr) [![npm](https://img.shields.io/npm/v/adr.svg)](https://www.npmjs.com/adr)\n\nInspired by [https://github.com/npryce/adr-tools](https://github.com/npryce/adr-tools), but supported Windows.\n\nADR Blogpost: [Documenting Architecture Decisions](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions)\n\nA good material about [Architecture decision record](https://github.com/joelparkerhenderson/architecture_decision_record)\n\n中文翻译：[架构决策记录](https://www.phodal.com/blog/documenting-architecture-decisions/)\n\n**功能特性**\n\n- 支持 Windows, GNU/Linux, Mac OS\n- Markdown 目录生成\n- 为项目经理、业务人员等非开发人员，生成报表：HTML，CSV, JSON\n- 兼容 adr-tools\n- 国际化支持：English、中文、Brazilian Portuguese (pt-br), Standard Italian (it-IT)\n- 状态历史\n- 状态查询\n- 更好的列表展示\n- 兼容 adr-tools\n\n[查看本项目的架构决策记录](/docs/adr)\n\n**Features**\n\n- Supported Windows, GNU/Linux, Mac OS\n- **report for PM, BA**: html, csv, json\n- Support Markdown and Asciidoc\n- generate markdown and asciidoc toc（see in [docs/adr](/docs/adr) ）\n- **i18n**: English (en), 中文(zh-cn), Brazilian Portuguese (pt-br), Standard Italian (it-IT), Farsi (fa), French (fr)\n- status logs\n- status query\n- better list view\n- compatible adr-tools\n- custom templates: add a `template.md` (or `template.adoc`, `template.asciidoc`) file in the save path\n\n## HTML Reporter Example\n\n- [ADR Example](https://phodal.github.io/adr/examples/export-1.html)\n- [ADR Tools Example](https://phodal.github.io/adr/examples/export-3.html)\n- [会分期 Example](https://phodal.github.io/adr/examples/export-2.html)\n- [Arachne Framework Example](https://phodal.github.io/adr/examples/export-4.html)\n\nScreenshots\n---\n\n### ADR List\n\n![List Examples](docs/list-example.png)\n\n### ADR Reporter\n\n![Reporter Examples](docs/reporter-example.png)\n\n## Install\n\n1. install\n\n```bash\nnpm install -g adr\n```\n\n2. init\n\n```bash\nadr init \u003clanguage\u003e\n```\n\ne.x: ``adr init en``\n\n### new\n\n```bash\nadr new \u003cdecision\u003e\n```\n\ne.x: ``adr new \"create project\"``. It will open the new file with your config [editor](#config)\n\n### list\n\n```bash\nadr list\n```\n\nresult:\n\n```\n╔══════════════════════════════════════╤══════════════╤═══════════════════╗\n║ Decision                             │ Last Modified│ Last Status       ║\n╟──────────────────────────────────────┼──────────────┼───────────────────╢\n║ 1.编写完整的单元测试                    │ 2017-11-26   │ 2017-11-26 已完成  ║\n╟──────────────────────────────────────┼──────────────┼───────────────────╢\n║ 2.添加目录生成                         │ 2017-11-26   │ 2017-11-25 已完成  ║\n╟──────────────────────────────────────┼──────────────┼───────────────────╢\n║ 3.图形生成功能                         │ 2017-11-26   │ 2017-11-24 已完成  ║\n╟──────────────────────────────────────┼──────────────┼───────────────────╢\n║ 4.生成在线图形                         │ 2017-11-26   │ 2017-11-22 提议    ║\n╚══════════════════════════════════════╧══════════════╧═══════════════════╝\n```\n\n### generate toc\n\n```bash\nadr generate toc\n```\n\nresults:\n\n```markdown\n# Architecture Decision Records\n\n* [1. 编写完整的单元测试](001-编写完整的单元测试.md)\n* [2. 添加目录生成](002-添加目录生成.md)\n* [3. 图形生成](003-图形生成.md)\n```\n\n### generate graph\n\n```sh\nadr generate graph\n```\n\nresults:\n\n```\ndigraph {\n  node [shape=plaintext];\n  _1 [label=\"1.编写完整的单元测试\"; URL=\"001-编写完整的单元测试.md\"]\n  _2 [label=\"2.添加目录生成\"; URL=\"002-添加目录生成.md\"]\n  _1 -\u003e _2 [style=\"dotted\"];\n  _3 [label=\"3.图形生成\"; URL=\"003-图形生成.md\"]\n  _2 -\u003e _3 [style=\"dotted\"];\n}\n```\n\n### update filename by title\n\n```bash\nadr update\n```\n\n### decisions change logs\n\n```bash\nadr logs \u003cindex\u003e\n```\n\ne.x. ``adr logs 9``\n\n```\n╔════════════╤══════╗\n║  -         │  -   ║\n╟────────────┼──────╢\n║ 2017-11-23 │ 提议 ║\n╟────────────┼──────╢\n║ 2017-11-24 │ 通过 ║\n╚════════════╧══════╝\n```\n\n### export adr\n\nsupport: json, csv, html, markdown\n\n```bash\nadr export \u003ctype\u003e\n```\n\ne.x. ``adr export csv``\n\n```\nIndex, 决策, 上次修改时间, 最后状态\n1, 编写完整的单元测试, 2017-11-26, 2017-11-26 已完成\n2, 添加目录生成, 2017-11-26, 2017-11-25 已完成\n3, 图形生成功能, 2017-11-26, 2017-11-24 已完成\n```\n\n### search adr\n\n```bash\nadr search \u003ckeyword\u003e\n```\n\ne.x. ``adr search 测试``\n\n```\n╔══════════════════════╤══════════════════╗\n║ 决策                 │ 最后状态         ║\n╟──────────────────────┼──────────────────╢\n║ 19.添加-e2e-测试     │ 2017-11-28 提议  ║\n╟──────────────────────┼──────────────────╢\n║ 1.编写完整的单元测试 │ 2017-11-26 完成  ║\n╚══════════════════════╧══════════════════╝\n```\n\nConfig\n---\n\ncurrent:\n\n- **language**, language\n- **path**, save path\n- **digits**, the index length, e.x. digits:3 001-index.md\n- **prefix**, the prefix of files, e.x. adr-0001\n- **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`\n- **force_nfc**, whether to normalize the names of files generated by `adr` commands in NFC (Normalization Form Canonical Composition) format, e.x. `true`\n- **extension**, the document extension/format you want to used. `md` for Markdown (default value) or`adoc` for asciidoc\n\nexample config:\n\n```json\n{\n  \"path\":\"doc/adr/\",\n  \"language\":\"zh-cn\",\n  \"prefix\": \"\",\n  \"digits\": 4,\n  \"editor\": \"code\",\n  \"force_nfc\": true,\n  \"extension\": \"md\"\n}\n```\n\nLicense\n---\n\n[![Phodal's Idea](http://brand.phodal.com/shields/idea-small.svg)](http://ideas.phodal.com/)\n\n@ 2017~2021 A [Phodal Huang](https://www.phodal.com)'s [Idea](http://github.com/phodal/ideas).  This code is distributed under the MIT license. See `LICENSE` in this directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphodal%2Fadr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphodal%2Fadr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphodal%2Fadr/lists"}