Skip to main content
Core concepts explains when each command fits and where calls go. None of them overrides a workload’s configuration; that comes only from its decorator or constructor.

lazycloud deploy

Deploys one workload or a whole app, chosen by handler reference:
The deployment name comes from the workload’s name=. --source-root <dir> uploads a different directory. A failure stops the command and leaves what already deployed. Deploying one pod or devbox prints its role and the idle time and capacity it resolved to; an app deploy lists its devboxes.
--diff, or -d, lists each workload as add, redeploy, retain, or, with --prune, remove, and changes nothing. It imports your modules but compares no source or configuration. --prune, or -p, removes workloads the code no longer declares. Several references deploy separate apps together.

lazycloud run

Calls a function once in the cloud from your working tree, with no deploy, and prints the result. JSON arguments become Python values; anything else stays a string:
Arguments are positional, so lists and objects need quotes. A pod handler starts an instance with the given command, and a plain Python callable runs locally. Logs go to stderr and the result to stdout. --json needs a JSON-compatible result, and --output result.pkl saves any result to a file.

lazycloud serve

Runs a function, endpoint, or ASGI app as a live preview until Ctrl+C or --timeout seconds. Each edit syncs only changed files. --sync-dir syncs a directory other than the current one. The Python form:
Functions, endpoints, ASGI apps, and apps all have .serve().

lazycloud shell

Opens a shell in the handler’s image, or attaches one to a running container.

lazycloud ssh

ssh opens a session on a devbox or a pod with ssh=True. Anything after -- goes to ssh, such as -L 8080:localhost:8080 or a command. ssh-config writes host entries named lazycloud-<workspace>-<app>-<name> for VS Code, Cursor, and plain ssh, one per name, or one for every devbox and SSH pod in the workspace when none is named. --prune, or -p, also removes entries for ones that stopped serving SSH or were deleted. --app picks the app when several deploy the same name. The generated config calls two hidden commands that carry the connection and renew the login certificate.

lazycloud devbox

list returns a page of deployed devboxes and status shows one box’s live state and resources; both support --json and leave sleeping boxes asleep. start waits until the box runs. stop stops it in any state, even mid-start or while a failing start retries, and saves its disk. Ctrl-C while start or ssh waits on a box it woke stops the box again. Every command accepts --workspace <workspace>. See devboxes for listing and selection. login runs the installed agent’s own browser login inside the devbox; HARNESS is codex, claude, opencode, or pi. The local CLI opens your browser and forwards the callback over SSH. It needs an interactive terminal and rejects --json. See coding agents for installation, provider selection, and credential persistence.

lazycloud dev

Opens a shell in a remote container with your working directory synced in. --sync defaults to ./. Without a handler, dev uses the managed Python image with default resources; a GPU or custom image comes from a workload passed as the handler.
To change your default workspace, run uv run lazycloud workspace use <name>. Commands with a --workspace option can override it for one call.