Command reference
Look up every anlyon CLI command with its arguments, flags, defaults, required scopes, an example and the output it prints.
This page lists every anlyon command, grouped by task. Each entry gives the synopsis, the command’s own flags with their defaults, the scope it needs, an example and the shape of what it prints.
Every command also accepts the global flags below. anlyon <command> --help prints the same information from the CLI itself.
Use the global flags
| Flag | Default | Meaning |
|---|---|---|
--json |
off | Print one JSON document on stdout. Lists: {"data": [...], "nextCursor": ..., "total": ...}. Single objects: {"data": {...}}. |
--profile <name> |
ANLYON_PROFILE, then the default profile, then default |
The profile to use. Refused together with ANLYON_API_KEY. |
--environment <id|slug> |
none | Assert the environment the credential is bound to. A mismatch stops the command with exit code 10. It never switches the environment. |
--input <file|-> |
none | Read the command’s options as a JSON object from a file, or from stdin with -. For actions invoke it is the action input instead. |
--limit <n> |
20 | Page size for list commands, 1 to 100. Refused on a command that is not a list. |
--cursor <cursor> |
none | Continue a list from the nextCursor of the previous page. |
--timeout <duration> |
60s | Give up after this long: 500ms, 30s, 2m, 1h. A bare number is seconds. Maximum 24h. Some commands raise the default (see each command). |
--no-input |
off | Never prompt and never open a browser. Fail instead. |
-h, --help |
off | Show help for the command, or for a group with anlyon <group> --help. |
anlyon --version (or -V) prints the CLI version, the bundled @anlyonhq/sdk version and the runtime. With --json it prints {"cli", "sdk", "runtime", "platform"}.
Flag values and the exit codes are described in Scripting and CI.
Set up a project
anlyon init
Set Anlyon up in the project in the current directory: sign in (or sign up), write an agent key to the project’s env file, install the SDK, add the MCP server for your coding agents, optionally install and connect a pack, and run one governed read. Safe to run again: what is already right is left alone. See Set up from your agent.
anlyon init [--yes] [--pack <name>] [--wait <duration>] [--mcp <clients>] [--no-install] [--no-smoke] [--api-url <url>] [--no-browser]
| Flag | Default | Meaning |
|---|---|---|
--yes |
off | Confirm without prompting. Required when not interactive. |
--pack <name> |
none | Also install a catalogue pack (github, hubspot, …) or a pack directory, and connect its account. |
--wait <duration> |
none | Wait this long for what needs you in the browser: a sign-off, or the pack’s account. |
--mcp <clients> |
the agents found in the project | claude, cursor, codex, comma-separated, or none. |
--no-install |
off | Print the SDK install command instead of running it. |
--no-smoke |
off | Skip the governed read. |
--api-url <url> |
https://api.anlyon.com |
The API origin to sign in to. |
--no-browser |
off | Print links instead of opening a browser. |
It signs in with the browser and asks for the Create API keys consent group (anlyon:keys), plus Secrets and Guardrails with --pack. A login that already holds them is reused. ANLYON_API_KEY in the shell is ignored: init acts as you. The key it creates holds the standard agent scopes and goes to .env (.env.local for Next.js); it is never printed. The default timeout is 20 minutes, plus --wait.
npx @anlyonhq/cli init --yes
anlyon init --yes --pack github --wait 15m --json
Anlyon is set up in shop.
login signed-in: profile default, workspace <workspace-id>, environment production
api key created: ANLYON_API_KEY in .env.local (not printed), .env* added to .gitignore
sdk installed: @anlyonhq/sdk
mcp .mcp.json added
smoke test succeeded: anlyon-smoke-test, receipt eff_... (acknowledged)
Exits 0 when the smoke test succeeded or was skipped, 10 when the env file holds a key for another environment, 12 when an approval policy holds the smoke test, 14 when it failed, and 15 when adding its action waits for a sign-off.
anlyon setup claude-code and anlyon setup cursor
Point a coding agent at Anlyon, when you have no app to build. It adds the anlyon server to .mcp.json or .cursor/mcp.json, with a URL and no secret, and lists the servers the agent can still reach directly, with the command to remove each and to put it behind Anlyon. It sends nothing, needs no login, and changes no other server. See Put your coding agent behind Anlyon.
anlyon setup claude-code [--api-url <url>]
anlyon setup cursor [--api-url <url>]
Added Anlyon to .mcp.json. The entry holds a URL and no secret, so it is safe to commit.
Your agent can still reach this server directly, which skips approvals, limits and receipts:
tracker (https://mcp.tracker.example/mcp), in .mcp.json
It is given Authorization. If that is a credential, revoke it or take it out of the agent's reach.
Behind Anlyon: anlyon mcp add https://mcp.tracker.example/mcp --name tracker
Remove it: claude mcp remove tracker --scope project
Log in and check your account
These commands manage the credential and show where it acts. See Log in and profiles for how profiles and credentials work.
anlyon auth login
Log in with your Anlyon account in the browser (OAuth 2.1 with PKCE), or store an API key read from stdin. The profile it saves to is --profile, then ANLYON_PROFILE, then the default profile, then default.
anlyon auth login [--scope <groups>] [--no-browser] [--api-url <url>]
anlyon auth login --api-key-stdin [--api-url <url>]
| Flag | Default | Meaning |
|---|---|---|
--scope <groups> |
none | Extra consent groups, comma- or space-separated, on top of the default openid profile email offline_access anlyon:actions anlyon:observability. For example anlyon:approvals.decide or anlyon:secrets. Browser login only. |
--no-browser |
off | Print the login URL instead of opening a browser. ANLYON_NO_BROWSER=1 does the same. |
--api-key-stdin |
off | Store an API key read from a pipe instead of logging in with the browser. Refused when stdin is a terminal. |
--api-url <url> |
the profile’s API, then ANLYON_API_URL, then https://api.anlyon.com |
The API origin to log in to. https, or http to localhost only. |
The default timeout is 10 minutes, to leave time for the browser. Pass --environment to refuse a login bound to another environment. Nothing is saved in that case.
anlyon auth login --scope anlyon:approvals.decide
printf %s "$ANLYON_API_KEY" | anlyon auth login --api-key-stdin --profile ci
Logged in. Profile "default" → https://api.anlyon.com
workspace <workspace-id>
environment production (<environment-id>)
consent anlyon:actions, anlyon:observability, anlyon:approvals.decide
stored in macos-keychain
This is now the default profile.
anlyon auth status
Show which profile, API and credential commands will use, and check it with the server.
anlyon auth status [--offline]
| Flag | Default | Meaning |
|---|---|---|
--offline |
off | Do not contact the server. Report what is stored only. |
Exits 0 when the credential works, 3 when nothing is stored, and the failing check’s exit code otherwise.
anlyon auth status
profile default (from default)
api https://api.anlyon.com
auth oauth
credential stored
store macos-keychain
bound to workspace <workspace-id>, environment production
server check ok
With --json it adds hasRefreshToken, accessTokenExpiresAt, the stored binding and a live object with the server’s answer.
anlyon auth logout
Revoke this profile’s refresh token and delete its stored credential.
anlyon auth logout [--forget]
| Flag | Default | Meaning |
|---|---|---|
--forget |
off | Also remove the profile from the config file. |
anlyon auth logout --profile staging --forget
Logged out of profile "staging".
Refresh token revoked. An access token already issued stays valid until it expires (at most 15 minutes).
anlyon auth scopes
Show what the current credential is granted, and which commands it can run.
anlyon auth scopes
No flags of its own.
anlyon auth scopes
Consent groups: anlyon:actions, anlyon:observability
Scopes: actions:invoke, actions:read, actions:write, approvals:read, ...
COMMAND NEEDS OK HOW TO GET IT
anlyon actions list actions:read yes
anlyon runs list runs:read yes
anlyon policies list policies:read no API key only
For a command the credential cannot run, the last column says how to get it: login --scope <group> with the consent group that grants the scope, or API key only when no consent group does.
anlyon profile list
List profiles. * marks the one commands in this terminal will use.
anlyon profile list
No flags of its own.
anlyon profile list
NAME API AUTH WORKSPACE ENVIRONMENT
* default (default) https://api.anlyon.com oauth <workspace-id> production
ci https://api.anlyon.com api_key <workspace-id> staging
anlyon profile use <name>
Set the default profile for new commands. ANLYON_PROFILE still wins in a terminal that sets it.
anlyon profile use <name>
No flags of its own. A name that has no profile exits 2.
anlyon profile use staging
Default profile is now "staging".
To pin one terminal instead: export ANLYON_PROFILE=staging
anlyon whoami
Show who and where the current credential acts: user, workspace, environment and role.
anlyon whoami
No flags of its own.
anlyon whoami --environment production
profile default
api https://api.anlyon.com
credential oauth
user you@example.com
workspace <workspace-id>
environment production (<environment-id>)
role admin
expires 2026-10-27T12:15:00.000Z
user and role are shown for a browser login. An API key has neither, and shows its key id after credential. HALTED follows the environment when the environment is halted.
anlyon doctor
Check the install, config, credential store, API reachability, clock, OAuth discovery and credential, one line per check.
anlyon doctor
No flags of its own. Exits 1 when any check fails and 0 otherwise. A warning does not fail it.
anlyon doctor
OK version anlyon 0.3.0, @anlyonhq/sdk ..., node 20.18.0 (darwin/arm64)
OK config /Users/you/.config/anlyon/config.json
OK target profile "default" (from default) → https://api.anlyon.com
OK credential store macos-keychain
OK api https://api.anlyon.com/health → HTTP 200
OK clock local clock is 0s ahead of the server
OK oauth issuer https://api.anlyon.com
OK credential oauth, workspace <workspace-id>, environment production (<environment-id>)
List and inspect actions
anlyon actions list
List the actions configured in this environment. Needs actions:read.
anlyon actions list [--limit <n>] [--cursor <cursor>]
No flags of its own.
anlyon actions list --limit 50
NAME ID METHOD ENABLED APPROVAL
refund_payment act_... POST true false
send_email act_... POST true true
anlyon actions get <ref>
Show one action by name or act_ id, with what it declares. Needs actions:read.
anlyon actions get <ref>
No flags of its own.
anlyon actions get send_email
name send_email
id act_...
description Send a transactional email
method POST
url https://api.example.com/v1/messages
enabled true
requires approval true
governed true
impact emails: count(input.to), exact
verify GET https://api.example.com/v1/messages/{{response.id}} must answer 200, data.status = "sent"
current version acv_...
created 2026-10-01T09:00:00.000Z
anlyon actions versions <ref>
Show an action’s version history. Needs actions:read.
anlyon actions versions <ref> [--limit <n>] [--cursor <cursor>]
No flags of its own.
anlyon actions versions send_email
VERSION ID METHOD URL
1 acv_... POST https://api.example.com/v1/messages
2 acv_... POST https://api.example.com/v1/messages
Invoke an action
anlyon actions invoke <ref>
Invoke an action by name or act_ id. Policies, approvals and impact limits apply exactly as for any other caller. Needs actions:invoke, and actions:read as well with --wait. This is a write: it asks for confirmation and carries an idempotency key.
anlyon actions invoke <ref> [--data <json> | --input <file|->] [--idempotency-key <key>] [--wait <duration>] [--yes]
| Flag | Default | Meaning |
|---|---|---|
--data <json> |
{} |
The action input as a JSON object. Use this or --input, not both. |
--input <file|-> |
none | Read the action input from a JSON file, or from stdin with -. |
--idempotency-key <key> |
generated (cli_<uuid>) and printed |
Makes the call safe to repeat: the same key returns the recorded result. 8 to 255 letters, digits, ., _, : or -. |
--wait <duration> |
none | If the call waits for approval or is still running, poll every 2 seconds for up to this long for the outcome. |
--yes |
off | Confirm without prompting. Required when stdin is not a terminal. |
With --wait, the default --timeout becomes the wait plus 1 minute.
The exit code says what happened: 0 succeeded, 12 waiting for approval or still running, 13 outcome unknown, 14 failed, denied or expired. See How writes behave.
anlyon actions invoke refund_payment --data '{"charge":"ch_123","amount":1200}' --wait 10m --yes
echo '{"to":["ana@example.com"],"subject":"Hi"}' | anlyon actions invoke send_email --input - --yes
Invoking refund_payment (idempotency key cli_...)…
Waiting for approval apr_...…
invocation inv_...
action refund_payment
status succeeded
approval apr_...
http status 200
idempotency key cli_...
Invocation succeeded.
The first two lines and the last line go to stderr. With --json, stdout carries {"data": <invocation>, "idempotencyKey": "...", "nextStep": "..."}. nextStep is present when the status is not succeeded.
Declare what an action changes
anlyon actions declare <ref>
Set or remove what an action declares: its impact, its read-back, or governed alone. An action is governed when it declares any of these. A flag you leave out keeps what the action already declares. Needs actions:write. Changing or removing what a governed action already declares also needs actions:govern, which no browser login grants: use an operator API key. This is a write.
anlyon actions declare <ref> [--dimension <d> [--unit <u>] --amount <expr> --bound exact|upper_bound]
[--verify-url <url> --verify-status <code> [--verify-match path=value]...]
[--governed] [--no-impact] [--no-verify] [--ungoverned]
[--idempotency-key <key>] [--yes]
| Flag | Default | Meaning |
|---|---|---|
--dimension <d> |
none | What one call changes: money, resource_mutations, or a unit you name such as emails. |
--unit <u> |
none | The currency when the dimension is money, for example usd. Required for money. Leave it out otherwise. |
--amount <expr> |
none | How much one call changes: an integer, input.<path> or count(input.<path>), with an optional * <integer>. |
--bound <b> |
none | exact or upper_bound (the amount is a ceiling). |
--verify-url <url> |
none | A GET on the action’s own host that reads the write back. May use {{input.field}} and {{response.field}}. |
--verify-status <code> |
none | The HTTP status the read-back must answer with, for example 200. |
--verify-match <path=value> |
none | A check on the read-back body, for example data.status=sent. Repeatable, up to 10. |
--governed |
off | Govern an action that declares neither an impact nor a read-back. |
--no-impact |
off | Remove the declared impact. |
--no-verify |
off | Remove the declared read-back. |
--ungoverned |
off | Remove every declaration. The action stops being governed. Cannot be combined with another declaration flag. |
--idempotency-key <key> |
generated | Makes the call safe to repeat. |
--yes |
off | Confirm without prompting. Required when not interactive. |
Rules the CLI checks before anything is sent (exit 2 otherwise):
- An impact needs
--dimension,--amountand--boundtogether. Setting an impact replaces the whole impact. - A read-back needs
--verify-urland--verify-statustogether. Setting one replaces the whole read-back. --no-impactcannot be combined with an impact flag, and--no-verifycannot be combined with a read-back flag.- A
--verify-matchvalue that reads as a JSON number,true,falseornullis sent as that. Quote it as JSON to send a string:--verify-match 'id="42"'. - At least one declaration flag is required.
# One call sends count(input.to) emails. Impact limits in the unit "emails" now apply.
anlyon actions declare send_email --dimension emails --amount 'count(input.to)' --bound exact --yes
# Money needs its currency. The amount is a ceiling here.
anlyon actions declare refund_payment --dimension money --unit usd --amount input.amount --bound upper_bound --yes
# Read the write back after dispatch. A match grades the effect confirmed.
anlyon actions declare send_email \
--verify-url 'https://api.example.com/v1/messages/{{response.id}}' --verify-status 200 \
--verify-match data.status=sent --yes
anlyon actions declare send_email --no-verify --yes # remove the read-back
anlyon actions declare send_email --ungoverned --yes # remove every declaration
name send_email
id act_...
governed true
impact emails: count(input.to), exact
verify -
idempotency key cli_...
Declarations saved. The action is governed.
See Actions and Governed effects.
Read invocations
anlyon invocations list
List action invocations, newest first. Needs actions:read.
anlyon invocations list [--action <ref>] [--status <status>] [--limit <n>] [--cursor <cursor>]
| Flag | Default | Meaning |
|---|---|---|
--action <ref> |
all actions | Only invocations of this action (name or act_ id). |
--status <status> |
all | Only invocations in this status: pending_approval, running, succeeded, failed, unknown, denied or expired. |
anlyon invocations list --status unknown
ID ACTION STATUS HTTP CREATED
inv_... refund_payment unknown - 2026-10-27T10:02:11.000Z
More results: add --cursor eyJsIjoi...
The More results line goes to stderr.
anlyon invocations get <id>
Show one invocation by inv_ id. Needs actions:read.
anlyon invocations get <id>
No flags of its own.
anlyon invocations get inv_123
id inv_123
action refund_payment
status pending_approval
approval apr_...
http status -
duration ms -
retry of -
created 2026-10-27T10:02:11.000Z
completed -
An invocation’s status is described in Receipts and grades. failed means the destination rejected the request, or it was never sent. unknown means it may have taken effect.
Read runs
anlyon runs list
List runs (agent traces), newest first. Needs runs:read.
anlyon runs list [--status <s>] [--search <text>] [--agent <id>] [--since <time>] [--until <time>] [--limit <n>] [--cursor <cursor>]
| Flag | Default | Meaning |
|---|---|---|
--status <s> |
all | running, succeeded, failed or cancelled. |
--search <text> |
none | Substring match on run id, name or application. |
--agent <id> |
all | Only runs by this agent id. |
--since <time> |
none | Only runs started at or after this ISO 8601 time. |
--until <time> |
none | Only runs started before this ISO 8601 time. |
anlyon runs list --status failed --since 2026-10-01T00:00:00Z
ID NAME STATUS STARTED ENDED
<run-id> nightly-triage failed 2026-10-26T02:00:00.000Z 2026-10-26T02:00:41.000Z
anlyon runs get <id>
Show one run with its span tree. Needs runs:read.
anlyon runs get <id>
No flags of its own. The human output shows the number of spans. --json returns the full tree.
anlyon runs get <run-id> --json
Review and decide approvals
anlyon approvals list
List your team’s approval requests, newest first. --status pending is the inbox. Needs approvals:read.
anlyon approvals list [--status <s>] [--origin <o>] [--limit <n>] [--cursor <cursor>]
| Flag | Default | Meaning |
|---|---|---|
--status <s> |
all | pending, approved, denied or expired. |
--origin <o> |
all | Only decisions of this origin: human, policy, system, unknown, assistant or automated. |
Approvals your end users decide (a policy with decidedBy: "end_user") are not in this list. They are decided in your app.
anlyon approvals list --status pending
ID TITLE STATUS CREATED EXPIRES
apr_... Refund 1200 on charge ch_1 pending 2026-10-27T10:02:11.000Z 2026-10-28T10:02:11.000Z
anlyon approvals get <id>
Show one approval by apr_ id. Needs approvals:read.
anlyon approvals get <id>
No flags of its own.
anlyon approvals get apr_123
id apr_123
title Refund 1200 on charge ch_1
status approved
description -
decided by ...
decision origin human
decided 2026-10-27T10:05:40.000Z
created 2026-10-27T10:02:11.000Z
expires 2026-10-28T10:02:11.000Z
anlyon approvals approve <id> and anlyon approvals deny <id>
Approve or deny a pending request. For a gated action, Anlyon runs the reviewed request once enough approvers agree. A denied action never runs. Needs approvals:decide and approvals:read. A browser login also needs a role that may decide in the approval’s environment (admin, member or approver). These are writes.
anlyon approvals approve <id> [--note <text>] [--idempotency-key <key>] [--yes]
anlyon approvals deny <id> [--note <text>] [--idempotency-key <key>] [--yes]
| Flag | Default | Meaning |
|---|---|---|
--note <text> |
none | Why, recorded with the decision. |
--idempotency-key <key> |
generated | Makes the call safe to repeat. |
--yes |
off | Confirm without prompting. Required when not interactive. |
The CLI reads the approval first. One that is no longer pending exits 6 and nothing is sent.
anlyon auth login --scope anlyon:approvals.decide
anlyon approvals approve apr_123 --note "checked with the customer"
anlyon approvals deny apr_456 --note "amount does not match the ticket" --yes
approval apr_123
status approved
invocation inv_...
invocation status succeeded
Exit codes: 0 when the decision is recorded. 13 when an approved action then ran and its outcome is unknown. 6 when the approval was not pending. 4 when the credential may not decide it (see below). 5 for an approval your end user decides.
Who may decide:
- An API key never decides an approval it requested.
- An app never decides an approval it requested for the same person. A CLI login is an app.
- A person does not decide, through the CLI or any app or key, an approval that they requested, that an app acting for them requested, or that an API key they created requested. Another member who can decide approvals in that environment decides it, or a separate approver key.
Read approval policies
The CLI reads approval policies. To change them, keep them in anlyon.yaml or a policy file. Policy commands need policies:read: log in with anlyon auth login --scope anlyon:guardrails, or use an operator API key.
anlyon policies list
List approval policies for this environment.
anlyon policies list [--action <name>] [--limit <n>] [--cursor <cursor>]
| Flag | Default | Meaning |
|---|---|---|
--action <name> |
all | Only policies for this action name. |
anlyon policies list --action refund_payment
ID NAME PRIORITY EFFECT ENABLED VERSION
<pol-id> refunds-over-500 10 require_approval true 3
anlyon policies get <id>
Show one approval policy: match, effect, required approvals, version.
anlyon policies get <id>
No flags of its own.
anlyon policies get <policy-id> --json
anlyon policies versions <id>
Show a policy’s version history, newest first.
anlyon policies versions <id> [--limit <n>] [--cursor <cursor>]
No flags of its own.
anlyon policies versions <policy-id>
VERSION OPERATION CREATED ACTOR NOTE
3 updated 2026-10-20T08:00:00.000Z ... raise threshold
Read effects and receipt grades
Every governed call leaves an effect with a receipt grade. Effect commands need actions:read.
anlyon effects list
List governed effects with their receipt grades, newest first.
anlyon effects list [--action <ref>] [--outcome <o>] [--grade <g>] [--unresolved] [--limit <n>] [--cursor <cursor>]
| Flag | Default | Meaning |
|---|---|---|
--action <ref> |
all | Only effects of this action (name or act_ id). |
--outcome <o> |
all | not_dispatched, pending, succeeded, failed or unknown. |
--grade <g> |
all | confirmed, acknowledged, unknown, failed, refused, denied or pending. |
--unresolved |
off | Only effects still holding impact-limit capacity: pending, unknown or possibly partial. |
anlyon effects list --unresolved
anlyon effects list --action send_email --grade refused
anlyon effects list --grade acknowledged --json
ID ACTION STAGE GRADE OUTCOME VERIFIED CREATED
eff_... send_email settled confirmed succeeded provider 2026-10-27T09:12:03.000Z
anlyon effects get <id>
Show one governed effect by eff_ id, with its receipt grade, what the grade means, and its evidence.
anlyon effects get <id>
No flags of its own.
anlyon effects get eff_123
id eff_123
invocation inv_...
action send_email
adapter ...
grade confirmed: A read-back matched the request.
stage settled
outcome succeeded
partial effect none
verification provider
provider reference ...
approval -
unresolved exposure ...
created 2026-10-27T09:12:03.000Z
outcome at 2026-10-27T09:12:04.000Z
effects list has a GRADE column, and effects get prints what the grade means:
| Grade | Meaning |
|---|---|
confirmed |
A read-back matched the request. On a declared action that is the verify rule the workspace wrote. |
acknowledged |
The provider accepted the request. Nothing read it back. |
unknown |
No usable response. Anlyon does not send it again. It stays unknown until a read-back or an operator settles it. |
failed |
The provider rejected the request, or it never left Anlyon. |
refused |
Anlyon refused it at dispatch. |
denied |
The approval was denied. |
pending |
No receipt yet. |
See Governed effects and Receipts and grades.
Read impact limits
The CLI reads limits. It does not create or change them. Limit commands need impact-limits:read.
anlyon impact-limits list
List the impact limits shared by every agent in this environment.
anlyon impact-limits list [--include-archived] [--limit <n>] [--cursor <cursor>]
| Flag | Default | Meaning |
|---|---|---|
--include-archived |
off | Include archived limits. |
anlyon impact-limits list
ID NAME DIMENSION UNIT PERIOD LIMIT CONSUMED RESERVED
lim_... outbound-sales: contact updates per day resource_mutations resource_mutations day 200 37 1
UNIT is the currency for money and the declared unit otherwise. PERIOD is day, month or total.
anlyon impact-limits get <id>
Show one impact limit by lim_ id, with its scope, current period and unknown exposure.
anlyon impact-limits get <id>
No flags of its own.
anlyon impact-limits get lim_123
See Impact limits.
Connect accounts
These commands manage your workspace’s connected accounts: accounts at a provider, stored as a secret bound to that provider’s hosts, whose token Anlyon adds at dispatch. With a browser login, add --scope anlyon:secrets. Listing needs secrets:read. Adding, checking and reconnecting need secrets:write.
anlyon connections integrations
The integrations an account can be connected for, how each is connected (sign-in or API key), the hosts its credential may reach, and the access it requests.
anlyon connections integrations
No flags of its own.
anlyon connections integrations
ID NAME CONNECT WITH HOSTS SCOPES
hubspot HubSpot sign-in api.hubapi.com ...
stripe Stripe API key api.stripe.com
anlyon integrations find <name>
The best way for your agent to act in an app, why, and the next command or link. It works for any name, needs no scope, and only suggests: nothing is registered, adopted or connected. With --json, an agent reads data.route.kind, data.route.next and data.alternatives.
anlyon integrations find <name>
No flags of its own.
anlyon integrations find stripe --json
anlyon connections list
Connected accounts in the credential’s environment, with their status.
anlyon connections list
No flags of its own.
anlyon connections list
SECRET INTEGRATION STATUS CHECKED HOSTS LAST USED
HUBSPOT hubspot active 2026-10-27T08:00:00.000Z api.hubapi.com 2026-10-27T09:40:00.000Z
anlyon connections add <integration>
Connect an account as a secret. For a sign-in integration it opens the provider’s consent page and waits for consent to finish. For an API-key integration it prints the provider’s instructions and asks for the key without echoing it. This is a write: it asks for confirmation.
anlyon connections add <integration> [--secret <NAME>] [--description <text>] [--no-browser] [--wait <duration>] [--api-key-stdin] [--yes]
| Flag | Default | Meaning |
|---|---|---|
--secret <NAME> |
the integration id in capitals | The secret name actions reference as {{secret:NAME}}. Uppercase letters, digits and underscores. |
--description <text> |
none | What this account is for. |
--no-browser |
off | Print the consent URL instead of opening a browser. ANLYON_NO_BROWSER=1 does the same. |
--wait <duration> |
15m (the session lifetime) | How long to wait for consent to finish. The default --timeout is this plus 1 minute. |
--api-key-stdin |
off | For an API-key integration: read the key from a pipe instead of a hidden prompt. Refused for a sign-in integration. |
--yes |
off | Confirm without prompting. Required when not interactive. |
An API key is never a command-line argument. Outside a terminal, pipe it in with --api-key-stdin. If consent does not finish before the wait ends, the command exits 9 and nothing is recorded.
anlyon connections add hubspot --secret HUBSPOT
printf %s "$KEY" | anlyon connections add <integration> --api-key-stdin --yes
Opening your browser to connect the account. If it does not open, visit:
https://...
Waiting for consent to finish (Ctrl-C to cancel)…
secret HUBSPOT
kind connection
integration hubspot
status active
checked -
reason -
hosts api.hubapi.com
placements ...
Connected. Reference it in an action header as Bearer {{secret:HUBSPOT}}.
anlyon connections check <SECRET>
Ask the provider whether a connected account still works, and print it with its status. The same command for a key and a sign-in. An account that no longer works is an answer, not an error: the command prints needs_reauth with a reason, a warning, and exits 0.
anlyon connections check <SECRET>
No flags of its own.
anlyon connections check HUBSPOT
secret HUBSPOT
kind connection
integration hubspot
status needs_reauth
checked 2026-10-27T10:00:00.000Z
reason refresh_failed
hosts api.hubapi.com
placements ...
warning: HUBSPOT no longer works: its token could not be renewed. Actions that use it fail before anything is sent. Reconnect it with: anlyon connections reconnect HUBSPOT
anlyon connections reconnect <SECRET>
Make a connected account work again under the same name. For an API-key integration it asks for the new key without echoing it and checks it with the provider. For a sign-in integration it opens the consent page and waits. Actions keep referencing it by the same name. This is a write.
anlyon connections reconnect <SECRET> [--no-browser] [--wait <duration>] [--api-key-stdin] [--yes]
| Flag | Default | Meaning |
|---|---|---|
--no-browser |
off | For a sign-in integration: print the consent URL instead of opening a browser. |
--wait <duration> |
15m | How long to wait for consent to finish. |
--api-key-stdin |
off | For an API-key integration: read the new key from a pipe instead of a hidden prompt. |
--yes |
off | Confirm without prompting. Required when not interactive. |
A name that is not a connected account in this environment exits 5.
anlyon connections reconnect HUBSPOT
See Connected accounts.
Install a pack
A pack is an integration’s tools, or a governed workflow, in one pack.json. Pass a pack directory or the manifest file. See Install a pack.
packs plan and packs install take the same flags:
| Flag | Default | Meaning |
|---|---|---|
--with-limits |
off | Create the pack’s suggested impact limits. Needs impact-limits:write. Without it they are listed as suggestions. |
--update |
off | Install a changed action definition as a new version instead of refusing. |
--no-prefix |
off | Keep the manifest’s action names instead of prefixing the pack’s short name. |
--secret <NAME=value> |
none | A stored secret’s value. Repeatable. At a terminal, packs install asks for a missing one. |
--param <name=value> |
none | A pack parameter. Repeatable. |
--action <name> |
every action | Install only this action (the manifest’s name), with its secrets, policies and limits. Repeatable. |
--secret-name <PACK_NAME=NAME> |
none | Use another secret for one the pack names, for an account connected under another name. Repeatable. |
--credential <mode> |
connection |
connection: each call uses its end user’s account, or this environment’s connected account when the call names no end user. secret: use the connected account the pack names, which must exist. |
A pack install reads and writes secrets, actions and policies, and limits with --with-limits. It needs the scopes for what the pack contains: actions:read and actions:write, secrets:read and secrets:write, policies:read and policies:write, and impact-limits:write with --with-limits. A browser login gets them with --scope anlyon:secrets,anlyon:guardrails, or use an operator API key. A missing scope exits 4 and names it.
anlyon packs plan <pack>
What installing a pack would create, skip or refuse. It reads your environment and sends no change.
anlyon packs plan <pack> [flags above]
anlyon packs plan ./packs/outbound-sales
anlyon/outbound-sales@0.3.0 (plan: nothing sent)
KIND NAME OUTCOME DETAIL
connection connection:hubspot skip Chosen at each call: the end user's own hubspot account, or this environment's…
action outbound-sales-update-contact create PATCH api.hubapi.com
policy outbound-sales: approve a stage change to customer create Disabled. Review it, then enable it.
limit outbound-sales: contact updates per day suggest Not created. 200 resource_mutations per day; add --with-limits to create it.
anlyon packs install <pack>
Install a pack: secrets, declared actions, policies (installed disabled) and, with --with-limits, limits. This is a write: it asks for confirmation.
anlyon packs install <pack> [flags above] [--yes]
anlyon packs install ./packs/outbound-sales --with-limits --yes
The output is the same table with outcomes created, updated and skip. Policies installed disabled are listed on stderr: review them, then enable them.
anlyon packs exercise <pack>
Run every action of an installed pack once against the connected account, in the order the pack’s exercise.json gives, and report each outcome and receipt grade. Writes change real data at the provider. Needs actions:invoke. This is a write: it asks for confirmation, naming how many calls change something.
anlyon packs exercise <pack> [--need <name=value>]... [--no-prefix] [--yes]
| Flag | Default | Meaning |
|---|---|---|
--need <name=value> |
none | A value the exercise needs (see the pack’s README). Repeatable. A missing one exits 2 and lists them. |
--no-prefix |
off | The pack was installed with --no-prefix: call the manifest’s action names. |
--yes |
off | Confirm without prompting. Required when not interactive. |
The run stops at the first step that does not succeed, or that waits for an approval. Every call carries the idempotency key exercise-<run>-<step>. The command exits 0 when every step succeeded and 1 otherwise.
anlyon packs exercise ./packs/github \
--need owner=acme --need repo=sandbox --need base_branch=scratch \
--need head_branch=exercise-1 --need reviewer_login=teammate --yes
anlyon/github@0.3.0, run 3f9a1c
STEP ACTION KIND OUTCOME GRADE EFFECT DETAIL
1 github-get-repository read succeeded - - -
...
8 github-create-issue write succeeded confirmed eff_... -
...
All 33 calls succeeded. Send the effect ids and grades to record the run.
Put a remote MCP server behind Anlyon
Register a server, read its tools and ask to adopt them. Reads need actions:read, and the rest need actions:write, which a browser login has by default. Adopting always waits for a person, so an agent can run all of this. See Govern a remote MCP server.
anlyon mcp add <url>
Register a server and list its tools. No agent can call anything until a person signs off adopting a tool.
anlyon mcp add <url> [--name <name>] [--header "Name: value"]... [--oauth] [--client-id <id>] [--client-secret <ref>] [--scope <scope>]... [--end-user-key-header <name>] [--wait <duration>]
| Flag | Default | Meaning |
|---|---|---|
--name <name> |
from the host | 1 to 32 lowercase letters, digits and hyphens, starting with a letter. |
--header "Name: value" |
none | Sent on every request. A credential is a reference: "Authorization: Bearer {{secret:NAME}}". Naming a secret needs secrets:read, and waits for a sign-off. Repeatable. |
--oauth |
off | The server signs people in with OAuth. Always waits for a sign-off. A person then connects an account in the console. |
--client-id <id>, --client-secret <ref>, --scope <scope> |
none | With --oauth: a client you registered with the vendor, its secret as {{secret:NAME}} with allowed hosts that include the vendor’s token host, and the scopes to ask for. |
--end-user-key-header <name> |
none | Each end user brings their own key in this header, which must be one of --header holding your own key as a {{secret:NAME}} reference. Your key lists the tools and is used for calls made for no end user. Not with --oauth. See Servers each user brings their own key to. |
--wait <duration> |
no wait | If it needs a sign-off, wait this long for the decision. |
anlyon mcp list
List the servers registered in this environment: tools listed, tools adopted, adopted tools that changed, and the last listing error.
anlyon mcp tools <name>
List a server’s tools: the suggested class, whether each is adopted and unchanged, whether it waits for approval, and its action. Suggested classes come from what the server says, which is untrusted. --refresh lists the server again first.
anlyon mcp adopt <name> <tool...>
Ask to adopt tools as actions, or adopt again a tool that changed. It prints a sign-off link, sends nothing else and exits 15 until a person approves. Nothing in the CLI can approve it.
| Flag | Default | Meaning |
|---|---|---|
--approval <which> |
suggested |
Which tools wait for approval on every call: suggested (what the risk engine calls irreversible or destructive), all or none. A tool adopted again keeps its setting. |
--wait <duration> |
no wait | Wait this long for the decision. Exits 0 when applied, 14 when it ends any other way, and 9 when the wait runs out. |
anlyon mcp archive <name>
Archive a server and every action adopted from it. They leave your actions list, and their call history stays. It applies at once. This is a write: it asks for confirmation.
Keep guardrails in code
plan, apply and pull keep an environment’s actions, packs, policies, limits, budgets and remote MCP servers in anlyon.yaml. The file format, how each change is read and a GitHub Actions workflow are in Config as code. They act on the environment the credential is bound to, and need policies:read (anlyon auth login --scope anlyon:guardrails, or an API key); apply also needs the write scopes for what changes.
All three take --file <path> (default anlyon.yaml in the current directory).
anlyon plan
Show what applying the file would change, each change marked tightening, loosening, neutral, or needs you (a secret value a person stores). Sends no change.
anlyon plan [--file <path>] [--markdown]
| Flag | Default | Meaning |
|---|---|---|
--markdown |
off | Print the plan as a Markdown table, for a pull-request comment. |
Plan for anlyon.yaml: environment production (<environment-id>)
~ limits.Emails per day tightening lowers the limit from 1000 to 500
- limits.Old limit loosening archives the limit (10 emails per day)
1 tightening, 1 loosening (waits for a person's sign-off), 0 neutral, 3 unchanged.
Exits 0, or 6 when the server refuses the file’s policies.
anlyon apply
Make the environment match the file. Tightening and neutral changes apply at once. A loosening change made with a CLI login or an API key waits for a workspace admin’s sign-off, and apply prints its link. This is a write: it asks for confirmation.
anlyon apply [--file <path>] [--yes] [--wait <duration>]
| Flag | Default | Meaning |
|---|---|---|
--yes |
off | Apply without prompting. Required when not interactive, as in CI. |
--wait <duration> |
none | Wait this long for the sign-offs to be decided, then report. |
Exits 0 when everything applied, 15 when a sign-off is pending, 9 when --wait ran out, and 14 when a change failed or a sign-off was rejected or expired.
anlyon pull
Write the live environment to the file: actions (except those of packs the file lists), the policies the file owns, limits, budgets, and the secret names actions use. Other environments, comments and line endings are kept.
anlyon pull [--file <path>] [--yes]
| Flag | Default | Meaning |
|---|---|---|
--yes |
off | Replace an environment already in the file without asking. |
See your plan and upgrade
anlyon billing status
Show the workspace’s plan, a pending plan change, and this month’s action calls. Needs billing:read, which the default login holds.
anlyon billing status
plan Free (free)
subscription none
action calls <used> of <included> included this month
anlyon billing upgrade
Get the checkout page for a paid plan and open it. You pay on that page; no card detail passes through the terminal. A person’s login can start a purchase; an API key is refused. A workspace with a subscription changes plan under Billing in the console.
anlyon billing upgrade --plan <plan> [--interval month|year] [--wait <duration>] [--no-browser]
| Flag | Default | Meaning |
|---|---|---|
--plan <plan> |
none | starter (Starter), production (Pro) or growth (Team). See pricing. |
--interval <interval> |
month |
month or year. |
--wait <duration> |
none | Wait this long for the payment to finish, then show the new plan. Exits 9 if it has not. |
--no-browser |
off | Print the link without opening a browser. |
anlyon billing upgrade --plan starter --wait 10m
How writes behave
init, apply, pull, actions invoke, actions declare, approvals approve, approvals deny, connections add, connections reconnect, packs install and packs exercise change things.
They confirm first
Interactively, the CLI asks you to confirm and names the workspace and environment the credential is bound to (and whether the environment is protected). Anywhere else (scripts, CI, an agent’s shell) pass --yes. Without it the command exits 2 and nothing is sent. Answering anything but y or yes exits 1 and nothing is sent.
anlyon actions invoke refund_payment --data '{"charge":"ch_123","amount":1200}' --yes
They carry an idempotency key
actions invoke, actions declare, approvals approve and approvals deny carry an idempotency key: yours, passed with --idempotency-key <key>, or one the CLI generates and prints. Re-running with the same key returns the recorded result and does not run the action again. That makes an interrupted command safe to repeat. A key is 8 to 255 characters of letters, digits, ., _, : or -.
anlyon actions invoke refund_payment --data '{"charge":"ch_123","amount":1200}' \
--idempotency-key refund-ch_123 --yes
For approvals approve and approvals deny, a re-run after the decision was recorded exits 6, because the approval is no longer pending. See Idempotency and retries.
Policy and approvals apply as for any caller
- An invoke that needs approval exits 12 and prints the approval id.
--wait <duration>follows it to its outcome, for example--wait 10m. - An action that is still running when the command returns also exits 12.
- An outcome the destination could not confirm, such as a timeout after it received the request, exits 13. Do not retry with a new key. Reconcile with the destination first. Re-running with the same
--idempotency-keyis safe: it returns the recorded result. - An action that failed, was denied, or whose approval expired exits 14.
If --timeout or Ctrl-C cuts off a write before a reply arrives, the request may already have reached Anlyon, so the command exits 13 and prints the key that reads the recorded result back.
The full exit code table is in Scripting and CI.

