WAYSCloud CLI
The official command-line tool for managing WAYSCloud resources. Manage servers, DNS, databases, storage, apps, IoT devices, Redis, and access the interactive CloudShell — all from your terminal.
Install
pip install wayscloud-cliRequires Python 3.9+. Installs the cloud binary. Built on the WAYSCloud Python SDK.
Authenticate
The CLI uses Personal Access Tokens (PAT) for authentication. Create a token in the dashboard under Account → Personal Access Tokens.
cloud login --token wayscloud_pat_xxx...The token is validated against the API before being saved. Credentials are stored in ~/.wayscloud/credentials with chmod 600.
Token resolution priority:
--tokenflag (any command)WAYSCLOUD_TOKENenvironment variable~/.wayscloud/credentialsfile
Token scopes
Tokens have granular scopes that control what the CLI can do:
| Scope | Access |
|---|---|
vps:read/write | List, create, start, stop, delete servers |
dns:read/write | Manage zones and records |
storage:read/write | Manage buckets and keys |
database:read/write | Manage databases |
redis:read/write | Manage Redis instances |
app:read/write | Manage apps and deployments |
iot:read/write | Manage IoT devices and groups |
shell:connect | Connect to CloudShell |
By default, new tokens have read-only access. Enable write scopes explicitly when creating the token.
Commands
Account
cloud login --token wayscloud_pat_xxx...
cloud whoami
cloud logoutVPS
cloud vps list
cloud vps create --hostname web01.example.com --plan vps-medium --region no --os ubuntu-24.04
cloud vps info <id>
cloud vps delete <id> --confirm
cloud vps start <id>
cloud vps stop <id>
cloud vps reboot <id>
cloud vps plans
cloud vps os-templatesDNS
cloud dns zones
cloud dns zones-create example.com
cloud dns zones-delete example.com --confirm
cloud dns records example.com
cloud dns records-create example.com --type A --name www --value 192.0.2.1
cloud dns records-update example.com <record-id> --value 192.0.2.2
cloud dns records-delete example.com <record-id> --confirmDatabases
cloud db list
cloud db create mydb --type postgresql --tier standard
cloud db info postgresql mydb
cloud db delete postgresql mydb --confirmRedis
cloud redis list
cloud redis create myredis --plan redis-starter --region no
cloud redis info <id>
cloud redis delete <id> --confirm
cloud redis plansStorage
cloud storage buckets
cloud storage buckets-create my-bucket
cloud storage buckets-delete my-bucket --confirm
cloud storage credentialsApps
cloud app list
cloud app create my-app --plan app-basic --region eu
cloud app info <id>
cloud app deploy <id> --image ghcr.io/org/app:latest
cloud app start <id>
cloud app stop <id>
cloud app delete <id> --confirmIoT
cloud iot devices
cloud iot devices-create --device-id sensor-01 --name "Temperature Sensor"
cloud iot devices-info <device-id>
cloud iot devices-delete <device-id> --confirm
cloud iot groups
cloud iot groups-create --name "Floor 2"
cloud iot groups-delete <group-id> --confirmInteractive Shell
cloud shell connectOpens a WebSocket connection to CloudShell, giving you interactive access to all services. Requires the shell:connect scope.
Output formats
Default: Human-readable tables with colors (Rich library).
cloud vps listJSON: Machine-readable output for scripting.
cloud vps list --json
cloud --json db listJSON contract:
- List commands return arrays
- Info commands return objects
- Errors return
{"error": "code", "code": 2, "message": "..."}
Global flags
| Flag | Description |
|---|---|
--json | Output as JSON |
--no-color | Disable ANSI colors |
--token <pat> | Override saved token |
--version | Show version |
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Not found / usage error |
2 | Authentication or permission error |
3 | Network or server error |
Scripting examples
List running servers as JSON and filter with jq:
cloud vps list --json | jq '.[] | select(.status == "running") | .ipv4_address'Create a database and capture credentials:
cloud db create prod-db --type postgresql --tier standard --json | jq '.connection_string'Use in CI/CD with environment variable:
export WAYSCLOUD_TOKEN="wayscloud_pat_xxx..."
cloud app deploy app-abc --image ghcr.io/org/app:v2.1.0Security
- Bearer-only authentication — Tokens are sent as
Authorization: Bearerheaders, never in query strings - Credential protection —
~/.wayscloud/credentialsis created withchmod 600 - Scope enforcement — Every API call validates scopes. Read-only tokens cannot perform write operations
- Audit logging — All CLI actions are logged with token ID, customer ID, and IP address
CLI vs SDK vs Terraform
| CLI | Python SDK | Terraform | |
|---|---|---|---|
| Install | pip install wayscloud-cli | pip install wayscloud | Registry provider |
| Auth | PAT token | PAT or API key | API key + PAT |
| Best for | Quick management, CI/CD | Application integration | Infrastructure as code |
| Output | Tables or JSON | Python objects | HCL state |
Next steps
- Python SDK — programmatic access from Python
- Terraform Provider — infrastructure as code
- CloudShell — interactive browser shell
- Authentication — PAT and API key details