@tryghost/ghst 0.4.3 → 0.6.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 +90 -2
- package/dist/index.js +7548 -2357
- package/dist/index.js.map +1 -1
- package/package.json +31 -31
package/README.md
CHANGED
|
@@ -109,14 +109,22 @@ Site/profile management:
|
|
|
109
109
|
ghst auth list
|
|
110
110
|
ghst auth switch <site-alias>
|
|
111
111
|
ghst auth link --site <site-alias>
|
|
112
|
+
ghst auth link --site <site-alias> --yes
|
|
113
|
+
ghst auth logout --yes
|
|
112
114
|
ghst auth token
|
|
113
115
|
```
|
|
114
116
|
|
|
117
|
+
`ghst auth token` prints a short-lived staff JWT. Treat the output as sensitive.
|
|
118
|
+
`ghst auth logout` requires confirmation when removing all configured sites; use `--yes` in non-interactive scripts.
|
|
119
|
+
`ghst auth link` requires confirmation before replacing an existing project link; use `--yes` in non-interactive scripts.
|
|
120
|
+
Interactive destructive confirmations also emit `GHST_AGENT_NOTICE:` lines on stderr instructing cooperative agents to ask the user for approval before continuing.
|
|
121
|
+
|
|
115
122
|
## Command Reference
|
|
116
123
|
|
|
117
124
|
| Resource | Actions |
|
|
118
125
|
| --- | --- |
|
|
119
126
|
| `auth` | `login`, `status`, `list`, `switch`, `logout`, `link`, `token` |
|
|
127
|
+
| `comment` | `list`, `get`, `thread`, `replies`, `likes`, `reports`, `hide`, `show`, `delete` |
|
|
120
128
|
| `post` | `list`, `get`, `create`, `update`, `delete`, `publish`, `schedule`, `unschedule`, `copy`, `bulk` |
|
|
121
129
|
| `page` | `list`, `get`, `create`, `update`, `delete`, `copy`, `bulk` |
|
|
122
130
|
| `tag` | `list`, `get`, `create`, `update`, `delete`, `bulk` |
|
|
@@ -130,6 +138,8 @@ ghst auth token
|
|
|
130
138
|
| `image` | `upload` |
|
|
131
139
|
| `theme` | `list`, `upload`, `activate`, `validate`, `dev` |
|
|
132
140
|
| `site` | `info` |
|
|
141
|
+
| `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` |
|
|
142
|
+
| `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
143
|
| `setting` | `list`, `get`, `set` |
|
|
134
144
|
| `migrate` | `wordpress`, `medium`, `substack`, `csv`, `json`, `export` |
|
|
135
145
|
| `config` | `show`, `path`, `list`, `get`, `set` |
|
|
@@ -165,10 +175,21 @@ ghst member bulk --update --filter "status:free" --labels "trial,needs-follow-up
|
|
|
165
175
|
ghst label bulk --filter "name:'legacy'" --action delete --yes
|
|
166
176
|
```
|
|
167
177
|
|
|
178
|
+
Comment moderation:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
ghst comment list --filter "status:hidden"
|
|
182
|
+
ghst comment thread <comment-id>
|
|
183
|
+
ghst comment replies <comment-id>
|
|
184
|
+
ghst comment hide <comment-id>
|
|
185
|
+
ghst comment show <comment-id>
|
|
186
|
+
ghst comment delete <comment-id> --yes
|
|
187
|
+
```
|
|
188
|
+
|
|
168
189
|
Scheduling:
|
|
169
190
|
|
|
170
191
|
```bash
|
|
171
|
-
ghst post schedule <post-id> --at 2026-03-01T10:00:00Z
|
|
192
|
+
ghst post schedule <post-id> --at 2026-03-01T10:00:00Z --newsletter weekly --email-only --email-segment status:paid
|
|
172
193
|
ghst post unschedule <post-id>
|
|
173
194
|
```
|
|
174
195
|
|
|
@@ -194,6 +215,50 @@ ghst api /posts/ --paginate --include-headers
|
|
|
194
215
|
ghst api /settings/ -X PUT -f settings[0].key=title -f settings[0].value="New title"
|
|
195
216
|
```
|
|
196
217
|
|
|
218
|
+
Analytics reporting:
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
ghst stats overview
|
|
222
|
+
ghst stats web
|
|
223
|
+
ghst stats web sources --range 90d --csv
|
|
224
|
+
ghst stats growth
|
|
225
|
+
ghst stats posts --range 30d --csv
|
|
226
|
+
ghst stats email subscribers --csv
|
|
227
|
+
ghst stats post <post-id> referrers --csv --output ./referrers.csv
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Social web / ActivityPub:
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
ghst socialweb status
|
|
234
|
+
ghst socialweb profile
|
|
235
|
+
ghst socialweb notes --json
|
|
236
|
+
ghst socialweb follow @alice@example.com
|
|
237
|
+
ghst socialweb delete https://example.com/.ghost/activitypub/note/1 --yes
|
|
238
|
+
ghst socialweb note --content "Hello fediverse"
|
|
239
|
+
ghst socialweb reply https://example.com/users/alice/statuses/1 --content "Replying from ghst"
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Social web auth note:
|
|
243
|
+
- `ghst socialweb` bootstraps a short-lived identity JWT from `/ghost/api/admin/identities/`.
|
|
244
|
+
- That bridge requires an Owner or Administrator staff access token.
|
|
245
|
+
- `ghst socialweb delete` requires confirmation; use `--yes` in non-interactive scripts.
|
|
246
|
+
- Public Ghost post publishing still lives under `ghst post`; `ghst socialweb` is for notes, interactions, profile, feed, and moderation flows.
|
|
247
|
+
|
|
248
|
+
Ghost analytics filter semantics:
|
|
249
|
+
- `source` and `utm_*` filters are session-scoped.
|
|
250
|
+
- post and member-status filters are hit-scoped.
|
|
251
|
+
|
|
252
|
+
Ghost range semantics:
|
|
253
|
+
- `stats growth` clips member, MRR, and subscription histories client-side when Ghost only exposes broader source data.
|
|
254
|
+
- `stats post ... growth` clips Ghost's lifetime post-growth history to the selected window.
|
|
255
|
+
|
|
256
|
+
File output safety:
|
|
257
|
+
- `ghst member export --output`, `ghst stats ... --csv --output`, and `ghst migrate export --output` refuse to overwrite an existing file.
|
|
258
|
+
|
|
259
|
+
`endpointPath` must stay within the selected Ghost API root. Use resource paths such as `/posts/`
|
|
260
|
+
or canonical Ghost API paths such as `/ghost/api/admin/posts/`.
|
|
261
|
+
|
|
197
262
|
## Configuration and Environment Variables
|
|
198
263
|
|
|
199
264
|
Connection resolution order:
|
|
@@ -261,20 +326,43 @@ Run MCP over stdio or HTTP:
|
|
|
261
326
|
|
|
262
327
|
```bash
|
|
263
328
|
ghst mcp stdio --tools all
|
|
264
|
-
ghst mcp http --host 127.0.0.1 --port 3100 --tools posts,tags,site
|
|
329
|
+
ghst mcp http --host 127.0.0.1 --port 3100 --tools posts,tags,site --auth-token token-123
|
|
265
330
|
```
|
|
266
331
|
|
|
332
|
+
Notes:
|
|
333
|
+
|
|
334
|
+
- `ghst mcp http` binds to loopback by default. Binding to a non-loopback host requires `--unsafe-public-bind`.
|
|
335
|
+
- `--cors-origin` accepts a single exact origin only, for example `https://app.example.com`.
|
|
336
|
+
|
|
267
337
|
Supported tool groups:
|
|
268
338
|
|
|
269
339
|
- `posts`
|
|
270
340
|
- `pages`
|
|
271
341
|
- `tags`
|
|
272
342
|
- `members`
|
|
343
|
+
- `comments`
|
|
273
344
|
- `site`
|
|
274
345
|
- `settings`
|
|
275
346
|
- `users`
|
|
276
347
|
- `api`
|
|
277
348
|
- `search`
|
|
349
|
+
- `socialweb`
|
|
350
|
+
- `stats`
|
|
351
|
+
|
|
352
|
+
The `stats` MCP tools mirror the CLI analytics surface, including `ghst stats overview`,
|
|
353
|
+
`ghst stats web`, `ghst stats growth`, `ghst stats posts`, `ghst stats email subscribers`,
|
|
354
|
+
and `ghst stats post <post-id> referrers`. The same Ghost analytics filter and range semantics
|
|
355
|
+
shown above apply to both the CLI and MCP stats tooling.
|
|
356
|
+
|
|
357
|
+
The `socialweb` MCP tools mirror the private `ghst socialweb` admin surface for status,
|
|
358
|
+
profile, feeds, interactions, moderation, and uploads. They use the same Owner/Admin
|
|
359
|
+
identity-token bridge as the CLI and remain limited to Ghost's private social web admin APIs.
|
|
360
|
+
|
|
361
|
+
## Safe Operation
|
|
362
|
+
|
|
363
|
+
- Keep `ghst mcp http` on loopback unless you explicitly intend to expose Ghost admin automation.
|
|
364
|
+
- Treat `ghst api` and MCP `ghost_api_request` as privileged admin access.
|
|
365
|
+
- Avoid sharing terminal output that contains `ghst auth token` output or values revealed with `config --show-secrets`.
|
|
278
366
|
|
|
279
367
|
## Troubleshooting
|
|
280
368
|
|