CLI Quickstart
CLI Quickstart
Section titled “CLI Quickstart”Get authenticated and manage your first resource from the terminal.
This quickstart uses CLI v1.0.1. Install or upgrade with the installation guide.
Step 1: Authenticate
Section titled “Step 1: Authenticate”zcp profile addYou’ll be prompted for:
- Profile name (e.g.,
default) - Bearer token: get this from the portal under Profile → API Tokens
- API URL:
https://api.zcp.zsoftly.ca/api - Default region (e.g.,
yow-1) and default project (e.g.,default-9)
The default region and project are saved to the profile and used by every region/project-scoped
command, so you don’t have to pass --region/--project each time (like aws configure).
Verify authentication:
zcp auth validateStep 2: Explore
Section titled “Step 2: Explore”# List available regionszcp region list
# List available planszcp plan vmzcp plan storagezcp plan networkzcp storage-category list
# List your projectszcp project listStep 3: Create a VM
Section titled “Step 3: Create a VM”# List available templates (OS images)zcp template list --region yow-1
# Create an instancezcp instance create \ --name my-server \ --template "<template-slug>" \ --plan "<compute-plan-slug>" \ --blockstorage-plan "<root-storage-plan-slug>" \ --root-disk-size 100 \ --network-plan "<network-plan-slug>" \ --storage-category "<storage-category-slug>" \ --billing-cycle hourlyStep 4: Manage it
Section titled “Step 4: Manage it”# List your instanceszcp instance list
# Get instance detailszcp instance get my-server
# Power offzcp instance stop my-server
# Rebootzcp instance reboot my-server
# Deletezcp instance delete my-serverOutput formats
Section titled “Output formats”# JSON output (great for scripting)zcp instance list --output json
# YAML outputzcp instance list --output yaml
# Pipe to jqzcp instance list -o json | jq '.[].name'CI/CD usage
Section titled “CI/CD usage”# Use environment variables with no config fileexport ZCP_BEARER_TOKEN="your-token"export ZCP_API_URL="https://api.zcp.zsoftly.ca/api"export ZCP_PROJECT="default"
zcp instance list -o jsonSee also: Configuration, CLI Reference