Skip to main content

Archgate

Enterprise-grade linting and guardrails for AI work.

License: Apache-2.0 Release Docs OpenSSF Best Practices Reddit


AI agents write code fast, but they don't know your rules. Archgate turns your team's decisions into executable checks: a lint step for architecture, conventions, and AI output. Your agents read the rules before writing code, and archgate check blocks what slips through. In CI, in pre-commit hooks, and inside every major AI coding tool.

Write an ADR once. Enforce it everywhere.

How it works

Archgate has two layers:

  1. 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.
  2. 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.
.archgate/
└── adrs/
    ├── ARCH-001-command-structure.md          # human-readable decision
    ├── ARCH-001-command-structure.rules.ts    # machine-executable checks
    ├── ARCH-002-error-handling.md
    └── ARCH-002-error-handling.rules.ts

When 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.

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.

Installation

Install via standalone script, npm, pip, dotnet, Go, gem, Maven, or proto. See the installation guide for all options and platform support.

Quick start

# 1. Initialize governance in your project
cd my-project
archgate init

# 2. Edit the generated ADR to document a real decision
# .archgate/adrs/ARCH-001-*.md

# 3. Add a companion .rules.ts to enforce it automatically
# .archgate/adrs/ARCH-001-*.rules.ts

# 4. Run checks
archgate check

Writing rules

Each ADR can have a companion .rules.ts file that exports automated checks. See the writing rules guide for examples and the full rule API reference.

Supercharge with AI plugins

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.

Plugins are available for Claude Code, Cursor, VS Code, Copilot CLI, and opencode.

archgate login             # one-time GitHub auth
archgate init              # installs the plugin automatically

Get started with plugins. The CLI works fully without them, but plugins close the loop between decisions and code.

Documentation

Full documentation is available at cli.archgate.dev, including guides for writing ADRs, writing rules, CI integration, editor plugin setup, and the complete CLI reference.

Community

Questions, ideas, or feedback? Join the discussion at r/archgatedev.

Contributing

See CONTRIBUTING.md for development setup and workflow.

License

Apache-2.0

Metadata

Release files for archgate 0.59.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for archgate 0.59.0
File Size Uploaded
archgate-0.59.0.tar.gz 10.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for archgate 0.59.0
File Interpreter ABI Platform
archgate-0.59.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.3 kB

Release files / archgate-0.59.0.tar.gz

Download URL archgate-0.59.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
cd638999f45ca40d0b6f6197a3c61cd4ff2abb659bdb37ba9a9d251e204115ca
BLAKE2b-256 checksum
How to use checksums
784318464593dd9059c80c8057c1a19a6bce2023cd74e2046736a3921c4f1284
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release files / archgate-0.59.0-py3-none-any.whl

Download URL archgate-0.59.0-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89110c50f28ad354c96b6c84637f61656d72e36c44a1a4527962c05c5521b30b
BLAKE2b-256 checksum
How to use checksums
10f12ca29f0719abcf3e1693d28d6860f0c61c5cc45d103066bd909a8c852bfd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page