# ApeMind CLI installation

ApeMind CLI connects your terminal, scripts and AI agents to ApeMind.
It is a standalone binary; Node.js, Python and a local server are not required.
Desktop includes the CLI, so Desktop users do not need a separate installation.

## Install on macOS or Linux (x64 and ARM64)

Requires curl and either shasum or sha256sum. Copy this into your terminal:

```sh
curl -fsSL https://apemind.ai/ap/install.sh | APEMIND_VERSION=latest sh
```

The installer selects the OS and architecture, verifies the published SHA-256
checksum, and installs to ~/.local/bin by default. If that directory is not on PATH:

```sh
export PATH="$HOME/.local/bin:$PATH"
```

Add the same PATH line to ~/.zshrc or ~/.bashrc for new terminals.

## Install on Windows (x64 and ARM64)

Run this single line in PowerShell:

```powershell
$env:APEMIND_VERSION = "latest"; Invoke-RestMethod https://apemind.ai/ap/install.ps1 | Invoke-Expression
```

The installer verifies SHA-256 and adds %LOCALAPPDATA%\ApeMind\bin to your
user PATH. Open a new PowerShell window if the command is not found.

## Verify and sign in

```sh
apemind --help
apemind auth login
apemind capabilities --json
```

Login requires the user's authorization in a browser. For a machine without a
browser, use apemind auth login --device. Never put passwords or access tokens
in prompts or command-line arguments.

To connect to a private deployment, replace the example URL:

```sh
apemind auth login --server https://apemind.example.com
```

The installers download the official CLI from apemind.ai, even when you later
connect to a private server. They do not deploy an ApeMind server.

## Update, pin or change installation directory

Run the install command again for the latest release.
To pin a release, replace latest with ap/vX.Y.Z.
Set APEMIND_INSTALL_DIR to override the default installation directory.
The Unix PATH example above assumes the default directory.

## Inspect before running

The one-line commands execute a remote installer. Read it before running if
your environment requires script review:

- [Shell installer](https://apemind.ai/ap/install.sh)
- [PowerShell installer](https://apemind.ai/ap/install.ps1)

SHA-256 checks detect a mismatch with the published checksum; they are not
a digital signature or a substitute for trusting the download source.

## Download discovery

- [Download page](https://apemind.ai/download): Desktop downloads and CLI setup.
- [Public release metadata](https://apemind.ai/api/v2/public/desktop-release): JSON with
  desktop and cli products. Only offer direct downloads when enabled is true
  and the matching assets key has a non-empty URL. Missing platforms are unavailable.
  release_url is release information or checksums, not necessarily a binary.
- [Agent index](https://apemind.ai/llms.txt)

Desktop asset keys: mac-arm, mac-intel, windows, linux.
CLI binary keys: mac-arm, mac-intel, linux-amd64, linux-arm64, windows,
windows-arm64. Installer keys: install-sh, install-ps1.
The JSON describes this deployment's published downloads. The installation
commands above use the official apemind.ai latest release channel.
