Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CLI reference

Every command runs in the context of the active project (see cps project use) and requires login (cps login). The global --json flag emits machine-readable JSON instead of tables.

Environment overrides config: CPS_API_URL, CPS_TOKEN, CPS_PROJECT_ID.

Authentication & context

CommandPurpose
cps login --token <t>Save the token and API URL to config.
cps whoamiShow the current user/org.
cps versionCLI version.
cps project listProjects in your org.
cps project use <prj_id>Make a project active.
cps project create <name>Create a project.

Machines

cps new <image> --name <n> [--start] [--wait] [options]
FlagDefaultDescription
--cpu <n>1vCPUs.
--ram <n>512 (MiB)Memory; accepts 2G, 512M.
--disk <n>4Disk in GiB.
--ttl <d>24hLifetime; 0 means persistent. Accepts 2h, 30m, 7d.
--ssh-key <path>—Public key to inject.
--region <r>—Preferred region/host.
--require <label>—Required host labels (repeatable).
--start—Start right after create.
--wait—Block until ready.
CommandPurpose
cps ps [--all]List machines (--all includes deleted).
cps status <m>Detailed machine status.
cps start <m> / cps stop <m>Start / stop.
cps rm <m> --yesDelete a machine.
cps wait <m> --timeout <s>Block until ready.
cps clone <src> --name <n> [--start] [--wait]Clone a machine.
cps console <m>Attach to the serial console.

Access & files

CommandPurpose
cps ssh <m> [--identity <key>] [-- <cmd>]Root shell over SSH (via tunnel); with a command, run and exit.
cps exec <m> [--timeout <s>] -- <cmd>One-off command, returns stdout/stderr.
cps cp [--recursive] <src> <dst>Copy files (m:/path is a path inside the machine).
cps ssh-proxy <project> <m>Print a ProxyCommand for native ssh/scp.

Publishing ports (ingress)

CommandPurpose
cps expose <m> <port>Public HTTPS URL to an internal port; prints https://rte-….cps.run.
cps routesActive routes.
cps unexpose <selector>Remove a route.

Snapshots & backups

The machine must be stopped. A snapshot is a fast restore point; a backup is a durable copy in S3 (portable across hosts).

CommandPurpose
cps snapshot create <m> --name <n> [--wait]Take a snapshot.
cps snapshot list [<m>]List snapshots.
cps snapshot show <snap>Details.
cps snapshot restore <snap> --name <n> [--start] [--wait]Restore into a new machine.
cps snapshot rm <snap> [--yes]Delete.
cps backup create <m> --name <n> [--wait]Create a backup.
cps backup list [<m>] / show <b> / restore <b> … / rm <b> [--yes]Manage backups.

Metrics

CommandPurpose
cps metrics <m>Current CPU / memory.
cps metrics <m> --history [--window <s>]History over a window (from ClickHouse).
cps operationsRecent async operations in the project.

Secrets

Project secrets are encrypted at rest and available to the project’s machines.

CommandPurpose
cps secret set KEY=VALUE …Set secrets.
cps secret listSecret names (no values).
cps secret rm <name>Delete.

Tokens

CommandPurpose
cps token create [--name <n>] [--ttl <d>]Issue a token (the secret is shown once).
cps token listYour tokens.
cps token rm <token_id>Revoke.

Images

An image registry backed by S3; hosts pull an image on demand (see also the API).

CommandPurpose
cps image push <id> --kernel <vmlinux> --rootfs <ext4> [--name] [--version] [--arch] [--boot-args]Upload and register an image.
cps image listAvailable images.
cps image rm <id> [--yes]Remove an image from the registry and S3.

Administration

Requires an admin token. Not available to regular users.

CommandPurpose
cps admin org create <name> --cpu --ram --disk --max-machinesCreate an org with a quota (auto-creates a default project).
cps admin org list / usage <org>List orgs / consumption vs quota.
cps admin org quota set <org> …Change a quota.
cps admin user create <org> --name [--email] / user rm <user>Users.
cps admin token issue <org> <user> [--name] [--ttl]Issue a user token.
cps admin hosts / cps admin host <inspect|drain|cordon|uncordon|tag> <host>Fleet management.