Skip to content

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>

CommandDescription
cpctl loginAuthenticate with Compute Portal
cpctl logoutLog out and revoke credentials
cpctl whoamiShow current authenticated user
cpctl initInteractively create cp.json
cpctl link <service>Link directory to a service
cpctl link <svc-a> <svc-b>Wire two services together
cpctl unlinkRemove .cp-link
cpctl open [service]Open service URL in browser
cpctl listList all services
cpctl deployDeploy 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 listList 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 psList 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 variableAlias for cpctl env
cpctl environment listList environments
cpctl environment createCreate an environment
cpctl environment deleteDelete an environment
cpctl environment switchSwitch 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 listList 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 listList 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 initGenerate cp.yaml from live services
cpctl iac up [--dry-run] [--yes] [-f file]Apply cp.yaml
cpctl iac downDestroy 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 listList 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 listList 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 createIssue single-use invitation token
cpctl invite listList active invitation tokens
cpctl invite revoke <id>Revoke a pending invitation
cpctl quotaShow compute quota usage
cpctl metrics <service>View service metrics
cpctl gpu listList GPU inventory
cpctl gpu status <service>Show GPU utilization
cpctl gpu reserveReserve GPU capacity
cpctl gpu runRun a one-shot GPU job
cpctl node listList 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 listList regions
cpctl region verify <service>Confirm data residency
cpctl policy setSet org-wide data residency policy
cpctl github pat <token>Store GitHub PAT for private images
cpctl billing balanceShow current balance and burn rate
cpctl billing topup initGet a deposit address for crypto top-up
cpctl billing topup verifySubmit transaction ID to confirm top-up
cpctl billing usageShow itemized spend
cpctl billing alertSet a low-balance alert threshold
cpctl billing historyShow invoice history
cpctl pay setupLink a card for per-call machine payments
cpctl pay statusShow linked payment method
cpctl pay authorize <service> <amount>Pre-authorize a per-call charge
cpctl pay historyList per-call payment charges
cpctl sandbox createCreate an ephemeral GPU sandbox
cpctl sandbox listList 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 docsOpen documentation in browser
cpctl upgradeUpgrade the CLI
cpctl uninstallRemove cpctl binary (--purge to also remove ~/.cp)
cpctl versionPrint CLI version

REST API Endpoints

Base URL: https://api.computeportal.io
Auth: Authorization: Bearer cp_live_<hex>

Services

MethodPathDescription
GET/v1/servicesList all services
POST/v1/servicesDeploy a new service
GET/v1/services/:nameGet service details
PATCH/v1/services/:nameUpdate service (image, env vars, replicas)
DELETE/v1/services/:nameDelete a service
POST/v1/services/:name/startStart a stopped service
POST/v1/services/:name/stopStop a running service
POST/v1/services/:name/restartRestart a service
POST/v1/services/:name/redeployRe-trigger deployment
POST/v1/services/:name/scaleScale replicas or resources
POST/v1/services/:name/autoscaleConfigure or disable HPA
GET/v1/services/:name/autoscaleGet current HPA config
POST/v1/services/:name/rollbackRoll back to previous deployment
GET/v1/services/:name/logsFetch recent log output
GET/v1/services/:name/build-logsStream build logs (SSE)
GET/v1/services/:name/metricsGet CPU/memory/network metrics
GET/v1/services/:name/gpuGet GPU utilization
GET/v1/services/:name/deploymentsList deployment history
GET/v1/services/:name/deployments/:idGet a specific deployment
GET/v1/services/:name/envList environment variables
POST/v1/services/:name/envSet environment variables
POST/v1/services/:name/env/unsetRemove environment variables
GET/v1/services/:name/volumesList attached volumes
POST/v1/services/:name/volumesAttach a volume
DELETE/v1/services/:name/volumes/:idDelete a volume
GET/v1/statusPlatform health check

Domains

MethodPathDescription
POST/v1/services/:name/domainsAttach a custom hostname
GET/v1/services/:name/domainsList all hostnames
GET/v1/services/:name/domains/:hostnameGet domain/TLS status
DELETE/v1/services/:name/domains/:hostnameRemove a custom hostname

Deploy Hooks & Webhooks

MethodPathDescription
POST/v1/services/:name/hooksCreate a deploy hook
GET/v1/services/:name/hooksList deploy hooks
DELETE/v1/services/:name/hooks/:idDelete a deploy hook
POST/v1/services/:name/hooks/:id/triggerTrigger a deploy (inbound hook endpoint)
POST/v1/webhooksRegister an outbound webhook
GET/v1/webhooksList outbound webhooks
DELETE/v1/webhooks/:idDelete an outbound webhook

Config Maps

