Skip to main content
Make sure you are authenticated before proceeding.
Commands that take a resource ID accept it as an argument, e.g. shardcloud app restart <id>. If you omit the ID and the current directory is linked to that resource type, the CLI uses the linked resource. If neither is given, the command fails with a clear error — unlike v1, there is no interactive selection menu to pick from your resources.

Linking a Directory

A link ties the current directory to one existing app, database, or VM, so you can omit the ID on every subsequent command run from that directory. It’s stored in a .shardcloud.json file:
.shardcloud.json (the directory link) is separate from .shardcloud (the app’s own build/deploy config file) — linking a directory doesn’t touch your .shardcloud file, and vice versa.
shardcloud app create auto-links the directory it’s run from to the newly created app, the same way v1’s create did — you don’t need to run shardcloud link yourself right after creating an app. Databases and VMs have no creation-time side effect to piggyback a link off of (databases are created with db create, VMs only from the dashboard), so link those with shardcloud link <id> --type database / --type vm after the fact if you want to omit their ID from a directory.

auth / config

See Authentication for auth login / auth logout / auth whoami and config profile *. config set <key> <value> sets a free-form CLI setting — currently used for api_url, to point the CLI at a different API base URL:

app

app has an apps alias — shardcloud apps list works the same as shardcloud app list.

Create

create always writes a .shardcloud.json link to the current directory pointing at the new app, whichever path you use.

Deploys

app deploys list and app deploys restore only return data for apps linked to a GitHub repository. Apps deployed via zip upload (shardcloud app commit) have no deploy history to list or restore from these commands.

Env

env set merges into the app’s existing variables — it doesn’t wipe ones you don’t mention. All env subcommands accept --app <id> in place of a positional ID/link.

Exec

Streams stdout/stderr live and exits with the remote command’s exit code.

db

db has database/databases aliases.
--type accepts postgres, mysql, mongo, or redis.

vm

vm has a vms alias. shardcloud vm create does not exist. VMs are created from the web dashboard only — creating one starts a real recurring subscription charge, so the CLI deliberately doesn’t expose a way to trigger that. Every other vm command works once a VM exists.
vm reinstall --distro is accepted by the CLI but ignored by the backend — a reinstall always reuses the VM’s current distro, there is no API to change it. The CLI prints a note to stderr when you pass --distro so you aren’t left wondering why the distro didn’t change.

backup

Generic across apps, databases, and VMs — the same commands work for all three resource types, since it’s one backup API underneath.
--target-database is only relevant when backing up/restoring a database resource. download without -o/--output prints the backup’s download URL instead of saving it.

lb

Load balancers require a Pro or Enterprise plan. Creating one, or claiming a domain for one, on a lower plan fails with a plan-tier error.
A load balancer is a named, reusable pool of sibling apps that a domain can point at, so traffic round-robins/fails over across them instead of being tied to one app.
lb (and its aliases loadbalancer/loadbalancers) has no domain or error-page subcommands — claiming a custom domain for a load balancer is done from the web dashboard, not the CLI.

image

Custom Docker images: build them from a directory or zip, then deploy them as apps.
--context accepts either a directory (zipped Docker-context-aware, honoring .dockerignore and keeping the Dockerfile) or a path to an existing .zip.
image rebuild always requires a build context (--context, defaulting to the current directory) — there is no “reuse the previous build’s context” option. Every rebuild re-packs and re-uploads a context from scratch.

Misc