{"id":46250676,"url":"https://github.com/archgate/cli","last_synced_at":"2026-05-02T23:05:18.550Z","repository":{"id":341821873,"uuid":"1164933838","full_name":"archgate/cli","owner":"archgate","description":"Enforce Architecture Decision Records as executable rules — for both humans and AI agents","archived":false,"fork":false,"pushed_at":"2026-03-30T14:02:25.000Z","size":1267,"stargazers_count":21,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-30T15:25:13.407Z","etag":null,"topics":["adr","architecture","bun","claude-code","cli","cursor","npm"],"latest_commit_sha":null,"homepage":"https://cli.archgate.dev/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/archgate.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-23T16:40:08.000Z","updated_at":"2026-03-30T13:44:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/archgate/cli","commit_stats":null,"previous_names":["archgate/cli"],"tags_count":46,"template":false,"template_full_name":null,"purl":"pkg:github/archgate/cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archgate%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archgate%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archgate%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archgate%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/archgate","download_url":"https://codeload.github.com/archgate/cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archgate%2Fcli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290732,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","bun","claude-code","cli","cursor","npm"],"created_at":"2026-03-03T22:08:07.589Z","updated_at":"2026-05-02T23:05:18.544Z","avatar_url":"https://github.com/archgate.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Archgate\n\n\u003cdiv align=\"center\"\u003e\n\n**Enforce Architecture Decision Records as executable rules — for both humans and AI agents.**\n\n[![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](LICENSE.md)\n[![Release](https://github.com/archgate/cli/actions/workflows/release.yml/badge.svg)](https://github.com/archgate/cli/actions/workflows/release.yml)\n[![Docs](https://img.shields.io/badge/docs-cli.archgate.dev-blue)](https://cli.archgate.dev)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/12659/badge)](https://www.bestpractices.dev/projects/12659)\n\n\u003c/div\u003e\n\n---\n\nArchgate turns your Architecture Decision Records into a governance layer that runs in CI, enforces rules in pre-commit hooks, and feeds live context to AI coding agents — so architectural decisions don't stay in documents, they stay in the code.\n\n**Write an ADR once. Enforce it everywhere.**\n\n## How it works\n\nArchgate has two layers:\n\n1. **ADRs as documents** — markdown files with YAML frontmatter stored in `.archgate/adrs/`. Each ADR records a decision: what was decided, why, and what to do and not do.\n2. **ADRs as rules** — each ADR can have a companion `.rules.ts` file that exports automated checks. Archgate runs these checks against your codebase and reports violations.\n\n```\n.archgate/\n└── adrs/\n    ├── ARCH-001-command-structure.md          # human-readable decision\n    ├── ARCH-001-command-structure.rules.ts    # machine-executable checks\n    ├── ARCH-002-error-handling.md\n    └── ARCH-002-error-handling.rules.ts\n```\n\nWhen a rule is violated, `archgate check` reports the file, line, and which ADR was broken. Exit code 1 means violations — wire it into CI and it blocks merges automatically.\n\n**The CLI is free and open source.** Writing ADRs, enforcing rules, running checks in CI, and wiring up pre-commit hooks all work without an account or subscription.\n\n## Installation\n\n**Standalone** (no Node.js required):\n\n```bash\n# macOS / Linux\ncurl -fsSL https://cli.archgate.dev/install-unix | sh\n\n# Windows (PowerShell)\nirm https://cli.archgate.dev/install-windows | iex\n\n# Windows (Git Bash / MSYS2)\ncurl -fsSL https://cli.archgate.dev/install-unix | sh\n```\n\n**Via npm** (or any Node.js package manager):\n\n```bash\n# npm\nnpm install -g archgate\n\n# Bun\nbun install -g archgate\n\n# Yarn\nyarn global add archgate\n\n# pnpm\npnpm add -g archgate\n```\n\nYou can also install as a dev dependency:\n\n```bash\nnpm install -D archgate    # or: bun add -d archgate\nnpx archgate check         # run via package manager\n```\n\n**Requirements:** macOS (arm64), Linux (x86_64), or Windows (x86_64). See the [installation guide](https://cli.archgate.dev/getting-started/installation/) for more options.\n\n## Quick start\n\n```bash\n# 1. Install\ncurl -fsSL https://cli.archgate.dev/install-unix | sh  # or: npm install -g archgate\n\n# 2. Initialize governance in your project\ncd my-project\narchgate init\n\n# 3. Edit the generated ADR to document a real decision\n# .archgate/adrs/ARCH-001-*.md\n\n# 4. Add a companion .rules.ts to enforce it automatically\n# .archgate/adrs/ARCH-001-*.rules.ts\n\n# 5. Run checks\narchgate check\n```\n\n## Writing rules\n\nEach ADR can have a companion `.rules.ts` file that exports automated checks. See the [writing rules guide](https://cli.archgate.dev/guides/writing-rules/) for examples and the full [rule API reference](https://cli.archgate.dev/reference/rule-api/).\n\n## Supercharge with AI plugins\n\n\u003e **Make your AI agent architecture-aware.** With the optional editor plugins, your AI coding agent reads ADRs before writing code, validates changes against your rules, and captures new architectural patterns back into ADRs — automatically.\n\u003e\n\u003e Plugins are available for [**Claude Code**](https://cli.archgate.dev/guides/claude-code-plugin/) and [**Cursor**](https://cli.archgate.dev/guides/cursor-integration/).\n\u003e\n\u003e ```bash\n\u003e archgate login             # one-time GitHub auth\n\u003e archgate init              # installs the plugin automatically\n\u003e ```\n\u003e\n\u003e **[Get started with plugins](https://cli.archgate.dev/guides/claude-code-plugin/)** — the CLI works fully without them, but plugins close the loop between decisions and code.\n\n## Documentation\n\nFull documentation is available at **[cli.archgate.dev](https://cli.archgate.dev)** — including guides for writing ADRs, writing rules, CI integration, editor plugin setup, and the complete CLI reference.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and workflow.\n\n## License\n\n[Apache-2.0](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchgate%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchgate%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchgate%2Fcli/lists"}