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

# Overview

> Install the invoice-ai CLI, log in with your browser, and manage invoices from your terminal.

## Install

Requires Node 20 or later.

```bash theme={null}
npm install -g @horizonpay/invoice-ai-cli
```

Or run it once without installing: `npx @horizonpay/invoice-ai-cli invoices list`.

## Log in

```bash theme={null}
invoice-ai login
```

The CLI shows a one-time code and opens your browser. Approve the device there. The CLI gets a new API key for this machine and stores it in your OS keychain.

* `invoice-ai whoami` shows the account, key and profile in use.
* `invoice-ai logout` revokes the key and forgets it.
* `invoice-ai login --no-browser` prints the login URL instead of opening a browser.
* `invoice-ai login --api-key inv_live_...` stores an existing key.
* `invoice-ai login --profile work` adds another account. Switch with `invoice-ai switch work`, or pass `--profile work` to any command.

## Everyday commands

```bash theme={null}
invoice-ai customers create --name "Acme Ltd" --email billing@acme.example
invoice-ai invoices create                     # guided wizard
invoice-ai invoices create --customer cus_Nf3kQ8pR2mX7vB1cT9wL4sZ6 --price price_... --send
invoice-ai invoices list --status open
invoice-ai invoices send in_Pb2Xk7Mv4Qs9Lr1Wd6Tn3Fh8
invoice-ai invoices pdf in_Pb2Xk7Mv4Qs9Lr1Wd6Tn3Fh8 --open
invoice-ai webhooks test http://localhost:3000/api/webhooks/invoice-ai --secret whsec_...
invoice-ai api GET /business                   # call any endpoint
```

Global flags: `--json` for JSON output, `--yes` to skip confirmations, `--profile` to pick an account, `--debug` to log each request.

See the [command reference](/cli/commands) for every command and flag.


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