# Whop CLI Use these instructions to set up the Whop CLI for a user. ## Setup 1. Install the CLI: ```sh curl -fsSL https://whop.com/install.sh | sh ``` If `curl` is unavailable, run `npm i -g @whop/cli` instead. 2. Verify the installation, install the CLI's agent skills, and read its command manifest: ```sh whop --version whop skills add whop --llms ``` 3. Authenticate the user with OAuth. Start this command in the background and redirect stdout to a file so you can read events while it keeps running: ```sh whop login --method oauth --format jsonl ``` Read the first JSONL event's `authorizationUrl` and pass that exact value programmatically to the user's default browser with `open`, `xdg-open`, or `start`. Wait for the CLI process to exit after the user approves access. If the user provides an API key instead, authenticate with: ```sh WHOP_API_KEY= whop login --method api-key --format json ``` 4. Confirm authentication: ```sh whop auth status --format json ``` For OAuth logins, list the businesses the user can manage: ```sh whop auth accounts --list --format json ``` If the correct business is not active, ask the user which one to use, then set it: ```sh whop auth accounts --format json ``` API-key logins are already tied to one business and do not need this step. 5. Tell the user what they can do next. Use `whop --help` to discover workflows and `--format json` for structured command output. ## References - Whop developer docs: https://docs.whop.com/developer/cli - Whop API: https://api.whop.com/