@whop/cli 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/README.md +107 -52
  2. package/dist/{chunk-KFCNNWPI.js → chunk-4MBHKXEL.js} +34 -1
  3. package/dist/{chunk-KFCNNWPI.js.map → chunk-4MBHKXEL.js.map} +1 -1
  4. package/dist/{dist-2MZJLO2W.js → dist-KFETZ34P.js} +2 -2
  5. package/dist/index.js +46647 -23234
  6. package/dist/index.js.map +1 -1
  7. package/package.json +2 -3
  8. package/skills/whop-accounts/SKILL.md +1 -1
  9. package/skills/whop-ad-campaigns/SKILL.md +1 -0
  10. package/skills/whop-ad-groups/SKILL.md +1 -0
  11. package/skills/whop-ads/SKILL.md +3 -2
  12. package/skills/whop-api-keys/SKILL.md +24 -0
  13. package/skills/whop-app-builds/SKILL.md +21 -0
  14. package/skills/whop-apps/SKILL.md +5 -0
  15. package/skills/whop-audiences/SKILL.md +1 -0
  16. package/skills/whop-bounties/SKILL.md +1 -0
  17. package/skills/whop-bounty-submissions/SKILL.md +3 -0
  18. package/skills/whop-disputes/SKILL.md +22 -0
  19. package/skills/whop-events/SKILL.md +5 -1
  20. package/skills/whop-exports/SKILL.md +20 -0
  21. package/skills/whop-members/SKILL.md +19 -0
  22. package/skills/whop-memberships/SKILL.md +24 -0
  23. package/skills/whop-notifications/SKILL.md +25 -0
  24. package/skills/whop-people/SKILL.md +3 -3
  25. package/skills/whop-permissions/SKILL.md +18 -0
  26. package/skills/whop-products/SKILL.md +2 -0
  27. package/skills/whop-resolution-center-cases/SKILL.md +28 -0
  28. package/skills/whop-shipments/SKILL.md +21 -0
  29. package/skills/whop-team-members/SKILL.md +22 -0
  30. package/skills/whop-transfers/SKILL.md +1 -0
  31. package/skills/whop-users/SKILL.md +7 -1
  32. /package/dist/{dist-2MZJLO2W.js.map → dist-KFETZ34P.js.map} +0 -0
package/README.md CHANGED
@@ -1,6 +1,29 @@
1
1
  # Whop CLI
2
2
 
3
- `whop` — build and manage your Whop business from the terminal. Deploy apps, manage products and pricing, run ads, move money, and automate workflows from one agent-friendly CLI.
3
+ `whop` is your entire business on the command line. Ship software, sell products, move money, buy ads, hire people, and read the numbers.
4
+
5
+ ```bash
6
+ whop accounts create --title "Acme" # create a business
7
+ whop apps deploy # ship a web app to *.whop.app
8
+ whop products create --title "Pro membership" # something to sell
9
+ whop checkout-configurations create --plan_id plan_xxx # a link that accepts money
10
+ whop media generate --type image --prompt "launch art" # make an ad creative
11
+ whop ads create … # put it on Meta/Tiktok
12
+ whop payouts create … # send earnings to your bank
13
+ whop stats list # how it's all going
14
+ ```
15
+
16
+ With the CLI you can:
17
+
18
+ - **Ship software**: build and deploy hosted web apps to `*.whop.app`, with previews, rollbacks, secrets, and production logs
19
+ - **Sell anything**: products, one-time / recurring / trial pricing, checkout links
20
+ - **Move money**: payouts, transfers, deposits, currency swaps, spending cards
21
+ - **Advertise**: generate AI images and video, run Meta or Tiktok campaigns
22
+ - **Hire**: post bounties with escrowed rewards, review submissions, pay the winners
23
+ - **Measure**: financial, audience, and traffic stats, plus tracked people and events
24
+ - **Automate all of it**: structured output, a machine-readable manifest, an MCP server, and agent skills built in
25
+
26
+
4
27
 
5
28
  ## Installation
6
29
 
@@ -15,9 +38,7 @@ brew install whopio/tap/whop
15
38
  npm install -g @whop/cli
