Skip to main content

Team and keys: zyonix auth

zyonix auth covers your own account (sign up, sign in, sign out, password), your agents, and, for administrators, the team and the agent's API keys. It is the terminal side of the website's Account and Team pages.

  • Passwords are always read with a hidden prompt, never from an option, and never printed.
  • --json works on every auth command and never prints a session token.
  • Every auth command takes --config, --endpoint, --api-key, --ca-file, --no-color and --debug. Set ZYONIX_ENDPOINT (and ZYONIX_EGRESS_ALLOW, see the overview) before you sign in.
Website only

Setting up two-step sign-in (it needs the QR code), turning it off, requiring it for an agent, resetting someone's two-step sign-in, and the list of where you are signed in are on the website (Account and Team).

Your account​

zyonix auth login​

Sign in and save the session in the operating system's credential store.

zyonix auth login --email you@example.com
zyonix auth login --email you@example.com --code 123456
OptionWhat it does
--email EMAILyour email (asked when omitted)
--code CODEyour two-step code, or a recovery code (asked when the account needs one)

Who may run it: anyone with an account.

Output: Signed in as Asha Rao <you@example.com> (member). and where the session was saved. API keys (ZYONIX_API_KEY, --api-key) still take precedence over the session.

zyonix auth whoami​

Who the CLI is acting as.

zyonix auth whoami

Output: for a session, your name and email, then a line like this:

role=member project=7f3c9a auth=user-session

For an API key, project=7f3c9a auth=cli-api-key (or admin-api-key, agent-api-key, sdk-api-key).

zyonix auth logout​

Revoke your session on the server and remove it from this machine. It signs out your stored session even when ZYONIX_API_KEY is also set.

zyonix auth logout
zyonix auth logout --local
OptionWhat it does
--localonly remove the local credential; use it when the server is unreachable

Without a stored session it stops and suggests --local.

zyonix auth change-password​

Change your password. Asks for the current one, then the new one twice. Your other browser and CLI sessions are signed out.

zyonix auth change-password

zyonix auth signup​

Create your account: through an invitation, or with a new agent of your own where your Zyonix deployment allows open registration.

zyonix auth signup --invite-token <token>
zyonix auth signup --email you@example.com --name "Asha Rao" --agent "Invoice reader"
OptionWhat it does
--email EMAILyour email (asked when omitted)
--name NAMEyour display name (asked when omitted)
--agent NAMEthe name of your new agent (without an invitation)
--invite-token TOKENthe single-use invitation from an administrator

The password is asked twice. You are signed in afterwards. With a new agent, its SDK key is printed once: put it in your application's ZYONIX_API_KEY.

tip

Most people simply open the link in their invitation email on the website. Use signup when you got the invitation token itself.

zyonix auth join​

Accept an invitation to one more agent with the account you already have.

zyonix auth join --invite-token <token> --email you@example.com
OptionWhat it does
--invite-token TOKENthe single-use invitation (required)
--email EMAILyour email (asked when omitted)
--code CODEyour two-step code (asked when the account needs one)

One sign-in then works for all your agents.

Your agents​

These need a person's session (zyonix auth login), not an API key.

zyonix auth agents​

Every agent of your sign-in, with the last 7 days of each.

zyonix auth agents

How to read it: ID, NAME, ROLE (yours on that agent), DOCUMENTS, FAILED, PROBLEMS (open). A * marks the agent you are on.

zyonix auth use​

Work on another of your agents. Every command after this one acts on it.

zyonix auth use 7f3c9a
OptionWhat it does
AGENTthe agent id from zyonix auth agents

Output: Now on 7f3c9a (admin).

zyonix auth add-agent​

Add a new agent. You become its administrator, your session moves to it, and its SDK key is printed once.

zyonix auth add-agent "Receipt reader"
OptionWhat it does
NAMEwhat the agent is called

Who may run it: someone who administers at least one agent, where your deployment allows people to add agents (otherwise "agents are added by whoever runs this server").

Managing the team​

