Skip to content

WAYSCloud CLI (cloud)

Command-line interface for WAYSCloud platform services. Published on PyPI as wayscloud-cli, installs the cloud binary.

Overview

ItemValue
Binarycloud
Packagewayscloud-cli
PyPIhttps://pypi.org/project/wayscloud-cli/
Version0.1.1
Python>= 3.9
Config dir~/.wayscloud/
AuthPAT (Personal Access Token)
APIhttps://api.wayscloud.services

Installation

bash
pip install wayscloud-cli

Requires 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

  1. --token <pat> flag (highest priority)
  2. WAYSCLOUD_TOKEN environment variable
  3. ~/.wayscloud/credentials file (saved by cloud login)

Login

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

json
{
  "version": 1,
  "token": "wayscloud_pat_...",
  "created_at": "2026-03-24T10:00:00Z"
}

Commands

Authentication

CommandDescription
cloud login --token <pat>Save token (validated first)
cloud logoutRemove saved token
cloud whoamiShow current identity

VPS

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

Database

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

Repo 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.

bash
cloud app info 7a2f1b3c          # by ID
cloud app info my-app             # by name
cloud app info my-app --json      # JSON output for scripting

Environment Variables

Manage runtime environment variables. Changes require a redeploy to take effect.

List variables:

bash
cloud app env list <id>
cloud app env list my-app --json

Set one or more variables:

bash
cloud app env set <id> DATABASE_URL=postgres://localhost/mydb
cloud app env set <id> DB_HOST=localhost DB_PORT=5432 DB_NAME=mydb

Remove variables:

bash
cloud app env unset <id> DATABASE_URL
cloud app env unset <id> DB_HOST DB_PORT DB_NAME

Import from a .env file:

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

Import 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

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

Connects via WebSocket to wss://shell.wayscloud.services/ws. Requires shell:connect scope on the PAT.

Global Flags

FlagDescription
--jsonOutput as JSON
--no-colorDisable ANSI colors
--token <pat>Override saved token
--versionShow 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

CodeMeaning
0Success
1Not found / usage error
2Authentication / scope error
3Network / 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