Skip to main content

The zyonix command line

The zyonix command gives you the same data and the same actions as the Zyonix website, from a terminal or from a CI pipeline. Both use one API and the same rules: whatever you can see or decide on the website, you can see or decide here, and the server checks every request.

Use it to:

  • see how your agent is doing and what needs you (zyonix status);
  • inspect documents (runs), problems (issues) and their root cause;
  • answer review questions and give feedback;
  • add checks and manage the reliability spec;
  • propose a fix, verify it on your own machine, approve it, record the deploy and watch that the problem stays gone;
  • run the regression suite in CI;
  • manage your team and API keys;
  • let a coding agent (Claude Code, Cursor) investigate a problem and leave a fix draft.

Install​

The CLI needs Python 3.10 or newer.

pip install zyonix-cli

This also installs zyonix-sdk, which provides the zyonix command itself (and the init and doctor commands). For the coding-agent MCP server, install the optional extra:

pip install "zyonix-cli[mcp]"
note

If your Zyonix contact gave you install files instead of a package index, use the install command that came with them. The commands on these pages are the same either way.

Check the installation:

zyonix --help

Point it at your Zyonix address​

Tell the CLI where your Zyonix deployment is. Use its https:// address.

export ZYONIX_ENDPOINT=https://zyonix.example.com
export ZYONIX_EGRESS_ALLOW=zyonix.example.com
Allow your Zyonix host

