Skip to main content
In this tutorial, you use the vms command line tool to create a sandbox, run a command in it, copy a file, open SSH, and delete the sandbox.

Use a sandbox from the terminal with the vms CLI.

Before you start

  • Your workspace needs a plan or a trial. See Choose a plan or start a trial.
  • You need the Owner or Admin role in the workspace to sign in with your browser. A member can sign in with an API key. See Sign in.
  • You need Homebrew on macOS or Linux. To install without Homebrew, see Install.
1

Install the CLI

2

Sign in

The CLI shows a code and opens a page in your browser. Check that the page shows the same code, and choose Approve. The CLI saves an API key for your workspace.
3

Create a sandbox

The CLI waits until the sandbox is running, and writes its ID.
4

Run a command

The CLI streams the output, and exits with the exit code of the command.
5

Copy a file

6

Open a shell

The CLI adds your public key to the sandbox and the host key of ssh.vms.dev to ~/.ssh/known_hosts. Type exit to close the shell.
7

Delete the sandbox

This deletes the sandbox and its files. You cannot undo this.

Check the result

Run vms ls. The list does not show agent-42.

Next steps