16
39
  ```
17
40
 
18
- Prebuilt binaries cover macOS and Linux ([releases](https://github.com/whopio/whop-public-cli/releases)); on other platforms, use npm.
19
-
20
- The standalone installer uses your standard user executable directory (`$XDG_BIN_HOME` or `~/.local/bin`) and updates your shell profile when needed.
41
+ Prebuilt binaries cover macOS and Linux ([releases](https://github.com/whopio/whop-public-cli/releases)); on other platforms, use npm. The standalone installer uses your standard user executable directory (`$XDG_BIN_HOME` or `~/.local/bin`).
21
42
 
22
43
  ## Getting started
23
44
 
@@ -25,7 +46,7 @@ The standalone installer uses your standard user executable directory (`$XDG_BIN
25
46
  whop
26
47
  ```
27
48
 
28
- That's it — it signs you in, lets you choose or create the business the CLI should use, and points you to the available workflows. Run `whop quickstart` later to change the selected business.
49
+ That's it! Run `whop auth accounts` anytime to switch businesses.
29
50
 
30
51
  ## Usage
31
52
 
@@ -34,75 +55,73 @@ whop --help # all commands
34
55
  whop products list # what you're selling
35
56
  whop plans create --help # options for any command
36
57
  whop stats list # your numbers
58
+ whop accounts get --account_id biz_xxx # target another business
37
59
  ```
38
60
 
39
- Every command takes `--format json` for structured output.
61
+ Every command takes `--format json` for structured output, or `--format jsonl` to stream events.
40
62
 
41
- In a terminal, commands that are missing required inputs ask for them interactively instead of failing — run `whop swaps quote` with no flags and it prompts for the amount and tokens. Agents and scripts (non-TTY) get a structured validation error instead.
63
+ Account-scoped commands use the selected business by default. Pass another business with `--account_id`.
42
64
 
43
- ## Authentication
65
+ In a terminal, commands prompt for missing inputs. Agents and scripts (non-TTY) get a structured validation error instead, so nothing hangs.
44
66
 
45
- ```bash
46
- whop login --method oauth # interactive browser login
47
- whop login --method oauth --format jsonl # stream the authorization URL for an agent
48
- whop login --method api-key --api-key whop_xxx # explicit API-key login
49
- WHOP_API_KEY=whop_xxx whop login --method api-key # API key from the environment
50
- ```
67
+ ## Ship apps
51
68
 
52
- Agent OAuth recipe:
53
-
54
- 1. Run `whop login --method oauth --format jsonl` in the background with stdout redirected to a file — pipes like `| head` can buffer past the URL.
55
- 2. The first line is an `authorization_required` event, emitted once the local callback listener is ready. Open its `authorizationUrl` in the user's browser (e.g. `open <url>` on macOS, `xdg-open <url>` on Linux). The URL is several KB long (it carries the full scope list): pass it programmatically and never retype, truncate, or summarize it — a mangled scope list fails with `invalid_scope`.
56
- 3. Wait for the process to exit — the final `done` event means the profile is saved.
57
- 4. If the user manages more than one business, the login succeeds without picking one; set it with `whop auth account <biz_id>` (`whop auth account --list` to enumerate) — no second browser round-trip needed.
58
-
59
- The flow redirects to `localhost:13337`, so the browser must run on the same host as the CLI (or forward that port to the CLI host). Fully remote browser authorization will require a future device login flow.
60
-
61
- ## Build and deploy apps
62
-
63
- Fully-hosted web apps (`*.whop.app`) follow a git-shaped lifecycle — two on-ramps, one loop:
69
+ Hosted web apps (`*.whop.app`) follow a git-shaped lifecycle. Two on-ramps, one loop:
64
70
 
65
71
  ```bash
66
- # Start a NEW app: registers it, scaffolds the latest TanStack Start
67
- # template (or --template app_xxx to clone another app's published source),
68
- # wires it for Whop hosting, installs, and git-inits
69
- whop apps init
70
-
71
- # …or get an EXISTING app's deployed source onto this machine: downloads the
72
- # production build's source archive (--build abld_xxx for any specific build)
73
- # and three-way merges it with whatever is here via git
74
- whop apps pull --app app_xxxxxxxx
72
+ whop apps init # start a NEW app: registers, scaffolds, git-inits
73
+ whop apps pull --app app_xxx # or pull an EXISTING app's deployed source
75
74
 
76
75
  # The loop
77
76
  whop apps dev # local dev server, credentials auto-injected
78
- whop apps deploy # build → typecheck → upload → promote to production
77
+ whop apps deploy # build, typecheck, upload, promote to production
79
78
  ```
80
79
 
