Admin and Other Commands
Alerts, sessions, user administration, API keys, and a couple of commands for checking things are working.
termix alerts
Your alerts. See Alerts.
termix alerts # list your alerts, newest first
termix alerts --unread # only unread ones
termix alerts --limit 10
termix alerts dismiss <id> # mark as read
termix alerts undismiss <id> # mark as unread again
termix alerts delete <id> # remove it from your inbox
termix sessions
Your own logged-in sessions across every device.
termix sessions # list
termix sessions revoke <id>
termix sessions revoke-all
revoke-all signs out every session including the one you are using, so your next command will ask you to log in again. Use it if you think an account is compromised.
termix status
Whether your hosts are up.
termix status # every host
termix status 3 # one host
Shows each host's status and when it was last checked. Good for a quick look without opening the dashboard.
termix version
termix version
Prints the CLI version, the server you are pointed at, whether that server is reachable, its version and how many plugins it is running. This is the first thing to run when something is not working.
termix whoami
termix whoami
Shows who you are signed in as, your server, whether you are an admin, and whether you authenticated with a login or an API key.
Admin commands
These need an admin account, or a role with the matching permission, like Helpdesk or Auditor.
List users
termix users
termix users list
termix users list --status pending
--status takes active, disabled or pending (waiting for approval).
Turn accounts off and on
termix users disable <userId>
termix users enable <userId>
disable signs the user out everywhere and stops their sign ins and API keys. enable turns the account back on, or approves one waiting for approval. See users.
Invite links
termix users invites
termix users invites create --note "New ops hire" --role 3 --hours 168
termix users invites revoke <id>
| Option | What it does |
|---|---|
--note <text> | Who the link is for |
--role <id> | A role the new account gets. Repeat for more roles |
--uses <n> | How many accounts the link can make. Default 1 |
--hours <n> | Hours until the link ends. Default 72 |
--admin | Make the new account an admin. Admins only |
create prints the token once. The link is your server's address with ?invite=<token>. See invite links.
Access review
termix access-review
termix access-review --kind host --user <userId>
termix access-review --csv > shares.csv
| Option | What it does |
|---|---|
--kind <kind> | Only host, folder or credential |
--user <id> | Shares this user has or owns |
--role <id> | Shares given to this role |
--csv | Print the whole list as CSV |
See access review.
Audit logs
termix audit-logs
termix audit-logs --limit 50
termix audit-logs --action login
termix audit-logs --user <userId>
| Option | What it does |
|---|---|
--limit <n> | How many entries to return |
--action <action> | Only this kind of action |
--user <userId> | Only actions by this user |
API keys
termix api-keys # list
termix api-keys create --name "CI deploy" --user <userId>
termix api-keys create --name "CI deploy" --user <userId> --expires-at 2027-01-01
termix api-keys revoke <keyId>
| Option | What it does |
|---|---|
--name <name> | Name for the key. Required |
--user <userId> | The user the key acts as. Required |
--expires-at <date> | Expiry date. Leave off for the server's default, 90 days |
--never-expires | Make a key that never expires |
--scope <scope> | read, actions-read, actions-run or full. Leave off for read only |
The key is printed once when you create it and cannot be shown again. Copy it straight away. If you lose it, revoke it and make another.
Give a key an expiry date where you can, and one per system rather than one shared everywhere, so you can revoke a single one without breaking everything else.
See API Keys.
When a command does not work
| Exit code | What to try |
|---|---|
| 3 | Run termix login again |
| 4 | Your account cannot do this, or the command needs an admin |
| 5 | Check the id is right |
| 6 | Check the server address with termix version |
| 7 | Unlock your data in the web app |
| 8 | Ask an admin to install or turn on the plugin it names |