@tryghost/ghst 0.11.1 → 0.13.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
 
@@ -172,7 +174,7 @@ Bulk updates:
172
174
  ```bash
173
175
  ghst post bulk --filter "status:draft" --update --add-tag release-notes --authors editor@example.com
174
176
  ghst member bulk --update --filter "status:free" --labels "trial,needs-follow-up"
175
- ghst label bulk --filter "name:'legacy'" --action delete --yes
177
+ ghst --enable-destructive-actions label bulk --filter "name:'legacy'" --action delete --yes
176
178
  ```
177
179
 
178
180
  Comment moderation:
@@ -183,7 +185,7 @@ ghst comment thread <comment-id>
183
185
  ghst comment replies <comment-id>
184
186
  ghst comment hide <comment-id>
185
187
  ghst comment show <comment-id>
186
- ghst comment delete <comment-id> --yes
188
+ ghst --enable-destructive-actions comment delete <comment-id> --yes
187
189
  ```
188
190
 
189
191
  Scheduling:
@@ -212,7 +214,7 @@ Direct API calls:
212
214
 
213
215
  ```bash
214
216
  ghst api /posts/ --paginate --include-headers
215
- ghst api /settings/ -X PUT -f settings[0].key=title -f settings[0].value="New title"
217
+ ghst --enable-destructive-actions api /settings/ -X PUT -f settings[0].key=title -f settings[0].value="New title"
216
218
  ```
217
219
 
218
220
  Analytics reporting:
@@ -234,7 +236,7 @@ ghst socialweb status
234
236
  ghst socialweb profile
235
237
  ghst socialweb notes --json
236
238
  ghst socialweb follow @alice@example.com
237
- ghst socialweb delete https://example.com/.ghost/activitypub/note/1 --yes
239
+ ghst --enable-destructive-actions socialweb delete https://example.com/.ghost/activitypub/note/1 --yes
238
240
  ghst socialweb note --content "Hello fediverse"
239
241
  ghst socialweb reply https://example.com/users/alice/statuses/1 --content "Replying from ghst"
240
242
  ```
@@ -242,7 +244,7 @@ ghst socialweb reply https://example.com/users/alice/statuses/1 --content "Reply
242
244
  Social web auth note:
243
245
  - `ghst socialweb` bootstraps a short-lived identity JWT from `/ghost/api/admin/identities/`.
244
246
  - That bridge requires an Owner or Administrator staff access token.
245
- - `ghst socialweb delete` requires confirmation; use `--yes` in non-interactive scripts.
247
+ - `ghst socialweb delete` requires `--enable-destructive-actions` and confirmation; use `--yes` in non-interactive scripts.
246
248
  - Public Ghost post publishing still lives under `ghst post`; `ghst socialweb` is for notes, interactions, profile, feed, and moderation flows.
247
249
 
248
250
  Ghost analytics filter semantics:
@@ -300,6 +302,8 @@ ghst post list --json
300
302
  ghst post list --json --jq '.posts[].title'
301
303
  ```
302
304
 
305
+ Raw `ghst api` requests using non-read HTTP methods also require `--enable-destructive-actions`.
306
+
303
307
  Common machine-safe practices:
304
308
 
305
309
  - Use `--json` for scripts.
@@ -333,6 +337,17 @@ Notes:
333
337
 
334
338
  - `ghst mcp http` binds to loopback by default. Binding to a non-loopback host requires `--unsafe-public-bind`.
335
339
  - `--cors-origin` accepts a single exact origin only, for example `https://app.example.com`.
340
+ - `--tools` accepts `all` or comma-separated group names such as `posts,stats`.
341
+ - Exposed MCP tools include `ghst/toolGroup` and `ghst/toolGroupTitle` metadata for clients that render grouped tools.
342
+ - MCP tools accept an optional `site` argument to target a configured site alias per call. When omitted, `ghst` uses the normal site resolution order.
343
+ - Use `ghost_site_list` to list configured site aliases without exposing stored credentials.
344
+
345
+ Example multi-instance workflow:
346
+
347
+ ```text
348
+ ghost_post_get({ id: "abc123", site: "blog-fr" })
349
+ ghost_post_create({ title: "Translated title", html: "<p>...</p>", site: "blog-en" })
350
+ ```
336
351
 
337
352
  Supported tool groups:
338
353