@whop/cli 0.6.0 → 0.8.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.
- package/README.md +28 -2
- package/dist/index.js +37811 -780
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/skills/whop-accounts/SKILL.md +5 -2
- package/skills/whop-ads/SKILL.md +76 -0
- package/skills/whop-apps/SKILL.md +18 -0
- package/skills/whop-events/SKILL.md +19 -0
- package/skills/whop-media/SKILL.md +23 -0
- package/skills/whop-partners/SKILL.md +23 -0
- package/skills/whop-payouts/SKILL.md +3 -2
- package/skills/whop-people/SKILL.md +19 -0
- package/skills/whop-social-accounts/SKILL.md +26 -0
- package/skills/whop-stats/SKILL.md +19 -0
- package/skills/whop-verifications/SKILL.md +4 -0
- package/skills/whop-workforce-bounties/SKILL.md +19 -0
- package/dist/api-P7EWPZKG.js +0 -18
- package/dist/api-P7EWPZKG.js.map +0 -1
- package/dist/chunk-GKKJXDPK.js +0 -33369
- package/dist/chunk-GKKJXDPK.js.map +0 -1
- package/skills/whop-referrals/SKILL.md +0 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whop/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "The Whop CLI — build and manage Whop apps from your terminal. Human and agent friendly.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/node": "25.3.5",
|
|
47
47
|
"fflate": "0.8.2",
|
|
48
|
-
"incur": "github:whopio/incur#
|
|
48
|
+
"incur": "github:whopio/incur#fbe3f4dbf48f1bc780cb1bca476f7dade1fe12d3",
|
|
49
49
|
"tsup": "8.5.0",
|
|
50
50
|
"tsx": "4.19.4",
|
|
51
51
|
"typescript": "5.9.3",
|
|
@@ -5,9 +5,9 @@ requires_bin: whop
|
|
|
5
5
|
command: whop accounts
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
An Account represents a person or business
|
|
8
|
+
An Account represents a person or business on Whop that can have its own profile, wallet, and account-scoped settings. Use accounts for customers, creators, merchants, sellers, or connected businesses your integration supports.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Use the Accounts API to create accounts, list accounts visible to your credentials, retrieve or update an account, and retrieve the account associated with the current API key.
|
|
11
11
|
|
|
12
12
|
## Commands
|
|
13
13
|
|
|
@@ -18,5 +18,8 @@ Create an account when someone needs to hold funds, receive payments, send money
|
|
|
18
18
|
| `whop accounts me` | Retrieve Requesting Account |
|
|
19
19
|
| `whop accounts get` | Retrieve Account |
|
|
20
20
|
| `whop accounts update` | Update Account |
|
|
21
|
+
| `whop accounts preferences` | Retrieve Account Preferences |
|
|
22
|
+
| `whop accounts update-preferences` | Update Account Preferences |
|
|
23
|
+
| `whop accounts recommend_actions` | List Recommended Actions |
|
|
21
24
|
|
|
22
25
|
Run `whop accounts <command> --help` for options, or `whop accounts <command> --schema` for full argument details.
|
package/skills/whop-ads/SKILL.md
CHANGED
|
@@ -22,3 +22,79 @@ Use the Ads API to list ads for an account, create ads inside ad groups, retriev
|
|
|
22
22
|
| `whop ads unpause` | Unpause an Ad |
|
|
23
23
|
|
|
24
24
|
Run `whop ads <command> --help` for options, or `whop ads <command> --schema` for full argument details.
|
|
25
|
+
|
|
26
|
+
## Launch playbook — from nothing to a live ad
|
|
27
|
+
|
|
28
|
+
Three commands take you from nothing to a launchable ad: generate a creative, create the campaign + ad group + ad in one request, then flip the campaign to active. Structured flags (`--ad_group`, `--creatives`, `--ads_payment_methods`) take JSON strings.
|
|
29
|
+
|
|
30
|
+
### One-time setup
|
|
31
|
+
|
|
32
|
+
1. **Auth** — `whop login` (OAuth). First-time billing setup requires a user login; an API key can only reorder already-configured payment methods. If a command fails with a scope error saying your login predates the scope, run `whop login` again.
|
|
33
|
+
2. **Facebook page** — `whop social-accounts list` must show a `"platform": "facebook"` entry. Three ways to get one:
|
|
34
|
+
- **Already connected** — use its `sacc_` id as-is.
|
|
35
|
+
- **Link a Meta Business account** — `whop social-accounts connect --platform meta_business --scopes '["advertise"]' --redirect_url <url>`, then send the user to the returned `authorize_url`.
|
|
36
|
+
- **No page at all** — have Whop create one for the account: `whop social-accounts create --platform facebook`.
|
|
37
|
+
3. **Ads payment method** — check with `whop accounts preferences <account_id>` (your `biz_` ID, from `whop accounts me`). If `ads_payment_methods` is null, configure balance billing:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
whop accounts update-preferences <account_id> --ads_payment_methods '{"primary": {"type": "platform_balance"}}'
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Only launching needs this — drafts work without. Fund the balance with `whop deposits create --amount 50` (returns a hosted deposit page URL).
|
|
44
|
+
|
|
45
|
+
### 1. Generate a creative
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
whop media generate --type image --prompt "A running club jogging across a bridge at sunrise, warm light" --wait
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`--wait` blocks until the asset is terminal and returns `file.id` — use that as the creative. Billed from the balance (`amount_charged`); a failed generation auto-refunds, so adjust the prompt and retry. Video: `--type video` plus optional `--duration_seconds` (5/10/15), `--resolution` (480p–4k), and up to 4 `--reference_media` file IDs (first one seeds the opening frame).
|
|
52
|
+
|
|
53
|
+
### 2. Create the whole tree as a draft — one request
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
whop ads create \
|
|
57
|
+
--title "Run club launch ad" \
|
|
58
|
+
--primary_texts "Join 10,000 runners chasing their next PR together." \
|
|
59
|
+
--headlines "Find your stride" \
|
|
60
|
+
--call_to_action sign_up \
|
|
61
|
+
--url "https://whop.com/your-store-page" \
|
|
62
|
+
--creatives '[{"id": "file_XXXXXXXX"}]' \
|
|
63
|
+
--social_accounts '[{"id": "sacc_XXXXXXXX"}]' \
|
|
64
|
+
--ad_group '{
|
|
65
|
+
"title": "US broad",
|
|
66
|
+
"conversion_location": "website",
|
|
67
|
+
"regions": {"include": {"countries": ["US"]}},
|
|
68
|
+
"ad_campaign": {"title": "Run club growth", "platform": "meta", "objective": "sales", "status": "draft", "budget_amount": 25, "budget_optimization": "ad_campaign"}
|
|
69
|
+
}'
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Field rules:
|
|
73
|
+
|
|
74
|
+
| Field | Rule |
|
|
75
|
+
|-------|------|
|
|
76
|
+
| `creatives` | One entry with no `format` is required (the base asset). `square`/`vertical`/`horizontal` are optional crops on top. |
|
|
77
|
+
| `url` | Required for website ads. A whop.com store page works as-is; an external page needs the Whop pixel installed. |
|
|
78
|
+
| Budget | Default to CBO: `budget_amount` on the campaign with `budget_optimization: "ad_campaign"` (the network shifts spend to the best ad group). Per-ad-group `budget_amount` (ABO) is the manual alternative. One level owns it — never both. |
|
|
79
|
+
| Targeting | Omit `demographics`/`placements`/`devices` for automatic optimization. `regions` uses ISO 3166 (`"US"`, `"US-CA"`). |
|
|
80
|
+
| `lead_form` | Only with an instant-form `conversion_location`. |
|
|
81
|
+
|
|
82
|
+
Reuse existing containers by passing `--ad_group_id adgrp_x` instead of `--ad_group`, or `"ad_campaign_id": "adcamp_x"` inside `--ad_group` instead of the inline `ad_campaign`.
|
|
83
|
+
|
|
84
|
+
### 3. Launch
|
|
85
|
+
|
|
86
|
+
`"status": "draft"` above kept money out of it. Review, then launch — this is when spend starts and the payment method is enforced:
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
whop ad-campaigns update adcamp_XXXXXXXX --status active
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
(Ready to spend immediately? Omit `"status": "draft"` and the one-shot create launches directly.)
|
|
93
|
+
|
|
94
|
+
### 4. Monitor
|
|
95
|
+
|
|
96
|
+
```sh
|
|
97
|
+
whop ads get ad_XXXXXXXX
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
`delivery_status` is the live state (a brief `in_review` for moderation is normal); `issues[]` carries a human-readable `message` for anything the network rejected asynchronously. Control delivery with `pause`/`unpause` on ads, ad groups, or campaigns. Edit copy or creatives with `whop ads update` — sending `creatives` replaces the whole set, so include the base entry.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: whop-apps
|
|
3
|
+
description: "Apps you build on Whop: metadata, hosted builds, runtime logs. Run `whop apps --help` for usage details."
|
|
4
|
+
requires_bin: whop
|
|
5
|
+
command: whop apps
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
An App is software you build on Whop. It can be a hosted web app served at `<route>.whop.app` or an API integration installed as an experience, and it belongs to the account that owns its credentials, settings, builds, and runtime logs.
|
|
9
|
+
|
|
10
|
+
Use the Apps API to manage app configuration and, for hosted apps, read server runtime logs for console output, uncaught exceptions, and failed requests. Logs are retained for 7 days and can be filtered by build, level, time window, and message text.
|
|
11
|
+
|
|
12
|
+
## Commands
|
|
13
|
+
|
|
14
|
+
| Command | Description |
|
|
15
|
+
|---------|-------------|
|
|
16
|
+
| `whop apps logs` | List App Logs |
|
|
17
|
+
|
|
18
|
+
Run `whop apps <command> --help` for options, or `whop apps <command> --schema` for full argument details.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: whop-events
|
|
3
|
+
description: Conversion and engagement events tracked for attribution. Run `whop events --help` for usage details.
|
|
4
|
+
requires_bin: whop
|
|
5
|
+
command: whop events
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
An Event records conversion or engagement activity for an account, such as page views, purchases, or leads. Each event ties the action to the [person](https://docs.whop.com/api-reference/beta/people/person) who took it, so activity can be attributed to the ads and links that drove it.
|
|
9
|
+
|
|
10
|
+
Use the Events API to send new tracking events and list the events recorded for a person.
|
|
11
|
+
|
|
12
|
+
## Commands
|
|
13
|
+
|
|
14
|
+
| Command | Description |
|
|
15
|
+
|---------|-------------|
|
|
16
|
+
| `whop events list` | List Events |
|
|
17
|
+
| `whop events create` | Create Event |
|
|
18
|
+
|
|
19
|
+
Run `whop events <command> --help` for options, or `whop events <command> --schema` for full argument details.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: whop-media
|
|
3
|
+
description: AI-generated assets, billed from a balance, attachable wherever files are accepted. Run `whop media --help` for usage details.
|
|
4
|
+
requires_bin: whop
|
|
5
|
+
command: whop media
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
A Media Asset is an AI-generated image or video created from a prompt and billed from an account balance. When generation finishes, the asset includes a file that can be attached anywhere Whop accepts files.
|
|
9
|
+
|
|
10
|
+
Use the Media API to start a generation job and retrieve the asset while it processes or after it is ready.
|
|
11
|
+
|
|
12
|
+
## Commands
|
|
13
|
+
|
|
14
|
+
| Command | Description |
|
|
15
|
+
|---------|-------------|
|
|
16
|
+
| `whop media generate` | Generate Media Asset |
|
|
17
|
+
| `whop media get` | Retrieve Media Asset |
|
|
18
|
+
|
|
19
|
+
Run `whop media <command> --help` for options, or `whop media <command> --schema` for full argument details.
|
|
20
|
+
|
|
21
|
+
## Steps that finish in the browser
|
|
22
|
+
|
|
23
|
+
Some commands respond with a URL the user must open in a browser to finish the flow (`authorize_url`, `session_url`, `deposit_url`) — the CLI cannot complete that step itself. When a response contains one of these fields, or the CLI prints "Action required: open this link in the user's browser", open that link in the user's browser for them, tell them what to complete there, then re-run the matching `get`/`list` command to confirm the step finished.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: whop-partners
|
|
3
|
+
description: The users and businesses you referred to Whop, and what you earn from them. Run `whop partners --help` for usage details.
|
|
4
|
+
requires_bin: whop
|
|
5
|
+
command: whop partners
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
The Referrals API covers your Whop partner activity: the users you referred onto Whop, the businesses you referred and the earnings generated from their processing volume, and the partner leaderboard.
|
|
9
|
+
|
|
10
|
+
Use it to enroll as a Whop partner, list the users you referred, list your referred businesses and review their earnings, and see the partner leaderboard.
|
|
11
|
+
|
|
12
|
+
## Commands
|
|
13
|
+
|
|
14
|
+
| Command | Description |
|
|
15
|
+
|---------|-------------|
|
|
16
|
+
| `whop partners create` | Enroll as a Whop partner |
|
|
17
|
+
| `whop partners list` | List partner business referrals |
|
|
18
|
+
| `whop partners get` | Retrieve a partner business referral |
|
|
19
|
+
| `whop partners earnings` | List a partner business referral's earnings |
|
|
20
|
+
| `whop partners leaderboard` | Retrieve the partner leaderboard |
|
|
21
|
+
| `whop partners referred_users` | List the users the caller referred |
|
|
22
|
+
|
|
23
|
+
Run `whop partners <command> --help` for options, or `whop partners <command> --schema` for full argument details.
|
|
@@ -5,15 +5,16 @@ requires_bin: whop
|
|
|
5
5
|
command: whop payouts
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
Payouts represent money sent from an account balance to an external destination, such as a bank account or other
|
|
8
|
+
Payouts represent money sent from an account or user balance to an external destination, such as a bank account, wallet, or other saved payout method.
|
|
9
9
|
|
|
10
|
-
Use the Payouts API to list payout history, monitor payout statuses, and show expected arrival details for funds leaving
|
|
10
|
+
Use the Payouts API to create payouts from stablecoin accounts, list payout history for accounts or users, monitor payout statuses, and show expected arrival details for funds leaving Whop.
|
|
11
11
|
|
|
12
12
|
## Commands
|
|
13
13
|
|
|
14
14
|
| Command | Description |
|
|
15
15
|
|---------|-------------|
|
|
16
16
|
| `whop payouts list` | List Payouts |
|
|
17
|
+
| `whop payouts create` | Create Payout |
|
|
17
18
|
| `whop payouts methods` | List Payout Methods |
|
|
18
19
|
|
|
19
20
|
Run `whop payouts <command> --help` for options, or `whop payouts <command> --schema` for full argument details.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: whop-people
|
|
3
|
+
description: Visitors and customers of an account, aggregated from pixel events. Run `whop people --help` for usage details.
|
|
4
|
+
requires_bin: whop
|
|
5
|
+
command: whop people
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
A Person represents a visitor or customer of an account, assembled from [pixel events](https://docs.whop.com/api-reference/beta/events/event) and purchase activity — ad clicks, storefront visits, and checkouts.
|
|
9
|
+
|
|
10
|
+
Use the People API to list the people of an account and retrieve a single person.
|
|
11
|
+
|
|
12
|
+
## Commands
|
|
13
|
+
|
|
14
|
+
| Command | Description |
|
|
15
|
+
|---------|-------------|
|
|
16
|
+
| `whop people list` | List People |
|
|
17
|
+
| `whop people get` | Retrieve Person |
|
|
18
|
+
|
|
19
|
+
Run `whop people <command> --help` for options, or `whop people <command> --schema` for full argument details.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: whop-social-accounts
|
|
3
|
+
description: Connected Facebook and Instagram accounts that run ads. Run `whop social-accounts --help` for usage details.
|
|
4
|
+
requires_bin: whop
|
|
5
|
+
command: whop social-accounts
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
A Social Account represents an external profile connected to a Whop account or user, such as a Facebook page or Instagram account. Connecting a social account lets Whop run [ads](https://docs.whop.com/api-reference/beta/ads/ad) under that profile's identity and promote its existing posts.
|
|
9
|
+
|
|
10
|
+
Use the Social Accounts API to list connected accounts, create a Whop-managed Facebook page, start an OAuth connection, disconnect a social account, and list a connected profile's posts.
|
|
11
|
+
|
|
12
|
+
## Commands
|
|
13
|
+
|
|
14
|
+
| Command | Description |
|
|
15
|
+
|---------|-------------|
|
|
16
|
+
| `whop social-accounts list` | List Social Accounts |
|
|
17
|
+
| `whop social-accounts create` | Create a Social Account |
|
|
18
|
+
| `whop social-accounts connect` | Connect a Social Account |
|
|
19
|
+
| `whop social-accounts delete` | Delete a Social Account |
|
|
20
|
+
| `whop social-accounts posts` | List Social Account Posts |
|
|
21
|
+
|
|
22
|
+
Run `whop social-accounts <command> --help` for options, or `whop social-accounts <command> --schema` for full argument details.
|
|
23
|
+
|
|
24
|
+
## Steps that finish in the browser
|
|
25
|
+
|
|
26
|
+
Some commands respond with a URL the user must open in a browser to finish the flow (`authorize_url`, `session_url`, `deposit_url`) — the CLI cannot complete that step itself. When a response contains one of these fields, or the CLI prints "Action required: open this link in the user's browser", open that link in the user's browser for them, tell them what to complete there, then re-run the matching `get`/`list` command to confirm the step finished.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: whop-stats
|
|
3
|
+
description: Aggregated account time series for reporting. Run `whop stats --help` for usage details.
|
|
4
|
+
requires_bin: whop
|
|
5
|
+
command: whop stats
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Stats represent aggregated activity for an account over time. They help you understand revenue, transactions, disputes, members, referrals, and advertising performance across reporting periods like days, weeks, or months.
|
|
9
|
+
|
|
10
|
+
Use the Stats API to list available metrics and their filterable properties, then retrieve time-series values for a date range.
|
|
11
|
+
|
|
12
|
+
## Commands
|
|
13
|
+
|
|
14
|
+
| Command | Description |
|
|
15
|
+
|---------|-------------|
|
|
16
|
+
| `whop stats list` | List Metrics |
|
|
17
|
+
| `whop stats get` | Retrieve Metric |
|
|
18
|
+
|
|
19
|
+
Run `whop stats <command> --help` for options, or `whop stats <command> --schema` for full argument details.
|
|
@@ -19,3 +19,7 @@ Use the Verifications API to start or resume a hosted verification session, chec
|
|
|
19
19
|
| `whop verifications update` | Update Verification |
|
|
20
20
|
|
|
21
21
|
Run `whop verifications <command> --help` for options, or `whop verifications <command> --schema` for full argument details.
|
|
22
|
+
|
|
23
|
+
## Steps that finish in the browser
|
|
24
|
+
|
|
25
|
+
Some commands respond with a URL the user must open in a browser to finish the flow (`authorize_url`, `session_url`, `deposit_url`) — the CLI cannot complete that step itself. When a response contains one of these fields, or the CLI prints "Action required: open this link in the user's browser", open that link in the user's browser for them, tell them what to complete there, then re-run the matching `get`/`list` command to confirm the step finished.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: whop-workforce-bounties
|
|
3
|
+
description: Paid tasks with reviewed submissions and escrowed rewards. Run `whop workforce-bounties --help` for usage details.
|
|
4
|
+
requires_bin: whop
|
|
5
|
+
command: whop workforce-bounties
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
A Workforce Bounty is a paid task posted by an account or user. The reward is held in escrow when the bounty publishes, workers submit proof of completed work, and each accepted submission is paid out until every winner slot fills.
|
|
9
|
+
|
|
10
|
+
Use the Workforce Bounties API to list an account's bounties for reporting or dashboards, list the bounties a user can work or has participated in, and retrieve a single bounty by ID.
|
|
11
|
+
|
|
12
|
+
## Commands
|
|
13
|
+
|
|
14
|
+
| Command | Description |
|
|
15
|
+
|---------|-------------|
|
|
16
|
+
| `whop workforce-bounties list` | List Workforce Bounties |
|
|
17
|
+
| `whop workforce-bounties get` | Retrieve Workforce Bounty |
|
|
18
|
+
|
|
19
|
+
Run `whop workforce-bounties <command> --help` for options, or `whop workforce-bounties <command> --schema` for full argument details.
|
package/dist/api-P7EWPZKG.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
apps_spec_default,
|
|
5
|
-
createWhopFetch,
|
|
6
|
-
filterSpecByTag,
|
|
7
|
-
native_spec_default,
|
|
8
|
-
resolveActiveAccountId
|
|
9
|
-
} from "./chunk-GKKJXDPK.js";
|
|
10
|
-
import "./chunk-KFCNNWPI.js";
|
|
11
|
-
export {
|
|
12
|
-
apps_spec_default as appsSpec,
|
|
13
|
-
createWhopFetch,
|
|
14
|
-
filterSpecByTag,
|
|
15
|
-
native_spec_default as nativeSpec,
|
|
16
|
-
resolveActiveAccountId
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=api-P7EWPZKG.js.map
|
package/dist/api-P7EWPZKG.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|