Complete command-line reference for the cloud CLI tool.
# Build from source
make build
# The binary will be in ./bin/cloud
./bin/cloud --help
# Add to PATH (optional)
export PATH=$PATH:$(pwd)/binAvailable for all commands:
| Flag | Short | Description | Example |
|---|---|---|---|
--api-key |
-k |
API key for authentication | -k thecloud_abc123... |
--tenant |
Tenant ID to use for requests | --tenant uuid |
|
--json |
-j |
Output in JSON format | -j |
--help |
-h |
Show command help | -h |
The CLI stores configuration in ~/.cloud/config.json:
{
"api_key": "thecloud_xxxxx"
}Register a new user account.
cloud auth register <email> <password> <name>Login with email and password to receive and save an API key.
cloud auth login-user <email> <password>Show current session information (user ID, email, role, default tenant).
cloud auth whoamiList your active API keys.
cloud auth list-keysRevoke an API key.
cloud auth revoke-key <id>Rotate an API key (replaces it with a new one).
cloud auth rotate-key <id>Create a demo user and save API key (development only).
cloud auth create-demo my-userList all organizations (tenants) you belong to.
cloud tenant listCreate a new organization.
cloud tenant create "My Org" my-orgSwitch your default tenant for future CLI operations.
cloud tenant switch <id>Manage compute instances (containers or VMs).
List all instances in the current tenant.
cloud instance list
cloud instance list --json # JSON outputStandard Output:
ID NAME IMAGE STATUS ACCESS
a1b2c3d4 my-server nginx:alpine RUNNING localhost:8080->80
Launch a new compute instance.
cloud instance launch --name my-server --image nginx:alpineFlags:
| Flag | Short | Required | Default | Description |
|---|---|---|---|---|
--name |
-n |
Yes | - | Instance name |
--image |
-i |
No | alpine |
Docker image or VM template |
--type |
-t |
No | basic-2 |
Instance type (e.g., basic-1, standard-1) |
--port |
-p |
No | - | Port mapping (host:container) |
--vpc |
-v |
No | - | VPC ID or name |
--subnet |
-s |
No | - | Subnet ID or name |
--volume |
-V |
No | - | Volume attachment (vol-id:/path) |
--ssh-key |
No | - | SSH Key ID to inject | |
--wait |
-w |
No | false |
Wait for instance to reach RUNNING state |
Examples:
# Basic instance
cloud instance launch --name web --image nginx:alpine --type basic-2 --wait
# With port mapping
cloud instance launch --name api --image node:20 --port 3000:3000 --type standard-1
# With VPC and Subnet
cloud instance launch --name db --image postgres:16 \
--vpc vpc-uuid \
--subnet subnet-uuidStop a running instance.
cloud instance stop my-serverView real-time instance logs.
cloud instance logs my-serverShow detailed instance information.
cloud instance show my-serverTerminate and remove an instance. (Alias: delete)
cloud instance rm my-serverShow real-time resource usage.
cloud instance stats my-serverRegister a public SSH key for use with instances.
cloud ssh-key register my-laptop ~/.ssh/id_rsa.pubList all registered SSH keys.
cloud ssh-key listManage persistent block storage.
List all volumes.
cloud volume listCreate a new volume.
cloud volume create --name my-data --size 10Flags:
| Flag | Short | Required | Default | Description |
|---|---|---|---|---|
--name |
-n |
Yes | - | Volume name |
--size |
-s |
No | 1 |
Size in GB |
Delete a volume. (Alias: delete)
cloud volume rm my-dataManage volume snapshots.
List all snapshots.
cloud snapshot listCreate a snapshot from a volume.
cloud snapshot create vol-uuid --desc "Backup before upgrade"Restore a snapshot to a new volume.
cloud snapshot restore snap-uuid --name restored-volDelete a snapshot. (Alias: delete)
cloud snapshot rm snap-uuidManage Virtual Private Clouds (network isolation).
List all VPCs.
cloud vpc listCreate a new VPC.
cloud vpc create my-network --cidr-block 10.0.0.0/16Show VPC details.
cloud vpc show my-networkDelete a VPC. (Alias: delete)
cloud vpc rm my-networkManage private connectivity between VPCs.
List all VPC peering connections.
cloud vpc-peering listInitiate a peering request between two VPCs.
cloud vpc-peering create --requester-vpc <vpc1-id> --accepter-vpc <vpc2-id>Accept a pending peering request.
cloud vpc-peering accept peering-uuidReject a pending peering request.
cloud vpc-peering reject peering-uuidDelete a peering connection. (Alias: delete)
cloud vpc-peering rm peering-uuidManage VPC subnets.
List all subnets in a VPC.
cloud subnet list vpc-uuidCreate a new subnet in a VPC.
cloud subnet create vpc-uuid my-private-subnet 10.0.1.0/24 --az us-east-1aDelete a subnet. (Alias: delete)
cloud subnet rm subnet-uuidList all security groups in a VPC.
cloud sg list --vpc-id <vpc-id>Get details and rules for a security group.
cloud sg get sg-uuidCreate a new security group.
cloud sg create my-sg --vpc-id vpc-uuid --description "Web servers"Delete a security group. (Alias: delete)
cloud sg rm sg-uuidAdd a rule to a security group.
cloud sg add-rule sg-uuid --direction ingress --protocol tcp --port-min 80 --port-max 80 --cidr 0.0.0.0/0Manage distributed object storage.
Make bucket (Create a new bucket). (Alias: create-bucket)
cloud storage mb my-bucket --publicRemove bucket. (Alias: delete-bucket)
cloud storage rb my-bucket --forceUpload a file to object storage.
cloud storage upload my-bucket ./local-file.txt --key remote-key.txtList all buckets, or objects within a specific bucket.
cloud storage list
cloud storage list my-bucketDownload an object.
cloud storage download my-bucket remote-key.txt ./local-file.txtDelete an object. (Alias: delete)
cloud storage rm my-bucket my-file.txtManage bucket lifecycle rules (expiration).
# List rules
cloud storage lifecycle list my-bucket
# Set expiration rule
cloud storage lifecycle set my-bucket --prefix logs/ --days 30
# Remove rule
cloud storage lifecycle rm my-bucket rule-uuidManage granular IAM policies.
List all platform IAM policies.
cloud iam listCreate a new policy from a JSON file.
cloud iam create ReadOnlyS3 ./policy.jsonAttach a policy to a user.
cloud iam attach user-uuid policy-uuidDetach a policy from a user.
cloud iam detach user-uuid policy-uuidList recent platform audit logs.
cloud audit list --limit 20Get billing summary for the current period.
cloud billing summaryList detailed usage records.
cloud billing usageManage managed databases.
List all database instances.
cloud db listCreate a new managed database.
cloud db create --name my-db --engine postgres --version 16Get database connection string.
cloud db connection db-uuidShow detailed database information.
cloud db show db-uuidDelete a database instance. (Alias: delete)
cloud db rm db-uuidManage managed Redis instances.
List all cache instances.
cloud cache listCreate a new Redis cache.
cloud cache create --name my-redis --memory 256 --waitDelete a cache instance. (Alias: delete)
cloud cache rm redis-uuidManage managed Kubernetes clusters.
List all Kubernetes clusters.
cloud k8s listCreate a new Kubernetes cluster.
cloud k8s create --name my-cluster --vpc vpc-uuid --ha --workers 3Get kubeconfig for a cluster.
cloud k8s kubeconfig cluster-uuid > kubeconfig.yamlDelete a Kubernetes cluster. (Alias: delete)
cloud k8s rm cluster-uuidManage API gateway routes.
List all registered routes.
cloud gateway list-routesCreate a new gateway route.
cloud gateway create-route my-api "/users/{id}" http://my-instance:8080 --strip --methods GET,POSTDelete a route. (Alias: delete)
cloud gateway rm-route route-uuidManage serverless functions.
List all functions.
cloud function listCreate a new function.
cloud function create --name my-func --runtime nodejs20 --code ./code.zip --handler index.handlerInvoke a function.
cloud function invoke my-func --payload '{"key":"value"}'Delete a function. (Alias: delete)
cloud function rm my-funcAll CLI table outputs truncate UUIDs to the first 8 characters for readability. You can use either the full UUID or the truncated version in commands.
Use --json (or -j) with any list/get command for programmatic integration:
cloud instance list --json | jq '.[].id'CLOUD_API_KEY: Default API key for all commands.CLOUD_TENANT_ID: Default tenant context.CLOUD_API_URL: Override API server URL.
Add to your shell config for faster access:
alias ci='cloud instance'
alias cv='cloud volume'
alias cdb='cloud db'0- Success1- General error2- Invalid arguments3- Authentication error4- Resource not found5- Permission denied