Skip to main content

CLI Reference

Commands that take a deployment id (status, logs, exec, ssh, terminate, resubmit) accept it as an optional argument. Omit the id in an interactive terminal to pick from recent deployments; in CI or when piped, set ANYCLOUD_DEPLOYMENT_ID or pass the id explicitly.

anycloud submit

Deploy a container image. Alias: anycloud run.

anycloud submit <image> [-- command...] [options]

Use -- before the command if it contains flags, to separate them from submit options.

OptionDescription
-c, --config <name>Config profile name
-i, --id <id>Custom deployment ID
-e, --env <KEY=VALUE>Environment variable (repeatable). Use -e KEY to read from current shell. Likely-sensitive keys trigger a warning
--env-file <file>Load env vars from .env file
--secret <name>Named secret to inject as env vars (repeatable). See Secrets
-p, --persistKeep VM alive after job completes
--persist-bucketKeep the spot checkpoint bucket after the job completes (spot only). Independent of --persist — see Spot Instances
--gpus <gpus>GPU access (all or count)
--shm-size <size>Shared memory size (e.g., 8g)
--memory <limit>Memory limit (e.g., 32g)
--cpus <count>CPU limit
--runtime <runtime>Container runtime (e.g., nvidia)
--ipc <mode>IPC mode (host, private, shareable)
--ulimit <ulimit>Ulimit settings (repeatable)
--gpu-type <type>GPU type (e.g., h100, a100:8). Repeatable for an ordered fallback pool. See CloudConfig Internals
--vm-type <type>VM instance type (e.g., g6e.xlarge). Repeatable for an ordered fallback pool. See CloudConfig Internals
--credentials <name>Cloud credentials to use. Repeatable for an ordered fallback list — see Fallback Credentials
--region <region>Cloud region
--spotUse spot/preemptible instances
--disk-size <gb>Disk size in GB
--zone <zone>Availability zone
--input-bucket <name>Input bucket for read-only data
--output-bucket <name>Output bucket for results
--input-storage-credentials <name>Credentials for input bucket (cross-cloud)
--input-storage-region <region>Region for input bucket storage
--output-storage-credentials <name>Credentials for output bucket (cross-cloud)
--output-storage-region <region>Region for output bucket storage

<image> is required. Either -c, --config <name> or ANYCLOUD_CONFIG must resolve to an existing deployment profile (or --credentials plus inline flags must fully describe the cloud target).

anycloud serve

Deploy a long-running server. The container must listen on port 8088 (set via PORT env var). Once running, access your server at https://<id>.anycloud.sh.

anycloud serve <image> [-- command...] [options]
OptionDescription
-c, --config <name>Config profile name
-i, --id <id>Server ID (auto-generated if not provided)
-e, --env <KEY=VALUE>Environment variable (repeatable). Use -e KEY to read from current shell. Likely-sensitive keys trigger a warning
--env-file <file>Load env vars from .env file
--secret <name>Named secret to inject as env vars (repeatable). See Secrets
--gpus <gpus>GPU access (all or count)
--shm-size <size>Shared memory size (e.g., 8g)
--memory <limit>Memory limit (e.g., 32g)
--cpus <count>CPU limit
--runtime <runtime>Container runtime (e.g., nvidia)
--ipc <mode>IPC mode (host, private, shareable)
--ulimit <ulimit>Ulimit settings (repeatable)
--gpu-type <type>GPU type (e.g., h100, a100:8). Repeatable for an ordered fallback pool. See CloudConfig Internals
--vm-type <type>VM instance type (e.g., t3.medium). Repeatable for an ordered fallback pool. See CloudConfig Internals
--credentials <name>Cloud credentials to use. Repeatable for an ordered fallback list — see Fallback Credentials
--region <region>Cloud region
--disk-size <gb>Disk size in GB
--zone <zone>Availability zone

anycloud build

Build and push a Docker image to GitHub Container Registry (GHCR).