The CLI and SDK only send data to a local address (localhost, a private IP, a .local / .internal / .lan name) unless you allow the host. For a deployment under a public name, list it in ZYONIX_EGRESS_ALLOW (comma-separated host names, no https://, no port) or in egress_allow in zyonix.yaml. Without it every command stops with "endpoint host ... is not local and not listed in egress_allow".

A plain http:// address is refused for a public host (the key would travel unencrypted). If your deployment uses a private certificate authority, give the CA bundle:

export ZYONIX_CA_FILE=/path/to/zyonix-ca.pem

Where settings come from​

SettingOptionEnvironment variablezyonix.yaml key
Zyonix address--endpointZYONIX_ENDPOINTendpoint
API key--api-keyZYONIX_API_KEYnever (keys are not read from the file)
Private CA bundle--ca-fileZYONIX_CA_FILEca_file
Allowed hosts(none)ZYONIX_EGRESS_ALLOWegress_allow
Configuration file--configZYONIX_CONFIG(default: zyonix.yaml in the current folder)

An option beats the environment variable, which beats the file. Without any endpoint the CLI uses http://localhost:8000.

zyonix.yaml is the same file your application's SDK reads. The CLI uses it for the address, the CA file, the capture mode and redaction (for zyonix test and zyonix replay) and the replay: section. See Set up: init, doctor, import.

Sign in: people and API keys​

There are two kinds of credential.

A person's sign-in is for you at your own terminal. It uses your Zyonix email and password, the same account as the website:

zyonix auth login --email you@example.com

The CLI asks for your password with a hidden prompt (passwords are never accepted as options). If your account uses two-step sign-in, it then asks for the 6-digit code from your authenticator app; a recovery code works too. You can give the code up front with --code 123456. Two-step sign-in is set up on the website, because it needs the QR code.

The session is saved in your operating system's credential store (Windows Credential Manager, macOS Keychain, or the Linux secret service). On Linux or macOS without a secret service it falls back to a file readable only by you in the CLI state folder. One session is kept per Zyonix address. What you may do follows your role on the current agent: viewer, member or administrator.

An API key is for machines: CI, scripts and coding agents. Put it in ZYONIX_API_KEY (or pass --api-key). A key belongs to one agent.

export ZYONIX_API_KEY=zx_cli_xxxxxxxx

When both exist, the API key wins: --api-key, then ZYONIX_API_KEY, then your saved session.

What each credential may do​

CredentialReadsTests, replays, deploy records, feedbackFix previews (replay --local)Fix draftsDecisions (review, approve, checks, spec, golden set, Guard)Team and keys
Viewer (person)yesnonononono
Member (person)yesyesyesnonono
Administrator (person)yesyesyesyesyesyes
cli keyyesyesyesnonono
admin keyyesyesyesyesyesno
agent keyyesnoyesyesnono
sdk keynofeedback onlynononono
  • Team and keys (zyonix auth users, invite, access, reset-link, offboard, keys, ...) need an administrator's personal session. An admin API key is refused there.
  • sdk keys are for your application to send traces. They cannot read anything.
  • cli, sdk and agent keys are created by an administrator with zyonix auth keys --create. An admin key is issued by whoever runs your Zyonix deployment.
  • Give CI a cli key and coding agents an agent key. Keep decisions with people.

The pages that follow say for each command who may run it, using these words:

Who may run itMeans
Any readerviewer, member or administrator; or a cli, admin or agent key
Membermember or administrator; or a cli or admin key
Administratoradministrator; or an admin key
Administrator (session)an administrator signed in with zyonix auth login; no API key

The server makes the final decision. A refused request says which credential it needs, for example "this needs an admin key".

Choosing the agent​

Zyonix calls each monitored AI application an agent. Everything a command shows or changes belongs to one agent.

  • With an API key, the agent is the one the key was created for.
  • With your session, it is your current agent. List your agents and switch:
zyonix auth agents # every agent you work on; * marks the current one
zyonix auth use 7f3c9a # work on another one (id from the list)
zyonix auth whoami # who you are and which agent you are on

Output​

Every command prints plain text written for people. It follows a few rules you can rely on.

  • --json on every read. Add --json and stdout carries exactly one JSON document (the API's answer) and nothing else: no colour, no tables, no progress, no Next block. Use it in scripts. zyonix test, zyonix replay, zyonix deploy, zyonix import, zyonix doctor, zyonix golden import and zyonix summary --generate take --json too.
  • A Next block. Most outputs end with Next: the commands to run next, each with a short reason. The commands it recommends only read; when the next step is a decision your credential cannot make, it says which credential it needs.
  • Errors are one line on stderr, zyonix <command>: <reason>. Keys, passwords and tokens are removed from error messages first. Add --debug (or set ZYONIX_DEBUG=1) for a traceback on an unexpected error.
  • Colour only on an interactive terminal. Turn it off with --no-color or NO_COLOR=1; force it with ZYONIX_COLOR=always (for example for less -R). On a terminal, tables are fitted to the window; set ZYONIX_WIDTH=120 to fit them to a width in a pipe. The words never change between the two, so scripts that read the text keep working.
  • Times are the server's, in UTC.
  • Ids. Run ids are the first 12 characters shown in lists; any unique prefix works. Issues are numbered (ISS-3 is issue 3), drafts too (D-7 is draft 7).
  • Three levels of detail. Overviews (zyonix status, zyonix issues, zyonix runs) show one line per item. --detail (or zyonix issues show N) gives the three-part view: ERROR (what failed), ROOT CAUSE (why, and how sure), FIX (what is recommended and what is already done). --verbose (-v) prints every section, table and diagnostic. --json is the same API answer at every level.

A group on its own runs its main action: zyonix issues is zyonix issues list, zyonix runs --limit 5 is zyonix runs list --limit 5, zyonix spec is zyonix spec show.

Options every command takes​

Every command that talks to Zyonix accepts these options (in addition to its own):

OptionWhat it does
--config FILEthe zyonix.yaml to read (default: zyonix.yaml in the current folder, or ZYONIX_CONFIG)
--endpoint URLthe Zyonix address (default: ZYONIX_ENDPOINT, then zyonix.yaml)
--api-key KEYthe API key (default: ZYONIX_API_KEY, then your saved session)
--ca-file FILEa PEM CA bundle for a deployment with a private certificate authority (default: ZYONIX_CA_FILE)
--jsonprint the API's answer as JSON (on reads and the commands named above)
--no-colorplain text without colour (also before the command: zyonix --no-color status)
--debugprint a traceback (credentials removed) on an unexpected error
-h, --helpthe command's help

Exit codes​

CodeMeaning
0it worked
1a check failed: a regression (zyonix test), a failed verification (zyonix replay), a failed setup check (zyonix doctor, zyonix mcp --check), rejected records (zyonix import)
2it could not run: bad configuration or key, Zyonix unreachable, the server refused the request (an unknown issue, missing permission), or an unexpected error. Also a bare zyonix or zyonix fix without an action
3only zyonix replay --local: the preview is incomplete or unsupported. This is not a pass
130interrupted with Ctrl-C

An unexpected failure is always 2, never 1, so CI never mistakes a crash for a regression.

Finding every command​

zyonix --help # commands grouped by task
zyonix --help-all # every command and action, and what each kind of key may do
zyonix runs --help # the options of one command
zyonix runs show --help

The commands, by page​

PageCommands
Set up: init, doctor, importinit, doctor, import
Status and documentsstatus, summary, usage, history, runs list, runs show, findings
Problemsissues list, show, groups, context, report, reopen; prompts list, prompts diff
Review and feedbackreview list, show, confirm, reject, correct; feedback
Checks and the specchecks list, test, add, remove, mode; spec show, versions, push, redetect
Fixes, tests and replayfix suggest, propose, show, approve, reject, promote; replay; test; regression list, show, cases; golden list, add, import, remove
Deploys and monitoringdeploy, deploys, monitor status, monitor run; guard status, events, mode, kill, resume; jobs list, jobs retry
Team and keysauth signup, join, login, logout, whoami, change-password, agents, use, add-agent, invite, invites, cancel-invite, users, access, reset-link, offboard, keys
Coding agents and MCPinit --agent, mcp, drafts list, show, create, update, dismiss
Using the CLI in CItest in a pipeline, deploy from CD, JUnit, exit codes
Troubleshootingcommon errors and what to do