Archgate CLI

Archgate turns architecture decisions into executable rules and blocks violations in CI, hooks and AI agent work

  • 74 ★ on the repository
  • Last commit
  • Apache-2.0
CLI

Extended access

Why this level

  • Executes `.rules.ts` files from the repository as code during checks, so rules from others should be read before running
  • Plugins add hooks and rules to editor and agent settings and need a GitHub sign-in
All reasons and checks

archgate/cli

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/archgate

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Executes `.rules.ts` files from the repository as code during checks, so rules from others should be read before running
  • Plugins add hooks and rules to editor and agent settings and need a GitHub sign-in

This is third-party code. Review the repository files before installing.

What it does

Archgate keeps team decisions in the `.archgate/adrs/` directory in two layers. The first is a Markdown ADR with YAML frontmatter: what was decided, why, and what to do or avoid. The second is a companion `.rules.ts` file that exports automated checks for that decision. `archgate check` runs the checks over the codebase and reports the file, the line and the ADR that was broken. Exit code 1 means violations, so the step drops into CI and pre-commit hooks and blocks a merge. You can start with `archgate init`, which creates the structure and an ADR template, then describe a real decision and add a check for it. AI agents read the same rules before writing code. Archgate has plugins for Claude Code, Cursor, VS Code, Copilot CLI and opencode. After `archgate login`, `archgate init` installs the plugin itself, and the agent validates changes against the ADRs and writes new patterns back. Without plugins the CLI works fully and needs no account.

Who it is for. Tech leads and teams whose architecture agreements sit in a wiki and are regularly broken by agents and people alike.

Good fit when

  • A decision such as "the domain layer does not import infrastructure" should become a check that fails in CI
  • An agent writes code faster than you can review and you need an automatic barrier before merge
  • The team wants ADRs next to the code, out of the wiki, and read by the agent before it starts
  • You need a pre-commit hook that rejects commits breaking a specific ADR

Not a fit when

  • The project has no ADRs and no wish to keep them: decisions come first, rules second
  • You need static analysis of types or style: linters and compilers do that, and Archgate checks project decisions
  • You want a ready-made rule set out of the box: the team writes `.rules.ts` rules itself

Example request

Set up Archgate in this repository, record the decision "domain does not depend on infrastructure" as an ADR with a check, and run archgate check

Limitations

  • Rules are TypeScript in `.rules.ts` files, so someone has to write and maintain them.
  • Editor plugins require `archgate login`, a one-time GitHub sign-in per machine.
  • The full list of install methods and supported platforms lives in the documentation; the README names npm, pip, dotnet, Go, gem, Maven and proto.
  • Checks follow the team's rules, so architecture coverage depends on the quality of your ADR set.

How to disable. Delete the `.archgate/` directory from the project and remove the `archgate check` step from CI and pre-commit. An editor plugin is removed with the agent's own tools, for instance claude plugin uninstall in Claude Code. Remove the CLI with the same package manager you used to install it.

FAQ

What is an ADR in Archgate?

An ADR is a Markdown file in `.archgate/adrs/` with YAML frontmatter that records the decision, the reason and what to do. If a `.rules.ts` file sits beside it, the decision is checked automatically.

How do I connect Archgate to CI?

Add an `archgate check` step to the pipeline. Exit code 1 on violations stops the merge, and the report names the file, the line and the ADR. The same call fits a pre-commit hook.

Do I need an account?

The CLI needs no account: writing ADRs, checks, CI and hooks all work free. An account matters only for editor plugins, where `archgate login` signs in through GitHub.

Which agents and editors are supported?

Plugins exist for Claude Code, Cursor, VS Code, Copilot CLI and opencode. The agent reads ADRs before work and validates changes against the rules.

How does Archgate differ from a linter?

A linter checks style and common code mistakes. Archgate checks your own decisions: layer boundaries, team conventions and conclusions from past discussions recorded as ADRs.

Discussion

No questions or reviews yet.

CLI tools

Git-native project context for agents: specs, decisions and rules live in Markdown beside the code and are read before edits

PluginExtended access75Repository stars

AI-RULES turns a project's architecture rules into a skill and prompts an agent can review code and repair violations against.

SkillMinimal access421Repository stars

A CLI that scores project architecture 0 to 100 from the AST, finds anti-patterns and runs AI refactoring on request.

CLIExtended access56Repository stars

A Claude Code plugin for project architecture: ADRs, multi-role reviews, findings turned into plans, a pragmatic mode.

PluginExtended access80Repository stars

A governance layer for agentic coding: enforced gates for tests, reviews, security and decisions, shared across Claude Code, Codex CLI and Pi

PluginExtended access153Repository stars

One rules directory generates instructions, skills, MCP and settings for 52 AI coding assistants and checks them in CI

CLIExtended access169Repository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialRepository starsMain difference
Archgate (this card)no74
Adrianno591keeps ADRs as documents for an agent with no executable rules in CI
MADREno127a decision record format with no code checks attached

README in short

The README presents Archgate as enterprise-grade linting for AI work. The two layers, ADRs as documents and ADRs as rules, are shown on the `.archgate/adrs/` tree. A four-step quick start follows, then a link to the install guide and a block on plugins for Claude Code, Cursor, VS Code, Copilot CLI and opencode. Links to the docs, the Reddit community and contribution rules close it, under the Apache-2.0 license.

README badge

Report a problem