The cloud CLI
One binary for Linux, macOS and Windows. It talks to the same API the console uses, so anything you can do in the dashboard you can script.
Install
# Linux and macOS
curl -fsSL https://cloud.co.zm/install.sh | sh
# Windows: download cloud_*_windows_*.zip from the releases page and put cloud.exe on your PATH Releases: github.com/swiftcloud-platform/cli/releases.
The installer verifies the download's checksum before installing. cloud version prints what you have; cloud update fetches the latest.
Sign in
cloud login The terminal shows a short code and opens a page where you are already signed in; check the code matches and approve. It works over SSH — open the URL on any device. The CLI gets an ordinary seven-day session; no password touches the terminal.
For CI, use an API token instead:
echo "$TOKEN" | cloud login --token-stdin # or simply export CLOUD_TOKEN=...
cloud whoami # who, which API, which organisation, when the credential expires
cloud logout Organisation, region, contexts
Commands act in an organisation. Pick a default once:
cloud org list
cloud org use acme
cloud region list A context bundles an API URL, an organisation and a default region under a name, so production and a staging or local platform can coexist:
cloud context set prod --org acme --region zm-lusaka-central-1 --use
cloud context list
cloud context use prod Precedence, highest first: flags (--org, --region, --api-url) → environment
(CLOUD_ORG, CLOUD_REGION, CLOUD_API_URL, CLOUD_TOKEN) → current context →
built-in defaults. Credentials are stored per API host, so signing in to one does not disturb another.
Reading the commands
Every command reads cloud <resource> <verb> [name] [flags]. The name comes first, flags after: cloud app domain add web shop.example.com. --help on any command lists its arguments, flags and examples.
Apps
cloud app list
cloud app create <name> --image <ref> [--port 8080] [--min 0] [--max 3] [--size <tier>]
[--env KEY=VALUE ...] [--region <name>] [--wait]
cloud app get <name>
cloud app deploy <name> --image <ref> [--wait]
cloud app scale <name> --min N --max N
cloud app logs <name> [-f] [--tail 200]
cloud app delete <name> [--yes]
cloud app domain list <name>
cloud app domain add <name> <hostname>
cloud app domain remove <name> <hostname> Private registries: --registry-server, --registry-username and --registry-password-stdin together; the password is read from stdin, never from the command line.
Databases
cloud db engines
cloud db list
cloud db create <name> --engine postgresql|mariadb [--version 17] [--size <tier>] [--wait]
cloud db get <name>
cloud db credentials <name> [--format env|url]
cloud db start|stop|restart <name>
cloud db logs <name> [-f]
cloud db backup enable <name> [--retention 3d]
cloud db backup create <name>
cloud db backup list <name>
cloud db restore <name> --to <new-name> [--at 2026-09-04T10:15:00Z]
cloud db delete <name> [--yes] Object storage
cloud storage bucket list
cloud storage bucket create <name> [--region <name>]
cloud storage bucket get <name>
cloud storage bucket credentials <name> --format env|aws-profile|rclone
cloud storage bucket delete <name> [--yes]
cloud storage ls [s3://bucket[/prefix]] [--recursive]
cloud storage cp <src> <dst> [--recursive] # local ↔ s3://, s3:// ↔ s3://
cloud storage sync <src> <dst> [--delete] [--dry-run]
cloud storage mv | rm | cat | stat
cloud storage presign s3://bucket/key [--method GET|PUT] [--expires 1h] Object operations talk directly to the storage endpoint with the bucket's credentials; bytes never pass through the platform.
Output and scripting
--output table|json|yaml(-o) on every command; JSON is the full resource.--quiet(-q) prints identifiers only, one per line — for piping.--waiton create and deploy polls until the resource isready,stoppedorfailed, printing each status change. If nothing changes because the platform's worker is not running, it says so instead of timing out silently.- Destructive commands ask you to type the name;
--yesskips the prompt. Without a terminal and without--yes, they refuse.
Exit codes
| Code | Meaning |
|---|---|
0 | success |
1 | the operation failed (network, or the platform reported an error) |
2 | usage: bad flags, invalid input, or a conflict such as a name already taken |
3 | not signed in, or the credential was rejected or has expired |
4 | signed in, but your role does not allow this |
5 | the resource does not exist (or belongs to another organisation) |
Error messages are the platform's own sentences, so what the CLI prints is what the console would have shown.