@tryghost/ghst 0.12.0 → 0.14.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 CHANGED
@@ -109,14 +109,15 @@ 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
+ ghst --enable-destructive-actions auth link --site <site-alias> --yes
113
+ ghst --enable-destructive-actions auth logout --yes
114
114
  ghst auth token
115
115
  ```
116
116
 
117
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.
118
+ Destructive commands require `--enable-destructive-actions`; use `--yes` in non-interactive scripts when a destructive command also asks for confirmation.
119
+ `ghst auth logout` requires confirmation when removing all configured sites.
120
+ `ghst auth link` requires confirmation before replacing an existing project link.
120
121
  Interactive destructive confirmations also emit `GHST_AGENT_NOTICE:` lines on stderr instructing cooperative agents to ask the user for approval before continuing.
121
122
 
122
123
  ## Command Reference
@@ -155,6 +156,7 @@ Interactive destructive confirmations also emit `GHST_AGENT_NOTICE:` lines on st
155
156
  | `--jq <filter>` | Apply jq-style extraction to JSON output |
156
157
  | `--site <alias>` | Use configured site alias |
157
158
  | `--url <url>` + `--staff-token <token>` | Use direct credentials for this invocation |
159
+ | `--enable-destructive-actions` | Allow destructive operations such as deletes |
158
160
  | `--debug [level]` | Enable debug output |
159
161
  | `--no-color` | Disable color output |
160
162
 
@@ -163,16 +165,18 @@ Interactive destructive confirmations also emit `GHST_AGENT_NOTICE:` lines on st
163
165
  Create and publish:
164
166
 
165
167
  ```bash
166
- ghst post create --title "Launch" --markdown-file ./launch.md --newsletter weekly --email-segment all
167
- ghst post publish <post-id>
168
+ ghst post create --title "Launch" --markdown-file ./launch.md
169
+ ghst post publish <post-id> --newsletter weekly --email-segment all
168
170
  ```
169
171
 
172
+ The email delivery flags (`--newsletter`, `--email-only`, `--email-segment`) belong on `post publish` (or `post schedule` / `post update`) — Ghost's email send pipeline fires on the publish transition, not on create.
173
+
170
174
  Bulk updates:
171
175
 
172
176
  ```bash
173
177
  ghst post bulk --filter "status:draft" --update --add-tag release-notes --authors editor@example.com
174
178
  ghst member bulk --update --filter "status:free" --labels "trial,needs-follow-up"
175
- ghst label bulk --filter "name:'legacy'" --action delete --yes
179
+ ghst --enable-destructive-actions label bulk --filter "name:'legacy'" --action delete --yes
176
180
  ```
177
181
 
178
182
  Comment moderation:
@@ -183,7 +187,7 @@ ghst comment thread <comment-id>
183
187
  ghst comment replies <comment-id>
184
188
  ghst comment hide <comment-id>
185
189
  ghst comment show <comment-id>
186
- ghst comment delete <comment-id> --yes
190
+ ghst --enable-destructive-actions comment delete <comment-id> --yes
187
191
  ```
188
192
 
189
193
  Scheduling:
@@ -212,7 +216,7 @@ Direct API calls:
212
216
 
213
217
  ```bash
214
218
  ghst api /posts/ --paginate --include-headers
215
- ghst api /settings/ -X PUT -f settings[0].key=title -f settings[0].value="New title"
219
+ ghst --enable-destructive-actions api /settings/ -X PUT -f settings[0].key=title -f settings[0].value="New title"
216
220
  ```
217
221
 
218
222
  Analytics reporting:
@@ -234,7 +238,7 @@ ghst socialweb status
234
238
  ghst socialweb profile
235
239
  ghst socialweb notes --json
236
240
  ghst socialweb follow @alice@example.com
237
- ghst socialweb delete https://example.com/.ghost/activitypub/note/1 --yes
241
+ ghst --enable-destructive-actions socialweb delete https://example.com/.ghost/activitypub/note/1 --yes
238
242
  ghst socialweb note --content "Hello fediverse"
239
243
  ghst socialweb reply https://example.com/users/alice/statuses/1 --content "Replying from ghst"
240
244
  ```
@@ -242,7 +246,7 @@ ghst socialweb reply https://example.com/users/alice/statuses/1 --content "Reply
242
246
  Social web auth note:
243
247
  - `ghst socialweb` bootstraps a short-lived identity JWT from `/ghost/api/admin/identities/`.
244
248
  - That bridge requires an Owner or Administrator staff access token.
245
- - `ghst socialweb delete` requires confirmation; use `--yes` in non-interactive scripts.
249
+ - `ghst socialweb delete` requires `--enable-destructive-actions` and confirmation; use `--yes` in non-interactive scripts.
246
250
  - Public Ghost post publishing still lives under `ghst post`; `ghst socialweb` is for notes, interactions, profile, feed, and moderation flows.
247
251
 
248
252
  Ghost analytics filter semantics:
@@ -300,6 +304,8 @@ ghst post list --json
300
304
  ghst post list --json --jq '.posts[].title'
301
305
  ```
302
306
 
307
+ Raw `ghst api` requests using non-read HTTP methods also require `--enable-destructive-actions`.
308
+
303
309
  Common machine-safe practices:
304
310
 
305
311
  - Use `--json` for scripts.
@@ -333,6 +339,17 @@ Notes:
333
339
 
334
340
  - `ghst mcp http` binds to loopback by default. Binding to a non-loopback host requires `--unsafe-public-bind`.
335
341
  - `--cors-origin` accepts a single exact origin only, for example `https://app.example.com`.
342
+ - `--tools` accepts `all` or comma-separated group names such as `posts,stats`.
343
+ - Exposed MCP tools include `ghst/toolGroup` and `ghst/toolGroupTitle` metadata for clients that render grouped tools.
344
+ - MCP tools accept an optional `site` argument to target a configured site alias per call. When omitted, `ghst` uses the normal site resolution order.
345
+ - Use `ghost_site_list` to list configured site aliases without exposing stored credentials.
346
+
347
+ Example multi-instance workflow:
348
+
349
+ ```text
350
+ ghost_post_get({ id: "abc123", site: "blog-fr" })
351
+ ghost_post_create({ title: "Translated title", html: "<p>...</p>", site: "blog-en" })
352
+ ```
336
353
 
337
354
  Supported tool groups:
338
355