81
- `deploy` ships the linked project; `--preview` uploads without promoting, and `whop apps builds promote <build_id>` ships it later — promoting an older build is also how you roll back. `pull` and `deploy` share a per-app snapshot ref (`refs/whop/remote/<app_id>`), so pulls always merge against the last state this machine saw: local edits are autostashed around the merge and conflicts surface as normal git conflict markers.
80
+ `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.
82
81
 
83
- Everything else is plain REST: `whop apps list|create|get|update`, `whop apps builds list|get|promote`, and `whop apps secrets list|set|unset`.
82
+ The rest is plain REST: `whop apps list|create|get|update`, `whop apps builds list|get|promote`, `whop apps secrets list|set|unset`. The `whop()` Vite build plugin ships as `@whop/cli/vite`.
84
83
 
85
- After a deploy, read your app's server logs — every `console.log`, uncaught exception, and failed request, kept for 7 days:
84
+ After a deploy, read your app's server logs (kept for 7 days):
86
85
 
87
86
  ```bash
88
87
  whop apps logs app_xxxxxxxx --level error
89
88
  whop apps logs app_xxxxxxxx --query "checkout"
90
89
  ```
91
90
 
92
- ## Create file uploads
93
91
 
94
- Create a file record to receive the presigned upload URL and headers, then retrieve its current status:
92
+
93
+ ## Sell and get paid
95
94
 
96
95
  ```bash
97
- whop files create --filename "banner.png"
98
- whop files get file_xxxxxxxxxxxxx
96
+ whop products create --title "Pro membership"
97
+ whop plans create --help # one-time, recurring, trials, stock
98
+ whop checkout-configurations create --help # shareable, prefilled checkout link
99
+ whop stats list # financial, audience, and traffic reporting
99
100
  ```
100
101
 
101
- Upload the file's bytes to the returned `upload_url` using its `upload_headers`. The response from `whop files get` includes the file URL once the upload is ready.
102
+ 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.
103
+
104
+ ## Serve the customers you have
105
+
106
+ ```bash
107
+ whop members list --access_level customer # one row per buyer
108
+ whop memberships cancel mem_xxx --reason "moved" # also pause, resume, extend
109
+ whop shipments create --payment_id pay_xxx --tracking_number 1Z999
110
+ whop disputes list # chargebacks, with evidence and outcomes
111
+ whop resolution-center-cases reply reso_xxx --help # answer a case before it escalates
112
+ ```
113
+
114
+ ## Export and notify
115
+
116
+ ```bash
117
+ whop exports create --resource receipts # then poll until download_url is set
118
+ whop exports get exprt_xxx
119
+ whop notifications create --experience_id exp_xxx --title "New drop" --content "Live now"
120
+ ```
102
121
 
103
122
  ## Run ads
104
123
 
105
- Generate a creative, then create the campaign, ad group, and ad in one command — structured flags take JSON strings:
124
+ Generate a creative, then create the campaign, ad group, and ad in one command. Structured flags take JSON strings:
106
125
 
107
126
  ```bash
108
127
  whop media generate --type image --prompt "A running club at sunrise" --wait
@@ -114,35 +133,71 @@ whop ads create \
114
133
  whop ad-campaigns update <adcamp_id> --status active # launch when ready
115
134
  ```
116
135
 
117
- The installed `whop-ads` skill (`whop skills add`) carries the full playbook — billing setup, field rules, and monitoring.
136
+ The `whop-ads` skill (`whop skills add`) carries the full playbook.
137
+
138
+ ## Hire a workforce
139
+
140
+ ```bash
141
+ whop bounties create --help # paid tasks with escrowed rewards
142
+ whop bounty-submissions list --help # review submitted work, approve to pay
143
+ ```
144
+
145
+
146
+
147
+ ## Upload files
148
+
149
+ ```bash
150
+ whop files create --filename "banner.png"
151
+ whop files get file_xxxxxxxxxxxxx
152
+ ```
153
+
154
+ `create` returns a presigned `upload_url` and `upload_headers`. Upload the bytes there, then `get` returns the file URL once it's ready.
118
155
 
119
156
  ## For AI agents
120
157
 
121
- The CLI is self-describing — agents can discover and drive every command:
158
+ The CLI is self-describing. Agents can discover and drive every command:
122
159
 
123
160
  ```bash
124
161
  whop --llms # machine-readable manifest of all commands
