# Installation

> Install clai with Go, Nix, or from source, and verify your config directory.

Canonical URL: https://www.clai.chat/docs/installation/ · Version: 1.0 · Updated: 2026-10-21

Full site index: https://www.clai.chat/llms.txt

`clai` ships as a single static Go binary with no runtime dependencies.

## Install with Go

With a Go toolchain installed, run:

```sh
go install github.com/baalimago/clai@latest
```

Ensure `$(go env GOPATH)/bin` is on your `PATH`, then verify the binary:

```sh
clai version
```

## Install with Nix

Run `clai` directly from the flake or install it into your Nix profile:

```sh
nix profile install github:baalimago/clai
```

## Build from source

Clone the repository and install locally:

```sh
git clone https://github.com/baalimago/clai.git
cd clai
go install .
```

## First-run configuration directory

On its first run, `clai` initializes its configuration directory at `<os.UserConfigDir()>/.clai` (typically `~/.config/.clai` on Linux and `~/Library/Application Support/.clai` on macOS). Override the location at any time with `CLAI_CONFIG_DIR`.

Run `clai setup` to interactively configure text, photo, and video models, profiles, and shell contexts. See [Configuration](/docs/reference/configuration/) for every file in `~/.config/.clai/`.