MethodPathDescription
POST/v1/configmaps/upload-tokenGet presigned S3 upload URLs for files
POST/v1/configmapsCommit uploaded files as a config map
GET/v1/configmapsList all config maps
DELETE/v1/configmaps/:nameDelete a config map

TCP Expose

MethodPathDescription
POST/v1/services/:name/exposeExpose a port over raw TCP
GET/v1/services/:name/exposeList exposed TCP ports
DELETE/v1/services/:name/expose/:portRemove a TCP expose

Firewall, TCP Proxy & Static IP

MethodPathDescription
POST/v1/services/:name/firewallAdd a firewall rule
GET/v1/services/:name/firewallList firewall rules
DELETE/v1/services/:name/firewall/:idRemove a firewall rule
DELETE/v1/services/:name/firewallRemove all firewall rules
POST/v1/services/:name/tcp-proxyCreate a TCP proxy
GET/v1/services/:name/tcp-proxyList TCP proxies
DELETE/v1/services/:name/tcp-proxy/:portDelete a TCP proxy
POST/v1/services/:name/static-ipEnable static outbound IP
GET/v1/services/:name/static-ipGet static IP
DELETE/v1/services/:name/static-ipDisable static IP

Preview Environments

MethodPathDescription
POST/v1/services/:name/previews/enableEnable PR preview environments
POST/v1/services/:name/previews/disableDisable PR previews
GET/v1/services/:name/previewsList active previews

GPU & Nodes

MethodPathDescription
GET/v1/gpu/nodesList GPU nodes and availability
POST/v1/gpu/reserveReserve GPU capacity
POST/v1/gpu/jobsRun a one-shot GPU job
GET/v1/gpu/jobs/:id/logsGet GPU job logs
GET/v1/nodesList compute nodes
GET/v1/nodes/:idGet node details
POST/v1/nodes/:id/reserveReserve a node
POST/v1/nodes/:id/releaseRelease a reserved node
GET/v1/regionsList available regions

Databases

MethodPathDescription
GET/v1/databasesList databases
POST/v1/databasesCreate a database
GET/v1/databases/:nameGet database details
DELETE/v1/databases/:nameDestroy a database

Object Storage

MethodPathDescription
POST/v1/storage/bucketsCreate a bucket
GET/v1/storage/bucketsList buckets
GET/v1/storage/buckets/:name/credentialsGet bucket credentials
DELETE/v1/storage/buckets/:nameDelete a bucket

Environments

MethodPathDescription
GET/v1/environmentsList environments
POST/v1/environmentsCreate an environment
DELETE/v1/environments/:nameDelete an environment

Sandboxes

MethodPathDescription
GET/v1/sandboxesList sandboxes
POST/v1/sandboxesCreate a sandbox
GET/v1/sandboxes/:idGet sandbox details
DELETE/v1/sandboxes/:idDestroy a sandbox

Agent Account Invitations

MethodPathDescription
POST/v1/users/invitationsIssue an invitation token
GET/v1/users/invitationsList active invitation tokens
DELETE/v1/users/invitations/:idRevoke an invitation
POST/v1/users/redeemRedeem invitation token → creates new account (public, rate-limited)

Machine Payments

MethodPathDescription
GET/v1/pay/statusGet linked payment method
POST/v1/pay/setupStart card setup
GET/v1/pay/setup/pollPoll for setup completion
POST/v1/pay/authorizePre-authorize a per-call charge
GET/v1/pay/historyList charge history

Billing

MethodPathDescription
GET/v1/billing/balanceCurrent balance and burn rate
GET/v1/billing/usageCurrent billing cycle usage
GET/v1/billing/historyPast invoices
POST/v1/billing/topup/initGet deposit address for crypto top-up
POST/v1/billing/topup/verifySubmit transaction ID to confirm

GitHub Integration

MethodPathDescription
GET/v1/github/tokenFetch 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

ToolDescription
cp_domain_addAttach a custom hostname to a service
cp_domain_listList all hostnames on a service
cp_domain_removeRemove a custom hostname

Service Tools

ToolDescription
cp_service_listList all deployed services
cp_service_getGet details for a specific service
cp_service_createDeploy a new service from a container image
cp_service_updateUpdate a service's image or configuration
cp_service_deleteRemove a service
cp_service_scaleScale a service to N replicas
cp_service_restartForce a rolling restart
cp_service_logsFetch recent log output
cp_service_inspectReturn the raw service spec
cp_env_listList environment variables on a service
cp_env_setSet environment variables
cp_env_unsetRemove environment variables
cp_gpu_listList available GPU resources
cp_gpu_statusShow GPU utilization per service
cp_volume_listList persistent volumes
cp_volume_createCreate and attach a persistent volume
cp_volume_deleteRemove a persistent volume
cp_health_checkCheck service health and replicas

GPU Compute Platform