> For the complete documentation index, see [llms.txt](/llms.txt).
> A full single-fetch corpus is available at [llms-full.txt](/llms-full.txt).
---
title: Install the CLI
description: Install the AGNT5 CLI, verify it, and authenticate with your account.
sdk: none
category: CLI
last_verified: 2026-07-31
---

The `agnt5` CLI scaffolds projects, runs `agnt5 dev` against AGNT5 from your laptop, and ships projects to managed environments.

**Prerequisites:**

- macOS (Apple Silicon or Intel), Linux (x86_64 or ARM64), or Windows via WSL2. Native Windows binaries are not yet shipped.
- An AGNT5 account. Sign up at [app.agnt5.com](https://app.agnt5.com).


> Using a coding agent? Copy the setup prompt from the [docs home](/docs). The agent installs the CLI, signs you in, and sets up your project.


## Step 1: Install




**curl (macOS, Linux, WSL2):**

```bash
curl -LsSf https://agnt5.com/cli.sh | bash
```




**Homebrew (macOS, Linux):**

```bash
brew install agnt5dev/agnt5/agnt5
```




If Homebrew asks you to confirm the third-party tap before installing, accept it, or add the tap explicitly first: `brew tap agnt5dev/agnt5`, then `brew install agnt5`.

The installer writes `agnt5` to `~/.agnt5/bin` and appends that directory to your shell's `PATH`. Open a new terminal, or reload the current shell:

```bash
source ~/.zshrc                    # zsh
source ~/.bashrc                   # bash
source ~/.config/fish/config.fish  # fish
```

## Step 2: Verify

```bash
agnt5 version
```

Expected output (version numbers will vary):

```
agnt5-cli version 20261016-351c8f
  - Go version: go1.24.5
  - Platform: darwin/arm64
  - Built: built on 2026-10-16 04:55:25
```

## Step 3: Authenticate

Sign in via OAuth in your browser:

```bash
agnt5 auth login
```

The CLI opens your default browser, signs you in, and writes the issued API key to `~/.agnt5/config.yaml`. Confirm:

```bash
agnt5 auth status
```

The output names the authenticated user, the active environment, and the API base URL.

For CI or non-interactive environments, pass an API key directly or set `AGNT5_API_KEY` in the environment:

```bash
agnt5 auth login --api-key agnt5_sk_...
# or
export AGNT5_API_KEY=agnt5_sk_...
```

API keys are issued during the OAuth flow above, or generated in [app.agnt5.com](https://app.agnt5.com) account settings. See the [auth command reference](/docs/cli/auth.md) for `agnt5 auth logout` and the full flag list.

## Upgrade

Update to the latest version with the CLI itself:

```bash
agnt5 upgrade
```

`agnt5 upgrade` is an alias for `agnt5 version update`. If you installed with Homebrew, upgrade through Homebrew instead:

```bash
brew upgrade agnt5
```

If neither works (for example, an older binary without the self-update command), re-run the install script. It replaces the binary with the latest version:

```bash
curl -LsSf https://agnt5.com/cli.sh | bash
```

## Troubleshooting

**`command not found: agnt5`** — your shell hasn't picked up the new `PATH` entry. Confirm `~/.agnt5/bin` is on `PATH`:

```bash
echo $PATH | tr ':' '\n' | grep agnt5
```

If nothing prints, add this line to your shell config and reload:

```bash
export PATH="$HOME/.agnt5/bin:$PATH"   # bash, zsh
# fish:
fish_add_path "$HOME/.agnt5/bin"
```

**`agnt5 version` still fails after fixing `PATH`** — the binary did not download. Re-run the install command and check its output for errors before further `PATH` debugging.

**Authentication errors after running `agnt5 dev` or `agnt5 deploy`** — re-authenticate with `agnt5 auth login`. If you switched accounts or contexts, run `agnt5 auth logout` first.

## Uninstall

Remove the CLI with the method that matches how you installed it. Both methods leave your credentials in `~/.agnt5/config.yaml` — the last step removes those too.

### Installed with curl

1. Delete the binary directory:

   ```bash
   rm -rf ~/.agnt5/bin
   ```

2. Remove the `PATH` entry the installer appended to your shell config — delete the line containing `.agnt5/bin` from `~/.zshrc` (zsh), `~/.bashrc` (bash), or `~/.config/fish/config.fish` (fish).

3. Open a new terminal and confirm `agnt5` no longer resolves:

   ```bash
   command -v agnt5
   ```

### Installed with Homebrew

1. Uninstall the formula:

   ```bash
   brew uninstall agnt5
   ```

2. Remove the tap if you no longer need it:

   ```bash
   brew untap agnt5dev/agnt5
   ```

### Remove credentials and configuration

Whichever install method you used, `agnt5 auth login` stored an API key in `~/.agnt5/config.yaml`. Delete the directory to finish the cleanup:

```bash
rm -rf ~/.agnt5
```

> **Note:** This signs the machine out of AGNT5. If you reinstall later, run `agnt5 auth login` again.

## Next steps

- **[Quickstart](/docs/quickstart.md)** — build and run the Hacker News digest workflow.
- **[CLI overview](/docs/cli/overview.md)** — the core commands, and links to every command and flag.
