> ## 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.

> ## Agent Instructions
> Treat these docs and the Whop MCP server as the source of truth for Whop API behavior. Don't infer endpoint behavior from marketing pages.
> MCP server: connect https://mcp.whop.com/mcp (streamable HTTP, browser sign-in, no API key in the client config) to search these docs and read or change live Whop data. Setup: https://docs.whop.com/developer/guides/ai_and_mcp.md
> Whop CLI: install with `curl -fsSL https://whop.com/install.sh | sh` to scaffold, run, and deploy Whop apps and websites. It acts on production, not the sandbox. Overview: https://docs.whop.com/cli/overview.md Agent mode: https://docs.whop.com/cli/agent-mode.md
> Hosting: Whop serves a site or app from the build `whop apps deploy` uploads, with rollbacks, secrets, and server logs. Guide: https://docs.whop.com/developer/websites/hosting.md
> Plugins: in Claude Code, run `/plugin marketplace add whopio/plugins`, then `/plugin install whop@whop`. Guide: https://docs.whop.com/developer/guides/plugins/claude-code.md Every agent tool: https://docs.whop.com/developer/ai/overview.md
> Environments: build and test in the sandbox (API `https://sandbox-api.whop.com/api/v1`, keys at https://sandbox.whop.com/dashboard/developer, SDK environment `Sandbox`; no real money). Production (API `https://api.whop.com/api/v1`, keys at https://whop.com/dashboard/developer, SDK environment `Production`, the SDK default) moves real money, so use it only at launch. The two share no accounts, keys, products, or webhooks, and their keys look identical: never mix them. Sandbox guide: https://docs.whop.com/developer/guides/sandbox.md Comparison: https://docs.whop.com/developer/quickstart.md
> API: send `Authorization: Bearer <API_KEY>` from your server only, and pin a dated version with the `Api-Version-Date` header. OpenAPI spec: https://api.whop.com/api/v1/openapi.json
> Which API: build on the Current API, whose pages live under https://docs.whop.com/api-reference/ (start at https://docs.whop.com/api-reference/overview.md). Pages under /api-reference/legacy/ are the Legacy API. Use one only when https://docs.whop.com/api-reference/stability.md lists the resource as Legacy-only.

# Whop CLI

> Instala la Whop CLI, inicia sesión y gestiona todo tu negocio desde la terminal: 74 grupos de comandos de comercio, dinero, anuncios y apps.

La Whop CLI (`whop`) lleva la API actual a tu terminal: despliega apps, crea productos, define precios, envía pagos, publica anuncios y consulta estadísticas. Todos los comandos también funcionan de forma no interactiva para scripts y agentes de IA.

> [!WARNING]
>
> La CLI no tiene modo sandbox ni de prueba. Todos los comandos se ejecutan en producción, y muchos pueden crear recursos reales o mover dinero real. Los comandos que modifican el estado piden confirmación, y `whop send --dry-run` muestra una vista previa de un pago sin enviarlo.

## Instalar

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

```powershell Windows theme={null}
irm https://github.com/whopio/whop-public-cli/releases/latest/download/install.ps1 | iex
```

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

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

> [!NOTE]
>
> Los scripts de instalación colocan `whop` en `~/.local/bin` (`%USERPROFILE%\.local\bin` en Windows) y no editan tu perfil de shell. Si después no se encuentra `whop`, añade ese directorio a tu `PATH`, por ejemplo `export PATH="$HOME/.local/bin:$PATH"`. Establece `WHOP_INSTALL_DIR` para instalarla en otro lugar. El paquete de npm requiere Node.js 22 o posterior.

Comprueba la instalación. Imprime el número de versión:

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

`whop --help` también muestra la versión de la API que usa la CLI.

## Iniciar sesión

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

`whop login --method oauth` abre un navegador. `whop login --method api-key --apiKey whop_xxx` no es interactivo. Los perfiles te permiten mantener varias identidades: `whop auth list`, `whop auth switch` y `whop auth status` los gestionan. Después, elige el negocio sobre el que actúa la CLI:

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

## Qué incluye

74 grupos de comandos, organizados como los agrupa `whop --help`:

| Categoría | Grupos |
| - | - |
| Primeros pasos | `quickstart` · `apps` |
| Comercio | `products` · `variants` · `promo-codes` · `checkout-configurations` · `waitlist-entries` · `memberships` · `shipments` · `reviews` · `review-reports` · `product-affiliates` |
| Recursos principales | `accounts` · `users` · `members` · `team-members` · `search` · `external-accounts` · `social-accounts` |
| Pagos | `payments` · `invoices` · `confirmation-tokens` · `payment-quotes` · `setup-intents` · `refunds` · `resolution-center-cases` · `dispute-alerts` · `disputes` · `payment-rules` · `financing-applications` |
| Dinero | `deposits` · `transfers` · `payouts` · `ledgers` · `cards` · `cashback-rules` · `swaps` · `trades` · `verifications` · `send` |
| Sitios web | `domains` · `app-installations` · `experiments` |
| Anuncios | `ad-campaigns` · `ad-groups` · `ads` · `audiences` · `ad-pixels` |
| Analítica | `stats` · `people` · `events` · `exports` · `economic-intelligence` |
| Comunicación | `livestreams` · `notifications` · `email-addresses` |
| Partners | `partners` · `partner-referral-requests` |
| Personal | `bounties` · `bounty-submissions` |
| Multimedia | `files` · `media` |
| Desarrollador | `api-keys` · `webhooks` · `permissions` · `api-logs` · `report-feedback` · `ask-question` |
| Autenticación | `auth` · `login` · `logout` |
| Integraciones | `completions` · `mcp` · `skills` |

Consulta [Comandos](https://docs.whop.com/es/cli/commands.md) para ver todos los comandos, o ejecuta `whop <group> --help`.

## Comandos habituales

```bash theme={null}
whop --help                  # all commands
whop products list           # what you're selling
whop variants create --help  # options for any command
whop checkout-configurations create --variant_id plan_xxx   # shareable checkout link
whop stats time-series list  # the metric catalog
whop stats time-series get net_revenue --from 2026-01-01 --to 2026-01-31
whop accounts get jordan     # retrieve a business by route
```

La mayoría de los grupos siguen la misma forma: `whop <resource> list|get|create|update`. Todos los comandos aceptan `--format json` para obtener salida estructurada. Los comandos con ámbito de cuenta usan el negocio seleccionado de forma predeterminada, y `--account_id` elige otro.

## Desplegar una app

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

Compila, comprueba los tipos, sube y promociona a producción el proyecto vinculado. Pasa `--preview` para subirlo sin promocionarlo y publícalo más tarde con `whop apps builds promote <build_id>`. Promocionar una compilación anterior también es la forma de revertir.

Después de un despliegue, lee los logs del servidor de tu app:

```bash theme={null}
whop apps logs app_xxx               # recent logs for your app
whop apps logs app_xxx --level error --query "checkout"
```

## Uso no interactivo

Para CI, scripts o agentes sin interfaz, establece `WHOP_API_KEY` en lugar de iniciar sesión. Crea una key en **Developer** en tu [panel](https://whop.com/dashboard), y consulta [Autenticación y API keys](https://docs.whop.com/es/developer/guides/auth-scoping.md) antes de dársela a un agente.

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

Las instalaciones independientes en macOS y Linux se actualizan solas en segundo plano. Establece `WHOP_CLI_AUTO_UPDATE=0` para recibir solo un aviso. De lo contrario, una terminal interactiva te avisa cuando hay una versión más reciente, y `whop --update` la instala. Las instalaciones con Homebrew se actualizan con `brew upgrade whop`.

## Próximos pasos

> [card] [Comandos](https://docs.whop.com/es/cli/commands.md)
>
> Todos los grupos de comandos, con descripciones de la propia CLI.

> [card] [Modo agente](https://docs.whop.com/es/cli/agent-mode.md)
>
> Sincronización de skills y los flags legibles por máquina.

> [card] [Crea con la CLI y Claude](https://docs.whop.com/es/developer/guides/cli-with-claude.md)
>
> Genera y publica una app de Whop con un agente en el ciclo.

> [card] [Autenticación y API keys](https://docs.whop.com/es/developer/guides/auth-scoping.md)
>
> Limita el alcance de la credencial con la que inicias sesión en la CLI.
