docs
CLI

Manage apps

List, inspect, scale, set concurrency, disable, and re-enable deployed apps from the CLI

Once an app is deployed you manage its lifecycle with urun app list and the urun app <command> family. Every app is addressed by its slug — the name shown under APP in urun app list.

List apps

urun app list

Lists every app deployed in the org with a single derived STATUS. Add --json for raw output to pipe into scripts.

How STATUS is derived

A deployed app moves through three backend lifecycle phases, each reporting from a different source. The CLI projects the reachable combinations onto one STATUS label:

Build (S3)Promotion (app_deployments)CapacitySTATUS
queued / building(no row yet)provisioning
failed(no row yet)failed
readyactivefunction_ready = 0pending
readyactivefunction_ready = 1ready
readypaused(irrelevant)paused
readyfailed(irrelevant)failed

The DETAIL column carries the disambiguating signal: the raw build state for provisioning rows, the error message for failed rows, the ready-reason for pending rows, or in-use GPU counts for ready rows.

Status for one app

urun app status hello-h100

The single-app complement to urun app list — shows build, deployment, capacity, and live-session status for one app. Target a non-default environment with --environment (alias --env); add --json for raw output.

urun app status hello-h100 --env staging

Scale

urun app scale sets the desired replica count — the control plane turns it into the runtime's replica count.

urun app scale hello-h100 --replicas 3

Drain an app to zero replicas without retiring it (it stays deployed and reactivates instantly when you scale back up):

urun app scale hello-h100 --replicas 0

scale only exposes --replicas — the horizontal knob. GPU count and compute shape are set on @app.function; a scale call (and a browser session invocation) never changes them. To change a function's GPU shape, edit the decorator and redeploy. The deploy-time vs. runtime boundary is spelled out in the Python SDK App reference.

scale sets the replica floor explicitly. On top of that, the platform scales on queued demand: when sessions queue, it adds replicas up to the function's session-concurrency limit (default 2, see below) and scales back down when idle. For a launch that needs guaranteed headroom, pair your concurrency limit with a capacity lease. --replicas 0 drains to zero and reactivates instantly when you scale back up.

Concurrency

urun app concurrency sets the session-concurrency limit — the maximum concurrent sessions for the app's function(s). The platform adds replicas on queued demand up to this limit and scales back down when idle. The platform default is 2.

urun app concurrency hello-h100 --limit 8          # allow up to 8 concurrent sessions
urun app concurrency hello-h100 --clear            # back to @app.function(max_concurrency=)
urun app concurrency hello-h100 --limit 4 --function hello

--limit N (>= 1) sets an operator override; --clear removes it and returns control to the app's declared @app.function(max_concurrency=). Use --function when the app registers more than one function.

Disable and enable

Disabling an app drives its deployment to paused so the control plane stops running it. It is reversible — no manual database edits, and you can bring it back later.

urun app disable hello-h100          # prompts for confirmation
urun app disable hello-h100 --yes    # skip the prompt (CI)

Bring a disabled app back online:

urun app enable hello-h100

Pause a single function

Add --function to pause one function of a multi-function app while its siblings keep serving:

urun app disable hello-h100 --function hello    # pause just `hello`
urun app enable  hello-h100 --function hello    # resume it

While a function is paused, new sessions to it fail fast with a 409 (function_paused) — they are never queued — and the control plane scales the function's replicas to zero, including pods serving live sessions. Reconnects to an existing session are unaffected. The pause applies to the current release: a redeploy re-registers the app's functions and clears it (the same lifetime as a concurrency override).

To delete an app outright, use urun app delete (retires the deployment; add --purge to remove the record). urun app purge permanently purges orphaned app metadata after a partial deletion — the backend refuses to purge an app that still has deployment rows, so disable first.

All of these commands accept --environment / --env (default main) and --json.

Next

  • Sessions — watch live and historical runs.
  • Compute — see provisioned GPU capacity.

On this page