WAYSCloud CLI (cloud)
Command-line interface for WAYSCloud platform services. Published on PyPI as wayscloud-cli, installs the cloud binary.
Overview
| Item | Value |
|---|---|
| Binary | cloud |
| Package | wayscloud-cli |
| PyPI | https://pypi.org/project/wayscloud-cli/ |
| Version | 0.1.1 |
| Python | >= 3.9 |
| Config dir | ~/.wayscloud/ |
| Auth | PAT (Personal Access Token) |
| API | https://api.wayscloud.services |
Installation
pip install wayscloud-cliRequires Python 3.9+. Dependencies (wayscloud SDK, typer, rich, websockets) are installed automatically.
Authentication
CLI uses Personal Access Tokens (PAT) created in the portal under Account > Personal Access Tokens.
Token Resolution Order
--token <pat>flag (highest priority)WAYSCLOUD_TOKENenvironment variable~/.wayscloud/credentialsfile (saved bycloud login)
Login
cloud login --token wayscloud_pat_xxx...Token is validated against the API before saving. Invalid tokens are rejected with exit code 2.
Credentials File
Saved at ~/.wayscloud/credentials with chmod 600:
{
"version": 1,
"token": "wayscloud_pat_...",
"created_at": "2026-03-24T10:00:00Z"
}Commands
Authentication
| Command | Description |
|---|---|
cloud login --token <pat> | Save token (validated first) |
cloud logout | Remove saved token |
cloud whoami | Show current identity |
VPS
cloud vps list
cloud vps create --hostname web01 --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> --confirmDatabase
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 <name|id>
cloud app deploy <id> --image ghcr.io/org/app:latest
cloud app deploy repo <id> --git-url https://github.com/user/repo
cloud app deploy repo <id> --git-url https://github.com/user/repo --branch main
cloud app deploy repo <id> --git-url https://github.com/user/repo --dockerfile-file ./Dockerfile
cloud app auto-deploy github get <name|id>
cloud app auto-deploy github set <name|id> --repo-url https://github.com/org/repo --enable
cloud app auto-deploy github disable <name|id>
cloud app start <id>
cloud app stop <id>
cloud app delete <id> --confirmRepo deploy clones a Git repository and builds a container. A Dockerfile is optional — the platform auto-detects Node.js, Python, and static sites. Use --dockerfile-file to provide a custom Dockerfile for unsupported runtimes.
App Info
Show detailed information about an application, including status, plan, region, URL, and current revision.
cloud app info 7a2f1b3c # by ID
cloud app info my-app # by name
cloud app info my-app --json # JSON output for scriptingEnvironment Variables
Manage runtime environment variables. Changes require a redeploy to take effect.
List variables:
cloud app env list <id>
cloud app env list my-app --jsonSet one or more variables:
cloud app env set <id> DATABASE_URL=postgres://localhost/mydb
cloud app env set <id> DB_HOST=localhost DB_PORT=5432 DB_NAME=mydbRemove variables:
cloud app env unset <id> DATABASE_URL
cloud app env unset <id> DB_HOST DB_PORT DB_NAMEImport from a .env file:
cloud app env import <id> --file .env
cloud app env import <id> --file .env --mode skip-existing
cloud app env import <id> --file .env --mode replace-allImport modes: replace-matching (default — updates matching keys, keeps others), skip-existing (only adds new keys), replace-all (deletes all existing variables and imports the file).
IoT
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 connectConnects via WebSocket to wss://shell.wayscloud.services/ws. Requires shell:connect scope on the PAT.
Global Flags
| Flag | Description |
|---|---|
--json | Output as JSON |
--no-color | Disable ANSI colors |
--token <pat> | Override saved token |
--version | Show version |
Output Formats
Table (default)
Human-readable tables using the Rich library.
JSON (--json)
- List commands return JSON arrays
- Info commands return single objects
- Errors return
{"error": "<code>", "code": <int>, "message": "<text>"}
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Not found / usage error |
| 2 | Authentication / scope error |
| 3 | Network / server error |
Scope Model
CLI tokens default to read-only. Write and shell access are opt-in.
Default (read-only)
account:read, services:read, billing:read, vps:read, storage:read, dns:read, app:read, database:read, redis:read
Opt-in (write)
vps:write, storage:write, dns:write, app:write, app:deploy, database:write, redis:write
Opt-in (shell)
shell:connect