# Install the Airdress CLI

The `airdress` CLI is one self-contained binary. Builds exist for Linux
(x86_64, arm64), macOS (Intel, Apple silicon) and Windows (x86_64). Pick one
of the three ways below; each one checks a SHA-256 before anything runs.

## One line, on Linux and macOS

```sh
curl -fsSL https://get.airdress.co/cli | sh
```

The installer reads the latest release from `downloads.airdress.co`,
downloads the binary for your platform, verifies its SHA-256 and installs it
as `~/.local/bin/airdress`. It never edits your shell startup files: when
`~/.local/bin` is not on your `PATH`, it prints the line to add. It needs
`curl` (or `wget`), `jq` and `sha256sum` (or `shasum`).

Two environment variables change what it installs:

| Variable | Effect |
| --- | --- |
| `AIRDRESS_CLI_VERSION` | Install this version (for example `v0.1.2`) instead of the latest |
| `AIRDRESS_CLI_HOME` | Install under this prefix instead of `~/.local` |

```sh
curl -fsSL https://get.airdress.co/cli | AIRDRESS_CLI_VERSION=v0.1.2 sh
```

Then check what you got. The first word must be `airdress`:

```sh
airdress --version
```

**Caution:** If `airdress --version` prints `airdress-agent`, the installer picked the
agent binary. Install from the downloads below instead, and tell
support@airdress.co.

## A .deb package, on Debian and Ubuntu

Every release publishes a `.deb` per architecture. It installs
`/usr/bin/airdress` and nothing else: no service, no configuration.

```sh
V=0.1.2
ARCH=$(dpkg --print-architecture)          # amd64 or arm64
BASE=https://downloads.airdress.co/airdress-cli/v$V
curl -fsSLO "$BASE/airdress_${V}_${ARCH}.deb"
curl -fsSLO "$BASE/airdress_${V}_${ARCH}.deb.sha256"
sha256sum -c "airdress_${V}_${ARCH}.deb.sha256"
sudo apt install "./airdress_${V}_${ARCH}.deb"
```

## A single binary, on any platform

Download `airdress-<platform>` and its `.sha256` from the release, check
it, and put it on your `PATH`.

| Platform | File |
| --- | --- |
| Linux x86_64 | `airdress-linux-amd64` |
| Linux arm64 | `airdress-linux-arm64` |
| macOS Intel | `airdress-darwin-amd64` |
| macOS Apple silicon | `airdress-darwin-arm64` |
| Windows x86_64 | `airdress-windows-amd64.exe` |

Each lives at `https://downloads.airdress.co/airdress-cli/<version>/<file>`.
The list of versions, and which one is the latest, is in
[`index.json`](https://downloads.airdress.co/airdress-cli/index.json).

```sh
    V=v0.1.2
    F=airdress-linux-amd64                  # pick yours from the table
    curl -fsSLO "https://downloads.airdress.co/airdress-cli/$V/$F"
    curl -fsSLO "https://downloads.airdress.co/airdress-cli/$V/$F.sha256"
    sha256sum -c "$F.sha256"                # macOS: shasum -a 256 -c "$F.sha256"
    install -m 0755 "$F" ~/.local/bin/airdress
    ```
  ```powershell
    $V = "v0.1.2"
    $F = "airdress-windows-amd64.exe"
    Invoke-WebRequest "https://downloads.airdress.co/airdress-cli/$V/$F" -OutFile airdress.exe
    Invoke-WebRequest "https://downloads.airdress.co/airdress-cli/$V/$F.sha256" -OutFile airdress.exe.sha256
    (Get-FileHash airdress.exe -Algorithm SHA256).Hash.ToLower()
    Get-Content airdress.exe.sha256          # the two hashes must match
    ```
    Then move `airdress.exe` into a directory on your `PATH`.
  ## The agent binary, `airdress-agent`

`airdress-agent` makes a machine an [agent device](/agents/) of your
airdress. It is a separate binary in the same release, for Linux and macOS
only, as `airdress-agent-<platform>` and as an `airdress-agent` `.deb`:

```sh
V=0.1.2
ARCH=$(dpkg --print-architecture)
BASE=https://downloads.airdress.co/airdress-cli/v$V
curl -fsSLO "$BASE/airdress-agent_${V}_${ARCH}.deb"
curl -fsSLO "$BASE/airdress-agent_${V}_${ARCH}.deb.sha256"
sha256sum -c "airdress-agent_${V}_${ARCH}.deb.sha256"
sudo apt install "./airdress-agent_${V}_${ARCH}.deb"
```

You only need it for agent devices. Everything else on these pages is the
`airdress` CLI.

## Updates and completions

Once installed, the CLI updates itself:

```sh
airdress update                 # to the newest release
airdress update --check         # just ask; exits 0 either way
airdress update --target v0.1.2 # a specific version
```

A CLI installed from the `.deb` is better updated the same way you installed
it, so `apt` keeps knowing which version is on disk.

Shell completions for bash, zsh, fish, PowerShell and elvish:

```sh
airdress completion bash > ~/.local/share/bash-completion/completions/airdress
airdress completion fish > ~/.config/fish/completions/airdress.fish
```

`airdress completion zsh`, `powershell` and `elvish` print theirs the same
way; put the output wherever your shell loads completions from.

## Next

[Sign in and choose your airdress](/cli/getting-started/).