avr vm
Manage long-running VMs (SSH/RDP/VNC).
avr vm [OPTIONS] COMMAND [ARGS]...Subcommands
Section titled “Subcommands”avr vm bootstrap
Section titled “avr vm bootstrap”Set up a RUNNING VM with your dev essentials over SSH.
avr vm bootstrap [OPTIONS] VM_ID_OR_NAMEEach selected step runs on the VM and streams its output; bootstrap stops atthe first failure. Secrets (GitHub token, forwarded env values, agentcredentials) ride SSH stdin, never argv. A forwarded CLAUDE_CODE_OAUTH_TOKENis a year-long, subscription-wide bearer, so it is only carried under theexplicit --forward-agent-creds opt-in. Bootstrap changes survive pauseand resume on the preserved disk. Example:avr vm bootstrap cvm-abc123 --setup-github --install claude,codex \ --repo https://github.com/me/project --env AWS_REGION=eu-north-1Arguments
VM_ID_OR_NAME
Options
--org, -o<TEXT>— Organization ID. Uses default org if not specified (see: avr config set org).-i, --identity<PATH>— SSH private key file. Sets IdentitiesOnly=yes, so ssh offers only this key and other configured identities, including matching keys in the agent.--setup-github / --no-setup-github— Forward your localgh auth tokeninto the VM (gh auth login --with-token + gh auth setup-git).--install<TEXT>— Install an agent CLI (repeatable or comma-separated): claude, codex. (repeatable)--forward-agent-creds— Forward the installed agents' credentials from your environment (ANTHROPIC_API_KEY / CLAUDE_CODE_OAUTH_TOKEN / OPENAI_API_KEY). If claude has none, offers to runclaude setup-token.--install-avr— Install the native avr release matching this CLI in ~/.local/bin (requires curl, tar and SHA-256 tooling).--repo, -R<TEXT>— Clone this git repo into the VM's home directory.--ref<TEXT>— Branch, refs/pull/<number>/head or 40-character commit SHA to check out after cloning (requires --repo). A pull request or commit is checked out detached. Tags are not supported.--dotfiles<TEXT>— Clone this dotfiles repo and run its installer.--env<TEXT>— Set an env var in the VM: KEY=VALUE, or a bare KEY to forward it from your environment. Repeatable. (repeatable)--run<TEXT>— Run a custom script last: an inline script, or @path to a file.--print— Print the ordered plan (secrets redacted) without running.
avr vm capabilities
Section titled “avr vm capabilities”List available operating systems, architectures, sizes, and quotas.
avr vm capabilities [OPTIONS]Options
--org, -o<TEXT>— Organization ID or slug.--json— Emit capabilities and quotas as JSON.
avr vm create
Section titled “avr vm create”Create a long-running VM.
avr vm create [OPTIONS]Provisioning is asynchronous: poll `avr vm show <id>` until the state isRUNNING and endpoints are populated, or pass --wait to block until then andprint a ready-to-paste connect command with the password baked in. Theresponse carries a one-time password for the VM's local account; save itnow, it is never stored.With --from-spawn-script it creates an agent sandbox for a coding-agentvendor's work order instead, for that vendor's controller to run. Forexample, as Claude Code's spawn-runner hook: exec avr vm create --from-spawn-script claude-code --org <org-id>Organization admins can pass --egress-rules inline or as @path to a JSON file. Scoped tokens cannot set these rules. Use an array of up to 100 rule objects. Every rule requires action ("allow" or "deny"). A non-default rule takes exactly one of fqdn (hostname) or cidr (IPv4 CIDR). Protocol is "any" by default and also accepts "tcp", "udp" and "icmp". TCP and UDP rules may set port_start and port_end to integers from 0 to 65535. One endpoint matches one port. Two form an inclusive range with start at or below end. Omitting both matches all ports.
An optional is_default boolean defaults to false. At most one rule can set it to true, with protocol "any" and no destination or ports. Agent sandboxes always deny unmatched traffic. The first matching non-default rule in array order wins. An optional nonnegative integer position is ignored.
Save these HTTPS rules as meteor-egress.json.
cat > meteor-egress.json <<'JSON'[ {"action":"allow","fqdn":"install.meteor.com","protocol":"tcp","port_start":443}, {"action":"allow","fqdn":"static.meteor.com","protocol":"tcp","port_start":443}, {"action":"allow","fqdn":"packages.meteor.com","protocol":"tcp","port_start":443}, {"action":"allow","fqdn":"warehouse.meteor.com","protocol":"tcp","port_start":443}]JSONApply the file when creating or updating a VM.
avr vm create --name meteor --os linux --size 2-vcpu --egress-rules @meteor-egress.jsonavr vm update meteor --egress-rules @meteor-egress.jsonOptions
--org, -o<TEXT>— Organization ID. Uses default org if not specified (see: avr config set org).--name<TEXT>— Unique VM name. Generated by the server when omitted.--os<CHOICE>— Guest operating system. Required unless --from-spawn-script, which is always linux. (choices:linux,macos,windows)--arch<TEXT>— CPU architecture (see: avr vm capabilities). Defaults to the selected OS's default.--idempotency-key<TEXT>— Retry creates safely with the same organization-scoped key.--https-port<INTEGER RANGE>— Publish a guest port as public HTTPS. Repeatable; the first is default. (repeatable)--os-version<TEXT>— Guest OS version (e.g. ubuntu-26.04; see: avr vm capabilities). Defaults to the latest version for the chosen --os.--size<TEXT>— Hardware tier, e.g. 2-vcpu (see: avr vm capabilities). Availability: linux x86_64 1-32 vCPU, linux arm64 up to 16, macos 8/16, windows 2-16. Required unless --from-spawn-script, which defaults to 4-vcpu.--ssh-key<TEXT>— SSH public key, or @path to read one from a file. Repeatable. (repeatable)--remote-desktop / --no-remote-desktop— Enable a remote desktop: RDP (Windows, Linux) or VNC (macOS Screen Sharing). Availability depends on OS version; the server validates.--ttl<TEXT>— TTL before pause, or deletion when pause is unavailable (e.g. 8h, 7d, 1800s). Default 8h, max 7d.--egress-rules<TEXT>— Per-VM egress firewall rules as a JSON array, or @path to a JSON file.--repo, -R<TEXT>— Git repository (owner/repo) to preload into the VM at boot. Best-effort; the checkout is warmed from Avrea's mirror when available.--ref<TEXT>— Branch, refs/pull/<number>/head or 40-character commit SHA to preload (default: the repository's default branch). Requires --repo. Tags are not supported.--fetch-depth<INTEGER RANGE>— Git history to preload with --repo, like actions/checkout fetch-depth: 1 (default) = branch tip, N = N commits, 0 = all branches and tags.--disable-cache<TEXT>— Disable a build/CI cache on this VM (repeatable, or comma-separated). Narrowing only: a VM can turn off an inherited cache but not turn one on. e.g. gha, packages, bazel, gradle, maven, turbo, nx, go-build (or a raw cache.<name>.enabled key). Repository-scoped caches require --repo. (repeatable)--wait— Wait until the VM is RUNNING, then print a ready-to-paste connect command with the password baked in.--wait-timeout<INTEGER>— Seconds to wait when --wait is set. (default:300)--json— Emit the raw API response (VM plus one-time password) as JSON.--from-spawn-script<CHOICE>— Run as a coding-agent vendor controller's spawn script: read the work order the controller passes in its environment, create an agent sandbox that starts the vendor's worker, print its ID, and exit 0 when created or already created, 1 to have the vendor retry, 2 or higher when refused. Needs an organization ID (org-...) from --org or the default org. (choices:claude-code)
avr vm delete
Section titled “avr vm delete”Delete a VM.
avr vm delete [OPTIONS] VM_ID_OR_NAMEDelete a VM. Asynchronous while live: shows DELETING until the node confirms the stop.
Arguments
VM_ID_OR_NAME
Options
--org, -o<TEXT>— Organization ID. Uses default org if not specified (see: avr config set org).--yes, -y— Skip the confirmation prompt.--wait— Wait until the VM is fully deleted before returning.--wait-timeout<INTEGER>— Seconds to wait when --wait is set. (default:300)--json— Emit the raw API response as JSON.
avr vm firewall
Section titled “avr vm firewall”Watch firewall blocks on a running VM or agent sandbox.
avr vm firewall [OPTIONS] VM_ID_OR_NAMEWatch firewall blocks on a running VM or agent sandbox until its run ends. Pass the VM ID or display name. Each snapshot shows recent denied DNS names and cumulative packet and byte counts by IP firewall rule. Destination IPs of dropped packets are unavailable.
Arguments
VM_ID_OR_NAME— VM ID or display name.
Options
--org, -o<TEXT>— Organization ID or slug.--json— Emit the full live snapshot, including top destinations, as one JSON object per line.
avr vm fork
Section titled “avr vm fork”Boot a copy of a PAUSED VM's disk; the source remains paused.
avr vm fork [OPTIONS] VM_ID_OR_NAMECopies the source's machine configuration and disk, including its SSH host keys and password, but discards memory state. A scoped-token password may be replaced without returning its replacement. No password is returned; use update --rotate-password if needed. Requires admin access to the source.
Arguments
VM_ID_OR_NAME
Options
--name<TEXT>— Fork name. Defaults to a name derived from the source.--ttl<TEXT>— Fork TTL (e.g. 8h, 7d). Default 8h, max 7d.--org, -o<TEXT>— Organization ID or slug.--wait— Wait for the fork to become connectable.--wait-timeout<INTEGER RANGE>— Seconds to wait when --wait is set. (default:300)--json— Emit the fork VM as JSON.
avr vm list
Section titled “avr vm list”List the organization's VMs, newest first (deleted ones excluded).
avr vm list [OPTIONS]Options
--org, -o<TEXT>— Organization ID. Uses default org if not specified (see: avr config set org).--state<CHOICE>— Filter by lifecycle state. (choices:PENDING,STARTING,RUNNING,PAUSING,PAUSED,STOPPING,DELETING,FAILED)--scope<CHOICE>— Visible VMs or only your own. (choices:all,mine· default:all)--sandbox / --no-sandbox— Agent sandboxes only, or human-created VMs only.-L, --limit<INTEGER RANGE>— Max VMs to return. (default:50)--cursor<TEXT>— Pagination cursor from a previous response.--json— Emit the VM list as JSON.
avr vm metrics
Section titled “avr vm metrics”Show CPU/memory/IO metrics for a VM's current or last run.
avr vm metrics [OPTIONS] VM_ID_OR_NAMEArguments
VM_ID_OR_NAME
Options
--org, -o<TEXT>— Organization ID or slug.--source<CHOICE>— Metric source. Repeatable; defaults to cpu and memory. (choices:cpu,memory,filesystem,load,disk-io,disk-ops,network· repeatable)--start<INTEGER>— Start time in Unix seconds (single-shot only).--end<INTEGER>— End time in Unix seconds (single-shot only).--watch, -w— Stream live metrics until the run completes; Ctrl-C to exit.--json— Emit metrics JSON; watch emits one snapshot per line.
avr vm pause
Section titled “avr vm pause”Pause a RUNNING Linux x86_64 VM while preserving its disk.
avr vm pause [OPTIONS] VM_ID_OR_NAMEBy default the snapshot is disk-only: the filesystem survives, but resume performs a fresh boot and running processes do not. Pass --memory to also preserve guest memory and continue processes from where they stopped.
Arguments
VM_ID_OR_NAME
Options
--org, -o<TEXT>— Organization ID. Uses default org if not specified (see: avr config set org).--memory— Include guest memory and device state so running processes continue on resume.--wait— Wait until the VM reaches PAUSED before returning.--wait-timeout<INTEGER>— Seconds to wait when --wait is set. (default:300)--json— Emit the raw API response as JSON.
avr vm port-forward
Section titled “avr vm port-forward”Forward one or more local ports to TCP ports on the VM over SSH.
avr vm port-forward [OPTIONS] VM_ID_OR_NAMEThe generic primitive behind avr vm rdp / avr vm vnc: opens
127.0.0.1:<local> -> <VM>:<guest> through the VM's SSH endpoint for each
--port, and holds them open until Ctrl-C. Bring your own client.
avr vm port-forward cvm-abc123 --port 8080avr vm port-forward cvm-abc123 --port 8080 --port 5432 --port 9000:3000Arguments
VM_ID_OR_NAME
Options
--org, -o<TEXT>— Organization ID. Uses default org if not specified (see: avr config set org).--port<TEXT>— Guest TCP port to forward, optionally with a local bind port (e.g. 8080 or 9000:8080). Repeatable. (repeatable · required)--local-port<INTEGER RANGE>— Local port to bind for a single bare --port (with multiple ports, use --port LOCAL:GUEST instead).-i, --identity<PATH>— SSH private key file. Sets IdentitiesOnly=yes, so ssh offers only this key and other configured identities, including matching keys in the agent.--print— Print the ssh command and exit, without opening the tunnel.
avr vm rdp
Section titled “avr vm rdp”Open an RDP desktop on a Windows or Linux VM over an SSH tunnel.
avr vm rdp [OPTIONS] VM_ID_OR_NAMEForwards a local port to the guest's RDP service (:3389) through the VM's SSH endpoint, so the desktop is never exposed publicly. Holds the tunnel open until Ctrl-C; pass --launch to also start a local RDP client.
Arguments
VM_ID_OR_NAME
Options
--org, -o<TEXT>— Organization ID. Uses default org if not specified (see: avr config set org).--local-port<INTEGER RANGE>— Local port to bind (default: an unused port).-i, --identity<PATH>— SSH private key file. Sets IdentitiesOnly=yes, so ssh offers only this key and other configured identities, including matching keys in the agent.--launch / --no-launch— Also start a local RDP client, instead of just printing the connect command.--print— Print the tunnel and client commands and exit, without opening the tunnel.
avr vm resume
Section titled “avr vm resume”Resume a PAUSED VM from its preserved snapshot.
avr vm resume [OPTIONS] VM_ID_OR_NAMEThe existing password remains unless resume withdraws credentials supplied to a scoped token. Use update --rotate-password to obtain a fresh one. If a memory restore cannot complete, retry with --discard-memory to boot the preserved disk without restoring running processes.
Arguments
VM_ID_OR_NAME
Options
--org, -o<TEXT>— Organization ID. Uses default org if not specified (see: avr config set org).--discard-memory— Ignore saved memory state and fresh-boot the preserved disk (recovery for a stuck memory restore).--wait— Wait until the VM is RUNNING and connectable.--wait-timeout<INTEGER>— Seconds to wait when --wait is set. (default:300)--json— Emit the raw API response as JSON.
avr vm rotate-https-label
Section titled “avr vm rotate-https-label”Replace public HTTPS URLs to invalidate leaked URLs.
avr vm rotate-https-label [OPTIONS] VM_ID_OR_NAMERoutes change once ingress applies the rotation. On a running VM, AVREA_SANDBOX_URL (in new login shells) and /vm/info follow within seconds; a paused VM picks up the new URLs at resume.
Arguments
VM_ID_OR_NAME
Options
--org, -o<TEXT>— Organization ID or slug.--json— Emit the updated VM as JSON.
avr vm show
Section titled “avr vm show”Show a VM's details, including connection endpoints and egress rules.
avr vm show [OPTIONS] VM_ID_OR_NAMEArguments
VM_ID_OR_NAME
Options
--org, -o<TEXT>— Organization ID. Uses default org if not specified (see: avr config set org).--json— Emit the full VM record (with egress rules) as JSON.
avr vm ssh
Section titled “avr vm ssh”Open an SSH session to a RUNNING VM, or run a command on it.
avr vm ssh [OPTIONS] VM_ID_OR_NAME [SSH_ARGS]...With no extra arguments this opens an interactive session. Anything after
-- is run as a remote command instead, e.g.:
avr vm ssh cvm-abc123 -- uname -aA one-off -- <cmd> runs in a non-login shell that sources no startup files,
so it won't see env forwarded by avr vm bootstrap. Pass --login to run it
in a login shell instead (e.g. so claude finds its subscription token):
avr vm ssh cvm-abc123 --login -- claude -p 'summarize the repo'Pass --session <name> to attach to (or create) a persistent tmux session,
so the shell and any long-running process in it survive a dropped
connection; reconnect with the same name to resume where you left off. A
-- <cmd> given with --session runs only when the session is first created;
reattaching to an existing session resumes it and does not rerun the command.
When the VM's endpoint publishes a host key it is pinned, so the first
connect neither prompts nor is spoofable. If the endpoint has no host key,
avr prints a warning and falls back to trust-on-first-use, so this
spoofing protection is conditional rather than guaranteed. For
port-forwarding use avr vm port-forward.
Arguments
VM_ID_OR_NAME[SSH_ARGS...]
Options
--org<TEXT>— Organization ID. Uses default org if not specified (see: avr config set org).-i, --identity<PATH>— SSH private key file. Sets IdentitiesOnly=yes, so ssh offers only this key and other configured identities, including matching keys in the agent.--session<TEXT>— Attach to (or create) a persistent tmux session by this name, so the shell and any long-running process in it survive a dropped connection. Reconnect with the same --session. A-- <cmd>runs only when the session is created, not on reattach.--login— Run the-- <cmd>in a login shell (bash -lc) so it sees bootstrap-forwarded env like CLAUDE_CODE_OAUTH_TOKEN. Needed for a non-interactive command; a plainssh host cmdshell sources nothing.--print— Print the ssh command instead of running it.
avr vm ssh-config
Section titled “avr vm ssh-config”Print (or --append) an ssh_config Host block for a RUNNING VM.
avr vm ssh-config [OPTIONS] VM_ID_OR_NAMEReach the VM with plain ssh, scp/rsync, and VS Code / Cursor Remote-SSH,
host key pinned, without wrapping each tool. Redirect it yourself:
avr vm ssh-config cvm-abc123 >> ~/.ssh/configor let --append manage the block for you (idempotent — re-run after a resume to refresh the endpoint in place):
avr vm ssh-config cvm-abc123 --appendThe block references a dedicated known_hosts file that this command writes the pinned host key into (one entry per VM). If the endpoint publishes no host key, the block falls back to accept-new (trust-on-first-use) and a warning is printed.
Arguments
VM_ID_OR_NAME
Options
--org, -o<TEXT>— Organization ID. Uses default org if not specified (see: avr config set org).-i, --identity<PATH>— IdentityFile to write into the block, with IdentitiesOnly yes.--host-alias<TEXT>— Host alias for the block (default: avr-<vm-id>).--known-hosts-file<PATH>— Where to pin the host key (default: ~/.ssh/avr_known_hosts).--append— Write the block into your SSH config (default: ~/.ssh/config) instead of printing it, replacing any prior block for the same alias in place.--config-file<PATH>— SSH config file for --append (default: ~/.ssh/config).
avr vm update
Section titled “avr vm update”Update a VM's name, TTL, or SSH keys, or rotate its password.
avr vm update [OPTIONS] VM_ID_OR_NAMEUse avr vm pause, avr vm resume, or avr vm delete for lifecycle changes.
--egress-rules replaces the entire VM rule list. Pass [] to clear it. See avr vm create --help for the JSON format and an example.
Arguments
VM_ID_OR_NAME
Options
--org, -o<TEXT>— Organization ID. Uses default org if not specified (see: avr config set org).--name<TEXT>— New display name.--ttl<TEXT>— Extend the TTL window from now (e.g. 8h, 7d). Max 7d.--ssh-key<TEXT>— Replace stored SSH public keys (literal or @path). Repeatable. Applies live on a RUNNING VM, otherwise at next resume. (repeatable)--rotate-password— Provision a fresh one-time password (returned in the response).--egress-rules<TEXT>— Replace the per-VM egress rules with this JSON array (or @path to a file).--json— Emit the raw API response as JSON.--https-port<INTEGER RANGE>— Replace public HTTPS ports. Repeatable; applies live on a RUNNING VM, otherwise at next start or resume. (repeatable)--clear-https-ports— Publish no HTTPS ports. Applies live on a RUNNING VM, otherwise at next start or resume.
avr vm usage
Section titled “avr vm usage”Show usage metering (runtime / vCPU / memory seconds) per VM.
avr vm usage [OPTIONS]Each power-on cycle's window is clipped to the requested period and summed. Deleted VMs are included: usage survives deletion.
Options
--org, -o<TEXT>— Organization ID. Uses default org if not specified (see: avr config set org).--start<DATETIME>— Inclusive period start (default: 30 days ago).--end<DATETIME>— Exclusive period end (default: now).--json— Emit the usage report as JSON.
avr vm vnc
Section titled “avr vm vnc”Open a VNC desktop on a macOS VM (Screen Sharing) over an SSH tunnel.
avr vm vnc [OPTIONS] VM_ID_OR_NAMEForwards a local port to the guest's Screen Sharing service (:5900) through the VM's SSH endpoint, so the desktop is never exposed publicly. Holds the tunnel open until Ctrl-C; pass --launch to also open Screen Sharing.
Arguments
VM_ID_OR_NAME
Options
--org, -o<TEXT>— Organization ID. Uses default org if not specified (see: avr config set org).--local-port<INTEGER RANGE>— Local port to bind (default: an unused port).-i, --identity<PATH>— SSH private key file. Sets IdentitiesOnly=yes, so ssh offers only this key and other configured identities, including matching keys in the agent.--launch / --no-launch— Also start a local VNC client (macOS Screen Sharing), instead of just printing the connect command.--print— Print the tunnel and client commands and exit, without opening the tunnel.