> ## Documentation Index
> Fetch the complete documentation index at: https://docs.serval.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Installing the Serval CLI

> How to install and update the Serval command-line interface

# Installing the Serval CLI

The Serval CLI is available for macOS, Linux, and Windows. We recommend using Homebrew for macOS users for the easiest installation and update experience.

## macOS (Homebrew)

The recommended way to install the Serval CLI on macOS is through Homebrew:

### Install

```bash theme={null}
brew install --cask servalhq/serval/serval
```

### Update

To update to the latest version:

```bash theme={null}
brew update && brew install --cask servalhq/serval/serval
```

## Manual Installation

For other platforms or if you prefer manual installation:

1. Download the appropriate binary for your platform from the [releases page](https://github.com/ServalHQ/homebrew-serval/releases)
2. Extract the archive
3. Move the `serval` binary to a location in your PATH (e.g., `/usr/local/bin`)
4. Make it executable: `chmod +x serval`

### Linux Example

```bash theme={null}
# Download the latest release (replace VERSION with actual version)
wget https://github.com/ServalHQ/homebrew-serval/releases/download/VERSION/serval-linux-amd64.tar.gz

# Extract
tar -xzf serval-linux-amd64.tar.gz

# Move to PATH
sudo mv serval /usr/local/bin/

# Make executable
chmod +x /usr/local/bin/serval
```

### Windows

1. Download the Windows binary from the releases page
2. Extract the ZIP file
3. Add the directory containing `serval.exe` to your PATH environment variable
4. Or move `serval.exe` to a directory already in your PATH

## Verify Installation

After installation, verify that the CLI is working:

```bash theme={null}
serval version
```

This should display the installed version of the Serval CLI.

## Shell Completion

The Serval CLI supports autocompletion for various shells. To enable it:

### Bash

```bash theme={null}
serval completion bash > /etc/bash_completion.d/serval
```

### Zsh

```bash theme={null}
serval completion zsh > "${fpath[1]}/_serval"
```

### Fish

```bash theme={null}
serval completion fish > ~/.config/fish/completions/serval.fish
```

### PowerShell

```powershell theme={null}
serval completion powershell | Out-String | Invoke-Expression
```
