Skip to content

CLI Reference

prexorctl is the operator command-line for the PrexorCloud control plane. Every action available through the dashboard — and a handful that aren’t — is exposed as a subcommand here. The CLI talks to the controller’s REST API at /api/v1; auth state and the resolved controller URL live in ~/.config/prexorctl/config.json.

What you’ll learn

  • The global flags every subcommand inherits.
  • How the CLI is laid out into eight reference pages (one per surface).
  • Environment variables for headless / scripted use.
  • The exit-code contract for CI pipelines.

Global flags

These are inherited by every subcommand. They override config.json and PREXOR_* environment variables.

FlagShortDescription
--json-jEmit machine-readable JSON instead of the styled TUI. Implies --no-color.
--controller <url>-cOverride the configured controller URL (e.g. https://controller:8080).
--token <token>-tOverride the stored auth token.
--no-colorDisable ANSI colors. Auto-set when stdout isn’t a TTY.
--asciiUse ASCII glyphs only — no unicode box drawing or sparklines. For terminals without nerd-font / wide-char support.
--verbose-vPrint the underlying HTTP request and response.

Command map

PageCommands
Setup + Authsetup, login, logout, config, token
Clusternode, status, version
Group + Instancegroup, instance, crash
Templatestemplate
Users + Rolesuser, role
Modules + Pluginsmodule, plugin
Utilitieslogs, diagnostics, deploy, backup, restore, completion, scripting patterns

Environment variables

VariableEffect
PREXOR_OUTPUT=jsonSame as passing --json on every invocation.
PREXOR_CONTROLLERDefault controller URL. Equivalent to config set controller.
PREXOR_TOKENDefault auth token. Equivalent to config set token.

PREXOR_CONTROLLER and PREXOR_TOKEN are the supported way to drive the CLI from CI — they sidestep the on-disk config entirely.

Exit codes

CodeMeaning
0Success
1Generic error (validation, IO, parsing)
2Authentication failure (401)
3Authorization failure (403)
4Resource not found (404)
5Conflict / invalid state (409, 422)
6Network / unreachable controller

API-mapped codes (25) are derived from the controller’s HTTP response so scripts can branch on them without parsing JSON.

Next up

  • Setup + Auth — first contact with a fresh controller.
  • Cluster — node and version commands.
  • Utilities--output json patterns and CI snippets.