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

# CLI Installation

> Install the @dzapio/ai CLI and run your first local session.

## Requirements

* Node.js 18+ (Node 20+ recommended)
* `OPENAI_API_KEY`

## Install globally

```bash theme={null}
npm install -g @dzapio/ai
```

Package: `https://www.npmjs.com/package/@dzapio/ai`

If your npm scope config points `@dzapio` to another registry:

```bash theme={null}
npm install -g @dzapio/ai --@dzapio:registry=https://registry.npmjs.org
```

CLI command aliases:

```bash theme={null}
dzap
dzapai
DzapAI
```

## First launch

```bash theme={null}
export OPENAI_API_KEY=sk-...
dzap
```

On first run, the CLI prompts for profile fields and writes `~/.dzapai/config.json`.

## Update

```bash theme={null}
npm install -g @dzapio/ai@latest
```

## Uninstall

```bash theme={null}
npm uninstall -g @dzapio/ai
```

## Troubleshooting

<AccordionGroup>
  <Accordion title="Command not found">
    Ensure your npm global bin path is on `PATH` after global install.
  </Accordion>

  <Accordion title="Startup fails">
    Verify `OPENAI_API_KEY` is set and valid.
  </Accordion>

  <Accordion title="Some tools fail">
    Configure optional provider keys in [Configuration](/ai/cli/configuration).
  </Accordion>
</AccordionGroup>
