Runs and recovery
A Run is one command executed by Vanish. Put vanish in front of the command, with any Vanish flags in between:
vanish --cpu 8 --mem 16 sh -c 'echo hello'
vanish --dry-run --cpu 8 --mem 16 sh -c 'echo hello'
vanish config--dry-run prints the run plan without starting anything, and vanish config prints every effective setting and where it came from. There is no run subcommand and no -- separator. When your program has the same name as a Vanish subcommand, call it by path, as in vanish ./serve.
The default machine is 8 vCPU and 16 GiB on x86_64, served from machines that are already running. A larger --cpu or --mem, --arch arm64, --packages or --toolchain starts the Run on a new machine instead, which takes 20 seconds or more before the first output, so use them when the work is worth that wait.
Workers run Linux. Your working tree travels with the command; the tools installed on your laptop do not. Toolchains lists what the worker has and how to add the rest.
The command's stdout, stderr and exit code come back to your shell, and Ctrl-C cancels the Run. Files the command writes are staged, not written into your working tree, including the partial output of a command that failed. vanish results apply TOKEN writes a staged result in. To write results in as each Run finishes, pass --apply, or put apply = true in .vanish.toml at the root of your repository. If you change a file during a Run and the Run writes the same file, --apply keeps your version, leaves the whole result staged, and lists the paths.
Limits and errors
| Error or condition | What to do |
|---|---|
| Command succeeded, but its output files are missing | They are staged. Run vanish results, then vanish results apply TOKEN, or rerun with --apply. |
Command not found, or Cannot find module | The tool or the project's dependencies are not on the worker. Install dependencies in the same Run, as in vanish sh -c "npm ci && npm test", and see toolchains for other tools. |
| Not signed in, or unauthorized | Run vanish login; see login. |
| Credits exhausted | Check your balance on the account page, and ask in the Discord if you need more. |
| Concurrent Run limit reached | Wait for an active Run to finish, then retry. |
| Invalid request | Check vanish help, and put Vanish flags before the command. |
| Capacity or temporary service failure | Keep the Run ID or operation ID and the error text. Check whether the command started before you rerun it. |
| Result download lost | Keep the Run ID and snapshot reference it printed. Check vanish results before rerunning a command with external side effects. |
| Apply would overwrite files | Run vanish results apply TOKEN --dry-run, inspect, then decide whether to pass --force --yes. |
Rerunning a command that already started can repeat its network requests and other external effects. Each Run starts with no processes from earlier Runs, so start a server and its client in the same command when they must run together.