@whop/cli 0.6.0 → 0.7.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 +24 -0
- package/dist/{api-P7EWPZKG.js → api-YDHSDKDV.js} +4 -2
- package/dist/{chunk-GKKJXDPK.js → chunk-BSCOWFVU.js} +1649 -167
- package/dist/chunk-BSCOWFVU.js.map +1 -0
- package/dist/index.js +547 -12
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/skills/whop-accounts/SKILL.md +4 -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-payouts/SKILL.md +1 -0
- package/skills/whop-people/SKILL.md +19 -0
- package/skills/whop-referrals/SKILL.md +1 -1
- package/skills/whop-social-accounts/SKILL.md +26 -0
- package/skills/whop-verifications/SKILL.md +4 -0
- package/dist/chunk-GKKJXDPK.js.map +0 -1
- /package/dist/{api-P7EWPZKG.js.map → api-YDHSDKDV.js.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whop/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.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,7 @@ 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 |
|
|
21
23
|
|
|
22
24
|
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 the Whop platform — from a fully-hosted web app served at `<route>.whop.app` to an API integration installed into whops as experiences. Apps belong to an account and hold their own credentials and settings.
|
|
9
|
+
|
|
10
|
+
Use the Apps API to create and configure apps, and — for hosted apps — read their server runtime logs: every console line, uncaught exception, and failed request is captured for 7 days and queryable 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.
|
|
@@ -14,6 +14,7 @@ Use the Payouts API to list payout history, monitor payout statuses, and show ex
|
|
|
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.
|
|
@@ -5,7 +5,7 @@ requires_bin: whop
|
|
|
5
5
|
command: whop referrals
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
Referrals track businesses referred to Whop and the earnings generated from their processing volume. They help you see much volume your referred businesses have processed and how much you've earned from them.
|
|
8
|
+
Referrals track businesses referred to Whop and the earnings generated from their processing volume. They help you see how much volume your referred businesses have processed and how much you've earned from them.
|
|
9
9
|
|
|
10
10
|
Use the Referrals API to list referred businesses, retrieve one referral, and review earnings across all referrals or for a single referred business.
|
|
11
11
|
|
|
@@ -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.
|
|
@@ -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.
|