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

# CLI

> Install the Whop CLI, sign in, and get your first shareable checkout link without leaving your terminal.

The Whop CLI (`whop`) lets you sell on Whop and manage your business from your terminal. Create products, set pricing, get shareable checkout links, deploy apps, and pull your stats — every command also works non-interactively for scripts and AI agents.

## Install

<CodeGroup>
  ```bash macOS / Linux theme={null}
  curl -fsSL https://whop.com/install.sh | sh
  ```

  ```bash Homebrew theme={null}
  brew install whopio/tap/whop
  ```

  ```bash npm theme={null}
  npm install -g @whop/cli
  ```
</CodeGroup>

<Note>
  Prebuilt binaries cover macOS and Linux. On other platforms, install via npm (requires Node.js 22 or later).
</Note>

Confirm it works:

```bash theme={null}
whop --version
```

## Get started

Run the CLI with no arguments:

```bash theme={null}
whop
```

That's it — it signs you in through your browser and walks you to your first shareable checkout link, creating a business account and product along the way if you don't have one yet.

Already set up? `whop quickstart` re-checks your status and creates whatever is missing.

## Everyday commands

```bash theme={null}
whop --help                  # all commands
whop products list           # what you're selling
whop plans create --help     # options for any command
whop checkout-configurations create --plan_id plan_xxx   # shareable checkout link
whop stats time_series       # your numbers
```

Every command takes `--format json` for structured output, and most groups follow the same shape: `whop <resource> list|get|create|update`.

| Command group                      | What it manages                        |
| ---------------------------------- | -------------------------------------- |
| `products`, `plans`                | The things you sell and their pricing  |
| `checkout-configurations`          | Shareable, prefilled checkout links    |
| `payouts`, `transfers`, `ledgers`  | Moving money and reading balances      |
| `stats`                            | Financial time series for reporting    |
| `apps`                             | Fully-hosted web apps on `*.whop.app`  |
| `ads`, `ad-campaigns`, `ad-groups` | Paid acquisition                       |
| `auth`                             | Profiles, switching accounts, API keys |

## Deploy an app

```bash theme={null}
whop apps deploy
```

One command verifies the current directory is a Whop-ready Vite app — offering to scaffold a new one or link an existing app if not — then builds, typechecks, uploads, and promotes the build to production. Pass `--skip_promote` to upload a preview build and `whop apps builds promote <build_id>` to ship it later.

After a deploy, read your app's server logs — every `console.log`, uncaught exception, and failed request, kept for 7 days:

```bash theme={null}
whop apps logs                    # recent logs for the linked app
whop apps logs --level error --since 1h
whop apps logs --query "checkout"
```

## Use it with AI agents

The CLI is self-describing, so agents can discover and drive every command:

```bash theme={null}
whop --llms          # machine-readable manifest of all commands
whop mcp add         # register as an MCP server (e.g. Claude Desktop)
whop skills add      # generate agent skills
```

For non-interactive use — CI, scripts, or headless agents — set `WHOP_API_KEY` instead of logging in. Create a key under **Developer → API keys** in your [dashboard](https://whop.com/dashboard).

```bash theme={null}
WHOP_API_KEY=whop_xxx whop products list --format json
```

## Update

The CLI keeps itself up to date in the background. To update immediately:

```bash theme={null}
whop upgrade
```
