Two agents, one limit, one refused.

Anlyon CLI · 0.1

Production actions, from your terminal.

Invoke actions, approve what your agents are waiting on and read the record, from a shell, a script or CI. The same permissions, policies and approvals as the API and the dashboard, enforced on the server.

The rules

The CLI submits requests. Policy evaluation, approvals and the provider call stay on Anlyon, so a terminal can't do anything the dashboard wouldn't let it.

policy · approval · vault

The server decides, not your terminal

Every command runs with the permissions of the credential you logged in with. An invoke that needs approval waits for a person, exactly as it would from the SDK.

--idempotency-key

Safe to run twice

Every write carries an idempotency key: yours, or one the CLI generates and prints. Re-run an interrupted command with the same key and you get the recorded result, never a second refund.

Keychain · Credential Manager

No key in your shell history

Browser login is OAuth 2.1 with PKCE, and the refresh token lives in your OS credential store. API keys are piped in on stdin, never read from argv. Output masks credentials and anything shaped like a key or token.

approvals:decide

It can't approve its own request

Deciding needs a scope you grant on the consent screen, and a credential can never decide an approval it requested. Not the API key, and not the CLI login that asked for it.

--environment production

Pinned to one environment

--environment asserts the target and never switches it. If a login now resolves somewhere else, the command stops with exit 10 instead of guessing.

--json · exit 13

Built to be scripted

--json puts exactly one JSON document on stdout. Progress and errors go to stderr, and exit codes say whether an action is pending, failed, or may have happened.

Scripting

Set ANLYON_API_KEY, pass --yes, and the exit code tells the job what happened. A pending approval and an unknown outcome are different answers, so they are different codes.

0
Succeeded
3
Not logged in, or the credential was rejected
4
Missing scope or role
10
Target mismatch: wrong environment or binding
12
Accepted, not finished: waiting for approval or running
13
Outcome unknown. It may have happened: reconcile, don't retry
14
Did not succeed: failed, denied or approval expired

A CI step

workflow.yml
- name: Refund via Anlyon
  env:
    ANLYON_API_KEY: ${{ secrets.ANLYON_API_KEY }}
  run: |
    set +e
    npx @anlyonhq/cli actions invoke refund_payment \
      --data '{"charge":"ch_3P9x","amount":1200}' \
      --idempotency-key "refund-${{ github.run_id }}" \
      --wait 10m --yes --json > result.json
    code=$?
    case $code in
      0)  echo "Refund succeeded" ;;
      13) echo "Outcome unknown: reconcile before retrying"; exit 1 ;;
      *)  exit $code ;;
    esac

Commands

Organised by resource. anlyon <command> --help describes each one. Writes confirm first.

Account

01
  • $anlyon auth login

    Browser login, or an API key on stdin

  • $anlyon auth status | logout | scopes

    What this login is and allows

  • $anlyon profile list | use <name>

    Named targets, one per environment

  • $anlyon whoami

    Who, which workspace, which environment

  • $anlyon doctor

    Check config, credential and server

Actions

02
  • $anlyon actions list | get <ref>

    What your workspace has defined

  • $anlyon actions versions <ref>

    Every published version

  • $anlyon actions invoke <ref> --data '…'Write

    Run it. Idempotent, and --wait follows an approval

  • $anlyon invocations list | get <id>

    Each call and its outcome

  • $anlyon runs list | get <id>

    Agent runs, filtered by status or agent

Approvals

03
  • $anlyon approvals list --status pending

    What is waiting on a person

  • $anlyon approvals get <id>

    The exact request under review

  • $anlyon approvals approve <id> --note …Write

    Approve, with the reason on record

  • $anlyon approvals deny <id> --note …Write

    Deny, with the reason on record

Controls

04
  • $anlyon policies list | get | versions

    Approval policies and history

  • $anlyon effects list --unresolved

    Governed effects still to reconcile

  • $anlyon impact-limits list | get <id>

    Shared limits, consumed and reserved

Install

One npm package with no runtime dependencies. The SDK is bundled in. Node 20.3 or later on macOS, Linux and Windows.

  • macOSlogin Keychain
  • WindowsCredential Manager
  • LinuxSecret Service (gnome-keyring, KWallet)
  • Claude Code

    claude mcp add --transport http anlyon https://api.anlyon.com/mcp

  • Codex

    codex mcp add anlyon --url https://api.anlyon.com/mcp

  • Cursor

    "anlyon": { "url": "https://api.anlyon.com/mcp" }

FAQ

Install, scripting, credentials and what an exit code means.

Anything still unanswered is worth an email.

support@anlyon.com

Email us

anlyon is the command-line interface for Anlyon. It lets you log in, list and invoke actions, approve or deny pending approvals, and read invocations, runs, policies, effects and impact limits from a terminal, with the same permissions and execution guarantees as the API and the dashboard.

Run npm install -g @anlyonhq/cli (Node 20.3 or later), then anlyon auth login. pnpm add -g and bun add -g work too, and npx @anlyonhq/cli runs it without a global install.

Yes. Set ANLYON_API_KEY, pass --yes to confirm writes non-interactively, and use --json for one machine-readable document on stdout. Exit codes distinguish success (0), waiting for approval (12), an unknown outcome (13) and failure (14).

No. Deciding approvals needs the approvals:decide scope, and a credential can never decide an approval it requested: not the requesting API key, and not the CLI login that made the request. Decide those from the dashboard or a separate login.

If the destination may have received the request but the outcome can't be confirmed, the CLI exits 13. Do not retry with a new idempotency key. Reconcile first. Re-running with the same key returns the recorded result and never runs the action twice.

The refresh token is kept in the operating system's credential store: macOS Keychain, Windows Credential Manager or Linux Secret Service. Access tokens last 15 minutes and refresh automatically. An unused login expires after 7 days. On a headless machine use an API key.

The CLI is MIT-licensed and free to install. What it does counts against your workspace's plan the same way an API call would.

Free tier, no credit card. One command if you use Claude or Cursor.

$ claude mcp add anlyon -- npx -y @anlyonhq/mcp-server