Skip to content

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

bash
pip install wayscloud-cli

Requires 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 AccountPersonal Access Tokens.

bash
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:

  1. --token flag (any command)
  2. WAYSCLOUD_TOKEN environment variable
  3. ~/.wayscloud/credentials file

Token scopes

Tokens have granular scopes that control what the CLI can do:

ScopeAccess
vps:read/writeList, create, start, stop, delete servers
dns:read/writeManage zones and records
storage:read/writeManage buckets and keys
database:read/writeManage databases
redis:read/writeManage Redis instances
app:read/writeManage apps and deployments
iot:read/writeManage IoT devices and groups
shell:connectConnect to CloudShell

By default, new tokens have read-only access. Enable write scopes explicitly when creating the token.


Commands

Account

bash
cloud login --token wayscloud_pat_xxx...
cloud whoami
cloud logout

VPS

bash
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-templates

DNS

bash
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> --confirm

Databases

bash
cloud db list
cloud db create mydb --type postgresql --tier standard
cloud db info postgresql mydb
cloud db delete postgresql mydb --confirm

Redis

bash
cloud redis list
cloud redis create myredis --plan redis-starter --region no
cloud redis info <id>
cloud redis delete <id> --confirm
cloud redis plans

Storage

bash
cloud storage buckets
cloud storage buckets-create my-bucket
cloud storage buckets-delete my-bucket --confirm
cloud storage credentials

Apps

bash
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> --confirm

IoT

bash
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> --confirm

Interactive Shell

bash
cloud shell connect

Opens 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).

bash
cloud vps list

JSON: Machine-readable output for scripting.

bash
cloud vps list --json
cloud --json db list

JSON contract:

  • List commands return arrays
  • Info commands return objects
  • Errors return {"error": "code", "code": 2, "message": "..."}

Global flags

FlagDescription
--jsonOutput as JSON
--no-colorDisable ANSI colors
--token <pat>Override saved token
--versionShow version

Exit codes

CodeMeaning
0Success
1Not found / usage error
2Authentication or permission error
3Network or server error

Scripting examples

List running servers as JSON and filter with jq:

bash
cloud vps list --json | jq '.[] | select(.status == "running") | .ipv4_address'

Create a database and capture credentials:

bash
cloud db create prod-db --type postgresql --tier standard --json | jq '.connection_string'

Use in CI/CD with environment variable:

bash
export WAYSCLOUD_TOKEN="wayscloud_pat_xxx..."
cloud app deploy app-abc --image ghcr.io/org/app:v2.1.0

Security

  • Bearer-only authentication — Tokens are sent as Authorization: Bearer headers, never in query strings
  • Credential protection~/.wayscloud/credentials is created with chmod 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

CLIPython SDKTerraform
Installpip install wayscloud-clipip install wayscloudRegistry provider
AuthPAT tokenPAT or API keyAPI key + PAT
Best forQuick management, CI/CDApplication integrationInfrastructure as code
OutputTables or JSONPython objectsHCL state

Next steps