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

# Installation

> Install and authenticate the bx CLI

## Install

```bash theme={null}
cd cli
pnpm install
pnpm build
```

The CLI binary is `bx`. Create a global alias for convenience:

```bash theme={null}
alias bx="node /path/to/cli/dist/index.js"
```

## Authenticate

### Browser login (recommended)

```bash theme={null}
bx login
```

This opens your browser to the BoxCrew dashboard. An API key is created automatically and sent back to the CLI — no copy-pasting required.

**How it works:**

1. The CLI starts a temporary local HTTP server
2. Opens `https://boxcrew.ai/cli-auth?port=PORT` in your browser
3. An API key named "CLI" is created and sent back
4. The key is stored in the CLI config

| Flag                   | Description               | Default                  |
| ---------------------- | ------------------------- | ------------------------ |
| `--api-url <url>`      | Override the API URL      | `https://api.boxcrew.ai` |
| `--frontend-url <url>` | Override the frontend URL | `https://boxcrew.ai`     |

### Paste login (headless environments)

For SSH sessions, CI/CD, or environments without a browser:

```bash theme={null}
bx login --paste
```

This prompts you to paste an API key manually. Create one first in the dashboard under **Settings > API Keys**.

### Environment variables

| Variable               | Description                       |
| ---------------------- | --------------------------------- |
| `BOXCREW_API_URL`      | Override the BoxCrew API URL      |
| `BOXCREW_FRONTEND_URL` | Override the BoxCrew frontend URL |

## Logout

```bash theme={null}
bx logout
```

Removes stored credentials from the CLI config.
