Reference
Quick-reference tables for all CLI commands, REST API endpoints, and MCP tools.
CLI Commands
Base: cpctl <command>
Auth: cpctl login --token <cp-api-token>
| Command | Description |
|---|---|
cpctl login | Authenticate with Compute Portal |
cpctl logout | Log out and revoke credentials |
cpctl whoami | Show current authenticated user |
cpctl init | Interactively create cp.json |
cpctl link <service> | Link directory to a service |
cpctl link <svc-a> <svc-b> | Wire two services together |
cpctl unlink | Remove .cp-link |
cpctl open [service] | Open service URL in browser |
cpctl list | List all services |
cpctl deploy | Deploy a service (image, repo, or cp.json) |
cpctl redeploy <service> | Re-trigger current deployment |
cpctl rollback <service> [id] | Roll back to a previous deployment |
cpctl machine list | List services with replica counts |
cpctl machine start <name> | Start a service |
cpctl machine stop <name> | Stop a service |
cpctl machine restart <name> | Restart a service |
cpctl machine destroy <name> | Permanently destroy a service |
cpctl machine status <name> | Show service health |
cpctl logs <name> | Stream service logs |
cpctl status [name] | Check platform or service health |
cpctl scale <name> | Scale replicas, resources, or HPA |
cpctl exec <name> -- <cmd> | Run command inside container |
cpctl ssh <name> | Open interactive shell in container |
cpctl ps | List running services across all nodes |
cpctl env set <service> | Set environment variables |
cpctl env list <service> | List environment variables |
cpctl env unset <service> | Remove environment variables |
cpctl env copy <src> <dst> | Copy env vars between services |
cpctl variable | Alias for cpctl env |
cpctl environment list | List environments |
cpctl environment create | Create an environment |
cpctl environment delete | Delete an environment |
cpctl environment switch | Switch active environment |
cpctl deployment list <service> | List deployment history |
cpctl deployment status <service> <id> | Show deployment details |
cpctl domain add <service> <domain> | Attach custom domain |
cpctl domain list <service> | List domains |
cpctl domain status <service> <domain> | Check domain/TLS status |
cpctl domain remove <service> <domain> | Remove domain |
cpctl volume list [service] | List volumes |
cpctl volume add <service> <path> | Attach a volume |
cpctl volume delete <service> <name> | Delete a volume |
cpctl volume browse <service> | Open shell to browse volumes |
cpctl volume download <service> <remote> [local] | Download file from container |
cpctl volume upload <service> <local> <remote> | Upload file to container |
cpctl db create <type> | Create a managed database |
cpctl db list | List databases |
cpctl db url <name> | Print connection URL |
cpctl db attach <database> <service> | Inject DATABASE_URL into a service |
cpctl db destroy <name> | Destroy a database |
cpctl connect <name> | Open interactive database shell |
cpctl bucket create <name> | Create an S3 bucket |
cpctl bucket list | List S3 buckets |
cpctl bucket credentials <name> | Show bucket credentials |
cpctl bucket delete <name> | Delete an S3 bucket |
cpctl service clone <src> <dst> | Clone a service |
cpctl preview enable <service> | Enable PR preview environments |
cpctl preview disable <service> | Disable PR previews |
cpctl preview list <service> | List active preview deployments |
cpctl iac init | Generate cp.yaml from live services |
cpctl iac up [--dry-run] [--yes] [-f file] | Apply cp.yaml |
cpctl iac down | Destroy resources in cp.yaml |
cpctl deploy-hook create <service> | Create an inbound deploy hook |
cpctl deploy-hook list <service> | List deploy hooks |
cpctl deploy-hook delete <service> <id> | Delete a deploy hook |
cpctl webhook create <url> | Register an outbound webhook |
cpctl webhook list | List outbound webhooks |
cpctl webhook delete <id> | Delete an outbound webhook |
cpctl firewall add <service> | Add firewall rule |
cpctl firewall list <service> | List firewall rules |
cpctl firewall remove <service> <id> | Remove a firewall rule |
cpctl firewall off <service> | Remove all firewall rules |
cpctl configmap create <name> | Create a config map from file(s) |
cpctl configmap list | List config maps |
cpctl configmap delete <name> | Delete a config map |
cpctl expose <service> --port <n> | Expose a service port over raw TCP |
cpctl expose list <service> | List exposed TCP ports |
cpctl expose delete <service> <port> | Remove a TCP expose |
cpctl tcp-proxy create <service> | Create a TCP proxy |
cpctl tcp-proxy list <service> | List TCP proxies |
cpctl tcp-proxy delete <service> <port> | Delete a TCP proxy |
cpctl static-ip enable <service> | Enable static outbound IP |
cpctl static-ip show <service> | Show static IP |
cpctl static-ip disable <service> | Release static IP |
cpctl invite create | Issue single-use invitation token |
cpctl invite list | List active invitation tokens |
cpctl invite revoke <id> | Revoke a pending invitation |
cpctl quota | Show compute quota usage |
cpctl metrics <service> | View service metrics |
cpctl gpu list | List GPU inventory |
cpctl gpu status <service> | Show GPU utilization |
cpctl gpu reserve | Reserve GPU capacity |
cpctl gpu run | Run a one-shot GPU job |
cpctl node list | List bare-metal nodes |
cpctl node inspect <id> | Show node hardware specs |
cpctl node reserve <id> | Reserve a node for dedicated use |
cpctl node release <id> | Release a reserved node |
cpctl region list | List regions |
cpctl region verify <service> | Confirm data residency |
cpctl policy set | Set org-wide data residency policy |
cpctl github pat <token> | Store GitHub PAT for private images |
cpctl billing balance | Show current balance and burn rate |
cpctl billing topup init | Get a deposit address for crypto top-up |
cpctl billing topup verify | Submit transaction ID to confirm top-up |
cpctl billing usage | Show itemized spend |
cpctl billing alert | Set a low-balance alert threshold |
cpctl billing history | Show invoice history |
cpctl pay setup | Link a card for per-call machine payments |
cpctl pay status | Show linked payment method |
cpctl pay authorize <service> <amount> | Pre-authorize a per-call charge |
cpctl pay history | List per-call payment charges |
cpctl sandbox create | Create an ephemeral GPU sandbox |
cpctl sandbox list | List sandboxes |
cpctl sandbox exec <id> -- <cmd> | Run command inside a sandbox |
cpctl sandbox status <id> | Show sandbox health |
cpctl sandbox destroy <id> | Destroy a sandbox |
cpctl docs | Open documentation in browser |
cpctl upgrade | Upgrade the CLI |
cpctl uninstall | Remove cpctl binary (--purge to also remove ~/.cp) |
cpctl version | Print CLI version |
REST API Endpoints
Base URL: https://api.computeportal.io
Auth: Authorization: Bearer cp_live_<hex>
Services
| Method | Path | Description |
|---|---|---|
GET | /v1/services | List all services |
POST | /v1/services | Deploy a new service |
GET | /v1/services/:name | Get service details |
PATCH | /v1/services/:name | Update service (image, env vars, replicas) |
DELETE | /v1/services/:name | Delete a service |
POST | /v1/services/:name/start | Start a stopped service |
POST | /v1/services/:name/stop | Stop a running service |
POST | /v1/services/:name/restart | Restart a service |
POST | /v1/services/:name/redeploy | Re-trigger deployment |
POST | /v1/services/:name/scale | Scale replicas or resources |
POST | /v1/services/:name/autoscale | Configure or disable HPA |
GET | /v1/services/:name/autoscale | Get current HPA config |
POST | /v1/services/:name/rollback | Roll back to previous deployment |
GET | /v1/services/:name/logs | Fetch recent log output |
GET | /v1/services/:name/build-logs | Stream build logs (SSE) |
GET | /v1/services/:name/metrics | Get CPU/memory/network metrics |
GET | /v1/services/:name/gpu | Get GPU utilization |
GET | /v1/services/:name/deployments | List deployment history |
GET | /v1/services/:name/deployments/:id | Get a specific deployment |
GET | /v1/services/:name/env | List environment variables |
POST | /v1/services/:name/env | Set environment variables |
POST | /v1/services/:name/env/unset | Remove environment variables |
GET | /v1/services/:name/volumes | List attached volumes |
POST | /v1/services/:name/volumes | Attach a volume |
DELETE | /v1/services/:name/volumes/:id | Delete a volume |
GET | /v1/status | Platform health check |
Domains
| Method | Path | Description |
|---|---|---|
POST | /v1/services/:name/domains | Attach a custom hostname |
GET | /v1/services/:name/domains | List all hostnames |
GET | /v1/services/:name/domains/:hostname | Get domain/TLS status |
DELETE | /v1/services/:name/domains/:hostname | Remove a custom hostname |
Deploy Hooks & Webhooks
| Method | Path | Description |
|---|---|---|
POST | /v1/services/:name/hooks | Create a deploy hook |
GET | /v1/services/:name/hooks | List deploy hooks |
DELETE | /v1/services/:name/hooks/:id | Delete a deploy hook |
POST | /v1/services/:name/hooks/:id/trigger | Trigger a deploy (inbound hook endpoint) |
POST | /v1/webhooks | Register an outbound webhook |
GET | /v1/webhooks | List outbound webhooks |
DELETE | /v1/webhooks/:id | Delete an outbound webhook |
Config Maps
| Method | Path | Description |
|---|---|---|
POST | /v1/configmaps/upload-token | Get presigned S3 upload URLs for files |
POST | /v1/configmaps | Commit uploaded files as a config map |
GET | /v1/configmaps | List all config maps |
DELETE | /v1/configmaps/:name | Delete a config map |
TCP Expose
| Method | Path | Description |
|---|---|---|
POST | /v1/services/:name/expose | Expose a port over raw TCP |
GET | /v1/services/:name/expose | List exposed TCP ports |
DELETE | /v1/services/:name/expose/:port | Remove a TCP expose |
Firewall, TCP Proxy & Static IP
| Method | Path | Description |
|---|---|---|
POST | /v1/services/:name/firewall | Add a firewall rule |
GET | /v1/services/:name/firewall | List firewall rules |
DELETE | /v1/services/:name/firewall/:id | Remove a firewall rule |
DELETE | /v1/services/:name/firewall | Remove all firewall rules |
POST | /v1/services/:name/tcp-proxy | Create a TCP proxy |
GET | /v1/services/:name/tcp-proxy | List TCP proxies |
DELETE | /v1/services/:name/tcp-proxy/:port | Delete a TCP proxy |
POST | /v1/services/:name/static-ip | Enable static outbound IP |
GET | /v1/services/:name/static-ip | Get static IP |
DELETE | /v1/services/:name/static-ip | Disable static IP |
Preview Environments
| Method | Path | Description |
|---|---|---|
POST | /v1/services/:name/previews/enable | Enable PR preview environments |
POST | /v1/services/:name/previews/disable | Disable PR previews |
GET | /v1/services/:name/previews | List active previews |
GPU & Nodes
| Method | Path | Description |
|---|---|---|
GET | /v1/gpu/nodes | List GPU nodes and availability |
POST | /v1/gpu/reserve | Reserve GPU capacity |
POST | /v1/gpu/jobs | Run a one-shot GPU job |
GET | /v1/gpu/jobs/:id/logs | Get GPU job logs |
GET | /v1/nodes | List compute nodes |
GET | /v1/nodes/:id | Get node details |
POST | /v1/nodes/:id/reserve | Reserve a node |
POST | /v1/nodes/:id/release | Release a reserved node |
GET | /v1/regions | List available regions |
Databases
| Method | Path | Description |
|---|---|---|
GET | /v1/databases | List databases |
POST | /v1/databases | Create a database |
GET | /v1/databases/:name | Get database details |
DELETE | /v1/databases/:name | Destroy a database |
Object Storage
| Method | Path | Description |
|---|---|---|
POST | /v1/storage/buckets | Create a bucket |
GET | /v1/storage/buckets | List buckets |
GET | /v1/storage/buckets/:name/credentials | Get bucket credentials |
DELETE | /v1/storage/buckets/:name | Delete a bucket |
Environments
| Method | Path | Description |
|---|---|---|
GET | /v1/environments | List environments |
POST | /v1/environments | Create an environment |
DELETE | /v1/environments/:name | Delete an environment |
Sandboxes
| Method | Path | Description |
|---|---|---|
GET | /v1/sandboxes | List sandboxes |
POST | /v1/sandboxes | Create a sandbox |
GET | /v1/sandboxes/:id | Get sandbox details |
DELETE | /v1/sandboxes/:id | Destroy a sandbox |
Agent Account Invitations
| Method | Path | Description |
|---|---|---|
POST | /v1/users/invitations | Issue an invitation token |
GET | /v1/users/invitations | List active invitation tokens |
DELETE | /v1/users/invitations/:id | Revoke an invitation |
POST | /v1/users/redeem | Redeem invitation token → creates new account (public, rate-limited) |
Machine Payments
| Method | Path | Description |
|---|---|---|
GET | /v1/pay/status | Get linked payment method |
POST | /v1/pay/setup | Start card setup |
GET | /v1/pay/setup/poll | Poll for setup completion |
POST | /v1/pay/authorize | Pre-authorize a per-call charge |
GET | /v1/pay/history | List charge history |
Billing
| Method | Path | Description |
|---|---|---|
GET | /v1/billing/balance | Current balance and burn rate |
GET | /v1/billing/usage | Current billing cycle usage |
GET | /v1/billing/history | Past invoices |
POST | /v1/billing/topup/init | Get deposit address for crypto top-up |
POST | /v1/billing/topup/verify | Submit transaction ID to confirm |
GitHub Integration
| Method | Path | Description |
|---|---|---|
GET | /v1/github/token | Fetch short-lived GitHub installation token for private repo access |
MCP Tools
Endpoint: https://mcp.computeportal.io/mcp
Auth: CP_API_TOKEN=cp_live_<hex>
Domain Tools
| Tool | Description |
|---|---|
cp_domain_add | Attach a custom hostname to a service |
cp_domain_list | List all hostnames on a service |
cp_domain_remove | Remove a custom hostname |
Service Tools
| Tool | Description |
|---|---|
cp_service_list | List all deployed services |
cp_service_get | Get details for a specific service |
cp_service_create | Deploy a new service from a container image |
cp_service_update | Update a service's image or configuration |
cp_service_delete | Remove a service |
cp_service_scale | Scale a service to N replicas |
cp_service_restart | Force a rolling restart |
cp_service_logs | Fetch recent log output |
cp_service_inspect | Return the raw service spec |
cp_env_list | List environment variables on a service |
cp_env_set | Set environment variables |
cp_env_unset | Remove environment variables |
cp_gpu_list | List available GPU resources |
cp_gpu_status | Show GPU utilization per service |
cp_volume_list | List persistent volumes |
cp_volume_create | Create and attach a persistent volume |
cp_volume_delete | Remove a persistent volume |
cp_health_check | Check service health and replicas |