125
- whop mcp add # register as an MCP server (e.g. Claude Desktop)
126
- whop skills add # generate agent skills
162
+ whop mcp add # automatically register with supported coding agents
163
+ whop mcp doctor # diagnose an MCP registration
164
+ whop skills add # generate agent skills (per-resource playbooks)
127
165
  ```
128
166
 
129
- For OAuth, run `whop login --method oauth --format jsonl` and show the emitted URL to the user. For unattended automation, set `WHOP_API_KEY` instead (create one under **Developer → API keys**).
167
+ For 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.
168
+
169
+ For unattended automation, set `WHOP_API_KEY` (create one under **Developer → API keys**).
170
+
171
+ ## Authentication
172
+
173
+ ```bash
174
+ whop login --method oauth # interactive browser login
175
+ whop login --method oauth --format jsonl # stream the authorization URL for an agent
176
+ whop login --method api-key --api-key whop_xxx # explicit API-key login
177
+ WHOP_API_KEY=whop_xxx whop login --method api-key # API key from the environment
178
+ ```
179
+
180
+ List your businesses with `whop auth account --list` and switch with `whop auth account <biz_id>`.
181
+
182
+ The OAuth flow redirects to `localhost:13337`, so the browser must run on the same host as the CLI (or forward that port).
130
183
 
131
184
  ## Invocation logs
132
185
 
133
- Every run appends one JSON line — timestamp, arguments (secrets redacted), exit code, duration — to `~/.config/whop/logs/audit-YYYY-MM-DD.jsonl` so you can retrace what the CLI did when debugging. Logs older than 7 days are deleted automatically.
186
+ Every run appends one JSON line (arguments with secrets redacted, exit code, duration) to `~/.config/whop/logs/audit-YYYY-MM-DD.jsonl`. Logs older than 7 days are deleted.
134
187
 
135
188
  ```bash
136
189
  WHOP_CLI_AUDIT_RETENTION_DAYS=30 whop … # keep logs longer
137
190
  WHOP_CLI_AUDIT_LOG=0 whop … # disable logging
138
191
  ```
139
192
 
193
+
194
+
140
195
  ## Updating
141
196
 
142
197
  The CLI keeps itself up to date. To update manually, run `whop upgrade`.
143
198
 
144
199
  ## Documentation
145
200
 
201
+ - [Whop CLI docs](https://docs.whop.com/developer/cli)
146
202
  - [Whop developer docs](https://docs.whop.com)
147
- - [whop.com/developers](https://whop.com/developers/)
148
203
  - Bugs and feature requests: [issues](https://github.com/whopio/whop-public-cli/issues)
@@ -1,10 +1,40 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
3
+ var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
10
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
11
+ }) : x)(function(x) {
12
+ if (typeof require !== "undefined") return require.apply(this, arguments);
13
+ throw Error('Dynamic require of "' + x + '" is not supported');
14
+ });
15
+ var __commonJS = (cb, mod) => function __require2() {
16
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17
+ };
4
18
  var __export = (target, all) => {
5
19
  for (var name in all)
6
20
  __defProp(target, name, { get: all[name], enumerable: true });
7
21
  };
22
+ var __copyProps = (to, from, except, desc) => {
23
+ if (from && typeof from === "object" || typeof from === "function") {
24
+ for (let key of __getOwnPropNames(from))
25
+ if (!__hasOwnProp.call(to, key) && key !== except)
26
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
27
+ }
28
+ return to;
29
+ };
30
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
31
+ // If the importer is in node compatibility mode or this is not an ESM
32
+ // file that has been converted to a CommonJS file using a Babel-
33
+ // compatible transform (i.e. "__esModule" has not been set), then set
34
+ // "default" to the CommonJS "module.exports" for node compatibility.
35
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
36
+ mod
37
+ ));
8
38
 
9
39
  // ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js
10
40
  var NEVER = Object.freeze({
@@ -13777,7 +13807,10 @@ function fromJSONSchema(schema, params) {
13777
13807
  config(en_default());
13778
13808
 
13779
13809
  export {
13810
+ __require,
13811
+ __commonJS,
13780
13812
  __export,
13813
+ __toESM,
13781
13814
  NEVER,
13782
13815
  iso_exports,
13783
13816
  safeParse2 as safeParse,
@@ -13804,4 +13837,4 @@ export {
13804
13837
  coerce_exports,
13805
13838
  external_exports
13806
13839
  };
13807
- //# sourceMappingURL=chunk-KFCNNWPI.js.map
13840
+ //# sourceMappingURL=chunk-4MBHKXEL.js.map