Provision, connect to, monitor, schedule, and destroy Azure or Scaleway VMs used as remote devcontainer and GPU hosts, with SSH keys and 2FA handled.
pks vm <command> [options]$ pks vm initProvision a new Azure or Scaleway VM interactively
$ pks vm listList every tracked VM with live power status
$ pks vm statusInspect one VM and act on it from a menu
$ pks vm start my-vmStart a stopped VM and wait for SSH
$ pks vm stop my-vmDeallocate a VM but keep its disk
$ pks vm destroyPermanently delete a VM and its cloud resources
pks vm is the command group for cloud machines you rent, use, and give back — Azure VMs and Scaleway GPU instances that act as remote hosts for devcontainers, Claude sessions, and workloads too heavy for a laptop. It provisions the box, generates and stores the SSH key, registers the machine as a named pks SSH target, and tracks it so every later command can find it by name.
pks vm init walks an interactive wizard: pick a cloud, authenticate, name the machine, choose size and region, and confirm. It generates an ed25519 keypair under ~/.pks-cli/keys/, provisions the machine, waits for port 22, and registers an SSH target so pks ssh connect <name> and pks claude --ssh-target <name> work immediately. Every other subcommand operates on that tracked list, merged with live discovery from the provider.
pks actions.pks vm init lists live Azure SKUs with prices and lets you filter by RAM and vCPU, or lists Scaleway GPU types first when you pick that cloud.pks vm start blocks until the machine has a public IP and port 22 answers, then prints the connection panel.pks vm list merges local metadata with cloud discovery, probes power state and disk usage concurrently, and prunes records whose cloud resource has vanished.pks vm autoshutdown or the broader pks schedule wizard.pks vm add-ssh-key adopts a machine pks did not create; pks vm export-ssh-key hands access to another machine or agent.pks vm manages the machine, not what runs on it. Provision with pks vm init, then launch work on the box with pks devcontainer spawn --ssh-target <name> or pks claude --ssh-target <name>. Generic SSH-target management lives in pks ssh once the VM is registered.
Underneath, a provider registry resolves each tracked VM to Azure or Scaleway and merges local metadata with live discovery, so a machine started or stopped in the cloud console still shows the right state. Power and provisioning calls are wrapped by the action guard, which may ask for a time-based one-time password before it proceeds.
~/.pks-cli/vms.json; SSH keys live in ~/.pks-cli/keys/<name>.init · list · status · start · stop · destroy · autoshutdown · add-ssh-key · export-ssh-key · tailscale
| Command | What it does |
|---|---|
pks vm init | Provisions a new Azure or Scaleway VM and registers it as an SSH target. |
pks vm list | Lists every tracked VM with live power state, disk, IP, and size. |
pks vm status | Detailed panel for one VM plus an action menu. |
pks vm start | Starts a VM and waits until SSH answers. |
pks vm stop | Deallocates a VM, preserving its disk. |
pks vm destroy | Permanently deletes a VM and its cloud resources. |
pks vm autoshutdown | Configures idle and daily shutdown for an Azure VM. |
pks vm add-ssh-key | Registers a private key for a VM pks did not provision. |
pks vm export-ssh-key | Prints a snippet installing a VM's key on another machine. |
pks vm tailscale | Joins a VM to your Tailscale tailnet over SSH. |
Note.
pks scheduleis a separate top-level command, notpks vm schedule. It is the interactive superset ofpks vm autoshutdownand adds auto-start scheduling. See Scheduling VM start and stop.
| Setting | Value |
|---|---|
| Idle shutdown on a new Azure VM | 60 minutes |
| SSH key location | ~/.pks-cli/keys/<vm-name> |
| VM metadata store | ~/.pks-cli/vms.json |
| Wait for public IP after start | 5 minutes |
| Cloud-init and Docker wait on Azure | up to 10 minutes |
| Second factor required by default | vm.create, vm.destroy, vm.start |
| Second factor not required by default | vm.stop, vm.autoshutdown.write |
Second-factor requirements are per-user toggleable with pks actions. Scaleway VMs do not support scheduled shutdown; those commands decline with a notice and exit successfully.
pks schedule wizardConfigure idle-based and daily fixed-time shutdown for an Azure VM, or disable both, so a forgotten remote box stops charging you overnight.
pks vm autoshutdown [VM_NAME] [--idle <MINUTES>] [--scheduled <TIME>] [--disable]
Provision an Azure VM or a Scaleway GPU instance interactively, generate its SSH key, and register it as a named pks SSH target ready for devcontainers.
pks vm init [--idle-shutdown <MINUTES>] [--scheduled-shutdown <TIME>]
See every tracked VM with live power state, disk, and IP, then drill into one machine for remote stats and an action menu that can reconnect, prune, or stop it.
pks vm list · pks vm status
Run the power lifecycle of a tracked VM — resume it and wait for SSH, deallocate it while keeping the disk, or permanently delete it and its cloud resources.
pks vm start|stop [VM_NAME] · pks vm destroy
Use the top-level pks schedule wizard to set daily auto-start, daily auto-shutdown, and idle shutdown on an Azure VM in one multi-select pass.
pks schedule
Adopt a VM that pks did not provision by pasting its private key, and export a known key so another machine or agent can reach the same box over SSH.
pks vm add-ssh-key [VM_NAME] · pks vm export-ssh-key [VM_NAME]
Install the Tailscale client on a cloud VM over SSH and join it to your tailnet, so the machine can reach NAS and LAN devices behind your home network.
pks vm tailscale [VM_NAME]