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

> ## Agent Instructions
> Read the relevant procedure and prerequisites before suggesting commands. Cite the section and give an observable check. Treat sample data as illustrative. Report product actions and results only when verified in the user's environment.

# Install the aiv CLI

> Install aiv from a fixed public release on Linux, macOS or Windows x64, verify SHA-256, and make the client available in new terminals.

`aiv` is the AI Vision command-line client for sign-in, Agent integration, queries, and deployment. Installing the client does not start platform services. It requires neither Docker, an AI Vision sign-in, nor a Skill.

On Linux and macOS, use the CLI for supported Agent integrations. The web-generated `aiv connect` command needs the client on the machine that runs the Agent. A command with temporary installation authorization can run without `aiv auth login`. See [Connect your first Agent](https://aivision.mintlify.site/en/web-quickstart.md). For remote operations on an existing platform, follow the [Windows x64 steps](#install-windows-x64).

## Choose a fixed public release

The commands use [v0.6.0-daily.20261123.2](https://github.com/antgroup/ai-vision/releases/tag/v0.6.0-daily.20261123.2), a published Daily pre-release. To use another version, open its page in [Ant AI Vision Releases](https://github.com/antgroup/ai-vision/releases) and copy the full version tag. Check that it includes both your platform archive and `SHA256SUMS`. Use the same full tag for every download.

For platform deployment, use the CLI, `release-manifest.json`, configuration and service images from the same version. For distributed Docker, the example release provides `release-images.vars.yaml` for OceanBase CE and `release-seekdb.vars.yaml` for seekdb. See [Docker deployment](https://aivision.mintlify.site/en/deployment/docker.md) for verification and commands.

## Linux and macOS

Keep the installed `~/.local/bin/aiv` and make `aiv` available directly in new terminals; the extracted copy in the download directory is not the long-term entry point. These manual steps also work with older release installers that only print a PATH hint. An installer cannot change its parent terminal: the current terminal still needs the one-time `export` below, followed by persistent configuration. Updated source alone does not establish that a downloaded installer configures PATH automatically.

### 1. Create a download directory and select your platform

You need `curl`, `tar`, `awk`, `install`, and either `sha256sum` or `shasum`. Run the installation steps in one terminal to retain `AIV_RELEASE_TAG` and `AIV_PACKAGE`. If you chose another release, replace the tag before running the command.

```bash theme={null}
AIV_RELEASE_TAG=v0.6.0-daily.20261123.2
AIV_WORKDIR=$(mktemp -d) && cd "$AIV_WORKDIR"
```

Run the package assignment for this machine's operating system and CPU architecture.

> [tab] Linux x64
>
> ```bash theme={null}
> AIV_PACKAGE=aiv-linux-x64.tar.gz
> ```

> [tab] Linux ARM64
>
> ```bash theme={null}
> AIV_PACKAGE=aiv-linux-arm64.tar.gz
> ```

> [tab] macOS Intel
>
> ```bash theme={null}
> AIV_PACKAGE=aiv-darwin-x64.tar.gz
> ```

> [tab] macOS Apple Silicon
>
> ```bash theme={null}
> AIV_PACKAGE=aiv-darwin-arm64.tar.gz
> ```

### 2. Download the archive and checksum file

Download the selected archive and `SHA256SUMS` from the versioned Release selected by `AIV_RELEASE_TAG`. This step does not install anything.

```bash theme={null}
AIV_RELEASE_URL="https://github.com/antgroup/ai-vision/releases/download/$AIV_RELEASE_TAG"
curl --fail --location --output "$AIV_PACKAGE" "$AIV_RELEASE_URL/$AIV_PACKAGE" &&
curl --fail --location --output SHA256SUMS "$AIV_RELEASE_URL/SHA256SUMS"
```

These public downloads require no GitHub sign-in. If a download fails, check network access, the exact tag and the file name on the Release page before retrying in a new empty directory.

### 3. Verify only the selected archive, then install

`SHA256SUMS` also lists other platforms and release assets. The command below selects exactly one record for your archive. It does not require downloading or checking the other assets. A failed checksum, missing record, or duplicate record stops extraction and installation.

```bash theme={null}
awk -v file="$AIV_PACKAGE" \
  '$2 == file { print; count++ } END { if (count != 1) exit 1 }' \
  SHA256SUMS > SHA256SUMS.selected &&
if command -v sha256sum >/dev/null 2>&1; then
  sha256sum -c SHA256SUMS.selected
else
  shasum -a 256 -c SHA256SUMS.selected
fi &&
tar -xzf "$AIV_PACKAGE" aiv &&
mkdir -p "$HOME/.local/bin" &&
install -m 755 aiv "$HOME/.local/bin/aiv" &&
export PATH="$HOME/.local/bin:$PATH" &&
command -v aiv &&
aiv --version
```

**Success:** the checksum displays your archive name and `OK`, then `command -v aiv` points to `~/.local/bin/aiv`. With the example tag, `aiv --version` reports `0.6.0-daily.20261123.2`. If it differs, check the resolved binary path and download source first. The `export` applies to this terminal.

### 4. Configure PATH for new terminals

Open the configuration file for your shell in a text editor. Keep its existing contents and append the following line. Do not add it again if the same setting is already present:

```bash theme={null}
export PATH="$HOME/.local/bin:$PATH"
```

| Shell used by the new terminal | Configuration file |
| - | - |
| zsh | `${ZDOTDIR:-$HOME}/.zshrc`; this is `~/.zshrc` when `ZDOTDIR` is unset. Keep any existing `ZDOTDIR` setting. |
| Bash | `~/.bashrc`. For a login shell, also add the line to the existing login configuration that Bash reads: the first existing file among `~/.bash_profile`, `~/.bash_login`, and `~/.profile`, in that order. If none exists, you can create `~/.bash_profile`. |

Save the file and open a **new terminal window**, then run:

```bash theme={null}
command -v aiv
aiv --version
```

The resolved path must be the installed `~/.local/bin/aiv`, followed by its version. Run this check in the new terminal; a successful `export` in the installation terminal does not prove persistent PATH configuration. If you still see `command not found`, check the shell used by the new terminal and the configuration it reads. After verification, you can remove the downloaded archive, checksum files, and extracted copy from the temporary directory; keep `~/.local/bin/aiv`. See [download troubleshooting](https://aivision.mintlify.site/en/help/faq.md) for download failures.

Before connecting, check the capabilities of the client resolved by this terminal:

```bash theme={null}
aiv connect --help
```

Web-generated commands require `--base-url`, `--space-id`, `--agent-uuid`, and `--installation-token` in the help output. Keep the Agent UUID and temporary installation authorization together. Privacy mode also requires `--collection-mode`. If an option is missing or produces `unknown flag` or `unknown option`, use a release confirmed to include it or follow the [source build steps](#build-seekdb-cli), then check help again. Keep the authorization options when retrying.

For platform deployment, also inspect `aiv cast --help`, `aiv status --help` and `aiv logs --help`, including support for the selected target. Docker / Compose use `aiv redeploy` and `aiv destroy` for rebuilding and stopping; Kubernetes updates by repeating `cast` and does not support those two lifecycle commands.

### 5. Continue with your goal

* Using a web-generated command: return to [Connect your first Agent](https://aivision.mintlify.site/en/web-quickstart.md).
* Connect an Agent to an existing platform: [CLI quickstart](https://aivision.mintlify.site/en/quickstart.md).
* Query or export existing records: [CLI queries](https://aivision.mintlify.site/en/guides/cli.md).
* Set up a platform: [Choose a deployment method](https://aivision.mintlify.site/en/deployment/overview.md).

## Windows x64

Use the Windows x64 client in PowerShell 7 for `auth`, `space`, `key`, and `query` against an existing AI Vision server. Use a supported Linux or macOS machine for Agent installation, and follow the [deployment guide](https://aivision.mintlify.site/en/deployment/overview.md) for the target host's requirements.

In PowerShell 7, run the block below. If you selected another release, replace `$aivReleaseTag` with its full tag. The commands download into a new temporary directory, verify that the released ZIP has exactly one matching checksum entry, and copy `aiv.exe` to `%LOCALAPPDATA%\AI Vision\bin` after SHA-256 verification. Close any running copy of `aiv.exe` before upgrading.

```powershell theme={null}
& {
    $ErrorActionPreference = 'Stop'
    $aivReleaseTag = 'v0.6.0-daily.20261123.2'
    $aivReleaseUrl = "https://github.com/antgroup/ai-vision/releases/download/$aivReleaseTag"
    $aivDownloadDir = Join-Path ([IO.Path]::GetTempPath()) ('aiv-' + [guid]::NewGuid().ToString('N'))
    [void][IO.Directory]::CreateDirectory($aivDownloadDir)
    $aivZip = Join-Path $aivDownloadDir 'aiv-windows-x64.zip'
    $aivSums = Join-Path $aivDownloadDir 'SHA256SUMS'

    Invoke-WebRequest -Uri "$aivReleaseUrl/aiv-windows-x64.zip" -OutFile $aivZip
    Invoke-WebRequest -Uri "$aivReleaseUrl/SHA256SUMS" -OutFile $aivSums
    $aivEntry = @(Get-Content -LiteralPath $aivSums | Where-Object {
        $_ -match '^[a-f0-9]{64}  aiv-windows-x64\.zip$'
    })
    $aivHash = (Get-FileHash -LiteralPath $aivZip -Algorithm SHA256).Hash
    if ($aivEntry.Count -ne 1 -or $aivHash -ine $aivEntry[0].Substring(0, 64)) {
        throw 'SHA-256 verification failed for aiv-windows-x64.zip.'
    }

    $aivExtractDir = Join-Path $aivDownloadDir 'extracted'
    Expand-Archive -LiteralPath $aivZip -DestinationPath $aivExtractDir
    $aivBin = Join-Path $env:LOCALAPPDATA 'AI Vision\bin'
    [void][IO.Directory]::CreateDirectory($aivBin)
    $aivExe = Join-Path $aivBin 'aiv.exe'
    Copy-Item -LiteralPath (Join-Path $aivExtractDir 'aiv.exe') -Destination $aivExe -Force
    Write-Output "Verified and installed $aivExe"
}
```

Open Windows **Environment Variables** and add the directory containing `aiv.exe` to your user `Path`. Keep existing entries. Open a **new PowerShell window** and run:

```powershell theme={null}
(Get-Command aiv -ErrorAction Stop).Source
aiv --version
```

The path should end in `AI Vision\bin\aiv.exe`, and the example release reports `0.6.0-daily.20261123.2`. If PowerShell resolves another installation, check the order of your `Path` entries. After the check passes, follow [CLI queries](https://aivision.mintlify.site/en/guides/cli.md) to use an authorized SpaceKey against your existing platform.

## Optional: build a CLI with seekdb support

The [lightweight seekdb option for Docker](https://aivision.mintlify.site/en/deployment/docker.md) requires a client with `OB_BACKEND` support. First check the installed CLI:

```bash theme={null}
aiv gen --vars -o -
```

The template must contain `OB_BACKEND`. `-o -` prints to the terminal without creating or overwriting a variables file. If the command or entry is missing, choose a release with the required capability or build the Linux or macOS CLI from the verified public source below.

Building requires **Git, Go 1.24+, make and Python 3**. This example uses the public release tag from `ci`. Its source commit is [`d4f81c3`](https://github.com/antgroup/ai-vision/commit/d4f81c376bc4630f51a87090e39afc11afe67135). Start in a directory where you can create `ai-vision`.

```bash theme={null}
git clone --depth 1 --branch v0.6.0-daily.20261123.2 --single-branch \
  https://github.com/antgroup/ai-vision.git ai-vision &&
cd ai-vision/aivision-cli &&
test "$(git rev-parse HEAD)" = d4f81c376bc4630f51a87090e39afc11afe67135 &&
make build &&
mkdir -p "$HOME/.local/bin" &&
install -m 755 ./aiv "$HOME/.local/bin/aiv" &&
export PATH="$HOME/.local/bin:$PATH" &&
command -v aiv &&
aiv gen --vars -o -
```

After confirming the installed path and `OB_BACKEND` in the template, continue with [Docker deployment](https://aivision.mintlify.site/en/deployment/docker.md). The source build reports the tracked `VERSION`, which is `0.6.0` at this commit. To reproduce the published Daily deployment, use the Daily archive and matching service images. Check the database image's architecture requirements for your target. For development, see the [product CLI README](https://github.com/antgroup/ai-vision/blob/d4f81c376bc4630f51a87090e39afc11afe67135/aivision-cli/README.md).

**Optional Compose:** default Docker is unchanged; current source also provides `aiv ... --target compose`. Compose requires Docker Compose 2.27+ and a matching CLI, without host Python or an additional control script. Use a release confirmed to contain this target, or build matching source and inspect `aiv cast --help`. `OB_BACKEND` alone does not establish target support.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.