@whop/cli
v1.0.0
Published
The Whop CLI — build and manage Whop apps from your terminal. Human and agent friendly.
Readme
Whop CLI
whop is your entire business on the command line. Ship software, sell products, move money, buy ads, hire people, and read the numbers.
whop accounts create --title "Acme" # create a business
whop apps deploy # ship a web app to its domain
whop products create --title "Pro membership" # something to sell
whop checkout-configurations create --variant_id plan_xxx # a link that accepts money
whop media generate --type image --prompt "launch art" # make an ad creative
whop ads create … # run it as an ad
whop send @alice 25 # send money to anyone by @username or email
whop payouts create … # send earnings to your bank
whop stats time-series list # how it's all goingWith the CLI you can:
- Ship software: build and deploy hosted web apps to
*.whop.siteor your own domain, with previews, rollbacks, secrets, and production logs - Sell anything: products, one-time / recurring / trial pricing, checkout links
- Move money: send to anyone by @username or email, payouts, transfers, deposits, currency swaps, spending cards
- Advertise: generate AI images and video, run ad campaigns
- Hire: post bounties with escrowed rewards, review submissions, pay the winners
- Measure: financial, audience, and traffic stats, plus tracked people and events
- Automate all of it: structured output, a machine-readable manifest, an MCP server, and agent skills built in
Installation
# macOS / Linux
curl -fsSL https://whop.com/install.sh | sh
# Windows (PowerShell)
irm https://github.com/whopio/whop-public-cli/releases/latest/download/install.ps1 | iex
# Homebrew
brew install whopio/tap/whop
# npm (requires Node.js >= 22)
npm install -g @whop/cliPrebuilt binaries cover macOS, Linux (glibc and musl) and Windows, on arm64 and x64. On Alpine and other musl distributions, install libstdc++ and libgcc first (apk add libstdc++ libgcc) (releases). The installers put whop in ~/.local/bin (%USERPROFILE%\.local\bin on Windows; set WHOP_INSTALL_DIR to choose another directory) and do not edit your shell profile. If whop is not found after installing, add that directory to your PATH:
export PATH="$HOME/.local/bin:$PATH"Getting started
whopThat's it! Run whop auth account anytime to switch businesses.
Financing
whop financing-applications list, get, create, update, and submit manage merchant payment-financing applications. Pass --account_id to choose the account; an account API key defaults to its own. Creating an application reuses an open application and does not submit it for review.
whop accounts financing-providers --account_id biz_xxx shows each financing provider's status for an account: whether checkout offers it, what to do to turn it on, and why it is off. Pass --status to narrow the list.
Usage
whop --help # all commands
whop products list # what you're selling
whop variants create --help # options for any command
whop stats time-series list # your numbers
whop accounts get jordan # retrieve a business by route
whop partners retrieve me # your partner profile and payout ratesEvery command takes --format json for structured output, or --format jsonl to stream events.
Commands that act on one account take the business's biz_ ID or public route positionally. Account-scoped commands use the selected business by default; pass --account_id to choose a different scope. Account preferences and reserves remain account-scoped.
In a terminal, commands prompt for missing inputs. Agents and scripts (non-TTY) get a structured validation error instead, so nothing hangs.
Feedback and questions
whop report-feedback --content "The error message does not explain which permission is missing."
whop ask-question --content "How do trials interact with an existing subscription?" --format jsonBoth commands submit one observation for Whop's internal review and return a receipt. ask-question records an unanswered question; it does not return an answer or start a support conversation. Use a user credential from whop login (browser OAuth). Remove secrets, personal data, and payment details from --content.
Use --account_id biz_... to identify the account for an affected resource. Both commands default to your active account when available. Account context is optional.
Ship apps
Hosted web apps (on *.whop.site or a custom domain) follow a git-shaped lifecycle. Three on-ramps, one loop:
whop apps init # start a NEW app: registers, scaffolds, git-inits
whop apps pull --app app_xxx # or pull an EXISTING app's deployed source
whop apps init --app app_xxx # or start code for an existing app that was never deployed
whop apps init --template storefront # or start a complete shop with a cart and checkout
# The loop
whop apps dev # local dev server, credentials auto-injected
whop apps deploy # build, typecheck, upload, promote to productioninit registers the app on the selected business; pass --account_id biz_xxx to use another one. deploy --preview uploads without promoting. whop apps builds promote <build_id> ships a build later, and promoting an older build rolls back. pull merges the deployed source with your local files via git, so conflicts show up as normal git conflict markers.
The rest is plain REST: whop apps list|create|get|update|delete, whop apps builds list|get|promote, whop apps secrets list|set|unset. The whop() Vite build plugin ships as @whop/cli/vite.
Use whop apps categories to list the App Store categories, or --app_type b2b_app / b2c_app for one store's. Set category_id to a business category when updating a business app; the category's route filters app lists through --marketplace_category_route.
App secrets are encrypted at rest and injected into the hosted runtime. whop apps dev also injects them locally, except names that control the local runtime.
Manage them with:
whop apps secrets list
whop apps secrets set --secret MAIL_API_KEY=mail-key-123
whop apps secrets unset --key MAIL_API_KEYRun these inside a linked project or pass --app app_xxxxxxxx. App secrets are runtime configuration; they are separate from the app API key exposed as WHOP_API_KEY in the dashboard.
After a deploy, read your app's server logs (kept for 7 days):
whop apps logs app_xxxxxxxx --level error
whop apps logs app_xxxxxxxx --query "checkout"App logs cover the hosted server runtime. Use your browser's developer console for client-side JavaScript errors.
Sell and get paid
whop products create --title "Pro membership"
whop variants create --help # one-time, recurring, trials, stock
whop checkout-configurations create --help # shareable, prefilled checkout link
whop stats time-series list # financial, audience, and traffic reportingSet product gallery images or videos with uploaded file IDs:
whop products update prod_xxxxxxxx --gallery_images '[{"id":"file_xxxxxxxx"}]'products create accepts the same option. The array replaces the gallery in display order; include every file you want to keep. Pass '[]' to clear it. banner_image is separate and does not satisfy the marketplace gallery requirement.
Money moves through the same surface: payouts, transfers, deposits, swaps, and cards. Payouts and card issuing require identity verification (whop verifications). Steps that need a browser, like KYC, show up as a link to open.
whop send @sam 10 sends 10 USD to a Whop user from your business: it finds them, shows who will receive it, and asks before sending. Add --from biz_xxx to send from another business, or --dry-run to see the recipient without sending. The CLI can't send from a personal balance.
Use whop transfers get-claim-link <id> to retrieve a funded claim link by its airdrp_ ID or public claim code. ID reads require airdrop_link:basic:read on the funding business or ownership of the funding personal account; a claim code allows a public preview.
Read trading activity
Trading account access is available by request. Email [email protected] to get access.
whop accounts get biz_xxx --include_trading true --format json
whop users get me --include_trading true --format json
whop trades list --format jsonThese commands return the trading account address, its Hyperliquid websocket subscriptions, and earlier trade submissions. They don't place orders or move funds. Read live positions and open orders from Hyperliquid over the websocket.
Trade writes are retired. whop trades create and whop trades cancel return 410 Gone and send nothing to Hyperliquid. whop trades get trop_xxx returns an earlier submission record, not live fills.
Serve the customers you have
whop members list --access_level customer # one row per buyer
whop memberships cancel mem_xxx --reason "moved" # also pause, resume, extend
whop shipments create --payment_id pay_xxx --tracking_number 1Z999
whop disputes list # chargebacks, with evidence and outcomes
whop resolution-center-cases reply reso_xxx --help # answer a case before it escalatesExport and notify
whop exports create --resource receipts # then poll until download_url is set
whop exports get exprt_xxx
whop notifications create --experience_id exp_xxx --title "New drop" --content "Live now"Run ads
Generate a creative, then create the campaign, ad group, and ad in one command. Structured flags take JSON strings:
whop media generate --type image --prompt "A running club at sunrise" --wait
whop ads create \
--title "Launch ad" --headlines "Find your stride" --call_to_action sign_up \
--url "https://whop.com/your-store" \
--creatives '[{"id":"file_x"}]' \
--ad_group '{"title":"US broad","ad_campaign":{"title":"Growth","objective":"sales","status":"draft","budget_amount":25,"budget_optimization":"ad_campaign"}}'
whop ad-campaigns update <adcamp_id> --status active # launch when readyThe whop skill (whop skills add) carries the launch playbook in references/ads.md.
Run experiments
Use whop experiments to list, create, get, update, evaluate exposures, activate, pause, or end account experiments. Account experiments don't accept tags. Experiment creation isn't available to all accounts yet.
whop experiments list --account_id biz_xxx
whop experiments create --helpHire a workforce
whop bounties create --help # paid tasks with escrowed rewards
whop bounty-submissions list --help # review submitted work, approve to payUpload files
whop files create --filepath ./banner.png --visibility public
whop files get file_xxxxxxxxxxxxxcreate --filepath uploads a local file end to end: it creates the file, sends its bytes (in parts for files over 100 MB), and returns it once it's ready with its URL. The file name defaults to the local file's name.
Without --filepath, create --filename returns a presigned upload_url and upload_headers to upload the bytes yourself; get returns the file URL once it's ready. list shows your uploads, and complete finishes a multipart upload once every part is in.
For AI agents
The CLI is self-describing. Agents can discover and drive every command:
whop --llms # machine-readable manifest of all commands
whop mcp add # automatically register with supported coding agents
whop mcp doctor # diagnose an MCP registration
whop skills add # install the Whop agent skillFor OAuth, run whop login --method oauth --format jsonl in the background with stdout redirected to a file (pipes like | head can buffer past the URL). The first line carries an authorizationUrl; open it in the user's browser, unedited. Once the process exits, you're logged in.
For unattended automation, set WHOP_API_KEY (create one under Developer → API keys). For API commands, it takes precedence over any saved CLI profile for that invocation.
Authentication
whop login --method oauth # interactive browser login
whop login --method oauth --format jsonl # stream the authorization URL for an agent
whop login --method api-key --api-key whop_xxx # explicit API-key login
WHOP_API_KEY=whop_xxx whop login --method api-key # API key from the environmentList your businesses with whop auth account --list and switch with whop auth account <biz_id>. If you manage more than one business, whop login asks which one to use; agents and scripts set it afterwards with whop auth account <biz_id>.
Saved credentials live in ~/.config/whop/credentials.json, encrypted with a key bound to this machine. Credentials an earlier version stored in the OS keychain are no longer read, so run whop login once after upgrading. Neither whop login nor whop logout deletes those keychain entries, so remove them yourself for each profile (whop auth list names them; if it is empty, security dump-keychain | grep whop-cli, secret-tool search --all service whop-cli or cmdkey /list | findstr whop-cli finds them): security delete-generic-password -s whop-cli -a <profile> on macOS, secret-tool clear service whop-cli username <profile> on Linux, or cmdkey /delete:<profile>.whop-cli on Windows. Revoke the API key in the dashboard if you no longer use it. Login, logout, and the auth commands are not exposed to MCP clients.
whop api-keys permissions lists the permissions that can be assigned to API keys. Creating, listing, updating, rotating, and revoking keys requires a first-party dashboard session, so those operations are not exposed by the CLI. Manage keys in the Whop dashboard.
The OAuth flow redirects to localhost:13337, so the browser must run on the same host as the CLI (or forward that port).
Invocation logs
Every command run appends one JSON line (arguments with secrets redacted, the command, exit code, duration) to ~/.config/whop/logs/audit-YYYY-MM-DD.jsonl. Logs older than 7 days are deleted.
WHOP_CLI_AUDIT_RETENTION_DAYS=30 whop … # keep logs longer
WHOP_CLI_AUDIT_LOG=0 whop … # disable loggingUpdating
Standalone installs on macOS and Linux check GitHub hourly and replace themselves with the verified release in the background; set WHOP_CLI_AUTO_UPDATE=0 to get only a notice. Elsewhere, an interactive terminal tells you when a newer release is out. whop --update (or whop upgrade) installs it now, and exits 0 when you are already up to date: standalone installs replace themselves with the verified GitHub release, and npm installs run your package manager's global install. Homebrew installs update with brew upgrade whop. Set NO_UPDATE_NOTIFIER=1 to turn off update checks.
whop --version prints the installed version; whop --help also shows the API version the CLI speaks. A standalone 0.x install updates itself to 1.x.
Documentation
- Whop CLI docs
- Whop developer docs
- Bugs and feature requests: issues