Who may run these: Administrator (session): an administrator of the current agent signed in with zyonix auth login. An admin API key is refused ("user administration needs a user admin session"). Changes apply to the agent you are on (zyonix auth use).

The roles:

RoleCan
viewerread everything on this agent
memberviewer, plus report problems on documents, give feedback, run tests and replays, record deploys
adminmember, plus every decision: review answers, fix approval, checks, spec, golden set, Guard, the team and the keys

zyonix auth invite​

Invite a teammate.

zyonix auth invite --email teammate@example.com
zyonix auth invite --email lead@example.com --role admin
OptionDefaultWhat it does
--email EMAIL(required)their email
--rolememberadmin, member or viewer

Output: if your deployment sends email, Invitation emailed to teammate@example.com (member); expires .... Otherwise the invitation token is printed once: send it only to that person. They run zyonix auth signup --invite-token ... (or join if they already have an account). An invitation works once and expires after 3 days.

zyonix auth invites​

The invitations: ID, EMAIL, ROLE, EXPIRES, STATE (pending, accepted, expired).

zyonix auth invites

zyonix auth cancel-invite​

Cancel an open invitation.

zyonix auth cancel-invite 5
OptionWhat it does
INVITEthe invitation id from zyonix auth invites

zyonix auth users​

The people of this agent: ID, NAME, EMAIL, ROLE, STATE (active or disabled). Use the ID in the commands below.

zyonix auth users

zyonix auth access​

Change a person's role, or disable or enable them on this agent.

zyonix auth access 12 --role viewer
zyonix auth access 12 --disable
zyonix auth access 12 --enable --role member
OptionWhat it does
USERthe user id from zyonix auth users
--roleadmin, member or viewer
--disableremove their access to this agent and end their sessions
--enablegive it back

Give at least one of --role, --disable, --enable (--disable and --enable exclude each other). A role change takes effect on their next request.

Output: teammate@example.com: viewer, active. or ..., disabled, all sessions ended.

Create a one-time link to set a password, for someone who forgot theirs.

zyonix auth reset-link 12
OptionWhat it does
USERthe user id from zyonix auth users

Output: if your deployment sends email, the link is emailed to them. Otherwise the link is printed once: send it only to that person, because whoever opens it chooses the password. If they also work on an agent you do not administer, you cannot do this for them; ask whoever runs your Zyonix deployment.

zyonix auth offboard​

Someone leaves. At once, they lose every agent you administer and are signed out everywhere, and the invitations they sent and password links they made stop working. If they have no agent left, they can no longer sign in.

zyonix auth offboard 12
OptionWhat it does
USERthe user id from zyonix auth users

Output: the agents they were removed from, how many agents you do not administer they are still on, and every API key they created with the time it stops working (24 hours later).

Rotate their keys

A key they created may be the one your live application sends with, so it keeps working for 24 hours. Within that time, rotate each listed key (zyonix auth keys --rotate ID) and put the new key in your application. Rotate any other key they had a copy of too.

Only stepping away for a while? Use zyonix auth access ID --disable instead.

zyonix auth keys​

This agent's API keys: list, create, rotate, revoke.

zyonix auth keys # list
zyonix auth keys --create cli # a new key, printed once
zyonix auth keys --rotate 8 # a new key; the old one works 24 more hours
zyonix auth keys --rotate 8 --grace-hours 0
zyonix auth keys --revoke 8 # stops working within 30 seconds
OptionDefaultWhat it does
(none)list the keys: ID, KEY (its public prefix), KIND, CREATED, STATE (active, stops <time>, revoked)
--create KINDcreate a key: sdk (your application), cli (a developer's or CI's zyonix commands) or agent (a coding agent)
--rotate IDreplace this key with a new one
--grace-hours H24with --rotate: how long the old key keeps working, 0 to 168
--revoke IDstop this key working (within 30 seconds); use it when a key may have leaked

Give at most one of --create, --rotate, --revoke.

Output: a new key is printed once (New key (shown once): then the key). Store it in a secret manager; Zyonix keeps only a hash. admin keys cannot be created here; they come from whoever runs your Zyonix deployment.