Skip to content

From your terminal

Install the si command, sign in, and run a command in a VM from your own terminal. You end with the output of that command.

The installer supports Linux with glibc and macOS, on x86-64 and ARM64. Alpine and other musl systems are not supported.

Terminal window
curl -fsSL https://slashinfra.com/install | sh

The script installs si at $HOME/.local/bin/si. In a terminal, it adds that directory to your PATH when it is missing and turns on tab completion, in the profile of zsh, bash or fish. Open a new terminal after the install.

Terminal window
si login

si login prints an approval URL and a code, and opens your browser. Approve the code there. The CLI then saves the key in ~/.config/si/config.json.

New accounts need approval before they can create a VM. The dashboard shows your status.

Terminal window
si create --default
Output
0zs0pshr3x
0zs0pshr3x is the default SVM

si create --default prints the id of the new VM and makes it the default. Commands that name no VM use the default.

Terminal window
si exec -c 'echo "Hello from SlashInfra"'
Output
Hello from SlashInfra

-c runs the text as a shell script with bash -c in the VM. The output comes back to your terminal, and the exit code is the command’s.

Terminal window
si shell

si shell connects your local terminal to a bash session in the VM. A plain shell ends when its connection closes. Start tmux or zellij with si shell --program tmux, and open the same program again to return to your session.

You should see Hello from SlashInfra in your terminal. The VM stays until you delete it. si rm deletes it and its files, and it clears the default.

  • Run commands: input, output, a working directory and a timeout.
  • si svm: list your VMs, wait for their state and set their sleep policy.
  • Sleep and wake: what the VM keeps when it sleeps between commands.