Skip to main content
Develop, test, deploy explains when each command fits and where calls go. None of these commands override a workload’s configuration, which 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 in place.
--diff lists each workload as add, redeploy, retain, or, with --prune, remove, without uploading or changing anything. It doesn’t compare source or configuration, and it still imports your modules. --prune, or -p, removes workloads the code no longer declares. Several references deploy separate complete 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, and 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 until --timeout seconds pass. Each edit syncs only the 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 an interactive shell in the handler’s image, or attaches a shell to a running container.

lazycloud dev

Opens a shell in a remote container with your working directory synced in, for iterating without a deploy. --sync defaults to ./. Without a handler, dev uses the managed Python image with default resources. A GPU or custom image comes from a workload defined in code and 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.