anycloud build [options]
OptionDescription
-t, --tag <tag>Tag for the image (default: latest)
-f, --forceAllow build with uncommitted changes

anycloud status

View detailed status of a deployment.

anycloud status [id]
anycloud status <id> --json | jq '.vmStatuses[0].ip'
OptionDescription
--verboseShow detailed logs
-a, --allInclude deployments older than 24h in the picker
--jsonEmit raw deployment status JSON to stdout

Omit the id in a TTY for an interactive picker; non-TTY/CI requires an explicit id or ANYCLOUD_DEPLOYMENT_ID. --json requires an explicit id too — picker chrome would otherwise corrupt the JSON pipe.

With --json, the payload mirrors the API's status response shape — an object with deployment, vmStatuses[], and events[]. Human chrome is routed to stderr, so anycloud status <id> --json 2>/dev/null is a clean pipe for jq and scripts. The schema is considered stable across patch releases.

anycloud list

List all deployments. Alias: anycloud ls.

anycloud list [options]
anycloud list --json | jq '.[].id'
OptionDescription
-f, --filter <text>Filter by id, image, cloud, region, or state
-a, --allInclude deployments older than 24h
--jsonEmit filtered deployments as a JSON array

When invoked non-interactively by an agent, output is scoped to that agent's own session; pass --session/--agent to target another. Interactive (TTY) runs are never scoped. See Agents.

With --json, emits an array of deployment objects — the same shape the API returns. An empty result is [] (exit 0), never a "No deployments found" message.

anycloud logs

View container logs.

anycloud logs [id]
OptionDescription
-f, --followStream logs in real-time

anycloud exec

Execute a command in a deployment container.

anycloud exec "nvidia-smi"
anycloud exec job-abc123 "python train.py"
anycloud exec --vm "df -h"
OptionDescription
--vmExecute on the VM instead of inside the container

anycloud ssh

SSH into a running deployment (interactive shell).

anycloud ssh [id]
anycloud ssh --vm
OptionDescription
--vmSSH to the VM directly (skip container shell)

anycloud terminate

Terminate one or more deployments and clean up cloud resources.

anycloud terminate [ids...]

anycloud resubmit

Resubmit one or more deployments in a terminal state. Resets the deployment back to the queue for re-provisioning with the same configuration.

anycloud resubmit [ids...]

anycloud cost

View estimated compute costs for your deployments.

anycloud cost [id]
OptionDescription
-p, --period <period>Time period: 7d, 30d, 90d, all (default: 30d)

Without an ID, shows costs for all deployments in the selected period. Like list, agent invocations are scoped to their own session; pass --session/--agent to look at another.

anycloud db query

Run a read-only SQL query against the local API database. Useful for ad-hoc inspection of deployment state from a script or agent, when no dedicated subcommand exposes the field you need.

anycloud db query "<sql>" [--json]
OptionDescription
--jsonEmit { rows, rowCount, truncated } JSON

Only SELECT, WITH, EXPLAIN, and PRAGMA statements are accepted; writes are refused at the SQLite engine level. Results are capped at 10 000 rows and the response sets truncated: true when the cap fires.

Examples:

anycloud db query "SELECT id, state FROM deployments ORDER BY started_at DESC LIMIT 10"
anycloud db query "SELECT * FROM deployment_events WHERE deployment_id = 'abc'" --json

anycloud db schema

List the local API database's tables, columns, foreign keys, and indexes. The --json form is the shape an agent should use for introspection before running anycloud db query.

anycloud db schema [table] [--json]
OptionDescription
--jsonEmit schema as JSON

With no argument, lists every user table and view. With a table name, narrows to that one.

Examples:

anycloud db schema
anycloud db schema deployments --json

anycloud docs

Print the published anycloud docs to stdout. A thin wrapper over https://anycloud.sh/llms.txt (index) and https://anycloud.sh/llms-full.txt (full corpus), so agents can ingest product context in one call.

