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.
1. Install
Section titled “1. Install”The installer supports Linux with glibc and macOS, on x86-64 and ARM64. Alpine and other musl systems are not supported.
curl -fsSL https://slashinfra.com/install | shThe 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.
2. Sign in
Section titled “2. Sign in”si loginsi 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.
3. Create a VM
Section titled “3. Create a VM”si create --default0zs0pshr3x0zs0pshr3x is the default SVMsi create --default prints the id of the new VM and makes it the default. Commands that name no VM use the default.
4. Run a command
Section titled “4. Run a command”si exec -c 'echo "Hello from SlashInfra"'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.
5. Open a shell
Section titled “5. Open a shell”si shellsi 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.
Check it works
Section titled “Check it works”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.