# Use the Linux CLI release

Use this path when you want rev0 in a terminal or on a Linux server, without the desktop
app. The release is a standalone binary for **x86_64 Linux**, not arm64. You do not need
to clone rev0, install Python, run `uv sync` or build the frontend.

## Download and start

1. Install `git` and an agent CLI on the machine that will run the board. See
   [What you need](install.md#what-you-need) for the optional tools and supported engines.
2. Sign in to [your account page](https://account.rev0.codes) and download
   **`rev0-linux-x86_64`** under **Download rev0**. This is the current release's binary,
   not the `.deb` or AppImage. Those install the desktop app, not a `rev0` command.
   The initial download requires browser sign in; `curl` against the account page
   downloads a sign in page instead. For a server, copy the downloaded file there:

   ```bash
   scp rev0-linux-x86_64 you@server:
   ```

3. In the directory containing the file, run:

   ```bash
   chmod +x rev0-linux-x86_64
   ./rev0-linux-x86_64 --help
   ./rev0-linux-x86_64 serve --with-runner
   ```

4. Leave that terminal running and open [http://127.0.0.1:8000](http://127.0.0.1:8000)
   on the same machine. Complete the setup wizard, sign in an engine under
   **Settings > Engine accounts**, and connect your repository. Repositories and agent
   tools must be available on the board's machine, not just the machine viewing it.

`serve` starts the API and board UI. **`--with-runner` also starts the agents** that pick
up tickets; omit it only for manual agent sessions or a separately started `run` process.
Use Ctrl+C to stop the foreground board and runner. Closing its terminal is not a way to
keep a server running.

### Viewing a server from your laptop

Keep the board bound to its default localhost address and forward its port over SSH:

```bash
ssh -N -L 8000:127.0.0.1:8000 you@server
```

Leave this second terminal open, then visit `http://127.0.0.1:8000` on your laptop.
If your laptop already uses port 8000, use `-L 8001:127.0.0.1:8000` and visit port 8001.
This does not require exposing the board's port to the network.

For direct network access, follow [Reach the board from your phone](phone.md).
Set an access token before binding to a network address. The board can execute commands
on its host: never expose it without authentication and an encrypted transport.

## Use ticket commands

Optionally install the binary into a directory you own on your `PATH`:

```bash
mkdir -p "$HOME/.local/bin"
install -m 755 ./rev0-linux-x86_64 "$HOME/.local/bin/rev0"
export PATH="$HOME/.local/bin:$PATH"
```

Add that PATH setting to your shell configuration to keep it in future terminals.
Start `rev0 serve --with-runner` from this installed copy next time. In another terminal,
while the board is running:

```bash
rev0 list
rev0 create "My first ticket" -w /absolute/path/to/repository -d "What should change"
rev0 show 1
```

Replace `1` with the id returned for your ticket. These commands are clients of a running
board, not an alternative to starting it. For another address or port, set `REV0_API`:

```bash
REV0_API=http://127.0.0.1:8001 rev0 list
```

If the board requires a token, the CLI needs the same `REV0_AUTH_TOKEN`, supplied in your
environment or the board's `~/.rev0/.env`. Do not put it in tickets or commit it.
See [Command line](../reference/cli.md) for the full command list and `rev0 create --help`
for creation options.

## State, updates and common problems

- The binary stores board state in `~/.rev0`, independent of its current directory.
  Replacing the executable does not replace your tickets. See [Back up and restore](backup.md)
  before maintenance; `REV0_DATA_ROOT` selects a different complete state directory.
- In **Settings > System > Updates**, use **Update** when offered. A writable install
  such as `~/.local/bin` allows the binary to replace itself. The previous executable
  is kept with `.prev` appended. See [Updating](install.md#updating) for fallback and rollback.
- **Permission denied:** check the executable bit with `chmod +x`. A filesystem mounted
  `noexec` requires moving the binary to one that permits execution.
- **Exec format error:** check `uname -m`; this download needs `x86_64`.
- **Port already in use:** stop the other board or use `rev0 serve --with-runner --port 8001`,
  then open port 8001 and point separate CLI clients there with `REV0_API`.
- **Tickets do not start:** confirm `--with-runner`, an installed and signed in agent,
  and a repository path on this host. Check [Troubleshooting](troubleshooting.md) for
  browser system libraries and other startup problems.
