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

# Install the Detail CLI on macOS, Linux, or Windows

> Install the Detail CLI using the one-line installer script or build from source.

The Detail CLI is a single static binary available for macOS, Linux, and Windows. It has no runtime dependencies; just download and run. Install it with the one-line installer script or build it yourself from source.

## Install with the installer script (recommended)

The fastest way to get started is the official installer script, which downloads the correct pre-built binary for your platform and places it on your `PATH`:

```bash theme={null}
curl --proto '=https' --tlsv1.2 -LsSf https://cli.detail.dev | sh
```

Restart your terminal (or run `source ~/.bashrc` / `source ~/.zshrc`) after the script completes.

## Build from source

The Detail CLI is open source and can be cloned from GitHub: [https://github.com/usedetail/cli](https://github.com/usedetail/cli)

If you prefer to build the CLI yourself, clone it and use `cargo install`:

```bash theme={null}
cargo install detail-cli
```

This requires a working [Rust toolchain](https://rustup.rs). The binary is placed in `~/.cargo/bin/detail`.

## Verify the installation

Confirm that the CLI is installed and on your `PATH`:

```bash theme={null}
detail --version
# detail-cli v0.2.5
```

## Update the CLI

Run `detail update` to immediately pull the latest release:

```bash theme={null}
detail update
```

The CLI also checks for updates automatically in the background and prints a notice when a new version is available. Structured JSON output (`--format json`) suppresses the notice to keep machine-readable output clean.

## Shell completions

The CLI can generate completion scripts for Bash, Zsh, Fish, Elvish, and PowerShell. Add the appropriate line to your shell's startup file so completions load in every new session:

```bash theme={null}
# Bash — add to ~/.bashrc
source <(detail completions bash)

# Zsh — add to ~/.zshrc
source <(detail completions zsh)

# Fish — add to ~/.config/fish/config.fish
detail completions fish | source

# PowerShell — add to $PROFILE
detail completions powershell | Out-String | Invoke-Expression
```

## Config file location

The CLI stores its configuration and authentication token in a single TOML file:

| Platform      | Path                                    |
| ------------- | --------------------------------------- |
| Linux / macOS | `~/.config/detail-cli/config.toml`      |
| Windows       | `%LOCALAPPDATA%\detail-cli\config.toml` |

If the `XDG_CONFIG_HOME` environment variable is set, it takes precedence over the default location on all platforms.

<Note>
  You can hand-edit `config.toml` to override advanced settings such as the API URL. The CLI preserves any comments and custom keys you add.
</Note>

## Next steps

Once the CLI is installed, authenticate with your Detail account:

```bash theme={null}
detail auth login
```

See [Authentication](/cli/authentication) for the full login guide.
