Skip to content

archgate adr

Create a new ADR interactively or via flags.

Terminal window
archgate adr create [options]

When run without --title and --domain, the command prompts interactively for the domain, title, and optional file patterns. When both --title and --domain are provided, it runs non-interactively.

The ADR ID is auto-generated with the domain prefix and the next available sequence number (e.g., ARCH-002, BE-001).

OptionDescription
--title <title>ADR title (skip interactive prompt)
--domain <domain>ADR domain. Built-ins: backend, frontend, data, architecture, general. Custom domains must first be registered via archgate adr domain add.
--files <patterns>File patterns, comma-separated
--body <markdown>Full ADR body markdown (skip template)
--rulesSet rules: true in frontmatter
--jsonOutput as JSON

Interactive mode:

Terminal window
archgate adr create

Non-interactive mode:

Terminal window
archgate adr create \
--title "API Response Envelope" \
--domain backend \
--files "src/api/**/*.ts" \
--rules

List all ADRs in the project.

Terminal window
archgate adr list [options]
OptionDescription
--jsonOutput as JSON
--domain <domain>Filter by domain

List all ADRs in table format:

Terminal window
archgate adr list
ID Domain Rules Title
────────────────────────────────────────────────────────
ARCH-001 architecture true Command Structure
ARCH-002 architecture true Error Handling
BE-001 backend true API Response Envelope

List ADRs as JSON:

Terminal window
archgate adr list --json

Filter by domain:

Terminal window
archgate adr list --domain backend

Print a specific ADR by ID.

Terminal window
archgate adr show <id>

Prints the full ADR content (frontmatter and body) to stdout.

ArgumentDescription
<id>ADR ID (e.g., ARCH-001, BE-003)
Terminal window
archgate adr show ARCH-001

Update an existing ADR by ID.

Terminal window
archgate adr update --id <id> --body <markdown> [options]

Replaces the ADR body with the provided markdown. Frontmatter fields (--title, --domain, --files, --rules) are updated only when explicitly passed; otherwise the existing values are preserved.

OptionRequiredDescription
--id <id>YesADR ID to update (e.g., ARCH-001)
--body <markdown>YesFull replacement ADR body markdown
--title <title>NoNew ADR title (preserves existing if omitted)
--domain <domain>NoNew domain. Built-ins: backend, frontend, data, architecture, general. Custom domains must first be registered via archgate adr domain add.
--files <patterns>NoNew file patterns, comma-separated (preserves existing if omitted)
--rulesNoSet rules: true in frontmatter
--jsonNoOutput as JSON
Terminal window
archgate adr update \
--id ARCH-001 \
--title "Updated Command Structure" \
--body "## Context\n\nUpdated context..."

Manage custom ADR domains. Custom domains are name → ID-prefix mappings persisted in .archgate/config.json and merged with the five built-ins (backend, frontend, data, architecture, general) at read time.

Use this command when a decision doesn’t cleanly fit any built-in domain. Before registering a new one, check whether the decision can be folded under an existing domain — built-ins are the default and a custom domain should only be introduced when no built-in is a genuine fit.

Terminal window
archgate adr domain <subcommand> [options]
SubcommandDescription
archgate adr domain listShow all merged (built-in + custom) domains and their prefixes
archgate adr domain add <name> <prefix>Register a custom domain
archgate adr domain remove <name>Unregister a custom domain (built-ins cannot be removed)
  • <name> — lowercase kebab-case, 2–32 chars (e.g., security, ml-ops)
  • <prefix> — uppercase letters, digits, or underscores, 2–10 chars (e.g., SEC, MLOPS)
  • Custom names and prefixes cannot collide with built-ins or with any other custom entry.
OptionApplies toDescription
--jsonall subcommandsOutput as JSON

List built-in and custom domains:

Terminal window
archgate adr domain list
Domain Prefix Source
────────────────────────────────
architecture ARCH default
backend BE default
data DATA default
frontend FE default
general GEN default
security SEC custom

Register a custom domain:

Terminal window
archgate adr domain add security SEC

Remove a custom domain:

Terminal window
archgate adr domain remove security