Archyl CLI: Your Architecture, in the Terminal and in Your Coding Agents
You're on feature/refunds, four files into the Payments code, and you want to know what depends on it before you open the pull request. The answer exists. It's in a browser tab you'd have to find, on a project you'd have to open, at the right level of the diagram. So you skip it and push, and a reviewer tells you that Checkout Web calls what you just changed.
Your coding agent has it worse. It has no tab at all, only whatever someone thought to connect it to.
Developers ship from the terminal, and the architecture stayed in a browser. So we built archyl, a command line that connects a repository to its architecture in Archyl and brings the model to where the work happens, for you and for the agents working next to you. It's open source under the MIT license, at github.com/archyl-com/cli.
The samples below use an example shop, not anyone's real model. Some are shortened.
Start with a question
Run archyl on its own and you get a session: a prompt in your terminal that knows which repository and branch you're on.
$ archyl
◆ archyl
Checkout · feature/refunds · alignment 86
Ask anything about the architecture. / commands · @ files · # elements
› which elements does my branch touch, and who should I tell?
⏺ archyl impact
Touched ◉ Payments 4 files in Checkout / API
… +12 lines
Your branch changes Payments, which Checkout Web calls and the Refund
Worker reads. Tell @payments before merging.
The ⏺ line is the assistant running a real command and showing it to you before it uses the output. It answers from the architecture, and when the answer depends on your code or on what is happening right now, it runs impact, check, brief or show here. Read-only commands run without asking. Anything that changes something, such as recording a memory or approving an agent's plan, asks you first with y/n.
Type / for commands, @ to attach a file, # to point at an element. archyl -c picks up the last conversation.
The assistant needs a plan that includes AI chat, so a paid one: it isn't on the free Developer plan. / commands work on every plan, so /impact, /review and /map run on Developer too.
See what you're about to touch
Four commands answer the questions you'd otherwise open a tab for.
archyl map is a full-screen C4 explorer: a tree of systems, containers, components and code, with each element's relationships in both directions, its blast radius and a fuzzy filter. Press d to switch to the diagram of the level you're on, and enter to drill down.
archyl diagram draws the system context, or centres on any element you name:
archyl diagram # the system context
archyl diagram Checkout # centred on one element, any level
archyl diagram Shop --inside # the containers of the Shop system
In Kitty, Ghostty, WezTerm and iTerm2 it's an inline image. Everywhere else, and in pipes, it's text:
┌─────────────────┐ ┌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┐
│ ▣ Storefront │ ╎ ◆ Warehouse ╎
│ web app · React │ ╎ software system ╎
└────────┬────────┘ └╌╌╌╌╌╌╌╌┬╌╌╌╌╌╌╌╌┘
│ │
└───────────────┐ │ updates stock
places orders ×2 │ │
▼ ▼
┌─────────────────┐
│ ▣ Shop API 4 ◉ │
│ api · Go │
└─────────────────┘
archyl why is git blame for the architecture. Give it a file and a line, and it tells you what that code belongs to, the commit that last changed the line, and the decisions made around that commit:
$ archyl why internal/payments/refund.go:42
◆ archyl why internal/payments/refund.go:42
▍ Belongs to
Checkout / API / Payments
owners @payments
▍ Last change
3f2a9c4 Keep refund amounts in minor units
Ada · Oct 12, 2026 · 2 weeks ago
▍ Decisions
ADR-12 Store money as integer minor units accepted
▍ Remembered
pitfall Refund amounts are in minor units; never use floats
archyl impact takes everything your branch changes and walks the relationships to what depends on it, with the owners to notify. It covers committed, staged, unstaged and untracked changes, so you can run it before you commit anything:
$ archyl impact
◆ archyl impact vs origin/main · 4 changed files
▍ Touched
◉ Payments 4 files Checkout / API
▍ Blast radius
◉ Payments
├── ▣ Checkout Web calls · 1 hop @payments
╰── ▣ Refund Worker reads · 1 hop @payments
▍ Notify
@payments
archyl impact --diagram draws the same thing, with the touched elements highlighted.
Put your coding agents under the same model
If you don't run coding agents yet, nothing above depends on them, and you can skip to the CI section. If you do, this is the part that keeps them inside the architecture.
archyl setup # once per repository
archyl wrap --task "Add partial refunds" -- claude # run the agent in a work session
archyl agents # who is working on what, live
archyl setup configures Claude Code, Cursor, VS Code and Codex to use Archyl's MCP server, installs the Guard hook, and adds a short block to CLAUDE.md and AGENTS.md telling the agent when to run which command: plan before a non-trivial change, brief before editing files, check before finishing. By default each agent starts archyl mcp, which uses the CLI's own session, so one archyl login connects every agent. The files it writes in your repository hold no secret and are safe to commit.
archyl wrap -- claude runs the agent inside a work session. Archyl picks the relevant elements, decisions and rules, leases those elements, and returns a briefing. While the agent works, the session is kept alive. When it exits, wrap reports what changed, closes the session and offers to open a draft Architecture Change Request, so a human reviews how the model should catch up. If Archyl is unreachable, wrap warns and runs the agent anyway. It's the quickest way to put an agent under the Archyl Harness.
archyl guard is the hook that stops an edit before it lands. It runs your conformance rules on the file as it would be after the edit: critical violations block it, high ones warn. If the agent edits a manifest such as go.mod or package.json and adds a dependency your technology radar puts on hold, the edit is blocked and the agent gets the alternative from the radar's note. Dependencies on hold that were already there don't block anything.
archyl agents is a live view of the sessions on the project: which agent, on what task, on which elements, with which files changed. Elements leased by more than one agent are flagged, so you see two agents heading for the same code while you can still do something about it.
Check every pull request
The same commands run on your laptop and in CI. On GitHub, the action installs the CLI and runs one:
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: archyl-com/cli@v1
with:
api-key: ${{ secrets.ARCHYL_API_KEY }}
command: review --comment
archyl review --comment keeps one comment on the GitHub or GitLab request, edited in place on every push: the verdict, the violations with their file and line, the elements touched and what depends on them, the owners to loop in, and a Mermaid diagram of the impact.
archyl check runs the conformance rules on every changed file and exits 1 when a violation reaches --fail-on, high by default:
$ archyl check
CRITICAL Forbidden pattern found: fmt.Println (use slog) No printing in services
╭─ internal/payments/refund.go:42
42 │ fmt.Println("total", total)
╰─ → Remove usage of the forbidden pattern: fmt.Println (use slog)
✗ 1 violation in 3 changed files · 1 critical
That gives you inline annotations on GitHub, a Code Quality report on GitLab, or SARIF for anything else. It also works on Bitbucket Pipelines and Azure Pipelines, where the CLI finds the base branch from the environment.
archyl fix deals with what check found. It lets you pick the violations and hands each one to Claude Code or Codex under the harness, with its rule, location and suggestion, and the brief and decisions around it. When the agent exits, it checks again:
$ archyl fix
...
✓ 3 violations → 0 · 3 fixed · nothing committed, review with git diff
It never commits. archyl fix --print writes the task out instead, to hand to any other agent.
And also
A few more, each worth a look when you need it:
archyl tourwalks a newcomer through the codebase, stop by stop, with owners, files to read first, decisions and pitfalls.--markdown > ONBOARDING.mdkeeps a copy.archyl history --playreplays every version of the model full screen, like the web app's time-lapse. Without--play, it shows what changed between two releases or dates, as Markdown for release notes when piped.archyl incident <element>is one read-only screen for an element in trouble: owners, what depends on it, recent changes, everyone to tell. No AI, and--slackprints a message for the incident channel.archyl decidedrafts an ADR from your branch's changes, for you to review and record as proposed.archyl codeownersgenerates the CODEOWNERS block from the owners in Archyl, and--checkfails CI when it's out of date.archyl drift --compute --fail-under 80turns the model-to-code alignment score into a quality gate.archyl lspis a language server: violations as diagnostics on save, the file's element on hover, for VS Code, Neovim, Zed and Helix.
What it doesn't do
- It needs Archyl behind it. The CLI is MIT, but it reads and writes a model in Archyl, cloud or self-hosted. A self-hosted instance has to be recent enough to have the endpoints it calls:
archyl doctortells you when it isn't. - Its answers are as good as the model.
impactandwhywalk what's documented.archyl drifttells you how far the model is from the code. - The Guard is a Claude Code hook.
archyl setupconnects Cursor, VS Code and Codex to the MCP server and the CLI instructions, but the edit-blocking hook is Claude Code'sPreToolUse.wrapworks with any agent, and only Claude Code receives the briefing as a system prompt: others read it from$ARCHYL_BRIEFING_FILE. - The Guard fails open. No credential, no network or an unknown tool lets the edit through, by design, so a network problem never stops your work. It isn't a security boundary: put
archyl checkin CI as well. - Some commands spend AI quota. The story in
tourand the draft indecideboth count, and--no-aiskips the AI on either. Each repository inarchyl discovercounts as one discovery.
Install it
brew install archyl-com/tap/archyl
archyl login # sign in through your browser
archyl init # link this repository to its Archyl project
archyl setup # connect Claude Code, Cursor, VS Code or Codex
There's also an install script, go install, and signed binaries with an SBOM on the releases page.
No project yet? archyl init --new creates one, connects the repository from its git remote, runs an AI discovery while you watch, lets you triage what it found and draws the result. Commit the .archyl.json that init writes: it holds no secret, and your team and CI then share the link. If something's off, archyl doctor checks the whole setup and prints the fix for each problem.
The code is at github.com/archyl-com/cli, and every command is documented in the CLI guide. The Developer plan is free, with no credit card.
Related reading: work sessions for AI coding agents, for what wrap runs on, and the pricing page for what each plan includes.