anycloud docs [--all] [--url]
OptionDescription
--allPrint the full markdown corpus instead of the index
--urlPrint the docs URL instead of fetching

Examples:

anycloud docs              # short index — titles + descriptions
anycloud docs --all # full markdown corpus
anycloud docs --url # print the URL only

anycloud regions

List available regions for a cloud provider. With --vm-type, narrows to regions that offer that VM type, sorted cheapest first.

anycloud regions <provider> [--vm-type <type>] [--spot] [--json]
OptionDescription
--vm-type <type>Only regions offering this VM type, sorted cheapest first
--spotUse spot pricing for the --vm-type sort (requires --vm-type)
--jsonEmit regions as a JSON array

Examples:

anycloud regions aws
anycloud regions aws --vm-type p5.48xlarge --spot

anycloud vm-types

List VM types available in a region.

anycloud vm-types <provider> <region> [--accelerator <gpu>] [--json]
OptionDescription
--accelerator <gpu>Only VM types with this accelerator (e.g. H100)
--jsonEmit VM types as a JSON array

anycloud gpus

List available GPUs for a cloud provider. With --type, lists available counts for that GPU (e.g. [1, 4, 8]).

anycloud gpus <provider> [--type <gpu>] [--json]
OptionDescription
--type <gpu>Show available counts for this GPU instead of the list
--jsonEmit results as a JSON array

anycloud pricing

Look up on-demand or spot pricing for a VM type, either across all regions (cheapest first) or for one specific region.

anycloud pricing <provider> <vm-type> [--region <r>] [--spot] [--json]
OptionDescription
--region <r>Limit pricing to one region
--spotShow spot prices instead of on-demand
--jsonEmit pricing as a JSON object

anycloud bucket

Stream files in and out of a cloud bucket using a credential registered with anycloud credentials new. The upload/download path goes through the local API server, so the same routes back the Python SDK's Bucket.upload() / Bucket.download().

anycloud bucket upload <bucket-name> <local-path> <remote-path> --credentials <name> [--region <r>]
anycloud bucket download <bucket-name> <remote-path> <local-path> --credentials <name> [--region <r>]
OptionDescription
--credentials <name>(required) Named cloud credential to use for the transfer
--region <r>Bucket region — required for some providers/cross-region setups

anycloud credentials

Manage cloud provider credentials. Alias: anycloud creds.

anycloud credentials new              # Add credentials
anycloud credentials list # List credentials
anycloud credentials list --json # Machine-readable: [{name, cloudProvider}]
anycloud credentials edit [name] # Edit credentials
anycloud credentials delete <name> # Delete credentials
OptionDescription
-f, --forceSkip confirmation (for delete)
--jsonlist only: emit [{name, cloudProvider}]; never leaks secrets

anycloud secrets

Manage named secrets. Values are encrypted at rest, never returned by the API, and injected into containers at run time when referenced via --secret <name> (or secrets=[...] in the SDK). See the Secrets guide.

anycloud secrets new <name> KEY=VALUE [KEY=VALUE ...]   # Create or update a bundle
anycloud secrets list # List names and timestamps (no values)
anycloud secrets delete <name> [--force] # Delete a bundle
OptionDescription
-f, --forceDelete even if non-terminal deployments reference the secret (returns 409 without)

anycloud config

Manage deployment profiles in anycloud.yaml.

anycloud config new            # Create a profile
anycloud config list # List profiles
anycloud config list --json # Machine-readable profile array
anycloud config edit [name] # Edit a profile
anycloud config remove [name] # Delete a profile
OptionDescription
--jsonlist only: emit profiles as a JSON array of objects
OptionDescription
-f, --forceSkip confirmation (for remove)

anycloud api

Manage the local anycloud API server. Must be running before deploying.

