Avisi cloud logo
Commands

playroom play

Spin up a playroom seeded with a local directory and (optionally) run a command in it (alpha)

Synopsis

Create a fresh playroom, copy a local directory into it, then connect over SSH — optionally running a single command before exiting.

ALPHA: this command is in active development; flags and behaviour may change between releases.

DIR defaults to the current working directory. CMD (with its args) runs in the playroom with the uploaded directory as its working directory; with no CMD an interactive shell opens in that directory. Pass --rm to delete the playroom when the command (or session) exits. Pass -A / --forward-agent to forward your SSH agent into the playroom for git over SSH (off by default so nothing leaks into the sandbox unless you ask). The playroom is named "<basename>-<4-char random>" so multiple invocations from the same directory create independent sandboxes.

acloud playroom play [DIR] [-- CMD ARGS...] [flags]

Examples

  # persistent: drop into an interactive shell at this directory
  acloud playroom play -p playhouse-demo --env GITLAB_TOKEN

  # one-shot: run claude against this directory, then auto-delete the playroom
  acloud playroom play -p playhouse-demo --env ANTHROPIC_API_KEY --rm -- claude

  # fully ephemeral one-shot: skip the PVC too (faster spin-up; nothing persists)
  acloud playroom play -p playhouse-demo --env ANTHROPIC_API_KEY --rm --ephemeral -- claude

  # explicit directory + extra env var
  acloud playroom play ~/work/api -p playhouse-demo --env ANTHROPIC_API_KEY -- claude

Options

      --env stringArray         host env var to forward (opt-in); KEY=VAL or bare KEY. Repeatable.
      --ephemeral               use disposable storage; everything in /home/playroom is wiped if the playroom restarts (natural pairing with --rm)
      --exposure string         how to expose SSH: tailscale, nodeport, or portforward (no exposure; reached via API-server port-forward). Default: the playhouse's declared default.
  -f, --force-install           force a fresh login to the Playhouse even if a cached session is still valid
  -A, --forward-agent           forward your SSH agent into the playroom (enables git SSH without storing a key)
  -h, --help                    help for play
      --name string             override the auto-derived '<basename>-<random4>' name
      --no-copy                 skip uploading DIR (advanced: pre-seeded / git-only setups)
      --port stringArray        extra TCP port to expose on the tailnet next to SSH; PORT or PORT:TARGETPORT (e.g. 80:3000 routes tailnet port 80 to port 3000 in the playroom). Repeatable. Requires --exposure tailscale.
      --rm                      delete the playroom after CMD (or the interactive session) exits
      --tunnel                  connect through an API-server port-forward instead of the playroom's exposed address (works without Tailscale/NodePort reachability)
      --wait-timeout duration   max time to wait for the playroom to become ready (default 5m0s)

Options inherited from parent commands

  -C, --context string                    sets the context
      --debug                             enable debug mode
      --debug-show-authorization-header   prints actual authorization header in debug mode, use with caution!
  -O, --organisation string               sets the organisation
  -p, --playhouse string                  playhouse cluster slug (defaults to last-used; supports <env>/<slug>, etc.)
      --request-timeout duration          request timeout for api calls to the Avisi Cloud API (default 15s)
      --trace                             enable trace mode

SEE ALSO

On this page