@whop/cli 0.0.5 → 0.1.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 +31 -90
- package/dist/{api-NBD5G47Q.js → api-3MQ6MQGV.js} +3 -3
- package/dist/{chunk-O66TV7ZF.js → chunk-ET6QSHSA.js} +9938 -12792
- package/dist/chunk-ET6QSHSA.js.map +1 -0
- package/dist/{chunk-TZPTBY4K.js → chunk-KFCNNWPI.js} +1103 -12739
- package/dist/chunk-KFCNNWPI.js.map +1 -0
- package/dist/dist-2MZJLO2W.js +11660 -0
- package/dist/dist-2MZJLO2W.js.map +1 -0
- package/dist/index.js +567 -150
- package/dist/index.js.map +1 -1
- package/package.json +60 -60
- package/dist/chunk-O66TV7ZF.js.map +0 -1
- package/dist/chunk-TZPTBY4K.js.map +0 -1
- package/dist/dist-3D5NI5BW.js +0 -123
- package/dist/dist-3D5NI5BW.js.map +0 -1
- /package/dist/{api-NBD5G47Q.js.map → api-3MQ6MQGV.js.map} +0 -0
package/README.md
CHANGED
|
@@ -1,118 +1,59 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Whop CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`whop` — sell on Whop from your terminal. Create products, set pricing, and get a shareable checkout link without leaving your shell.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
> Status: **early.** This package will become the public `whop` CLI. The existing internal developer CLI (`infra/localdev`) keeps the `whop` name for now and will later be renamed `whopdev`.
|
|
8
|
-
|
|
9
|
-
## Develop
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
# from developer-platform/
|
|
13
|
-
pnpm install
|
|
14
|
-
|
|
15
|
-
# run the CLI from source (no build) via tsx
|
|
16
|
-
pnpm --filter @whop/cli dev --help
|
|
17
|
-
pnpm --filter @whop/cli dev auth status
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Build
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
pnpm --filter @whop/cli build # tsup -> dist/index.js (executable, ESM)
|
|
24
|
-
node packages/cli/dist/index.js --help
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Try it
|
|
5
|
+
## Installation
|
|
28
6
|
|
|
29
7
|
```bash
|
|
30
|
-
|
|
31
|
-
whop
|
|
32
|
-
whop auth login --help # help for a specific command
|
|
33
|
-
whop auth status # who am I?
|
|
34
|
-
whop auth status --format json # structured output for scripts/agents
|
|
35
|
-
whop --llms # agent-readable command manifest
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Start selling
|
|
8
|
+
# macOS / Linux
|
|
9
|
+
curl -fsSL https://whop.com/install.sh | sh
|
|
39
10
|
|
|
40
|
-
|
|
11
|
+
# Homebrew
|
|
12
|
+
brew install whopio/tap/whop
|
|
41
13
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
whop quickstart --title "My Course" --price 9.99 --billing_period monthly # one-shot
|
|
45
|
-
whop quickstart --format json # agents: a read-only status check (never mutates unless you pass creation flags)
|
|
14
|
+
# npm (requires Node.js >= 22)
|
|
15
|
+
npm install -g @whop/cli
|
|
46
16
|
```
|
|
47
17
|
|
|
48
|
-
|
|
18
|
+
Prebuilt binaries cover macOS and Linux ([releases](https://github.com/whopio/whop-public-cli/releases)); on other platforms, use npm.
|
|
49
19
|
|
|
50
|
-
##
|
|
51
|
-
|
|
52
|
-
Log in with a Whop **API key** (create one in your dashboard under **Developer → API keys**). Credentials are stored in your **OS keychain** (macOS Keychain, Windows Credential Manager, libsecret on Linux) — never in a plaintext file. Non-secret profile metadata lives in `~/.config/whop/config.json`.
|
|
20
|
+
## Getting started
|
|
53
21
|
|
|
54
22
|
```bash
|
|
55
|
-
whop
|
|
56
|
-
whop auth login # same thing
|
|
57
|
-
whop auth status # who am I? (whoami)
|
|
58
|
-
whop auth list # list saved profiles
|
|
59
|
-
whop auth switch [name] # switch the active profile (interactive picker if omitted)
|
|
60
|
-
whop auth logout [name] # remove a profile (defaults to the active one)
|
|
23
|
+
whop
|
|
61
24
|
```
|
|
62
25
|
|
|
63
|
-
|
|
26
|
+
That's it — it signs you in and walks you to a shareable checkout link.
|
|
64
27
|
|
|
65
|
-
##
|
|
28
|
+
## Usage
|
|
66
29
|
|
|
67
30
|
```bash
|
|
68
|
-
whop
|
|
69
|
-
whop
|
|
70
|
-
whop
|
|
31
|
+
whop --help # all commands
|
|
32
|
+
whop products list # what you're selling
|
|
33
|
+
whop plans create --help # options for any command
|
|
34
|
+
whop stats list # your numbers
|
|
71
35
|
```
|
|
72
36
|
|
|
73
|
-
|
|
37
|
+
Every command takes `--format json` for structured output.
|
|
74
38
|
|
|
75
|
-
|
|
39
|
+
## For AI agents
|
|
76
40
|
|
|
77
|
-
|
|
41
|
+
The CLI is self-describing — agents can discover and drive every command:
|
|
78
42
|
|
|
79
43
|
```bash
|
|
80
|
-
whop
|
|
81
|
-
|
|
44
|
+
whop --llms # machine-readable manifest of all commands
|
|
45
|
+
whop mcp add # register as an MCP server (e.g. Claude Desktop)
|
|
46
|
+
whop skills add # generate agent skills
|
|
82
47
|
```
|
|
83
48
|
|
|
84
|
-
|
|
85
|
-
| --- | --- |
|
|
86
|
-
| `WHOP_API_KEY` | API key for non-interactive login |
|
|
87
|
-
| `WHOP_API_BASE_URL` | Override the Whop API base URL (default `https://api.whop.com/api/v1`) |
|
|
88
|
-
| `WHOP_CONFIG_DIR` | Override the config directory (default `~/.config/whop`, honors `XDG_CONFIG_HOME`) |
|
|
49
|
+
Set `WHOP_API_KEY` for non-interactive use (create one under **Developer → API keys**).
|
|
89
50
|
|
|
90
|
-
##
|
|
51
|
+
## Updating
|
|
91
52
|
|
|
92
|
-
|
|
53
|
+
The CLI keeps itself up to date. To update manually, run `whop upgrade`.
|
|
93
54
|
|
|
94
|
-
|
|
95
|
-
whop accounts list # list accounts visible to your credential
|
|
96
|
-
whop accounts get <id> # retrieve a single account
|
|
97
|
-
whop accounts me # retrieve the account for the current API key
|
|
98
|
-
whop accounts create --email x@y.com # create a connected account
|
|
99
|
-
whop accounts update <id> --title "Acme" # update account fields
|
|
100
|
-
```
|
|
55
|
+
## Documentation
|
|
101
56
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
> The full incur authoring guide is vendored into this package as [`SKILL.md`](./SKILL.md) — the framework reference for command definitions, args/options schemas, output formats, middleware, streaming, and agent discovery. Re-sync it from the [`incur`](https://www.npmjs.com/package/incur) repo when upgrading.
|
|
107
|
-
|
|
108
|
-
Register new subcommands in `src/index.ts`:
|
|
109
|
-
|
|
110
|
-
```ts
|
|
111
|
-
cli.command("apps", {
|
|
112
|
-
description: "List your Whop apps",
|
|
113
|
-
output: z.object({ apps: z.array(z.object({ id: z.string(), name: z.string() })) }),
|
|
114
|
-
run() {
|
|
115
|
-
return { apps: [] };
|
|
116
|
-
},
|
|
117
|
-
});
|
|
118
|
-
```
|
|
57
|
+
- [Whop developer docs](https://docs.whop.com)
|
|
58
|
+
- [whop.com/developers](https://whop.com/developers/)
|
|
59
|
+
- Bugs and feature requests: [issues](https://github.com/whopio/whop-public-cli/issues)
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
filterSpecByTag,
|
|
6
6
|
native_spec_default,
|
|
7
7
|
resolveActiveCompanyId
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-ET6QSHSA.js";
|
|
9
|
+
import "./chunk-KFCNNWPI.js";
|
|
10
10
|
export {
|
|
11
11
|
createWhopFetch,
|
|
12
12
|
filterSpecByTag,
|
|
13
13
|
native_spec_default as nativeSpec,
|
|
14
14
|
resolveActiveCompanyId
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=api-
|
|
16
|
+
//# sourceMappingURL=api-3MQ6MQGV.js.map
|