anycloud api start [options]   # Start the API server
anycloud api stop # Stop the API server
anycloud api status # Show API server status
anycloud api logs [-f] # View API server logs
OptionDescription
--port <port>Port for API server (default: 8080)
-f, --followStream logs in real-time (for logs subcommand)

anycloud login

Authenticate with GitHub via OAuth. Required for pulling private images from GHCR.

anycloud login

anycloud update

Update anycloud CLI and API image.

anycloud update              # Update to stable version
anycloud update latest # Update to latest version
anycloud update 5.2.0 # Install a specific version

anycloud quota request

📊 Request a cloud-provider quota increase for a VM type or GPU family. Defaults to fanning out across every region in the cloud's catalog when --region is omitted.

anycloud quota request                                        # interactive: pick cloud, then GPU vmType
anycloud quota request <vmType> [--region <region>] [options]
anycloud quota request --gpu <name> --cloud <aws|azure> [--region <region>] [options]
OptionDescription
<vmType>VM type (e.g. g6e.48xlarge, Standard_NC40ads_H100_v5)
--gpu <name>GPU family (e.g. H100, A100) — expanded to a VM type for the cloud
--cloud <aws|azure>Cloud provider. Inferred from vmType when omitted
--region <name>Region to request quota in. Omit to fan out across every region in the catalog (AWS: where vmType is offered; Azure: where the family is exhausted)
--credential <name>Named credential to use
--spotRequest spot/preemptible quota instead of on-demand
--dry-runPrint what would be submitted without calling the cloud
--jsonEmit JSON (auto-enabled when stdout is not a TTY)

The command opens at most one case per region per invocation. Re-running it for a region that already has an open case returns SKIPPED together with the existing case's URL — no duplicate cases are created.

Run with no vmType and no --gpu in a TTY to get an interactive picker — anycloud prompts for a cloud (AWS or Azure) and then shows an autocomplete list of GPU instance types from the catalog. Non-TTY / --json invocations still require an explicit vmType or --gpu.

Heads up: AWS opt-in. When you fan out across regions, anycloud submits an EnableRegion call for each AWS region that is currently disabled-by-default (e.g. me-central-1, ap-east-1, af-south-1). Opt-in is asynchronous and takes a few minutes; the quota request for that region is deferred until opt-in completes. The entry's status is SUBMITTED with optInAction: enabling and a message explaining the deferral. Pass --region to scope the command to one region if you'd rather not opt anything new in.

Example (interactive output):

us-east-2 · G and VT  SUBMITTED
Previous 32
Requested 384
Case case-789
URL https://support.console.aws.amazon.com/support/home#/case/?displayId=case-789

Example (--json or piped):

[
{
"cloud": "aws",
"region": "us-east-2",
"resourceName": "G and VT",
"previousLimit": 32,
"requestedLimit": 384,
"grantedLimit": null,
"status": "submitted",
"requestId": "case-789",
"url": "https://support.console.aws.amazon.com/support/home#/case/?displayId=case-789"
}
]

anycloud quota status

📊 List quota requests — pending, approved, denied, and partially-granted. Defaults to every region in the cloud's catalog when --region is omitted (per-region calls run in parallel). On AWS the command pulls the last 30 days of Service Quotas history and detects partial grants by comparing the current limit against the originally requested value. On Azure it lists pending Quota-API requests and open quota-related support tickets.

anycloud quota status --cloud <aws|azure> [--region <region>] [options]
OptionDescription
--cloud <aws|azure>Cloud provider (defaults to aws)
--region <name>Region to query. Omit to query every region in the catalog
--credential <name>Named credential to use
--jsonEmit JSON (auto-enabled when stdout is not a TTY)

Example (partial grant on AWS):

us-east-1 · All G and VT Spot Instance Requests  PARTIAL (77%)
Requested 4000
Granted 3072
Submitted 2026-03-11 19:26 UTC
Case case-abc-123
URL https://support.console.aws.amazon.com/support/home#/case/?displayId=case-abc-123