# Run your first command (/docs/quickstart)



Vanish runs a command from your working tree on managed Linux compute, uncommitted files included. Output streams to your terminal, and the files the command writes are staged on your machine until you apply them.

Sign in with GitHub. Runs spend the starter credits on your account, and your balance is on the [account page](https://api.vanishcompute.com/account).

## Install [#install]

```sh
curl -fsSL https://vanishcompute.com/install.sh | bash
vanish version
```

The installer supports macOS, and Linux with glibc, on arm64 and x86\_64. It writes `vanish` to `/usr/local/bin` when you can write there, and to `~/.local/bin` otherwise. `~/.local/bin` is not on the default `PATH` on macOS, so if `vanish version` answers `command not found`, add it. The installer prints the exact line for your shell:

```sh
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
export PATH="$HOME/.local/bin:$PATH"
vanish version
```

## Sign in [#sign-in]

```sh
vanish login
```

Complete GitHub sign-in in your browser. Vanish saves a credential for this machine. See [login](./login.md) for headless machines and CI.

## Run in your own repository [#run-in-your-own-repository]

Open a terminal in your repository. The first run in a repository uploads and hashes the tree, so on a large one it takes a while: about a minute and a half on a 27 GB tree. After that, Vanish adds roughly a second to a command in a normal repository.

This command reads your working tree and writes a file, with no language toolchain needed:

```sh
vanish sh -c 'pwd; ls; printf "hello from Vanish\n" > vanish-example.txt'
vanish results
```

The command's stdout and stderr arrive on your terminal, and Vanish exits with the command's exit code. Copy the token printed by `vanish results`, preview the changes, then apply them:

```sh
vanish results apply TOKEN --dry-run
vanish results apply TOKEN --yes
cat vanish-example.txt
```

Replace `TOKEN` with the actual token. If applying would overwrite existing files, read the dry run before you use `--force --yes`.

Then run your test suite with the [toolchain](./toolchains.md) it needs, for example `vanish --toolchain rust cargo test`. Workers run Linux, so binaries built on your Mac do not run there. [Runs and recovery](./runs.md) covers flags, limits and errors.

If a Run fails in a way you cannot explain, bring the Run ID it printed to the [Discord](https://discord.gg/n8pwXcqmAM) while it is still on screen. The Run ID is what lets us trace it.
