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]"
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
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
| Setting | Option | Environment variable | zyonix.yaml key |
|---|---|---|---|
| Zyonix address | --endpoint | ZYONIX_ENDPOINT | endpoint |
| API key | --api-key | ZYONIX_API_KEY | never (keys are not read from the file) |
| Private CA bundle | --ca-file | ZYONIX_CA_FILE | ca_file |
| Allowed hosts | (none) | ZYONIX_EGRESS_ALLOW | egress_allow |
| Configuration file | --config | ZYONIX_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
| Credential | Reads | Tests, replays, deploy records, feedback | Fix previews (replay --local) | Fix drafts | Decisions (review, approve, checks, spec, golden set, Guard) | Team and keys |
|---|---|---|---|---|---|---|
| Viewer (person) | yes | no | no | no | no | no |
| Member (person) | yes | yes | yes | no | no | no |
| Administrator (person) | yes | yes | yes | yes | yes | yes |
cli key | yes | yes | yes | no | no | no |
admin key | yes | yes | yes | yes | yes | no |
agent key | yes | no | yes | yes | no | no |
sdk key | no | feedback only | no | no | no | no |
- Team and keys (
zyonix auth users,invite,access,reset-link,offboard,keys, ...) need an administrator's personal session. AnadminAPI key is refused there. sdkkeys are for your application to send traces. They cannot read anything.cli,sdkandagentkeys are created by an administrator withzyonix auth keys --create. Anadminkey is issued by whoever runs your Zyonix deployment.- Give CI a
clikey and coding agents anagentkey. Keep decisions with people.
The pages that follow say for each command who may run it, using these words:
| Who may run it | Means |
|---|---|
| Any reader | viewer, member or administrator; or a cli, admin or agent key |
| Member | member or administrator; or a cli or admin key |
| Administrator | administrator; 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.
--jsonon every read. Add--jsonand 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 importandzyonix summary --generatetake--jsontoo.- 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 setZYONIX_DEBUG=1) for a traceback on an unexpected error. - Colour only on an interactive terminal. Turn it off with
--no-colororNO_COLOR=1; force it withZYONIX_COLOR=always(for example forless -R). On a terminal, tables are fitted to the window; setZYONIX_WIDTH=120to 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-3is issue3), drafts too (D-7is draft7). - Three levels of detail. Overviews (
zyonix status,zyonix issues,zyonix runs) show one line per item.--detail(orzyonix 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.--jsonis 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):
| Option | What it does |
|---|---|
--config FILE | the zyonix.yaml to read (default: zyonix.yaml in the current folder, or ZYONIX_CONFIG) |
--endpoint URL | the Zyonix address (default: ZYONIX_ENDPOINT, then zyonix.yaml) |
--api-key KEY | the API key (default: ZYONIX_API_KEY, then your saved session) |
--ca-file FILE | a PEM CA bundle for a deployment with a private certificate authority (default: ZYONIX_CA_FILE) |
--json | print the API's answer as JSON (on reads and the commands named above) |
--no-color | plain text without colour (also before the command: zyonix --no-color status) |
--debug | print a traceback (credentials removed) on an unexpected error |
-h, --help | the command's help |
Exit codes
| Code | Meaning |
|---|---|
0 | it worked |
1 | a check failed: a regression (zyonix test), a failed verification (zyonix replay), a failed setup check (zyonix doctor, zyonix mcp --check), rejected records (zyonix import) |
2 | it 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 |
3 | only zyonix replay --local: the preview is incomplete or unsupported. This is not a pass |
130 | interrupted 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
| Page | Commands |
|---|---|
| Set up: init, doctor, import | init, doctor, import |
| Status and documents | status, summary, usage, history, runs list, runs show, findings |
| Problems | issues list, show, groups, context, report, reopen; prompts list, prompts diff |
| Review and feedback | review list, show, confirm, reject, correct; feedback |
| Checks and the spec | checks list, test, add, remove, mode; spec show, versions, push, redetect |
| Fixes, tests and replay | fix suggest, propose, show, approve, reject, promote; replay; test; regression list, show, cases; golden list, add, import, remove |
| Deploys and monitoring | deploy, deploys, monitor status, monitor run; guard status, events, mode, kill, resume; jobs list, jobs retry |
| Team and keys | auth signup, join, login, logout, whoami, change-password, agents, use, add-agent, invite, invites, cancel-invite, users, access, reset-link, offboard, keys |
| Coding agents and MCP | init --agent, mcp, drafts list, show, create, update, dismiss |
| Using the CLI in CI | test in a pipeline, deploy from CD, JUnit, exit codes |
| Troubleshooting | common errors and what to do |