@tryghost/ghst 0.4.2 → 0.5.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 +80 -2
- package/dist/index.js +7719 -2692
- package/dist/index.js.map +1 -1
- package/package.json +31 -31
package/README.md
CHANGED
|
@@ -112,11 +112,14 @@ ghst auth link --site <site-alias>
|
|
|
112
112
|
ghst auth token
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
+
`ghst auth token` prints a short-lived staff JWT. Treat the output as sensitive.
|
|
116
|
+
|
|
115
117
|
## Command Reference
|
|
116
118
|
|
|
117
119
|
| Resource | Actions |
|
|
118
120
|
| --- | --- |
|
|
119
121
|
| `auth` | `login`, `status`, `list`, `switch`, `logout`, `link`, `token` |
|
|
122
|
+
| `comment` | `list`, `get`, `thread`, `replies`, `likes`, `reports`, `hide`, `show`, `delete` |
|
|
120
123
|
| `post` | `list`, `get`, `create`, `update`, `delete`, `publish`, `schedule`, `unschedule`, `copy`, `bulk` |
|
|
121
124
|
| `page` | `list`, `get`, `create`, `update`, `delete`, `copy`, `bulk` |
|
|
122
125
|
| `tag` | `list`, `get`, `create`, `update`, `delete`, `bulk` |
|
|
@@ -130,6 +133,8 @@ ghst auth token
|
|
|
130
133
|
| `image` | `upload` |
|
|
131
134
|
| `theme` | `list`, `upload`, `activate`, `validate`, `dev` |
|
|
132
135
|
| `site` | `info` |
|
|
136
|
+
| `socialweb` | `status`, `enable`, `disable`, `profile`, `profile-update`, `search`, `notes`, `reader`, `notifications`, `notifications-count`, `posts`, `likes`, `followers`, `following`, `post`, `thread`, `follow`, `unfollow`, `like`, `unlike`, `repost`, `derepost`, `delete`, `note`, `reply`, `blocked-accounts`, `blocked-domains`, `block`, `unblock`, `block-domain`, `unblock-domain`, `upload` |
|
|
137
|
+
| `stats` | `overview`, `web` (content, sources, locations, devices, utm-sources, utm-mediums, utm-campaigns, utm-contents, utm-terms), `growth`, `posts`, `email` (clicks, subscribers), `post <id>` (web, growth, newsletter, referrers) |
|
|
133
138
|
| `setting` | `list`, `get`, `set` |
|
|
134
139
|
| `migrate` | `wordpress`, `medium`, `substack`, `csv`, `json`, `export` |
|
|
135
140
|
| `config` | `show`, `path`, `list`, `get`, `set` |
|
|
@@ -165,10 +170,21 @@ ghst member bulk --update --filter "status:free" --labels "trial,needs-follow-up
|
|
|
165
170
|
ghst label bulk --filter "name:'legacy'" --action delete --yes
|
|
166
171
|
```
|
|
167
172
|
|
|
173
|
+
Comment moderation:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
ghst comment list --filter "status:hidden"
|
|
177
|
+
ghst comment thread <comment-id>
|
|
178
|
+
ghst comment replies <comment-id>
|
|
179
|
+
ghst comment hide <comment-id>
|
|
180
|
+
ghst comment show <comment-id>
|
|
181
|
+
ghst comment delete <comment-id> --yes
|
|
182
|
+
```
|
|
183
|
+
|
|
168
184
|
Scheduling:
|
|
169
185
|
|
|
170
186
|
```bash
|
|
171
|
-
ghst post schedule <post-id> --at 2026-03-01T10:00:00Z
|
|
187
|
+
ghst post schedule <post-id> --at 2026-03-01T10:00:00Z --newsletter weekly --email-only --email-segment status:paid
|
|
172
188
|
ghst post unschedule <post-id>
|
|
173
189
|
```
|
|
174
190
|
|
|
@@ -194,6 +210,45 @@ ghst api /posts/ --paginate --include-headers
|
|
|
194
210
|
ghst api /settings/ -X PUT -f settings[0].key=title -f settings[0].value="New title"
|
|
195
211
|
```
|
|
196
212
|
|
|
213
|
+
Analytics reporting:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
ghst stats overview
|
|
217
|
+
ghst stats web
|
|
218
|
+
ghst stats web sources --range 90d --csv
|
|
219
|
+
ghst stats growth
|
|
220
|
+
ghst stats posts --range 30d --csv
|
|
221
|
+
ghst stats email subscribers --csv
|
|
222
|
+
ghst stats post <post-id> referrers --csv --output ./referrers.csv
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Social web / ActivityPub:
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
ghst socialweb status
|
|
229
|
+
ghst socialweb profile
|
|
230
|
+
ghst socialweb notes --json
|
|
231
|
+
ghst socialweb follow @alice@example.com
|
|
232
|
+
ghst socialweb note --content "Hello fediverse"
|
|
233
|
+
ghst socialweb reply https://example.com/users/alice/statuses/1 --content "Replying from ghst"
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Social web auth note:
|
|
237
|
+
- `ghst socialweb` bootstraps a short-lived identity JWT from `/ghost/api/admin/identities/`.
|
|
238
|
+
- That bridge requires an Owner or Administrator staff access token.
|
|
239
|
+
- Public Ghost post publishing still lives under `ghst post`; `ghst socialweb` is for notes, interactions, profile, feed, and moderation flows.
|
|
240
|
+
|
|
241
|
+
Ghost analytics filter semantics:
|
|
242
|
+
- `source` and `utm_*` filters are session-scoped.
|
|
243
|
+
- post and member-status filters are hit-scoped.
|
|
244
|
+
|
|
245
|
+
Ghost range semantics:
|
|
246
|
+
- `stats growth` clips member, MRR, and subscription histories client-side when Ghost only exposes broader source data.
|
|
247
|
+
- `stats post ... growth` clips Ghost's lifetime post-growth history to the selected window.
|
|
248
|
+
|
|
249
|
+
`endpointPath` must stay within the selected Ghost API root. Use resource paths such as `/posts/`
|
|
250
|
+
or canonical Ghost API paths such as `/ghost/api/admin/posts/`.
|
|
251
|
+
|
|
197
252
|
## Configuration and Environment Variables
|
|
198
253
|
|
|
199
254
|
Connection resolution order:
|
|
@@ -261,20 +316,43 @@ Run MCP over stdio or HTTP:
|
|
|
261
316
|
|
|
262
317
|
```bash
|
|
263
318
|
ghst mcp stdio --tools all
|
|
264
|
-
ghst mcp http --host 127.0.0.1 --port 3100 --tools posts,tags,site
|
|
319
|
+
ghst mcp http --host 127.0.0.1 --port 3100 --tools posts,tags,site --auth-token token-123
|
|
265
320
|
```
|
|
266
321
|
|
|
322
|
+
Notes:
|
|
323
|
+
|
|
324
|
+
- `ghst mcp http` binds to loopback by default. Binding to a non-loopback host requires `--unsafe-public-bind`.
|
|
325
|
+
- `--cors-origin` accepts a single exact origin only, for example `https://app.example.com`.
|
|
326
|
+
|
|
267
327
|
Supported tool groups:
|
|
268
328
|
|
|
269
329
|
- `posts`
|
|
270
330
|
- `pages`
|
|
271
331
|
- `tags`
|
|
272
332
|
- `members`
|
|
333
|
+
- `comments`
|
|
273
334
|
- `site`
|
|
274
335
|
- `settings`
|
|
275
336
|
- `users`
|
|
276
337
|
- `api`
|
|
277
338
|
- `search`
|
|
339
|
+
- `socialweb`
|
|
340
|
+
- `stats`
|
|
341
|
+
|
|
342
|
+
The `stats` MCP tools mirror the CLI analytics surface, including `ghst stats overview`,
|
|
343
|
+
`ghst stats web`, `ghst stats growth`, `ghst stats posts`, `ghst stats email subscribers`,
|
|
344
|
+
and `ghst stats post <post-id> referrers`. The same Ghost analytics filter and range semantics
|
|
345
|
+
shown above apply to both the CLI and MCP stats tooling.
|
|
346
|
+
|
|
347
|
+
The `socialweb` MCP tools mirror the private `ghst socialweb` admin surface for status,
|
|
348
|
+
profile, feeds, interactions, moderation, and uploads. They use the same Owner/Admin
|
|
349
|
+
identity-token bridge as the CLI and remain limited to Ghost's private social web admin APIs.
|
|
350
|
+
|
|
351
|
+
## Safe Operation
|
|
352
|
+
|
|
353
|
+
- Keep `ghst mcp http` on loopback unless you explicitly intend to expose Ghost admin automation.
|
|
354
|
+
- Treat `ghst api` and MCP `ghost_api_request` as privileged admin access.
|
|
355
|
+
- Avoid sharing terminal output that contains `ghst auth token` output or values revealed with `config --show-secrets`.
|
|
278
356
|
|
|
279
357
|
## Troubleshooting
|
|
280
358
|
|