Skip to content
English
Dashboard

CLI Commands

Use snapvm --help or snapvm help <command> in your terminal for the most current help output.

These options can be used before a command:

| Option | Environment variable | Purpose | | --- | --- | --- | | --api-url <url> | SNAPVM_API_URL | Use a custom SnapVM API URL when your administrator provides one. | | --org <slug>, -o <slug> | SNAPVM_ORG | Choose the organization for the command. | | --machine <name-or-id>, -m <name-or-id> | SNAPVM_MACHINE | Choose the machine for the command. |

Example:

snapvm --org my-team --machine frontend-lab console

Sign in through the browser:

snapvm login

Use --web-url only when your workspace administrator gives you a custom SnapVM web URL.

Remove stored CLI credentials:

snapvm logout

Update the installed CLI:

snapvm update

List machines:

snapvm list

Options:

  • --output table|json changes the output format.
  • --all lists machines owned by all users when your role allows it.
  • --user-id me|all|user_xxx filters by owner.

Create a machine:

snapvm create --name frontend-lab

Options:

  • --name <name> sets the machine name.
  • --launch-type sprites|external chooses the launch type exposed by your deployment.
  • --package <npm-package> installs an npm package during initial setup. Repeat the flag to install more than one package.
  • --package-manager bun|npm chooses the package manager for --package.
  • --output summary|json changes the output format.

Example:

snapvm create --name automation-lab --package typescript --package-manager npm

Permanently delete a machine:

snapvm destroy frontend-lab

Deletion is permanent. Move important files, repositories, generated data, and local databases elsewhere before destroying a machine.

Activate a machine for the current directory:

snapvm use frontend-lab

After this, commands such as snapvm exec and snapvm console use that machine when run from the same directory.

Remove the local context:

snapvm use --unset

Run a command inside the selected machine:

snapvm exec pwd
snapvm exec --dir ~/projects/app npm test

Alias:

snapvm x pwd

Options:

  • --dir <path> sets the working directory.
  • --env KEY=value passes environment variables. Repeat the flag for multiple values.
  • --stdin forwards standard input.
  • --tty allocates an interactive terminal.

Open an interactive shell in the selected machine:

snapvm console

Alias:

snapvm c

Create a checkpoint:

snapvm checkpoint create --comment "before dependency upgrade"

List checkpoints:

snapvm checkpoint list
snapvm checkpoint list --output json

Show checkpoint details:

snapvm checkpoint info <version-id>

Delete a checkpoint:

snapvm checkpoint delete <version-id>

Restore from a checkpoint:

snapvm restore <version-id>

Restoring changes the machine back to the selected checkpoint. Save or move any work you need to keep before restoring.

snapvm machines remains available for older workflows, but new usage should prefer the top-level commands:

snapvm list
snapvm create --name frontend-lab
snapvm destroy frontend-lab