@sanity/runtime-cli 17.1.0 → 17.2.0-blueprinit.g62f8017

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.
Files changed (109) hide show
  1. package/README.md +86 -55
  2. package/SKILL.md +21 -0
  3. package/dist/actions/blueprinit/manifest.d.ts +13 -0
  4. package/dist/actions/blueprinit/manifest.js +57 -0
  5. package/dist/actions/blueprinit/studio.d.ts +6 -0
  6. package/dist/actions/blueprinit/studio.js +43 -0
  7. package/dist/actions/blueprinit/templates.d.ts +34 -0
  8. package/dist/actions/blueprinit/templates.js +83 -0
  9. package/dist/actions/blueprinit/workspace.d.ts +15 -0
  10. package/dist/actions/blueprinit/workspace.js +142 -0
  11. package/dist/actions/blueprints/assets.d.ts +2 -1
  12. package/dist/actions/blueprints/assets.js +17 -26
  13. package/dist/actions/blueprints/blueprint.d.ts +1 -1
  14. package/dist/actions/blueprints/pre-deploy.d.ts +29 -0
  15. package/dist/actions/blueprints/pre-deploy.js +164 -0
  16. package/dist/actions/blueprints/wait-for-operation.js +4 -0
  17. package/dist/actions/sanity/datasets.d.ts +15 -0
  18. package/dist/actions/sanity/datasets.js +26 -0
  19. package/dist/actions/sanity/examples.d.ts +4 -4
  20. package/dist/baseCommands.d.ts +7 -4
  21. package/dist/baseCommands.js +17 -0
  22. package/dist/commands/blueprinit.d.ts +13 -0
  23. package/dist/commands/blueprinit.js +44 -0
  24. package/dist/commands/blueprints/add.d.ts +1 -1
  25. package/dist/commands/blueprints/config.d.ts +1 -1
  26. package/dist/commands/blueprints/deploy.d.ts +1 -1
  27. package/dist/commands/blueprints/destroy.d.ts +1 -1
  28. package/dist/commands/blueprints/doctor.d.ts +0 -1
  29. package/dist/commands/blueprints/doctor.js +3 -7
  30. package/dist/commands/blueprints/info.d.ts +1 -1
  31. package/dist/commands/blueprints/logs.d.ts +1 -1
  32. package/dist/commands/blueprints/mint-deploy-token.d.ts +1 -1
  33. package/dist/commands/blueprints/plan.d.ts +1 -1
  34. package/dist/commands/blueprints/promote.d.ts +1 -1
  35. package/dist/commands/blueprints/stacks.d.ts +1 -1
  36. package/dist/commands/functions/add.d.ts +1 -1
  37. package/dist/commands/functions/build.d.ts +1 -1
  38. package/dist/commands/functions/dev.d.ts +1 -1
  39. package/dist/commands/functions/env/add.d.ts +4 -1
  40. package/dist/commands/functions/env/add.js +6 -2
  41. package/dist/commands/functions/env/list.d.ts +4 -1
  42. package/dist/commands/functions/env/list.js +9 -3
  43. package/dist/commands/functions/env/remove.d.ts +4 -1
  44. package/dist/commands/functions/env/remove.js +9 -3
  45. package/dist/commands/functions/logs.d.ts +1 -1
  46. package/dist/commands/functions/test.d.ts +1 -1
  47. package/dist/constants.d.ts +1 -0
  48. package/dist/constants.js +1 -0
  49. package/dist/cores/blueprinit/adopt.d.ts +6 -0
  50. package/dist/cores/blueprinit/adopt.js +90 -0
  51. package/dist/cores/blueprinit/finish.d.ts +14 -0
  52. package/dist/cores/blueprinit/finish.js +36 -0
  53. package/dist/cores/blueprinit/fresh.d.ts +3 -0
  54. package/dist/cores/blueprinit/fresh.js +88 -0
  55. package/dist/cores/blueprinit/prompts.d.ts +4 -0
  56. package/dist/cores/blueprinit/prompts.js +14 -0
  57. package/dist/cores/blueprinit/selection.d.ts +15 -0
  58. package/dist/cores/blueprinit/selection.js +63 -0
  59. package/dist/cores/blueprinit/types.d.ts +13 -0
  60. package/dist/cores/blueprinit/types.js +1 -0
  61. package/dist/cores/blueprinit.d.ts +7 -0
  62. package/dist/cores/blueprinit.js +39 -0
  63. package/dist/cores/blueprints/deploy.js +18 -65
  64. package/dist/cores/blueprints/doctor.js +15 -12
  65. package/dist/cores/functions/build.js +3 -2
  66. package/dist/cores/functions/test.js +4 -2
  67. package/dist/server/app.js +8 -2
  68. package/dist/server/static/favicon-dark.svg +1 -0
  69. package/dist/server/static/favicon.svg +1 -0
  70. package/dist/server/static/index.html +1 -1
  71. package/dist/server/static/vendor/vendor.bundle.js +5 -0
  72. package/dist/utils/command-skills.d.ts +2 -0
  73. package/dist/utils/command-skills.js +17 -0
  74. package/dist/utils/functions/child-process-wrapper.js +13 -171
  75. package/dist/utils/functions/child-runtime/console.d.ts +1 -0
  76. package/dist/utils/functions/child-runtime/console.js +50 -0
  77. package/dist/utils/functions/child-runtime/invoke.d.ts +4 -0
  78. package/dist/utils/functions/child-runtime/invoke.js +47 -0
  79. package/dist/utils/functions/child-runtime/resources.d.ts +4 -0
  80. package/dist/utils/functions/child-runtime/resources.js +59 -0
  81. package/dist/utils/functions/find-entry-point.d.ts +1 -1
  82. package/dist/utils/functions/find-entry-point.js +10 -12
  83. package/dist/utils/functions/invoke/local.js +1 -1
  84. package/dist/utils/functions/invoke/prepare.d.ts +1 -1
  85. package/dist/utils/functions/invoke/prepare.js +19 -8
  86. package/dist/utils/functions/package-json.d.ts +1 -2
  87. package/dist/utils/functions/package-json.js +4 -6
  88. package/dist/utils/functions/prepare-asset.d.ts +2 -2
  89. package/dist/utils/functions/prepare-asset.js +18 -7
  90. package/dist/utils/functions/resolve-dependencies.d.ts +4 -1
  91. package/dist/utils/functions/resolve-dependencies.js +5 -6
  92. package/dist/utils/functions/resource-to-arc.d.ts +1 -1
  93. package/dist/utils/functions/resource-to-arc.js +4 -5
  94. package/dist/utils/functions/should-transpile.d.ts +7 -1
  95. package/dist/utils/functions/should-transpile.js +10 -10
  96. package/dist/utils/functions/transpile/function.d.ts +4 -1
  97. package/dist/utils/functions/transpile/function.js +9 -14
  98. package/dist/utils/functions/transpile/verify-handler.js +1 -1
  99. package/dist/utils/logger.d.ts +7 -5
  100. package/dist/utils/logger.js +33 -1
  101. package/dist/utils/progress.d.ts +5 -0
  102. package/dist/utils/progress.js +40 -0
  103. package/dist/utils/studios/prepare-asset.d.ts +6 -0
  104. package/dist/utils/studios/prepare-asset.js +139 -0
  105. package/dist/utils/types.d.ts +9 -8
  106. package/dist/utils/types.js +2 -3
  107. package/oclif.manifest.json +1218 -931
  108. package/package.json +33 -24
  109. package/skills/blueprinit.md +40 -0
@@ -1,15 +1,133 @@
1
1
  {
2
2
  "commands": {
3
- "functions:add": {
3
+ "blueprinit": {
4
4
  "aliases": [],
5
5
  "args": {},
6
- "description": "Scaffolds a new Function in the functions/ folder and templates a resource for your Blueprint manifest.\n\nFunctions are serverless handlers triggered by document, live content or media-library events (create, update, delete, publish).\n\nAfter adding, use 'functions dev' to test locally, then 'blueprints deploy' to publish.",
6
+ "description": "Scaffolds a Blueprint, Studio, and starter function around an existing Sanity project.\n\nThis hidden command is an experiment; its interface and generated files are not stable.",
7
7
  "examples": [
8
8
  "<%= config.bin %> <%= command.id %>",
9
- "<%= config.bin %> <%= command.id %> --helpers",
10
- "<%= config.bin %> <%= command.id %> --name my-function",
11
- "<%= config.bin %> <%= command.id %> --name my-function --type document-create",
12
- "<%= config.bin %> <%= command.id %> --name my-function --type document-create --type document-update --lang js"
9
+ "<%= config.bin %> <%= command.id %> --yes"
10
+ ],
11
+ "flags": {
12
+ "json": {
13
+ "description": "Format output as json",
14
+ "name": "json",
15
+ "allowNo": false,
16
+ "type": "boolean"
17
+ },
18
+ "llms": {
19
+ "aliases": [
20
+ "skill"
21
+ ],
22
+ "description": "Show agent-oriented guidance for this command",
23
+ "name": "llms",
24
+ "allowNo": false,
25
+ "type": "boolean"
26
+ },
27
+ "path": {
28
+ "aliases": [
29
+ "blueprint-path"
30
+ ],
31
+ "char": "p",
32
+ "description": "Path to a Blueprint file or directory containing one",
33
+ "env": "SANITY_BLUEPRINT_PATH",
34
+ "hidden": true,
35
+ "name": "path",
36
+ "hasDynamicHelp": false,
37
+ "multiple": false,
38
+ "type": "option"
39
+ },
40
+ "trace": {
41
+ "description": "Trace output",
42
+ "hidden": true,
43
+ "name": "trace",
44
+ "allowNo": false,
45
+ "type": "boolean"
46
+ },
47
+ "validate-resources": {
48
+ "description": "Validate resources",
49
+ "hidden": true,
50
+ "name": "validate-resources",
51
+ "allowNo": true,
52
+ "type": "boolean"
53
+ },
54
+ "verbose": {
55
+ "description": "Verbose output",
56
+ "hidden": true,
57
+ "name": "verbose",
58
+ "allowNo": false,
59
+ "type": "boolean"
60
+ },
61
+ "yes": {
62
+ "char": "y",
63
+ "description": "Skip confirmation prompts",
64
+ "name": "yes",
65
+ "allowNo": false,
66
+ "type": "boolean"
67
+ },
68
+ "organization-id": {
69
+ "aliases": [
70
+ "organization",
71
+ "organizationId",
72
+ "org"
73
+ ],
74
+ "description": "Organization to use when the account has several",
75
+ "name": "organization-id",
76
+ "hasDynamicHelp": false,
77
+ "multiple": false,
78
+ "type": "option"
79
+ },
80
+ "project-id": {
81
+ "aliases": [
82
+ "project",
83
+ "projectId"
84
+ ],
85
+ "description": "Project to use when the organization has several",
86
+ "name": "project-id",
87
+ "hasDynamicHelp": false,
88
+ "multiple": false,
89
+ "type": "option"
90
+ }
91
+ },
92
+ "hasDynamicHelp": false,
93
+ "hidden": true,
94
+ "hiddenAliases": [],
95
+ "id": "blueprinit",
96
+ "pluginAlias": "@sanity/runtime-cli",
97
+ "pluginName": "@sanity/runtime-cli",
98
+ "pluginType": "core",
99
+ "strict": true,
100
+ "summary": "Experimental blueprints-first project init",
101
+ "enableJsonFlag": true,
102
+ "isESM": true,
103
+ "relativePath": [
104
+ "dist",
105
+ "commands",
106
+ "blueprinit.js"
107
+ ]
108
+ },
109
+ "blueprints:add": {
110
+ "aliases": [],
111
+ "args": {
112
+ "type": {
113
+ "description": "Type of resource to add (only \"function\" is supported)",
114
+ "name": "type",
115
+ "options": [
116
+ "function"
117
+ ],
118
+ "required": true
119
+ }
120
+ },
121
+ "deprecationOptions": {
122
+ "to": "functions add"
123
+ },
124
+ "description": "This command is deprecated. Use \"functions add\" instead.\n\nEquivalent usage:\n $ <%= config.bin %> functions add\n $ <%= config.bin %> functions add --name my-function --type document-create",
125
+ "examples": [
126
+ "<%= config.bin %> <%= command.id %> function",
127
+ "<%= config.bin %> <%= command.id %> function --helpers",
128
+ "<%= config.bin %> <%= command.id %> function --name my-function",
129
+ "<%= config.bin %> <%= command.id %> function --name my-function --fn-type document-create",
130
+ "<%= config.bin %> <%= command.id %> function --name my-function --fn-type document-create --fn-type document-update --lang js"
13
131
  ],
14
132
  "flags": {
15
133
  "json": {
@@ -18,6 +136,15 @@
18
136
  "allowNo": false,
19
137
  "type": "boolean"
20
138
  },
139
+ "llms": {
140
+ "aliases": [
141
+ "skill"
142
+ ],
143
+ "description": "Show agent-oriented guidance for this command",
144
+ "name": "llms",
145
+ "allowNo": false,
146
+ "type": "boolean"
147
+ },
21
148
  "path": {
22
149
  "aliases": [
23
150
  "blueprint-path"
@@ -95,7 +222,7 @@
95
222
  "aliases": [
96
223
  "recipe"
97
224
  ],
98
- "description": "Example to use for the Function",
225
+ "description": "Example to use for the function resource. Discover examples at https://www.sanity.io/exchange/type=recipes/by=sanity",
99
226
  "exclusive": [
100
227
  "name",
101
228
  "fn-type",
@@ -111,18 +238,21 @@
111
238
  },
112
239
  "name": {
113
240
  "char": "n",
114
- "description": "Name of the Function to add",
241
+ "description": "Name of the resource to add",
115
242
  "name": "name",
116
243
  "hasDynamicHelp": false,
117
244
  "multiple": false,
118
245
  "type": "option"
119
246
  },
120
- "type": {
247
+ "fn-type": {
248
+ "aliases": [
249
+ "function-type"
250
+ ],
121
251
  "dependsOn": [
122
252
  "name"
123
253
  ],
124
254
  "description": "Document change event(s) that should trigger the function; you can specify multiple events by specifying this flag multiple times",
125
- "name": "type",
255
+ "name": "fn-type",
126
256
  "hasDynamicHelp": false,
127
257
  "multiple": true,
128
258
  "options": [
@@ -140,9 +270,11 @@
140
270
  },
141
271
  "language": {
142
272
  "aliases": [
273
+ "function-language",
274
+ "fn-language",
143
275
  "lang"
144
276
  ],
145
- "description": "Language of the new Function",
277
+ "description": "Language of the new function",
146
278
  "name": "language",
147
279
  "default": "ts",
148
280
  "hasDynamicHelp": false,
@@ -165,15 +297,23 @@
165
297
  "allowNo": false,
166
298
  "type": "boolean"
167
299
  },
168
- "helpers": {
169
- "description": "Add helpers to the new Function",
170
- "name": "helpers",
300
+ "fn-helpers": {
301
+ "aliases": [
302
+ "function-helpers",
303
+ "helpers"
304
+ ],
305
+ "description": "Add helpers to the new function",
306
+ "name": "fn-helpers",
171
307
  "allowNo": true,
172
308
  "type": "boolean"
173
309
  },
174
- "installer": {
175
- "description": "How to install the @sanity/functions helpers",
176
- "name": "installer",
310
+ "fn-installer": {
311
+ "aliases": [
312
+ "function-installer",
313
+ "installer"
314
+ ],
315
+ "description": "Which package manager to use when installing the @sanity/functions helpers",
316
+ "name": "fn-installer",
177
317
  "hasDynamicHelp": false,
178
318
  "multiple": false,
179
319
  "options": [
@@ -197,12 +337,13 @@
197
337
  },
198
338
  "hasDynamicHelp": false,
199
339
  "hiddenAliases": [],
200
- "id": "functions:add",
340
+ "id": "blueprints:add",
201
341
  "pluginAlias": "@sanity/runtime-cli",
202
342
  "pluginName": "@sanity/runtime-cli",
203
343
  "pluginType": "core",
344
+ "state": "deprecated",
204
345
  "strict": true,
205
- "summary": "Add a Function to your Blueprint",
346
+ "summary": "[deprecated] Use \"functions add\" instead",
206
347
  "enableJsonFlag": true,
207
348
  "needs": [
208
349
  "blueprint"
@@ -211,19 +352,20 @@
211
352
  "relativePath": [
212
353
  "dist",
213
354
  "commands",
214
- "functions",
355
+ "blueprints",
215
356
  "add.js"
216
357
  ]
217
358
  },
218
- "functions:build": {
359
+ "blueprints:config": {
219
360
  "aliases": [],
220
- "args": {
221
- "name": {
222
- "description": "The name of the Sanity Function",
223
- "name": "name",
224
- "required": false
225
- }
226
- },
361
+ "args": {},
362
+ "description": "Manages the local Blueprint configuration, which links your Blueprint to a Sanity project and Stack.\n\nWithout flags, displays the current configuration. Use --edit to interactively modify settings, or combine --edit with ID flags to update values directly (useful for scripting and automation).\n\nIf you need to switch your Blueprint to a different Stack, use --edit --stack.",
363
+ "examples": [
364
+ "<%= config.bin %> <%= command.id %>",
365
+ "<%= config.bin %> <%= command.id %> --edit",
366
+ "<%= config.bin %> <%= command.id %> --edit --project-id <projectId>",
367
+ "<%= config.bin %> <%= command.id %> --edit --project-id <projectId> --stack <name-or-id>"
368
+ ],
227
369
  "flags": {
228
370
  "json": {
229
371
  "description": "Format output as json",
@@ -231,6 +373,15 @@
231
373
  "allowNo": false,
232
374
  "type": "boolean"
233
375
  },
376
+ "llms": {
377
+ "aliases": [
378
+ "skill"
379
+ ],
380
+ "description": "Show agent-oriented guidance for this command",
381
+ "name": "llms",
382
+ "allowNo": false,
383
+ "type": "boolean"
384
+ },
234
385
  "path": {
235
386
  "aliases": [
236
387
  "blueprint-path"
@@ -266,8 +417,14 @@
266
417
  "type": "boolean"
267
418
  },
268
419
  "stack": {
269
- "description": "Stack name or ID to use instead of the locally configured Stack",
270
- "hidden": true,
420
+ "aliases": [
421
+ "stack-id",
422
+ "stackId"
423
+ ],
424
+ "dependsOn": [
425
+ "edit"
426
+ ],
427
+ "description": "Stack name or ID to set in the configuration. Requires --edit flag",
271
428
  "name": "stack",
272
429
  "hasDynamicHelp": false,
273
430
  "multiple": false,
@@ -278,11 +435,13 @@
278
435
  "project",
279
436
  "projectId"
280
437
  ],
438
+ "dependsOn": [
439
+ "edit"
440
+ ],
281
441
  "description": "Sanity project ID used to scope Blueprint and Stack",
282
442
  "exclusive": [
283
443
  "organization-id"
284
444
  ],
285
- "hidden": true,
286
445
  "name": "project-id",
287
446
  "hasDynamicHelp": false,
288
447
  "multiple": false,
@@ -294,70 +453,59 @@
294
453
  "organizationId",
295
454
  "org"
296
455
  ],
456
+ "dependsOn": [
457
+ "edit"
458
+ ],
297
459
  "description": "Sanity organization ID used to scope Blueprint and Stack",
298
460
  "exclusive": [
299
461
  "project-id"
300
462
  ],
301
- "hidden": true,
302
463
  "name": "organization-id",
303
464
  "hasDynamicHelp": false,
304
465
  "multiple": false,
305
466
  "type": "option"
306
467
  },
307
- "fn-installer": {
308
- "aliases": [
309
- "function-installer",
310
- "installer"
311
- ],
312
- "description": "Which package manager to use when building Functions",
313
- "hidden": true,
314
- "name": "fn-installer",
315
- "hasDynamicHelp": false,
316
- "multiple": false,
317
- "options": [
318
- "npm",
319
- "pnpm",
320
- "yarn"
321
- ],
322
- "type": "option"
323
- },
324
- "out-dir": {
325
- "char": "o",
326
- "description": "Output directory for zip files",
327
- "name": "out-dir",
328
- "hasDynamicHelp": false,
329
- "multiple": false,
330
- "type": "option"
468
+ "edit": {
469
+ "char": "e",
470
+ "description": "Modify the configuration interactively, or directly when combined with ID flags.",
471
+ "name": "edit",
472
+ "allowNo": false,
473
+ "type": "boolean"
331
474
  }
332
475
  },
333
476
  "hasDynamicHelp": false,
334
- "hidden": true,
335
477
  "hiddenAliases": [],
336
- "id": "functions:build",
478
+ "id": "blueprints:config",
337
479
  "pluginAlias": "@sanity/runtime-cli",
338
480
  "pluginName": "@sanity/runtime-cli",
339
481
  "pluginType": "core",
340
482
  "strict": true,
341
- "summary": "Build Sanity Function(s) to zip archives",
483
+ "summary": "View or edit the local Blueprint configuration",
342
484
  "enableJsonFlag": true,
343
485
  "needs": [
486
+ "token",
344
487
  "blueprint"
345
488
  ],
346
489
  "isESM": true,
347
490
  "relativePath": [
348
491
  "dist",
349
492
  "commands",
350
- "functions",
351
- "build.js"
493
+ "blueprints",
494
+ "config.js"
352
495
  ]
353
496
  },
354
- "functions:dev": {
497
+ "blueprints:deploy": {
355
498
  "aliases": [],
356
499
  "args": {},
357
- "description": "Runs a local, web-based development server to test your functions before deploying.\n\nOpen the emulator in your browser to interactively test your functions with the payload editor.\n\nOptionally, set the host and port with the --host and --port flags. Function timeout can be configured with the --timeout flag.\n\nTo invoke a function with the CLI, use 'functions test'.",
500
+ "description": "Applies your local Blueprint to the remote Stack, creating, updating, or removing resources as needed. This is the primary command for applying infrastructure changes.\n\nBefore deploying, run 'blueprints plan' to preview changes. After deployment, use 'blueprints info' to verify Stack status or 'blueprints logs' to monitor activity.\n\nUse --no-wait to queue the deployment and return immediately without waiting for completion.\n\nUse --fn-installer to force which package manager to use when deploying functions.\n\nSet SANITY_ASSET_TIMEOUT (seconds) to override the 60-second timeout for processing resource assets.\n\nExit codes: 0 deployed, 2 deployment failed, 75 deployment accepted but completion could not be confirmed (rerun 'blueprints info' to check).",
358
501
  "examples": [
359
- "<%= config.bin %> <%= command.id %> --host 127.0.0.1 --port 8974",
360
- "<%= config.bin %> <%= command.id %> --timeout 60"
502
+ "<%= config.bin %> <%= command.id %>",
503
+ "<%= config.bin %> <%= command.id %> --message \"Enable staging dataset\"",
504
+ "<%= config.bin %> <%= command.id %> --no-wait",
505
+ "<%= config.bin %> <%= command.id %> --fn-installer npm",
506
+ "<%= config.bin %> <%= command.id %> --stack <name-or-id>",
507
+ "<%= config.bin %> <%= command.id %> --organization-id <orgId> --stack <name-or-id>",
508
+ "<%= config.bin %> <%= command.id %> --new-stack-name <new-name>"
361
509
  ],
362
510
  "flags": {
363
511
  "json": {
@@ -366,9 +514,18 @@
366
514
  "allowNo": false,
367
515
  "type": "boolean"
368
516
  },
369
- "path": {
517
+ "llms": {
370
518
  "aliases": [
371
- "blueprint-path"
519
+ "skill"
520
+ ],
521
+ "description": "Show agent-oriented guidance for this command",
522
+ "name": "llms",
523
+ "allowNo": false,
524
+ "type": "boolean"
525
+ },
526
+ "path": {
527
+ "aliases": [
528
+ "blueprint-path"
372
529
  ],
373
530
  "char": "p",
374
531
  "description": "Path to a Blueprint file or directory containing one",
@@ -402,7 +559,6 @@
402
559
  },
403
560
  "stack": {
404
561
  "description": "Stack name or ID to use instead of the locally configured Stack",
405
- "hidden": true,
406
562
  "name": "stack",
407
563
  "hasDynamicHelp": false,
408
564
  "multiple": false,
@@ -417,7 +573,6 @@
417
573
  "exclusive": [
418
574
  "organization-id"
419
575
  ],
420
- "hidden": true,
421
576
  "name": "project-id",
422
577
  "hasDynamicHelp": false,
423
578
  "multiple": false,
@@ -433,35 +588,45 @@
433
588
  "exclusive": [
434
589
  "project-id"
435
590
  ],
436
- "hidden": true,
437
591
  "name": "organization-id",
438
592
  "hasDynamicHelp": false,
439
593
  "multiple": false,
440
594
  "type": "option"
441
595
  },
442
- "host": {
443
- "char": "h",
444
- "description": "The local network interface at which to listen. [default: \"localhost\"]",
445
- "name": "host",
446
- "required": false,
596
+ "message": {
597
+ "char": "m",
598
+ "description": "Message describing the deployment (e.g. reason for change)",
599
+ "name": "message",
447
600
  "hasDynamicHelp": false,
448
601
  "multiple": false,
449
602
  "type": "option"
450
603
  },
451
- "port": {
452
- "char": "p",
453
- "description": "TCP port to start emulator on. [default: 8080]",
454
- "name": "port",
455
- "required": false,
604
+ "fn-installer": {
605
+ "aliases": [
606
+ "function-installer",
607
+ "installer"
608
+ ],
609
+ "description": "Which package manager to use when installing Function dependencies",
610
+ "hidden": true,
611
+ "name": "fn-installer",
456
612
  "hasDynamicHelp": false,
457
613
  "multiple": false,
614
+ "options": [
615
+ "npm",
616
+ "pnpm",
617
+ "yarn"
618
+ ],
458
619
  "type": "option"
459
620
  },
460
- "timeout": {
461
- "char": "t",
462
- "description": "Maximum execution time for all functions, in seconds. Takes precedence over function-specific `timeout`",
463
- "name": "timeout",
464
- "required": false,
621
+ "no-wait": {
622
+ "description": "Do not wait for Stack deployment to complete",
623
+ "name": "no-wait",
624
+ "allowNo": false,
625
+ "type": "boolean"
626
+ },
627
+ "new-stack-name": {
628
+ "description": "Set a new name for the Stack",
629
+ "name": "new-stack-name",
465
630
  "hasDynamicHelp": false,
466
631
  "multiple": false,
467
632
  "type": "option"
@@ -469,39 +634,32 @@
469
634
  },
470
635
  "hasDynamicHelp": false,
471
636
  "hiddenAliases": [],
472
- "id": "functions:dev",
637
+ "id": "blueprints:deploy",
473
638
  "pluginAlias": "@sanity/runtime-cli",
474
639
  "pluginName": "@sanity/runtime-cli",
475
640
  "pluginType": "core",
476
641
  "strict": true,
477
- "summary": "Start the Sanity Function emulator",
642
+ "summary": "Deploy the local Blueprint to the remote Stack",
478
643
  "enableJsonFlag": true,
479
644
  "needs": [
645
+ "deployedStack",
480
646
  "blueprint"
481
647
  ],
482
648
  "isESM": true,
483
649
  "relativePath": [
484
650
  "dist",
485
651
  "commands",
486
- "functions",
487
- "dev.js"
652
+ "blueprints",
653
+ "deploy.js"
488
654
  ]
489
655
  },
490
- "functions:logs": {
656
+ "blueprints:destroy": {
491
657
  "aliases": [],
492
- "args": {
493
- "name": {
494
- "description": "The name of the Sanity Function",
495
- "name": "name",
496
- "required": false
497
- }
498
- },
499
- "description": "Fetches execution logs from a deployed function, useful for debugging production issues or monitoring activity.\n\nUse --watch (-w) to stream logs in real-time. Use --delete to clear all logs for a function (requires confirmation unless --force is specified).",
658
+ "args": {},
659
+ "description": "Permanently removes the remote Stack and all its provisioned resources. Your Blueprint manifest and resource files remain intact; \"stackId\" is unset in your local config.\n\nThis is a destructive operation. You will be prompted to confirm unless --force is specified.\n\nUse this to clean up test environments or decommission a Stack you no longer need.\n\nExit codes: 0 destroyed, 2 destruction failed, 75 destruction accepted but completion could not be confirmed (rerun 'blueprints info' to check).",
500
660
  "examples": [
501
- "<%= config.bin %> <%= command.id %> <name>",
502
- "<%= config.bin %> <%= command.id %> <name> --json",
503
- "<%= config.bin %> <%= command.id %> <name> --limit 100",
504
- "<%= config.bin %> <%= command.id %> <name> --delete"
661
+ "<%= config.bin %> <%= command.id %>",
662
+ "<%= config.bin %> <%= command.id %> --stack <name-or-id> --project-id <projectId> --force --no-wait"
505
663
  ],
506
664
  "flags": {
507
665
  "json": {
@@ -510,6 +668,15 @@
510
668
  "allowNo": false,
511
669
  "type": "boolean"
512
670
  },
671
+ "llms": {
672
+ "aliases": [
673
+ "skill"
674
+ ],
675
+ "description": "Show agent-oriented guidance for this command",
676
+ "name": "llms",
677
+ "allowNo": false,
678
+ "type": "boolean"
679
+ },
513
680
  "path": {
514
681
  "aliases": [
515
682
  "blueprint-path"
@@ -545,7 +712,11 @@
545
712
  "type": "boolean"
546
713
  },
547
714
  "stack": {
548
- "description": "Stack name or ID to use instead of the locally configured Stack",
715
+ "aliases": [
716
+ "stack-id",
717
+ "stackId"
718
+ ],
719
+ "description": "Stack name or ID to destroy (defaults to the locally configured Stack)",
549
720
  "name": "stack",
550
721
  "hasDynamicHelp": false,
551
722
  "multiple": false,
@@ -556,11 +727,14 @@
556
727
  "project",
557
728
  "projectId"
558
729
  ],
730
+ "dependsOn": [
731
+ "stack",
732
+ "force"
733
+ ],
559
734
  "description": "Sanity project ID used to scope Blueprint and Stack",
560
735
  "exclusive": [
561
736
  "organization-id"
562
737
  ],
563
- "hidden": true,
564
738
  "name": "project-id",
565
739
  "hasDynamicHelp": false,
566
740
  "multiple": false,
@@ -572,104 +746,62 @@
572
746
  "organizationId",
573
747
  "org"
574
748
  ],
749
+ "dependsOn": [
750
+ "stack",
751
+ "force"
752
+ ],
575
753
  "description": "Sanity organization ID used to scope Blueprint and Stack",
576
754
  "exclusive": [
577
755
  "project-id"
578
756
  ],
579
- "hidden": true,
580
757
  "name": "organization-id",
581
758
  "hasDynamicHelp": false,
582
759
  "multiple": false,
583
760
  "type": "option"
584
761
  },
585
- "limit": {
586
- "char": "l",
587
- "description": "Total number of log entries to retrieve",
588
- "name": "limit",
589
- "required": false,
590
- "default": 50,
591
- "hasDynamicHelp": false,
592
- "multiple": false,
593
- "type": "option"
594
- },
595
- "utc": {
596
- "char": "u",
597
- "description": "Show dates in UTC time zone",
598
- "name": "utc",
599
- "required": false,
600
- "allowNo": false,
601
- "type": "boolean"
602
- },
603
- "delete": {
604
- "char": "d",
605
- "description": "Delete all logs for the function",
606
- "exclusive": [
607
- "limit",
608
- "json"
609
- ],
610
- "name": "delete",
611
- "required": false,
612
- "allowNo": false,
613
- "type": "boolean"
614
- },
615
762
  "force": {
616
- "char": "f",
617
- "dependsOn": [
618
- "delete"
763
+ "aliases": [
764
+ "f"
619
765
  ],
620
- "description": "Skip confirmation for deleting logs",
766
+ "description": "Force Stack destruction (skip confirmation)",
621
767
  "name": "force",
622
- "required": false,
623
768
  "allowNo": false,
624
769
  "type": "boolean"
625
770
  },
626
- "watch": {
627
- "aliases": [
628
- "follow"
629
- ],
630
- "char": "w",
631
- "description": "Watch for new logs (streaming mode)",
632
- "name": "watch",
771
+ "no-wait": {
772
+ "description": "Do not wait for Stack destruction to complete",
773
+ "name": "no-wait",
633
774
  "allowNo": false,
634
775
  "type": "boolean"
635
776
  }
636
777
  },
637
778
  "hasDynamicHelp": false,
638
779
  "hiddenAliases": [],
639
- "id": "functions:logs",
780
+ "id": "blueprints:destroy",
640
781
  "pluginAlias": "@sanity/runtime-cli",
641
782
  "pluginName": "@sanity/runtime-cli",
642
783
  "pluginType": "core",
643
784
  "strict": true,
644
- "summary": "Retrieve or delete logs for a Sanity Function",
785
+ "summary": "Destroy a remote Stack deployment and its resources",
645
786
  "enableJsonFlag": true,
646
787
  "needs": [
647
- "deployedStack",
648
- "blueprint"
788
+ "scope"
649
789
  ],
650
790
  "isESM": true,
651
791
  "relativePath": [
652
792
  "dist",
653
793
  "commands",
654
- "functions",
655
- "logs.js"
794
+ "blueprints",
795
+ "destroy.js"
656
796
  ]
657
797
  },
658
- "functions:test": {
798
+ "blueprints:doctor": {
659
799
  "aliases": [],
660
- "args": {
661
- "name": {
662
- "description": "The name of the Sanity Function",
663
- "name": "name",
664
- "required": false
665
- }
666
- },
667
- "description": "Executes a function locally with the provided payload, simulating how it would run when deployed. Use this to test your function logic before deploying.\n\nProvide test data via --data (inline JSON), --file (JSON file), or --document-id (fetch from Sanity). For update events, use the before/after flag pairs to simulate document changes.",
800
+ "args": {},
801
+ "description": "Analyzes your local Blueprint and remote Stack configuration for common issues, such as missing authentication, invalid project references, or misconfigured resources.\n\nRun this command when encountering errors with other Blueprint commands. Use --fix to interactively resolve detected issues.\n\nSupports --json for programmatic consumption of diagnostic results.",
668
802
  "examples": [
669
- "<%= config.bin %> <%= command.id %> <name> --data '{ \"id\": 1 }'",
670
- "<%= config.bin %> <%= command.id %> <name> --file 'payload.json'",
671
- "<%= config.bin %> <%= command.id %> <name> --data '{ \"id\": 1 }' --timeout 60",
672
- "<%= config.bin %> <%= command.id %> <name> --event update --data-before '{ \"title\": \"before\" }' --data-after '{ \"title\": \"after\" }'"
803
+ "<%= config.bin %> <%= command.id %>",
804
+ "<%= config.bin %> <%= command.id %> --fix"
673
805
  ],
674
806
  "flags": {
675
807
  "json": {
@@ -678,6 +810,15 @@
678
810
  "allowNo": false,
679
811
  "type": "boolean"
680
812
  },
813
+ "llms": {
814
+ "aliases": [
815
+ "skill"
816
+ ],
817
+ "description": "Show agent-oriented guidance for this command",
818
+ "name": "llms",
819
+ "allowNo": false,
820
+ "type": "boolean"
821
+ },
681
822
  "path": {
682
823
  "aliases": [
683
824
  "blueprint-path"
@@ -685,7 +826,6 @@
685
826
  "char": "p",
686
827
  "description": "Path to a Blueprint file or directory containing one",
687
828
  "env": "SANITY_BLUEPRINT_PATH",
688
- "hidden": true,
689
829
  "name": "path",
690
830
  "hasDynamicHelp": false,
691
831
  "multiple": false,
@@ -712,308 +852,65 @@
712
852
  "allowNo": false,
713
853
  "type": "boolean"
714
854
  },
715
- "stack": {
716
- "description": "Stack name or ID to use instead of the locally configured Stack",
717
- "hidden": true,
718
- "name": "stack",
719
- "hasDynamicHelp": false,
720
- "multiple": false,
721
- "type": "option"
855
+ "fix": {
856
+ "description": "Interactively fix configuration issues",
857
+ "name": "fix",
858
+ "allowNo": false,
859
+ "type": "boolean"
860
+ }
861
+ },
862
+ "hasDynamicHelp": false,
863
+ "hiddenAliases": [],
864
+ "id": "blueprints:doctor",
865
+ "pluginAlias": "@sanity/runtime-cli",
866
+ "pluginName": "@sanity/runtime-cli",
867
+ "pluginType": "core",
868
+ "strict": true,
869
+ "summary": "Diagnose potential issues with local Blueprint and remote Stack configuration",
870
+ "enableJsonFlag": true,
871
+ "isESM": true,
872
+ "relativePath": [
873
+ "dist",
874
+ "commands",
875
+ "blueprints",
876
+ "doctor.js"
877
+ ]
878
+ },
879
+ "blueprints:info": {
880
+ "aliases": [],
881
+ "args": {},
882
+ "description": "Displays the current state and metadata of your remote Stack deployment, including deployed resources, status, and configuration.\n\nUse this command to verify a deployment succeeded, check what resources are live, or confirm which Stack your local Blueprint is connected to.\n\nRun 'blueprints stacks' to see all available Stacks in your project or organization.",
883
+ "examples": [
884
+ "<%= config.bin %> <%= command.id %>",
885
+ "<%= config.bin %> <%= command.id %> --stack <name-or-id>",
886
+ "<%= config.bin %> <%= command.id %> --project-id <id> --stack <name-or-id>",
887
+ "<%= config.bin %> <%= command.id %> --organization-id <orgId> --stack <name-or-id>"
888
+ ],
889
+ "flags": {
890
+ "json": {
891
+ "description": "Format output as json",
892
+ "name": "json",
893
+ "allowNo": false,
894
+ "type": "boolean"
722
895
  },
723
- "project-id": {
896
+ "llms": {
724
897
  "aliases": [
725
- "project",
726
- "projectId"
898
+ "skill"
727
899
  ],
728
- "description": "Sanity project ID used to scope Blueprint and Stack",
729
- "exclusive": [
730
- "organization-id"
900
+ "description": "Show agent-oriented guidance for this command",
901
+ "name": "llms",
902
+ "allowNo": false,
903
+ "type": "boolean"
904
+ },
905
+ "path": {
906
+ "aliases": [
907
+ "blueprint-path"
731
908
  ],
732
- "name": "project-id",
733
- "hasDynamicHelp": false,
734
- "multiple": false,
735
- "type": "option"
736
- },
737
- "organization-id": {
738
- "aliases": [
739
- "organization",
740
- "organizationId",
741
- "org"
742
- ],
743
- "description": "Sanity organization ID used to scope Blueprint and Stack",
744
- "exclusive": [
745
- "project-id"
746
- ],
747
- "name": "organization-id",
748
- "hasDynamicHelp": false,
749
- "multiple": false,
750
- "type": "option"
751
- },
752
- "data": {
753
- "char": "d",
754
- "description": "Data to send to the function",
755
- "exclusive": [
756
- "file",
757
- "document-id"
758
- ],
759
- "name": "data",
760
- "required": false,
761
- "hasDynamicHelp": false,
762
- "multiple": false,
763
- "type": "option"
764
- },
765
- "data-before": {
766
- "description": "Original document",
767
- "exclusive": [
768
- "data",
769
- "file",
770
- "document-id",
771
- "file-before",
772
- "file-after",
773
- "document-id-before",
774
- "document-id-after"
775
- ],
776
- "name": "data-before",
777
- "required": false,
778
- "hasDynamicHelp": false,
779
- "multiple": false,
780
- "type": "option"
781
- },
782
- "data-after": {
783
- "description": "Current document",
784
- "exclusive": [
785
- "data",
786
- "file",
787
- "document-id",
788
- "file-before",
789
- "file-after",
790
- "document-id-before",
791
- "document-id-after"
792
- ],
793
- "name": "data-after",
794
- "required": false,
795
- "hasDynamicHelp": false,
796
- "multiple": false,
797
- "type": "option"
798
- },
799
- "event": {
800
- "char": "e",
801
- "description": "Type of event (create, update, delete)",
802
- "name": "event",
803
- "required": false,
804
- "hasDynamicHelp": false,
805
- "multiple": false,
806
- "options": [
807
- "create",
808
- "update",
809
- "delete"
810
- ],
811
- "type": "option"
812
- },
813
- "file": {
814
- "char": "f",
815
- "description": "Read data from file and send to the function",
816
- "exclusive": [
817
- "data",
818
- "document-id"
819
- ],
820
- "name": "file",
821
- "required": false,
822
- "hasDynamicHelp": false,
823
- "multiple": false,
824
- "type": "option"
825
- },
826
- "file-before": {
827
- "description": "Original document",
828
- "exclusive": [
829
- "data",
830
- "file",
831
- "document-id",
832
- "data-before",
833
- "data-after",
834
- "document-id-before",
835
- "document-id-after"
836
- ],
837
- "name": "file-before",
838
- "required": false,
839
- "hasDynamicHelp": false,
840
- "multiple": false,
841
- "type": "option"
842
- },
843
- "file-after": {
844
- "description": "Current document",
845
- "exclusive": [
846
- "data",
847
- "file",
848
- "document-id",
849
- "data-before",
850
- "data-after",
851
- "document-id-before",
852
- "document-id-after"
853
- ],
854
- "name": "file-after",
855
- "required": false,
856
- "hasDynamicHelp": false,
857
- "multiple": false,
858
- "type": "option"
859
- },
860
- "timeout": {
861
- "char": "t",
862
- "description": "Execution timeout value in seconds",
863
- "name": "timeout",
864
- "required": false,
865
- "hasDynamicHelp": false,
866
- "multiple": false,
867
- "type": "option"
868
- },
869
- "api": {
870
- "char": "a",
871
- "description": "Sanity API Version to use",
872
- "name": "api",
873
- "required": false,
874
- "hasDynamicHelp": false,
875
- "multiple": false,
876
- "type": "option"
877
- },
878
- "dataset": {
879
- "description": "The Sanity dataset to use",
880
- "name": "dataset",
881
- "required": false,
882
- "hasDynamicHelp": false,
883
- "multiple": false,
884
- "type": "option"
885
- },
886
- "document-id": {
887
- "aliases": [
888
- "doc",
889
- "documentId"
890
- ],
891
- "description": "Document to fetch and send to function",
892
- "exclusive": [
893
- "data",
894
- "file"
895
- ],
896
- "name": "document-id",
897
- "required": false,
898
- "hasDynamicHelp": false,
899
- "multiple": false,
900
- "type": "option"
901
- },
902
- "document-id-before": {
903
- "description": "Original document",
904
- "exclusive": [
905
- "data",
906
- "file",
907
- "document-id",
908
- "data-before",
909
- "data-after",
910
- "file-before",
911
- "file-after"
912
- ],
913
- "name": "document-id-before",
914
- "required": false,
915
- "hasDynamicHelp": false,
916
- "multiple": false,
917
- "type": "option"
918
- },
919
- "document-id-after": {
920
- "description": "Current document",
921
- "exclusive": [
922
- "data",
923
- "file",
924
- "document-id",
925
- "data-before",
926
- "data-after",
927
- "file-before",
928
- "file-after"
929
- ],
930
- "name": "document-id-after",
931
- "required": false,
932
- "hasDynamicHelp": false,
933
- "multiple": false,
934
- "type": "option"
935
- },
936
- "with-user-token": {
937
- "description": "Prime access token from CLI config",
938
- "name": "with-user-token",
939
- "allowNo": false,
940
- "type": "boolean"
941
- },
942
- "media-library-id": {
943
- "aliases": [
944
- "media"
945
- ],
946
- "description": "Sanity Media Library ID to use",
947
- "exclusive": [
948
- "project-id",
949
- "dataset"
950
- ],
951
- "name": "media-library-id",
952
- "required": false,
953
- "hasDynamicHelp": false,
954
- "multiple": false,
955
- "type": "option"
956
- }
957
- },
958
- "hasDynamicHelp": false,
959
- "hiddenAliases": [],
960
- "id": "functions:test",
961
- "pluginAlias": "@sanity/runtime-cli",
962
- "pluginName": "@sanity/runtime-cli",
963
- "pluginType": "core",
964
- "strict": true,
965
- "summary": "Invoke a local Sanity Function",
966
- "enableJsonFlag": true,
967
- "needs": [
968
- "blueprint"
969
- ],
970
- "isESM": true,
971
- "relativePath": [
972
- "dist",
973
- "commands",
974
- "functions",
975
- "test.js"
976
- ]
977
- },
978
- "blueprints:add": {
979
- "aliases": [],
980
- "args": {
981
- "type": {
982
- "description": "Type of resource to add (only \"function\" is supported)",
983
- "name": "type",
984
- "options": [
985
- "function"
986
- ],
987
- "required": true
988
- }
989
- },
990
- "deprecationOptions": {
991
- "to": "functions add"
992
- },
993
- "description": "This command is deprecated. Use \"functions add\" instead.\n\nEquivalent usage:\n $ <%= config.bin %> functions add\n $ <%= config.bin %> functions add --name my-function --type document-create",
994
- "examples": [
995
- "<%= config.bin %> <%= command.id %> function",
996
- "<%= config.bin %> <%= command.id %> function --helpers",
997
- "<%= config.bin %> <%= command.id %> function --name my-function",
998
- "<%= config.bin %> <%= command.id %> function --name my-function --fn-type document-create",
999
- "<%= config.bin %> <%= command.id %> function --name my-function --fn-type document-create --fn-type document-update --lang js"
1000
- ],
1001
- "flags": {
1002
- "json": {
1003
- "description": "Format output as json",
1004
- "name": "json",
1005
- "allowNo": false,
1006
- "type": "boolean"
1007
- },
1008
- "path": {
1009
- "aliases": [
1010
- "blueprint-path"
1011
- ],
1012
- "char": "p",
1013
- "description": "Path to a Blueprint file or directory containing one",
1014
- "env": "SANITY_BLUEPRINT_PATH",
1015
- "hidden": true,
1016
- "name": "path",
909
+ "char": "p",
910
+ "description": "Path to a Blueprint file or directory containing one",
911
+ "env": "SANITY_BLUEPRINT_PATH",
912
+ "hidden": true,
913
+ "name": "path",
1017
914
  "hasDynamicHelp": false,
1018
915
  "multiple": false,
1019
916
  "type": "option"
@@ -1040,8 +937,10 @@
1040
937
  "type": "boolean"
1041
938
  },
1042
939
  "stack": {
1043
- "description": "Stack name or ID to use instead of the locally configured Stack",
1044
- "hidden": true,
940
+ "aliases": [
941
+ "id"
942
+ ],
943
+ "description": "Stack name or ID",
1045
944
  "name": "stack",
1046
945
  "hasDynamicHelp": false,
1047
946
  "multiple": false,
@@ -1056,7 +955,6 @@
1056
955
  "exclusive": [
1057
956
  "organization-id"
1058
957
  ],
1059
- "hidden": true,
1060
958
  "name": "project-id",
1061
959
  "hasDynamicHelp": false,
1062
960
  "multiple": false,
@@ -1072,159 +970,52 @@
1072
970
  "exclusive": [
1073
971
  "project-id"
1074
972
  ],
1075
- "hidden": true,
1076
973
  "name": "organization-id",
1077
974
  "hasDynamicHelp": false,
1078
975
  "multiple": false,
1079
976
  "type": "option"
1080
- },
1081
- "example": {
1082
- "aliases": [
1083
- "recipe"
1084
- ],
1085
- "description": "Example to use for the function resource. Discover examples at https://www.sanity.io/exchange/type=recipes/by=sanity",
1086
- "exclusive": [
1087
- "name",
1088
- "fn-type",
1089
- "language",
1090
- "javascript",
1091
- "fn-helpers",
1092
- "fn-installer"
1093
- ],
1094
- "name": "example",
1095
- "hasDynamicHelp": false,
1096
- "multiple": false,
1097
- "type": "option"
1098
- },
1099
- "name": {
1100
- "char": "n",
1101
- "description": "Name of the resource to add",
1102
- "name": "name",
1103
- "hasDynamicHelp": false,
1104
- "multiple": false,
1105
- "type": "option"
1106
- },
1107
- "fn-type": {
1108
- "aliases": [
1109
- "function-type"
1110
- ],
1111
- "dependsOn": [
1112
- "name"
1113
- ],
1114
- "description": "Document change event(s) that should trigger the function; you can specify multiple events by specifying this flag multiple times",
1115
- "name": "fn-type",
1116
- "hasDynamicHelp": false,
1117
- "multiple": true,
1118
- "options": [
1119
- "document-publish",
1120
- "document-create",
1121
- "document-delete",
1122
- "document-update",
1123
- "media-library-asset-create",
1124
- "media-library-asset-delete",
1125
- "media-library-asset-update",
1126
- "scheduled-function",
1127
- "sync-tag-invalidate"
1128
- ],
1129
- "type": "option"
1130
- },
1131
- "language": {
1132
- "aliases": [
1133
- "function-language",
1134
- "fn-language",
1135
- "lang"
1136
- ],
1137
- "description": "Language of the new function",
1138
- "name": "language",
1139
- "default": "ts",
1140
- "hasDynamicHelp": false,
1141
- "multiple": false,
1142
- "options": [
1143
- "ts",
1144
- "js"
1145
- ],
1146
- "type": "option"
1147
- },
1148
- "javascript": {
1149
- "aliases": [
1150
- "js"
1151
- ],
1152
- "description": "Use JavaScript instead of TypeScript",
1153
- "exclusive": [
1154
- "language"
1155
- ],
1156
- "name": "javascript",
1157
- "allowNo": false,
1158
- "type": "boolean"
1159
- },
1160
- "fn-helpers": {
1161
- "aliases": [
1162
- "function-helpers",
1163
- "helpers"
1164
- ],
1165
- "description": "Add helpers to the new function",
1166
- "name": "fn-helpers",
1167
- "allowNo": true,
1168
- "type": "boolean"
1169
- },
1170
- "fn-installer": {
1171
- "aliases": [
1172
- "function-installer",
1173
- "installer"
1174
- ],
1175
- "description": "Which package manager to use when installing the @sanity/functions helpers",
1176
- "name": "fn-installer",
1177
- "hasDynamicHelp": false,
1178
- "multiple": false,
1179
- "options": [
1180
- "skip",
1181
- "npm",
1182
- "pnpm",
1183
- "yarn"
1184
- ],
1185
- "type": "option"
1186
- },
1187
- "install": {
1188
- "char": "i",
1189
- "description": "Shortcut for --fn-installer npm",
1190
- "exclusive": [
1191
- "fn-installer"
1192
- ],
1193
- "name": "install",
1194
- "allowNo": false,
1195
- "type": "boolean"
1196
977
  }
1197
978
  },
1198
979
  "hasDynamicHelp": false,
1199
980
  "hiddenAliases": [],
1200
- "id": "blueprints:add",
981
+ "id": "blueprints:info",
1201
982
  "pluginAlias": "@sanity/runtime-cli",
1202
983
  "pluginName": "@sanity/runtime-cli",
1203
984
  "pluginType": "core",
1204
- "state": "deprecated",
1205
985
  "strict": true,
1206
- "summary": "[deprecated] Use \"functions add\" instead",
986
+ "summary": "Display the status and resources of the remote Stack deployment",
1207
987
  "enableJsonFlag": true,
1208
988
  "needs": [
1209
- "blueprint"
989
+ "deployedStack"
1210
990
  ],
1211
991
  "isESM": true,
1212
992
  "relativePath": [
1213
993
  "dist",
1214
994
  "commands",
1215
995
  "blueprints",
1216
- "add.js"
996
+ "info.js"
1217
997
  ]
1218
998
  },
1219
- "blueprints:config": {
999
+ "blueprints:init": {
1220
1000
  "aliases": [],
1221
- "args": {},
1222
- "description": "Manages the local Blueprint configuration, which links your Blueprint to a Sanity project and Stack.\n\nWithout flags, displays the current configuration. Use --edit to interactively modify settings, or combine --edit with ID flags to update values directly (useful for scripting and automation).\n\nIf you need to switch your Blueprint to a different Stack, use --edit --stack.",
1001
+ "args": {
1002
+ "dir": {
1003
+ "description": "Directory to create the local Blueprint in (defaults to the current directory)",
1004
+ "name": "dir"
1005
+ }
1006
+ },
1007
+ "description": "A Blueprint is your local infrastructure-as-code configuration that defines Sanity resources (datasets, functions, etc.). A Stack is the remote deployment target where your Blueprint is applied.\n[NOTE: Currently, accounts are limited to three (3) Stacks per project scope.]\n\nThis is typically the first command you run in a new project. It creates a local Blueprint manifest file (sanity.blueprint.ts, .js, or .json) and provisions a new remote Stack.\nAdditionally, a Blueprint configuration file is created in .sanity/ containing the scope and Stack IDs. This is .gitignored by default.\n\nAfter initialization, use 'blueprints plan' to preview changes, then 'blueprints deploy' to apply them.\n\nRunning without a directory prompts to confirm the current directory. Run 'blueprints init .' to initialize in the current directory without a prompt.",
1223
1008
  "examples": [
1224
1009
  "<%= config.bin %> <%= command.id %>",
1225
- "<%= config.bin %> <%= command.id %> --edit",
1226
- "<%= config.bin %> <%= command.id %> --edit --project-id <projectId>",
1227
- "<%= config.bin %> <%= command.id %> --edit --project-id <projectId> --stack <name-or-id>"
1010
+ "<%= config.bin %> <%= command.id %> .",
1011
+ "<%= config.bin %> <%= command.id %> [directory]",
1012
+ "<%= config.bin %> <%= command.id %> --blueprint-type <json|js|ts>",
1013
+ "<%= config.bin %> <%= command.id %> --organization-id <organizationId>",
1014
+ "<%= config.bin %> <%= command.id %> --project-id <projectId>",
1015
+ "<%= config.bin %> <%= command.id %> --stack-name <newStackName>",
1016
+ "<%= config.bin %> <%= command.id %> --stack-id <existingStackId>",
1017
+ "<%= config.bin %> <%= command.id %> new-stack --type <json|js|ts> --org <organizationId> --name <newStackName>",
1018
+ "<%= config.bin %> <%= command.id %> old-stack --type <json|js|ts> --project-id <projectId> --stack-id <existingStackId>"
1228
1019
  ],
1229
1020
  "flags": {
1230
1021
  "json": {
@@ -1233,6 +1024,15 @@
1233
1024
  "allowNo": false,
1234
1025
  "type": "boolean"
1235
1026
  },
1027
+ "llms": {
1028
+ "aliases": [
1029
+ "skill"
1030
+ ],
1031
+ "description": "Show agent-oriented guidance for this command",
1032
+ "name": "llms",
1033
+ "allowNo": false,
1034
+ "type": "boolean"
1035
+ },
1236
1036
  "path": {
1237
1037
  "aliases": [
1238
1038
  "blueprint-path"
@@ -1267,18 +1067,41 @@
1267
1067
  "allowNo": false,
1268
1068
  "type": "boolean"
1269
1069
  },
1270
- "stack": {
1070
+ "dir": {
1071
+ "description": "Directory to create the local Blueprint in",
1072
+ "name": "dir",
1073
+ "hasDynamicHelp": false,
1074
+ "multiple": false,
1075
+ "type": "option"
1076
+ },
1077
+ "example": {
1271
1078
  "aliases": [
1079
+ "recipe"
1080
+ ],
1081
+ "description": "Example to use for the local Blueprint",
1082
+ "exclusive": [
1083
+ "blueprint-type",
1272
1084
  "stack-id",
1273
- "stackId"
1085
+ "stack-name"
1274
1086
  ],
1275
- "dependsOn": [
1276
- "edit"
1087
+ "name": "example",
1088
+ "hasDynamicHelp": false,
1089
+ "multiple": false,
1090
+ "type": "option"
1091
+ },
1092
+ "blueprint-type": {
1093
+ "aliases": [
1094
+ "type"
1277
1095
  ],
1278
- "description": "Stack name or ID to set in the configuration. Requires --edit flag",
1279
- "name": "stack",
1096
+ "description": "Blueprint manifest type to use for the local Blueprint",
1097
+ "name": "blueprint-type",
1280
1098
  "hasDynamicHelp": false,
1281
1099
  "multiple": false,
1100
+ "options": [
1101
+ "json",
1102
+ "js",
1103
+ "ts"
1104
+ ],
1282
1105
  "type": "option"
1283
1106
  },
1284
1107
  "project-id": {
@@ -1286,9 +1109,6 @@
1286
1109
  "project",
1287
1110
  "projectId"
1288
1111
  ],
1289
- "dependsOn": [
1290
- "edit"
1291
- ],
1292
1112
  "description": "Sanity project ID used to scope Blueprint and Stack",
1293
1113
  "exclusive": [
1294
1114
  "organization-id"
@@ -1304,59 +1124,88 @@
1304
1124
  "organizationId",
1305
1125
  "org"
1306
1126
  ],
1307
- "dependsOn": [
1308
- "edit"
1127
+ "description": "Sanity organization ID used to scope Blueprint and Stack",
1128
+ "exclusive": [
1129
+ "project-id"
1130
+ ],
1131
+ "name": "organization-id",
1132
+ "hasDynamicHelp": false,
1133
+ "multiple": false,
1134
+ "type": "option"
1135
+ },
1136
+ "stack-id": {
1137
+ "aliases": [
1138
+ "stackId"
1139
+ ],
1140
+ "description": "Existing Stack ID used to scope local Blueprint",
1141
+ "exclusive": [
1142
+ "stack-name"
1143
+ ],
1144
+ "name": "stack-id",
1145
+ "relationships": [
1146
+ {
1147
+ "type": "some",
1148
+ "flags": [
1149
+ "project-id",
1150
+ "organization-id"
1151
+ ]
1152
+ }
1153
+ ],
1154
+ "hasDynamicHelp": false,
1155
+ "multiple": false,
1156
+ "type": "option"
1157
+ },
1158
+ "stack-name": {
1159
+ "aliases": [
1160
+ "name"
1309
1161
  ],
1310
- "description": "Sanity organization ID used to scope Blueprint and Stack",
1162
+ "description": "Name to use for a new Stack provisioned during initialization",
1311
1163
  "exclusive": [
1312
- "project-id"
1164
+ "stack-id"
1165
+ ],
1166
+ "name": "stack-name",
1167
+ "relationships": [
1168
+ {
1169
+ "type": "some",
1170
+ "flags": [
1171
+ "project-id",
1172
+ "organization-id"
1173
+ ]
1174
+ }
1313
1175
  ],
1314
- "name": "organization-id",
1315
1176
  "hasDynamicHelp": false,
1316
1177
  "multiple": false,
1317
1178
  "type": "option"
1318
- },
1319
- "edit": {
1320
- "char": "e",
1321
- "description": "Modify the configuration interactively, or directly when combined with ID flags.",
1322
- "name": "edit",
1323
- "allowNo": false,
1324
- "type": "boolean"
1325
1179
  }
1326
1180
  },
1327
1181
  "hasDynamicHelp": false,
1328
1182
  "hiddenAliases": [],
1329
- "id": "blueprints:config",
1183
+ "id": "blueprints:init",
1330
1184
  "pluginAlias": "@sanity/runtime-cli",
1331
1185
  "pluginName": "@sanity/runtime-cli",
1332
1186
  "pluginType": "core",
1333
1187
  "strict": true,
1334
- "summary": "View or edit the local Blueprint configuration",
1188
+ "summary": "Initialize a Blueprint and create a remote Stack",
1335
1189
  "enableJsonFlag": true,
1336
- "needs": [
1337
- "token",
1338
- "blueprint"
1339
- ],
1340
1190
  "isESM": true,
1341
1191
  "relativePath": [
1342
1192
  "dist",
1343
1193
  "commands",
1344
1194
  "blueprints",
1345
- "config.js"
1195
+ "init.js"
1346
1196
  ]
1347
1197
  },
1348
- "blueprints:deploy": {
1198
+ "blueprints:logs": {
1349
1199
  "aliases": [],
1350
1200
  "args": {},
1351
- "description": "Applies your local Blueprint to the remote Stack, creating, updating, or removing resources as needed. This is the primary command for applying infrastructure changes.\n\nBefore deploying, run 'blueprints plan' to preview changes. After deployment, use 'blueprints info' to verify Stack status or 'blueprints logs' to monitor activity.\n\nUse --no-wait to queue the deployment and return immediately without waiting for completion.\n\nUse --fn-installer to force which package manager to use when deploying functions.\n\nSet SANITY_ASSET_TIMEOUT (seconds) to override the 60-second timeout for processing resource assets.\n\nExit codes: 0 deployed, 2 deployment failed, 75 deployment accepted but completion could not be confirmed (rerun 'blueprints info' to check).",
1201
+ "description": "Retrieves Stack deployment logs, useful for debugging and monitoring deployment activity.\n\nUse --watch (-w) to tail logs in real-time.\n\nUse --limit, --since, or --before to narrow the result set when not watching.\n\nIf you're not seeing expected logs, verify your Stack is deployed with 'blueprints info'.",
1352
1202
  "examples": [
1353
1203
  "<%= config.bin %> <%= command.id %>",
1354
- "<%= config.bin %> <%= command.id %> --message \"Enable staging dataset\"",
1355
- "<%= config.bin %> <%= command.id %> --no-wait",
1356
- "<%= config.bin %> <%= command.id %> --fn-installer npm",
1204
+ "<%= config.bin %> <%= command.id %> --watch",
1357
1205
  "<%= config.bin %> <%= command.id %> --stack <name-or-id>",
1358
- "<%= config.bin %> <%= command.id %> --organization-id <orgId> --stack <name-or-id>",
1359
- "<%= config.bin %> <%= command.id %> --new-stack-name <new-name>"
1206
+ "<%= config.bin %> <%= command.id %> --limit 500",
1207
+ "<%= config.bin %> <%= command.id %> --since 2026-05-01T00:00:00Z",
1208
+ "<%= config.bin %> <%= command.id %> --before 2026-05-01T00:00:00Z"
1360
1209
  ],
1361
1210
  "flags": {
1362
1211
  "json": {
@@ -1365,6 +1214,15 @@
1365
1214
  "allowNo": false,
1366
1215
  "type": "boolean"
1367
1216
  },
1217
+ "llms": {
1218
+ "aliases": [
1219
+ "skill"
1220
+ ],
1221
+ "description": "Show agent-oriented guidance for this command",
1222
+ "name": "llms",
1223
+ "allowNo": false,
1224
+ "type": "boolean"
1225
+ },
1368
1226
  "path": {
1369
1227
  "aliases": [
1370
1228
  "blueprint-path"
@@ -1435,40 +1293,43 @@
1435
1293
  "multiple": false,
1436
1294
  "type": "option"
1437
1295
  },
1438
- "message": {
1439
- "char": "m",
1440
- "description": "Message describing the deployment (e.g. reason for change)",
1441
- "name": "message",
1296
+ "watch": {
1297
+ "aliases": [
1298
+ "follow"
1299
+ ],
1300
+ "char": "w",
1301
+ "description": "Watch for new Stack logs",
1302
+ "name": "watch",
1303
+ "allowNo": false,
1304
+ "type": "boolean"
1305
+ },
1306
+ "limit": {
1307
+ "char": "l",
1308
+ "description": "Maximum number of log entries to retrieve (1-500)",
1309
+ "exclusive": [
1310
+ "watch"
1311
+ ],
1312
+ "name": "limit",
1442
1313
  "hasDynamicHelp": false,
1443
1314
  "multiple": false,
1444
1315
  "type": "option"
1445
1316
  },
1446
- "fn-installer": {
1447
- "aliases": [
1448
- "function-installer",
1449
- "installer"
1317
+ "since": {
1318
+ "description": "Only show logs after this ISO 8601 timestamp",
1319
+ "exclusive": [
1320
+ "watch"
1450
1321
  ],
1451
- "description": "Which package manager to use when installing Function dependencies",
1452
- "hidden": true,
1453
- "name": "fn-installer",
1322
+ "name": "since",
1454
1323
  "hasDynamicHelp": false,
1455
1324
  "multiple": false,
1456
- "options": [
1457
- "npm",
1458
- "pnpm",
1459
- "yarn"
1460
- ],
1461
1325
  "type": "option"
1462
1326
  },
1463
- "no-wait": {
1464
- "description": "Do not wait for Stack deployment to complete",
1465
- "name": "no-wait",
1466
- "allowNo": false,
1467
- "type": "boolean"
1468
- },
1469
- "new-stack-name": {
1470
- "description": "Set a new name for the Stack",
1471
- "name": "new-stack-name",
1327
+ "before": {
1328
+ "description": "Only show logs before this ISO 8601 timestamp",
1329
+ "exclusive": [
1330
+ "watch"
1331
+ ],
1332
+ "name": "before",
1472
1333
  "hasDynamicHelp": false,
1473
1334
  "multiple": false,
1474
1335
  "type": "option"
@@ -1476,32 +1337,36 @@
1476
1337
  },
1477
1338
  "hasDynamicHelp": false,
1478
1339
  "hiddenAliases": [],
1479
- "id": "blueprints:deploy",
1340
+ "id": "blueprints:logs",
1480
1341
  "pluginAlias": "@sanity/runtime-cli",
1481
1342
  "pluginName": "@sanity/runtime-cli",
1482
1343
  "pluginType": "core",
1483
1344
  "strict": true,
1484
- "summary": "Deploy the local Blueprint to the remote Stack",
1345
+ "summary": "Display logs for the current Blueprint's Stack deployment",
1485
1346
  "enableJsonFlag": true,
1486
1347
  "needs": [
1487
- "deployedStack",
1488
- "blueprint"
1348
+ "deployedStack"
1489
1349
  ],
1490
1350
  "isESM": true,
1491
1351
  "relativePath": [
1492
1352
  "dist",
1493
1353
  "commands",
1494
1354
  "blueprints",
1495
- "deploy.js"
1355
+ "logs.js"
1496
1356
  ]
1497
1357
  },
1498
- "blueprints:destroy": {
1358
+ "blueprints:mint-deploy-token": {
1499
1359
  "aliases": [],
1500
1360
  "args": {},
1501
- "description": "Permanently removes the remote Stack and all its provisioned resources. Your Blueprint manifest and resource files remain intact; \"stackId\" is unset in your local config.\n\nThis is a destructive operation. You will be prompted to confirm unless --force is specified.\n\nUse this to clean up test environments or decommission a Stack you no longer need.\n\nExit codes: 0 destroyed, 2 destruction failed, 75 destruction accepted but completion could not be confirmed (rerun 'blueprints info' to check).",
1361
+ "description": "Mints a long-lived robot token with the role required to plan, deploy, and destroy Blueprints in this project or organization.\n\nBy default the command runs interactively and asks how you want to receive the token (clipboard, print, or exit). Use --print to emit only the raw token for shell pipelines, or --json for full API output.\n\nThe minted token is also visible in your Sanity Manage UI under Robots, where it can be revoked.",
1502
1362
  "examples": [
1503
1363
  "<%= config.bin %> <%= command.id %>",
1504
- "<%= config.bin %> <%= command.id %> --stack <name-or-id> --project-id <projectId> --force --no-wait"
1364
+ "<%= config.bin %> <%= command.id %> --label \"ci-deploy\"",
1365
+ "<%= config.bin %> <%= command.id %> --print",
1366
+ "export SANITY_AUTH_TOKEN=$(<%= config.bin %> <%= command.id %> --print)",
1367
+ "<%= config.bin %> <%= command.id %> --json",
1368
+ "<%= config.bin %> <%= command.id %> --project-id <projectId>",
1369
+ "<%= config.bin %> <%= command.id %> --organization-id <orgId>"
1505
1370
  ],
1506
1371
  "flags": {
1507
1372
  "json": {
@@ -1510,6 +1375,15 @@
1510
1375
  "allowNo": false,
1511
1376
  "type": "boolean"
1512
1377
  },
1378
+ "llms": {
1379
+ "aliases": [
1380
+ "skill"
1381
+ ],
1382
+ "description": "Show agent-oriented guidance for this command",
1383
+ "name": "llms",
1384
+ "allowNo": false,
1385
+ "type": "boolean"
1386
+ },
1513
1387
  "path": {
1514
1388
  "aliases": [
1515
1389
  "blueprint-path"
@@ -1545,11 +1419,8 @@
1545
1419
  "type": "boolean"
1546
1420
  },
1547
1421
  "stack": {
1548
- "aliases": [
1549
- "stack-id",
1550
- "stackId"
1551
- ],
1552
- "description": "Stack name or ID to destroy (defaults to the locally configured Stack)",
1422
+ "description": "Stack name or ID to use instead of the locally configured Stack",
1423
+ "hidden": true,
1553
1424
  "name": "stack",
1554
1425
  "hasDynamicHelp": false,
1555
1426
  "multiple": false,
@@ -1560,10 +1431,6 @@
1560
1431
  "project",
1561
1432
  "projectId"
1562
1433
  ],
1563
- "dependsOn": [
1564
- "stack",
1565
- "force"
1566
- ],
1567
1434
  "description": "Sanity project ID used to scope Blueprint and Stack",
1568
1435
  "exclusive": [
1569
1436
  "organization-id"
@@ -1579,10 +1446,6 @@
1579
1446
  "organizationId",
1580
1447
  "org"
1581
1448
  ],
1582
- "dependsOn": [
1583
- "stack",
1584
- "force"
1585
- ],
1586
1449
  "description": "Sanity organization ID used to scope Blueprint and Stack",
1587
1450
  "exclusive": [
1588
1451
  "project-id"
@@ -1592,30 +1455,32 @@
1592
1455
  "multiple": false,
1593
1456
  "type": "option"
1594
1457
  },
1595
- "force": {
1596
- "aliases": [
1597
- "f"
1598
- ],
1599
- "description": "Force Stack destruction (skip confirmation)",
1600
- "name": "force",
1601
- "allowNo": false,
1602
- "type": "boolean"
1458
+ "label": {
1459
+ "description": "Human-readable label for the robot. Defaults to a generated value.",
1460
+ "name": "label",
1461
+ "hasDynamicHelp": false,
1462
+ "multiple": false,
1463
+ "type": "option"
1603
1464
  },
1604
- "no-wait": {
1605
- "description": "Do not wait for Stack destruction to complete",
1606
- "name": "no-wait",
1465
+ "print": {
1466
+ "char": "P",
1467
+ "description": "Print only the raw token to stdout (suitable for shell substitution)",
1468
+ "exclusive": [
1469
+ "json"
1470
+ ],
1471
+ "name": "print",
1607
1472
  "allowNo": false,
1608
1473
  "type": "boolean"
1609
1474
  }
1610
1475
  },
1611
1476
  "hasDynamicHelp": false,
1612
1477
  "hiddenAliases": [],
1613
- "id": "blueprints:destroy",
1478
+ "id": "blueprints:mint-deploy-token",
1614
1479
  "pluginAlias": "@sanity/runtime-cli",
1615
1480
  "pluginName": "@sanity/runtime-cli",
1616
1481
  "pluginType": "core",
1617
1482
  "strict": true,
1618
- "summary": "Destroy a remote Stack deployment and its resources",
1483
+ "summary": "Create a robot API token for deploying Blueprints from CI/CD",
1619
1484
  "enableJsonFlag": true,
1620
1485
  "needs": [
1621
1486
  "scope"
@@ -1625,16 +1490,17 @@
1625
1490
  "dist",
1626
1491
  "commands",
1627
1492
  "blueprints",
1628
- "destroy.js"
1493
+ "mint-deploy-token.js"
1629
1494
  ]
1630
1495
  },
1631
- "blueprints:doctor": {
1496
+ "blueprints:plan": {
1632
1497
  "aliases": [],
1633
1498
  "args": {},
1634
- "description": "Analyzes your local Blueprint and remote Stack configuration for common issues, such as missing authentication, invalid project references, or misconfigured resources.\n\nRun this command when encountering errors with other Blueprint commands. Use --fix to interactively resolve detected issues.",
1499
+ "description": "Use this command to preview what changes will be applied to your remote Stack before deploying. This is a safe, read-only operation—no resources are created, modified, or deleted.\n\nRun 'blueprints plan' after making local changes to your Blueprint manifest to verify the expected diff. When ready, run 'blueprints deploy' to apply changes.",
1635
1500
  "examples": [
1636
1501
  "<%= config.bin %> <%= command.id %>",
1637
- "<%= config.bin %> <%= command.id %> --fix"
1502
+ "<%= config.bin %> <%= command.id %> --stack <name-or-id>",
1503
+ "<%= config.bin %> <%= command.id %> --organization-id <orgId> --stack <name-or-id>"
1638
1504
  ],
1639
1505
  "flags": {
1640
1506
  "json": {
@@ -1643,6 +1509,15 @@
1643
1509
  "allowNo": false,
1644
1510
  "type": "boolean"
1645
1511
  },
1512
+ "llms": {
1513
+ "aliases": [
1514
+ "skill"
1515
+ ],
1516
+ "description": "Show agent-oriented guidance for this command",
1517
+ "name": "llms",
1518
+ "allowNo": false,
1519
+ "type": "boolean"
1520
+ },
1646
1521
  "path": {
1647
1522
  "aliases": [
1648
1523
  "blueprint-path"
@@ -1650,6 +1525,7 @@
1650
1525
  "char": "p",
1651
1526
  "description": "Path to a Blueprint file or directory containing one",
1652
1527
  "env": "SANITY_BLUEPRINT_PATH",
1528
+ "hidden": true,
1653
1529
  "name": "path",
1654
1530
  "hasDynamicHelp": false,
1655
1531
  "multiple": false,
@@ -1670,44 +1546,79 @@
1670
1546
  "type": "boolean"
1671
1547
  },
1672
1548
  "verbose": {
1673
- "description": "Verbose output; defaults to true",
1549
+ "description": "Verbose output",
1550
+ "hidden": true,
1674
1551
  "name": "verbose",
1675
- "allowNo": true,
1676
- "type": "boolean"
1677
- },
1678
- "fix": {
1679
- "description": "Interactively fix configuration issues",
1680
- "name": "fix",
1681
1552
  "allowNo": false,
1682
1553
  "type": "boolean"
1554
+ },
1555
+ "stack": {
1556
+ "description": "Stack name or ID to use instead of the locally configured Stack",
1557
+ "name": "stack",
1558
+ "hasDynamicHelp": false,
1559
+ "multiple": false,
1560
+ "type": "option"
1561
+ },
1562
+ "project-id": {
1563
+ "aliases": [
1564
+ "project",
1565
+ "projectId"
1566
+ ],
1567
+ "description": "Sanity project ID used to scope Blueprint and Stack",
1568
+ "exclusive": [
1569
+ "organization-id"
1570
+ ],
1571
+ "name": "project-id",
1572
+ "hasDynamicHelp": false,
1573
+ "multiple": false,
1574
+ "type": "option"
1575
+ },
1576
+ "organization-id": {
1577
+ "aliases": [
1578
+ "organization",
1579
+ "organizationId",
1580
+ "org"
1581
+ ],
1582
+ "description": "Sanity organization ID used to scope Blueprint and Stack",
1583
+ "exclusive": [
1584
+ "project-id"
1585
+ ],
1586
+ "name": "organization-id",
1587
+ "hasDynamicHelp": false,
1588
+ "multiple": false,
1589
+ "type": "option"
1683
1590
  }
1684
1591
  },
1685
1592
  "hasDynamicHelp": false,
1686
1593
  "hiddenAliases": [],
1687
- "id": "blueprints:doctor",
1594
+ "id": "blueprints:plan",
1688
1595
  "pluginAlias": "@sanity/runtime-cli",
1689
1596
  "pluginName": "@sanity/runtime-cli",
1690
1597
  "pluginType": "core",
1691
1598
  "strict": true,
1692
- "summary": "Diagnose potential issues with local Blueprint and remote Stack configuration",
1599
+ "summary": "Preview changes that will be applied to the remote Stack",
1693
1600
  "enableJsonFlag": true,
1601
+ "needs": [
1602
+ "token",
1603
+ "blueprint"
1604
+ ],
1694
1605
  "isESM": true,
1695
1606
  "relativePath": [
1696
1607
  "dist",
1697
1608
  "commands",
1698
1609
  "blueprints",
1699
- "doctor.js"
1610
+ "plan.js"
1700
1611
  ]
1701
1612
  },
1702
- "blueprints:info": {
1613
+ "blueprints:promote": {
1703
1614
  "aliases": [],
1704
1615
  "args": {},
1705
- "description": "Displays the current state and metadata of your remote Stack deployment, including deployed resources, status, and configuration.\n\nUse this command to verify a deployment succeeded, check what resources are live, or confirm which Stack your local Blueprint is connected to.\n\nRun 'blueprints stacks' to see all available Stacks in your project or organization.",
1616
+ "description": "Promotes a deployed Stack to organization scope, enabling management of org-level resources. Promotion cannot be reversed.\n\nYour local Blueprint configuration will be updated to reflect the new scope.",
1706
1617
  "examples": [
1707
1618
  "<%= config.bin %> <%= command.id %>",
1708
1619
  "<%= config.bin %> <%= command.id %> --stack <name-or-id>",
1709
- "<%= config.bin %> <%= command.id %> --project-id <id> --stack <name-or-id>",
1710
- "<%= config.bin %> <%= command.id %> --organization-id <orgId> --stack <name-or-id>"
1620
+ "<%= config.bin %> <%= command.id %> --project-id <projectId> --stack <name-or-id>",
1621
+ "<%= config.bin %> <%= command.id %> --new-stack-name <new-name>"
1711
1622
  ],
1712
1623
  "flags": {
1713
1624
  "json": {
@@ -1716,6 +1627,15 @@
1716
1627
  "allowNo": false,
1717
1628
  "type": "boolean"
1718
1629
  },
1630
+ "llms": {
1631
+ "aliases": [
1632
+ "skill"
1633
+ ],
1634
+ "description": "Show agent-oriented guidance for this command",
1635
+ "name": "llms",
1636
+ "allowNo": false,
1637
+ "type": "boolean"
1638
+ },
1719
1639
  "path": {
1720
1640
  "aliases": [
1721
1641
  "blueprint-path"
@@ -1754,7 +1674,7 @@
1754
1674
  "aliases": [
1755
1675
  "id"
1756
1676
  ],
1757
- "description": "Stack name or ID",
1677
+ "description": "Stack name or ID to promote",
1758
1678
  "name": "stack",
1759
1679
  "hasDynamicHelp": false,
1760
1680
  "multiple": false,
@@ -1784,52 +1704,56 @@
1784
1704
  "exclusive": [
1785
1705
  "project-id"
1786
1706
  ],
1707
+ "hidden": true,
1787
1708
  "name": "organization-id",
1788
1709
  "hasDynamicHelp": false,
1789
1710
  "multiple": false,
1790
1711
  "type": "option"
1712
+ },
1713
+ "force": {
1714
+ "description": "Skip confirmation prompt",
1715
+ "name": "force",
1716
+ "allowNo": false,
1717
+ "type": "boolean"
1718
+ },
1719
+ "new-stack-name": {
1720
+ "description": "Set a new name for the Stack while promoting",
1721
+ "name": "new-stack-name",
1722
+ "hasDynamicHelp": false,
1723
+ "multiple": false,
1724
+ "type": "option"
1791
1725
  }
1792
1726
  },
1793
1727
  "hasDynamicHelp": false,
1794
1728
  "hiddenAliases": [],
1795
- "id": "blueprints:info",
1729
+ "id": "blueprints:promote",
1796
1730
  "pluginAlias": "@sanity/runtime-cli",
1797
1731
  "pluginName": "@sanity/runtime-cli",
1798
1732
  "pluginType": "core",
1799
1733
  "strict": true,
1800
- "summary": "Display the status and resources of the remote Stack deployment",
1734
+ "summary": "Promote a Stack from project scope to organization scope",
1801
1735
  "enableJsonFlag": true,
1802
1736
  "needs": [
1803
- "deployedStack"
1737
+ "deployedStack",
1738
+ "blueprint"
1804
1739
  ],
1805
1740
  "isESM": true,
1806
1741
  "relativePath": [
1807
1742
  "dist",
1808
1743
  "commands",
1809
1744
  "blueprints",
1810
- "info.js"
1745
+ "promote.js"
1811
1746
  ]
1812
1747
  },
1813
- "blueprints:init": {
1748
+ "blueprints:stacks": {
1814
1749
  "aliases": [],
1815
- "args": {
1816
- "dir": {
1817
- "description": "Directory to create the local Blueprint in (defaults to the current directory)",
1818
- "name": "dir"
1819
- }
1820
- },
1821
- "description": "A Blueprint is your local infrastructure-as-code configuration that defines Sanity resources (datasets, functions, etc.). A Stack is the remote deployment target where your Blueprint is applied.\n[NOTE: Currently, accounts are limited to three (3) Stacks per project scope.]\n\nThis is typically the first command you run in a new project. It creates a local Blueprint manifest file (sanity.blueprint.ts, .js, or .json) and provisions a new remote Stack.\nAdditionally, a Blueprint configuration file is created in .sanity/ containing the scope and Stack IDs. This is .gitignored by default.\n\nAfter initialization, use 'blueprints plan' to preview changes, then 'blueprints deploy' to apply them.\n\nRunning without a directory prompts to confirm the current directory. Run 'blueprints init .' to initialize in the current directory without a prompt.",
1750
+ "args": {},
1751
+ "description": "Shows all Stacks associated with a project or organization. By default, lists Stacks scoped to the local Blueprint.\n\nUse this to discover existing Stacks you can scope a local Blueprint to (using 'blueprints config --edit'), or to audit what's deployed across your project.\n\nUse --include-projects with --organization-id to also list Stacks from all projects within the organization.",
1822
1752
  "examples": [
1823
1753
  "<%= config.bin %> <%= command.id %>",
1824
- "<%= config.bin %> <%= command.id %> .",
1825
- "<%= config.bin %> <%= command.id %> [directory]",
1826
- "<%= config.bin %> <%= command.id %> --blueprint-type <json|js|ts>",
1827
- "<%= config.bin %> <%= command.id %> --organization-id <organizationId>",
1828
1754
  "<%= config.bin %> <%= command.id %> --project-id <projectId>",
1829
- "<%= config.bin %> <%= command.id %> --stack-name <newStackName>",
1830
- "<%= config.bin %> <%= command.id %> --stack-id <existingStackId>",
1831
- "<%= config.bin %> <%= command.id %> new-stack --type <json|js|ts> --org <organizationId> --name <newStackName>",
1832
- "<%= config.bin %> <%= command.id %> old-stack --type <json|js|ts> --project-id <projectId> --stack-id <existingStackId>"
1755
+ "<%= config.bin %> <%= command.id %> --organization-id <organizationId>",
1756
+ "<%= config.bin %> <%= command.id %> --organization-id <organizationId> --include-projects"
1833
1757
  ],
1834
1758
  "flags": {
1835
1759
  "json": {
@@ -1838,6 +1762,15 @@
1838
1762
  "allowNo": false,
1839
1763
  "type": "boolean"
1840
1764
  },
1765
+ "llms": {
1766
+ "aliases": [
1767
+ "skill"
1768
+ ],
1769
+ "description": "Show agent-oriented guidance for this command",
1770
+ "name": "llms",
1771
+ "allowNo": false,
1772
+ "type": "boolean"
1773
+ },
1841
1774
  "path": {
1842
1775
  "aliases": [
1843
1776
  "blueprint-path"
@@ -1872,41 +1805,12 @@
1872
1805
  "allowNo": false,
1873
1806
  "type": "boolean"
1874
1807
  },
1875
- "dir": {
1876
- "description": "Directory to create the local Blueprint in",
1877
- "name": "dir",
1878
- "hasDynamicHelp": false,
1879
- "multiple": false,
1880
- "type": "option"
1881
- },
1882
- "example": {
1883
- "aliases": [
1884
- "recipe"
1885
- ],
1886
- "description": "Example to use for the local Blueprint",
1887
- "exclusive": [
1888
- "blueprint-type",
1889
- "stack-id",
1890
- "stack-name"
1891
- ],
1892
- "name": "example",
1893
- "hasDynamicHelp": false,
1894
- "multiple": false,
1895
- "type": "option"
1896
- },
1897
- "blueprint-type": {
1898
- "aliases": [
1899
- "type"
1900
- ],
1901
- "description": "Blueprint manifest type to use for the local Blueprint",
1902
- "name": "blueprint-type",
1808
+ "stack": {
1809
+ "description": "Stack name or ID to use instead of the locally configured Stack",
1810
+ "hidden": true,
1811
+ "name": "stack",
1903
1812
  "hasDynamicHelp": false,
1904
1813
  "multiple": false,
1905
- "options": [
1906
- "json",
1907
- "js",
1908
- "ts"
1909
- ],
1910
1814
  "type": "option"
1911
1815
  },
1912
1816
  "project-id": {
@@ -1916,7 +1820,8 @@
1916
1820
  ],
1917
1821
  "description": "Sanity project ID used to scope Blueprint and Stack",
1918
1822
  "exclusive": [
1919
- "organization-id"
1823
+ "organization-id",
1824
+ "include-projects"
1920
1825
  ],
1921
1826
  "name": "project-id",
1922
1827
  "hasDynamicHelp": false,
@@ -1938,79 +1843,46 @@
1938
1843
  "multiple": false,
1939
1844
  "type": "option"
1940
1845
  },
1941
- "stack-id": {
1942
- "aliases": [
1943
- "stackId"
1944
- ],
1945
- "description": "Existing Stack ID used to scope local Blueprint",
1946
- "exclusive": [
1947
- "stack-name"
1948
- ],
1949
- "name": "stack-id",
1950
- "relationships": [
1951
- {
1952
- "type": "some",
1953
- "flags": [
1954
- "project-id",
1955
- "organization-id"
1956
- ]
1957
- }
1958
- ],
1959
- "hasDynamicHelp": false,
1960
- "multiple": false,
1961
- "type": "option"
1962
- },
1963
- "stack-name": {
1964
- "aliases": [
1965
- "name"
1966
- ],
1967
- "description": "Name to use for a new Stack provisioned during initialization",
1968
- "exclusive": [
1969
- "stack-id"
1970
- ],
1971
- "name": "stack-name",
1972
- "relationships": [
1973
- {
1974
- "type": "some",
1975
- "flags": [
1976
- "project-id",
1977
- "organization-id"
1978
- ]
1979
- }
1846
+ "include-projects": {
1847
+ "dependsOn": [
1848
+ "organization-id"
1980
1849
  ],
1981
- "hasDynamicHelp": false,
1982
- "multiple": false,
1983
- "type": "option"
1850
+ "description": "Include Stacks from all projects within the organization. Requires --organization-id.",
1851
+ "name": "include-projects",
1852
+ "allowNo": false,
1853
+ "type": "boolean"
1984
1854
  }
1985
1855
  },
1986
1856
  "hasDynamicHelp": false,
1987
1857
  "hiddenAliases": [],
1988
- "id": "blueprints:init",
1858
+ "id": "blueprints:stacks",
1989
1859
  "pluginAlias": "@sanity/runtime-cli",
1990
1860
  "pluginName": "@sanity/runtime-cli",
1991
1861
  "pluginType": "core",
1992
1862
  "strict": true,
1993
- "summary": "Initialize a Blueprint and create a remote Stack",
1863
+ "summary": "List remote Stack deployments for your project or organization",
1994
1864
  "enableJsonFlag": true,
1865
+ "needs": [
1866
+ "scope"
1867
+ ],
1995
1868
  "isESM": true,
1996
1869
  "relativePath": [
1997
1870
  "dist",
1998
1871
  "commands",
1999
1872
  "blueprints",
2000
- "init.js"
1873
+ "stacks.js"
2001
1874
  ]
2002
1875
  },
2003
- "blueprints:logs": {
1876
+ "functions:add": {
2004
1877
  "aliases": [],
2005
1878
  "args": {},
2006
- "description": "Retrieves Stack deployment logs, useful for debugging and monitoring deployment activity.\n\nUse --watch (-w) to tail logs in real-time.\n\nUse --limit, --since, or --before to narrow the result set when not watching.\n\nIf you're not seeing expected logs, verify your Stack is deployed with 'blueprints info'.",
1879
+ "description": "Scaffolds a new Function in the functions/ folder and templates a resource for your Blueprint manifest.\n\nFunctions are serverless handlers triggered by document, live content or media-library events (create, update, delete, publish).\n\nAfter adding, use 'functions dev' to test locally, then 'blueprints deploy' to publish.",
2007
1880
  "examples": [
2008
1881
  "<%= config.bin %> <%= command.id %>",
2009
- "<%= config.bin %> <%= command.id %> --watch",
2010
- "<%= config.bin %> <%= command.id %> --stack <name-or-id>",
2011
- "<%= config.bin %> <%= command.id %> --limit 500",
2012
- "<%= config.bin %> <%= command.id %> --since 2026-05-01T00:00:00Z",
2013
- "<%= config.bin %> <%= command.id %> --before 2026-05-01T00:00:00Z"
1882
+ "<%= config.bin %> <%= command.id %> --helpers",
1883
+ "<%= config.bin %> <%= command.id %> --name my-function",
1884
+ "<%= config.bin %> <%= command.id %> --name my-function --type document-create",
1885
+ "<%= config.bin %> <%= command.id %> --name my-function --type document-create --type document-update --lang js"
2014
1886
  ],
2015
1887
  "flags": {
2016
1888
  "json": {
@@ -2019,6 +1891,15 @@
2019
1891
  "allowNo": false,
2020
1892
  "type": "boolean"
2021
1893
  },
1894
+ "llms": {
1895
+ "aliases": [
1896
+ "skill"
1897
+ ],
1898
+ "description": "Show agent-oriented guidance for this command",
1899
+ "name": "llms",
1900
+ "allowNo": false,
1901
+ "type": "boolean"
1902
+ },
2022
1903
  "path": {
2023
1904
  "aliases": [
2024
1905
  "blueprint-path"
@@ -2055,6 +1936,7 @@
2055
1936
  },
2056
1937
  "stack": {
2057
1938
  "description": "Stack name or ID to use instead of the locally configured Stack",
1939
+ "hidden": true,
2058
1940
  "name": "stack",
2059
1941
  "hasDynamicHelp": false,
2060
1942
  "multiple": false,
@@ -2069,6 +1951,7 @@
2069
1951
  "exclusive": [
2070
1952
  "organization-id"
2071
1953
  ],
1954
+ "hidden": true,
2072
1955
  "name": "project-id",
2073
1956
  "hasDynamicHelp": false,
2074
1957
  "multiple": false,
@@ -2084,86 +1967,145 @@
2084
1967
  "exclusive": [
2085
1968
  "project-id"
2086
1969
  ],
1970
+ "hidden": true,
2087
1971
  "name": "organization-id",
2088
1972
  "hasDynamicHelp": false,
2089
1973
  "multiple": false,
2090
1974
  "type": "option"
2091
1975
  },
2092
- "watch": {
1976
+ "example": {
2093
1977
  "aliases": [
2094
- "follow"
1978
+ "recipe"
2095
1979
  ],
2096
- "char": "w",
2097
- "description": "Watch for new Stack logs",
2098
- "name": "watch",
2099
- "allowNo": false,
2100
- "type": "boolean"
2101
- },
2102
- "limit": {
2103
- "char": "l",
2104
- "description": "Maximum number of log entries to retrieve (1-500)",
1980
+ "description": "Example to use for the Function",
2105
1981
  "exclusive": [
2106
- "watch"
1982
+ "name",
1983
+ "fn-type",
1984
+ "language",
1985
+ "javascript",
1986
+ "fn-helpers",
1987
+ "fn-installer"
2107
1988
  ],
2108
- "name": "limit",
1989
+ "name": "example",
2109
1990
  "hasDynamicHelp": false,
2110
1991
  "multiple": false,
2111
1992
  "type": "option"
2112
1993
  },
2113
- "since": {
2114
- "description": "Only show logs after this ISO 8601 timestamp",
1994
+ "name": {
1995
+ "char": "n",
1996
+ "description": "Name of the Function to add",
1997
+ "name": "name",
1998
+ "hasDynamicHelp": false,
1999
+ "multiple": false,
2000
+ "type": "option"
2001
+ },
2002
+ "type": {
2003
+ "dependsOn": [
2004
+ "name"
2005
+ ],
2006
+ "description": "Document change event(s) that should trigger the function; you can specify multiple events by specifying this flag multiple times",
2007
+ "name": "type",
2008
+ "hasDynamicHelp": false,
2009
+ "multiple": true,
2010
+ "options": [
2011
+ "document-publish",
2012
+ "document-create",
2013
+ "document-delete",
2014
+ "document-update",
2015
+ "media-library-asset-create",
2016
+ "media-library-asset-delete",
2017
+ "media-library-asset-update",
2018
+ "scheduled-function",
2019
+ "sync-tag-invalidate"
2020
+ ],
2021
+ "type": "option"
2022
+ },
2023
+ "language": {
2024
+ "aliases": [
2025
+ "lang"
2026
+ ],
2027
+ "description": "Language of the new Function",
2028
+ "name": "language",
2029
+ "default": "ts",
2030
+ "hasDynamicHelp": false,
2031
+ "multiple": false,
2032
+ "options": [
2033
+ "ts",
2034
+ "js"
2035
+ ],
2036
+ "type": "option"
2037
+ },
2038
+ "javascript": {
2039
+ "aliases": [
2040
+ "js"
2041
+ ],
2042
+ "description": "Use JavaScript instead of TypeScript",
2115
2043
  "exclusive": [
2116
- "watch"
2044
+ "language"
2117
2045
  ],
2118
- "name": "since",
2046
+ "name": "javascript",
2047
+ "allowNo": false,
2048
+ "type": "boolean"
2049
+ },
2050
+ "helpers": {
2051
+ "description": "Add helpers to the new Function",
2052
+ "name": "helpers",
2053
+ "allowNo": true,
2054
+ "type": "boolean"
2055
+ },
2056
+ "installer": {
2057
+ "description": "How to install the @sanity/functions helpers",
2058
+ "name": "installer",
2119
2059
  "hasDynamicHelp": false,
2120
2060
  "multiple": false,
2061
+ "options": [
2062
+ "skip",
2063
+ "npm",
2064
+ "pnpm",
2065
+ "yarn"
2066
+ ],
2121
2067
  "type": "option"
2122
2068
  },
2123
- "before": {
2124
- "description": "Only show logs before this ISO 8601 timestamp",
2069
+ "install": {
2070
+ "char": "i",
2071
+ "description": "Shortcut for --fn-installer npm",
2125
2072
  "exclusive": [
2126
- "watch"
2073
+ "fn-installer"
2127
2074
  ],
2128
- "name": "before",
2129
- "hasDynamicHelp": false,
2130
- "multiple": false,
2131
- "type": "option"
2075
+ "name": "install",
2076
+ "allowNo": false,
2077
+ "type": "boolean"
2132
2078
  }
2133
2079
  },
2134
2080
  "hasDynamicHelp": false,
2135
2081
  "hiddenAliases": [],
2136
- "id": "blueprints:logs",
2082
+ "id": "functions:add",
2137
2083
  "pluginAlias": "@sanity/runtime-cli",
2138
2084
  "pluginName": "@sanity/runtime-cli",
2139
2085
  "pluginType": "core",
2140
2086
  "strict": true,
2141
- "summary": "Display logs for the current Blueprint's Stack deployment",
2087
+ "summary": "Add a Function to your Blueprint",
2142
2088
  "enableJsonFlag": true,
2143
2089
  "needs": [
2144
- "deployedStack"
2090
+ "blueprint"
2145
2091
  ],
2146
2092
  "isESM": true,
2147
2093
  "relativePath": [
2148
2094
  "dist",
2149
2095
  "commands",
2150
- "blueprints",
2151
- "logs.js"
2096
+ "functions",
2097
+ "add.js"
2152
2098
  ]
2153
2099
  },
2154
- "blueprints:mint-deploy-token": {
2100
+ "functions:build": {
2155
2101
  "aliases": [],
2156
- "args": {},
2157
- "description": "Mints a long-lived robot token with the role required to plan, deploy, and destroy Blueprints in this project or organization.\n\nBy default the command runs interactively and asks how you want to receive the token (clipboard, print, or exit). Use --print to emit only the raw token for shell pipelines, or --json for full API output.\n\nThe minted token is also visible in your Sanity Manage UI under Robots, where it can be revoked.",
2158
- "examples": [
2159
- "<%= config.bin %> <%= command.id %>",
2160
- "<%= config.bin %> <%= command.id %> --label \"ci-deploy\"",
2161
- "<%= config.bin %> <%= command.id %> --print",
2162
- "export SANITY_AUTH_TOKEN=$(<%= config.bin %> <%= command.id %> --print)",
2163
- "<%= config.bin %> <%= command.id %> --json",
2164
- "<%= config.bin %> <%= command.id %> --project-id <projectId>",
2165
- "<%= config.bin %> <%= command.id %> --organization-id <orgId>"
2166
- ],
2102
+ "args": {
2103
+ "name": {
2104
+ "description": "The name of the Sanity Function",
2105
+ "name": "name",
2106
+ "required": false
2107
+ }
2108
+ },
2167
2109
  "flags": {
2168
2110
  "json": {
2169
2111
  "description": "Format output as json",
@@ -2171,6 +2113,15 @@
2171
2113
  "allowNo": false,
2172
2114
  "type": "boolean"
2173
2115
  },
2116
+ "llms": {
2117
+ "aliases": [
2118
+ "skill"
2119
+ ],
2120
+ "description": "Show agent-oriented guidance for this command",
2121
+ "name": "llms",
2122
+ "allowNo": false,
2123
+ "type": "boolean"
2124
+ },
2174
2125
  "path": {
2175
2126
  "aliases": [
2176
2127
  "blueprint-path"
@@ -2222,6 +2173,7 @@
2222
2173
  "exclusive": [
2223
2174
  "organization-id"
2224
2175
  ],
2176
+ "hidden": true,
2225
2177
  "name": "project-id",
2226
2178
  "hasDynamicHelp": false,
2227
2179
  "multiple": false,
@@ -2237,57 +2189,66 @@
2237
2189
  "exclusive": [
2238
2190
  "project-id"
2239
2191
  ],
2192
+ "hidden": true,
2240
2193
  "name": "organization-id",
2241
2194
  "hasDynamicHelp": false,
2242
2195
  "multiple": false,
2243
2196
  "type": "option"
2244
2197
  },
2245
- "label": {
2246
- "description": "Human-readable label for the robot. Defaults to a generated value.",
2247
- "name": "label",
2198
+ "fn-installer": {
2199
+ "aliases": [
2200
+ "function-installer",
2201
+ "installer"
2202
+ ],
2203
+ "description": "Which package manager to use when building Functions",
2204
+ "hidden": true,
2205
+ "name": "fn-installer",
2248
2206
  "hasDynamicHelp": false,
2249
2207
  "multiple": false,
2208
+ "options": [
2209
+ "npm",
2210
+ "pnpm",
2211
+ "yarn"
2212
+ ],
2250
2213
  "type": "option"
2251
2214
  },
2252
- "print": {
2253
- "char": "P",
2254
- "description": "Print only the raw token to stdout (suitable for shell substitution)",
2255
- "exclusive": [
2256
- "json"
2257
- ],
2258
- "name": "print",
2259
- "allowNo": false,
2260
- "type": "boolean"
2215
+ "out-dir": {
2216
+ "char": "o",
2217
+ "description": "Output directory for zip files",
2218
+ "name": "out-dir",
2219
+ "hasDynamicHelp": false,
2220
+ "multiple": false,
2221
+ "type": "option"
2261
2222
  }
2262
2223
  },
2263
2224
  "hasDynamicHelp": false,
2225
+ "hidden": true,
2264
2226
  "hiddenAliases": [],
2265
- "id": "blueprints:mint-deploy-token",
2227
+ "id": "functions:build",
2266
2228
  "pluginAlias": "@sanity/runtime-cli",
2267
2229
  "pluginName": "@sanity/runtime-cli",
2268
2230
  "pluginType": "core",
2269
2231
  "strict": true,
2270
- "summary": "Create a robot API token for deploying Blueprints from CI/CD",
2232
+ "summary": "Build Sanity Function(s) to zip archives",
2271
2233
  "enableJsonFlag": true,
2272
2234
  "needs": [
2273
- "scope"
2235
+ "blueprint"
2274
2236
  ],
2275
2237
  "isESM": true,
2276
2238
  "relativePath": [
2277
2239
  "dist",
2278
2240
  "commands",
2279
- "blueprints",
2280
- "mint-deploy-token.js"
2241
+ "functions",
2242
+ "build.js"
2281
2243
  ]
2282
2244
  },
2283
- "blueprints:plan": {
2245
+ "functions:dev": {
2284
2246
  "aliases": [],
2285
2247
  "args": {},
2286
- "description": "Use this command to preview what changes will be applied to your remote Stack before deploying. This is a safe, read-only operation—no resources are created, modified, or deleted.\n\nRun 'blueprints plan' after making local changes to your Blueprint manifest to verify the expected diff. When ready, run 'blueprints deploy' to apply changes.",
2248
+ "description": "Runs a local, web-based development server to test your functions before deploying.\n\nOpen the emulator in your browser to interactively test your functions with the payload editor.\n\nOptionally, set the host and port with the --host and --port flags. Function timeout can be configured with the --timeout flag.\n\nTo invoke a function with the CLI, use 'functions test'.",
2287
2249
  "examples": [
2288
- "<%= config.bin %> <%= command.id %>",
2289
- "<%= config.bin %> <%= command.id %> --stack <name-or-id>",
2290
- "<%= config.bin %> <%= command.id %> --organization-id <orgId> --stack <name-or-id>"
2250
+ "<%= config.bin %> <%= command.id %> --host 127.0.0.1 --port 8974",
2251
+ "<%= config.bin %> <%= command.id %> --timeout 60"
2291
2252
  ],
2292
2253
  "flags": {
2293
2254
  "json": {
@@ -2296,6 +2257,15 @@
2296
2257
  "allowNo": false,
2297
2258
  "type": "boolean"
2298
2259
  },
2260
+ "llms": {
2261
+ "aliases": [
2262
+ "skill"
2263
+ ],
2264
+ "description": "Show agent-oriented guidance for this command",
2265
+ "name": "llms",
2266
+ "allowNo": false,
2267
+ "type": "boolean"
2268
+ },
2299
2269
  "path": {
2300
2270
  "aliases": [
2301
2271
  "blueprint-path"
@@ -2332,6 +2302,7 @@
2332
2302
  },
2333
2303
  "stack": {
2334
2304
  "description": "Stack name or ID to use instead of the locally configured Stack",
2305
+ "hidden": true,
2335
2306
  "name": "stack",
2336
2307
  "hasDynamicHelp": false,
2337
2308
  "multiple": false,
@@ -2346,6 +2317,7 @@
2346
2317
  "exclusive": [
2347
2318
  "organization-id"
2348
2319
  ],
2320
+ "hidden": true,
2349
2321
  "name": "project-id",
2350
2322
  "hasDynamicHelp": false,
2351
2323
  "multiple": false,
@@ -2361,42 +2333,75 @@
2361
2333
  "exclusive": [
2362
2334
  "project-id"
2363
2335
  ],
2336
+ "hidden": true,
2364
2337
  "name": "organization-id",
2365
2338
  "hasDynamicHelp": false,
2366
2339
  "multiple": false,
2367
2340
  "type": "option"
2341
+ },
2342
+ "host": {
2343
+ "char": "h",
2344
+ "description": "The local network interface at which to listen. [default: \"localhost\"]",
2345
+ "name": "host",
2346
+ "required": false,
2347
+ "hasDynamicHelp": false,
2348
+ "multiple": false,
2349
+ "type": "option"
2350
+ },
2351
+ "port": {
2352
+ "char": "p",
2353
+ "description": "TCP port to start emulator on. [default: 8080]",
2354
+ "name": "port",
2355
+ "required": false,
2356
+ "hasDynamicHelp": false,
2357
+ "multiple": false,
2358
+ "type": "option"
2359
+ },
2360
+ "timeout": {
2361
+ "char": "t",
2362
+ "description": "Maximum execution time for all functions, in seconds. Takes precedence over function-specific `timeout`",
2363
+ "name": "timeout",
2364
+ "required": false,
2365
+ "hasDynamicHelp": false,
2366
+ "multiple": false,
2367
+ "type": "option"
2368
2368
  }
2369
2369
  },
2370
2370
  "hasDynamicHelp": false,
2371
2371
  "hiddenAliases": [],
2372
- "id": "blueprints:plan",
2372
+ "id": "functions:dev",
2373
2373
  "pluginAlias": "@sanity/runtime-cli",
2374
2374
  "pluginName": "@sanity/runtime-cli",
2375
2375
  "pluginType": "core",
2376
2376
  "strict": true,
2377
- "summary": "Preview changes that will be applied to the remote Stack",
2377
+ "summary": "Start the Sanity Function emulator",
2378
2378
  "enableJsonFlag": true,
2379
2379
  "needs": [
2380
- "token",
2381
2380
  "blueprint"
2382
2381
  ],
2383
2382
  "isESM": true,
2384
2383
  "relativePath": [
2385
2384
  "dist",
2386
2385
  "commands",
2387
- "blueprints",
2388
- "plan.js"
2386
+ "functions",
2387
+ "dev.js"
2389
2388
  ]
2390
2389
  },
2391
- "blueprints:promote": {
2390
+ "functions:logs": {
2392
2391
  "aliases": [],
2393
- "args": {},
2394
- "description": "Promotes a deployed Stack to organization scope, enabling management of org-level resources. Promotion cannot be reversed.\n\nYour local Blueprint configuration will be updated to reflect the new scope.",
2392
+ "args": {
2393
+ "name": {
2394
+ "description": "The name of the Sanity Function",
2395
+ "name": "name",
2396
+ "required": false
2397
+ }
2398
+ },
2399
+ "description": "Fetches execution logs from a deployed function, useful for debugging production issues or monitoring activity.\n\nUse --watch (-w) to stream logs in real-time. Use --delete to clear all logs for a function (requires confirmation unless --force is specified).",
2395
2400
  "examples": [
2396
- "<%= config.bin %> <%= command.id %>",
2397
- "<%= config.bin %> <%= command.id %> --stack <name-or-id>",
2398
- "<%= config.bin %> <%= command.id %> --project-id <projectId> --stack <name-or-id>",
2399
- "<%= config.bin %> <%= command.id %> --new-stack-name <new-name>"
2401
+ "<%= config.bin %> <%= command.id %> <name>",
2402
+ "<%= config.bin %> <%= command.id %> <name> --json",
2403
+ "<%= config.bin %> <%= command.id %> <name> --limit 100",
2404
+ "<%= config.bin %> <%= command.id %> <name> --delete"
2400
2405
  ],
2401
2406
  "flags": {
2402
2407
  "json": {
@@ -2405,6 +2410,15 @@
2405
2410
  "allowNo": false,
2406
2411
  "type": "boolean"
2407
2412
  },
2413
+ "llms": {
2414
+ "aliases": [
2415
+ "skill"
2416
+ ],
2417
+ "description": "Show agent-oriented guidance for this command",
2418
+ "name": "llms",
2419
+ "allowNo": false,
2420
+ "type": "boolean"
2421
+ },
2408
2422
  "path": {
2409
2423
  "aliases": [
2410
2424
  "blueprint-path"
@@ -2440,10 +2454,7 @@
2440
2454
  "type": "boolean"
2441
2455
  },
2442
2456
  "stack": {
2443
- "aliases": [
2444
- "id"
2445
- ],
2446
- "description": "Stack name or ID to promote",
2457
+ "description": "Stack name or ID to use instead of the locally configured Stack",
2447
2458
  "name": "stack",
2448
2459
  "hasDynamicHelp": false,
2449
2460
  "multiple": false,
@@ -2458,6 +2469,7 @@
2458
2469
  "exclusive": [
2459
2470
  "organization-id"
2460
2471
  ],
2472
+ "hidden": true,
2461
2473
  "name": "project-id",
2462
2474
  "hasDynamicHelp": false,
2463
2475
  "multiple": false,
@@ -2479,28 +2491,66 @@
2479
2491
  "multiple": false,
2480
2492
  "type": "option"
2481
2493
  },
2494
+ "limit": {
2495
+ "char": "l",
2496
+ "description": "Total number of log entries to retrieve",
2497
+ "name": "limit",
2498
+ "required": false,
2499
+ "default": 50,
2500
+ "hasDynamicHelp": false,
2501
+ "multiple": false,
2502
+ "type": "option"
2503
+ },
2504
+ "utc": {
2505
+ "char": "u",
2506
+ "description": "Show dates in UTC time zone",
2507
+ "name": "utc",
2508
+ "required": false,
2509
+ "allowNo": false,
2510
+ "type": "boolean"
2511
+ },
2512
+ "delete": {
2513
+ "char": "d",
2514
+ "description": "Delete all logs for the function",
2515
+ "exclusive": [
2516
+ "limit",
2517
+ "json"
2518
+ ],
2519
+ "name": "delete",
2520
+ "required": false,
2521
+ "allowNo": false,
2522
+ "type": "boolean"
2523
+ },
2482
2524
  "force": {
2483
- "description": "Skip confirmation prompt",
2525
+ "char": "f",
2526
+ "dependsOn": [
2527
+ "delete"
2528
+ ],
2529
+ "description": "Skip confirmation for deleting logs",
2484
2530
  "name": "force",
2531
+ "required": false,
2485
2532
  "allowNo": false,
2486
2533
  "type": "boolean"
2487
2534
  },
2488
- "new-stack-name": {
2489
- "description": "Set a new name for the Stack while promoting",
2490
- "name": "new-stack-name",
2491
- "hasDynamicHelp": false,
2492
- "multiple": false,
2493
- "type": "option"
2535
+ "watch": {
2536
+ "aliases": [
2537
+ "follow"
2538
+ ],
2539
+ "char": "w",
2540
+ "description": "Watch for new logs (streaming mode)",
2541
+ "name": "watch",
2542
+ "allowNo": false,
2543
+ "type": "boolean"
2494
2544
  }
2495
2545
  },
2496
2546
  "hasDynamicHelp": false,
2497
2547
  "hiddenAliases": [],
2498
- "id": "blueprints:promote",
2548
+ "id": "functions:logs",
2499
2549
  "pluginAlias": "@sanity/runtime-cli",
2500
2550
  "pluginName": "@sanity/runtime-cli",
2501
2551
  "pluginType": "core",
2502
2552
  "strict": true,
2503
- "summary": "Promote a Stack from project scope to organization scope",
2553
+ "summary": "Retrieve or delete logs for a Sanity Function",
2504
2554
  "enableJsonFlag": true,
2505
2555
  "needs": [
2506
2556
  "deployedStack",
@@ -2510,19 +2560,25 @@
2510
2560
  "relativePath": [
2511
2561
  "dist",
2512
2562
  "commands",
2513
- "blueprints",
2514
- "promote.js"
2563
+ "functions",
2564
+ "logs.js"
2515
2565
  ]
2516
2566
  },
2517
- "blueprints:stacks": {
2567
+ "functions:test": {
2518
2568
  "aliases": [],
2519
- "args": {},
2520
- "description": "Shows all Stacks associated with a project or organization. By default, lists Stacks scoped to the local Blueprint.\n\nUse this to discover existing Stacks you can scope a local Blueprint to (using 'blueprints config --edit'), or to audit what's deployed across your project.\n\nUse --include-projects with --organization-id to also list Stacks from all projects within the organization.",
2569
+ "args": {
2570
+ "name": {
2571
+ "description": "The name of the Sanity Function",
2572
+ "name": "name",
2573
+ "required": false
2574
+ }
2575
+ },
2576
+ "description": "Executes a function locally with the provided payload, simulating how it would run when deployed. Use this to test your function logic before deploying.\n\nProvide test data via --data (inline JSON), --file (JSON file), or --document-id (fetch from Sanity). For update events, use the before/after flag pairs to simulate document changes.",
2521
2577
  "examples": [
2522
- "<%= config.bin %> <%= command.id %>",
2523
- "<%= config.bin %> <%= command.id %> --project-id <projectId>",
2524
- "<%= config.bin %> <%= command.id %> --organization-id <organizationId>",
2525
- "<%= config.bin %> <%= command.id %> --organization-id <organizationId> --include-projects"
2578
+ "<%= config.bin %> <%= command.id %> <name> --data '{ \"id\": 1 }'",
2579
+ "<%= config.bin %> <%= command.id %> <name> --file 'payload.json'",
2580
+ "<%= config.bin %> <%= command.id %> <name> --data '{ \"id\": 1 }' --timeout 60",
2581
+ "<%= config.bin %> <%= command.id %> <name> --event update --data-before '{ \"title\": \"before\" }' --data-after '{ \"title\": \"after\" }'"
2526
2582
  ],
2527
2583
  "flags": {
2528
2584
  "json": {
@@ -2531,6 +2587,15 @@
2531
2587
  "allowNo": false,
2532
2588
  "type": "boolean"
2533
2589
  },
2590
+ "llms": {
2591
+ "aliases": [
2592
+ "skill"
2593
+ ],
2594
+ "description": "Show agent-oriented guidance for this command",
2595
+ "name": "llms",
2596
+ "allowNo": false,
2597
+ "type": "boolean"
2598
+ },
2534
2599
  "path": {
2535
2600
  "aliases": [
2536
2601
  "blueprint-path"
@@ -2580,8 +2645,7 @@
2580
2645
  ],
2581
2646
  "description": "Sanity project ID used to scope Blueprint and Stack",
2582
2647
  "exclusive": [
2583
- "organization-id",
2584
- "include-projects"
2648
+ "organization-id"
2585
2649
  ],
2586
2650
  "name": "project-id",
2587
2651
  "hasDynamicHelp": false,
@@ -2603,34 +2667,230 @@
2603
2667
  "multiple": false,
2604
2668
  "type": "option"
2605
2669
  },
2606
- "include-projects": {
2607
- "dependsOn": [
2608
- "organization-id"
2670
+ "data": {
2671
+ "char": "d",
2672
+ "description": "Data to send to the function",
2673
+ "exclusive": [
2674
+ "file",
2675
+ "document-id"
2609
2676
  ],
2610
- "description": "Include Stacks from all projects within the organization. Requires --organization-id.",
2611
- "name": "include-projects",
2677
+ "name": "data",
2678
+ "required": false,
2679
+ "hasDynamicHelp": false,
2680
+ "multiple": false,
2681
+ "type": "option"
2682
+ },
2683
+ "data-before": {
2684
+ "description": "Original document",
2685
+ "exclusive": [
2686
+ "data",
2687
+ "file",
2688
+ "document-id",
2689
+ "file-before",
2690
+ "file-after",
2691
+ "document-id-before",
2692
+ "document-id-after"
2693
+ ],
2694
+ "name": "data-before",
2695
+ "required": false,
2696
+ "hasDynamicHelp": false,
2697
+ "multiple": false,
2698
+ "type": "option"
2699
+ },
2700
+ "data-after": {
2701
+ "description": "Current document",
2702
+ "exclusive": [
2703
+ "data",
2704
+ "file",
2705
+ "document-id",
2706
+ "file-before",
2707
+ "file-after",
2708
+ "document-id-before",
2709
+ "document-id-after"
2710
+ ],
2711
+ "name": "data-after",
2712
+ "required": false,
2713
+ "hasDynamicHelp": false,
2714
+ "multiple": false,
2715
+ "type": "option"
2716
+ },
2717
+ "event": {
2718
+ "char": "e",
2719
+ "description": "Type of event (create, update, delete)",
2720
+ "name": "event",
2721
+ "required": false,
2722
+ "hasDynamicHelp": false,
2723
+ "multiple": false,
2724
+ "options": [
2725
+ "create",
2726
+ "update",
2727
+ "delete"
2728
+ ],
2729
+ "type": "option"
2730
+ },
2731
+ "file": {
2732
+ "char": "f",
2733
+ "description": "Read data from file and send to the function",
2734
+ "exclusive": [
2735
+ "data",
2736
+ "document-id"
2737
+ ],
2738
+ "name": "file",
2739
+ "required": false,
2740
+ "hasDynamicHelp": false,
2741
+ "multiple": false,
2742
+ "type": "option"
2743
+ },
2744
+ "file-before": {
2745
+ "description": "Original document",
2746
+ "exclusive": [
2747
+ "data",
2748
+ "file",
2749
+ "document-id",
2750
+ "data-before",
2751
+ "data-after",
2752
+ "document-id-before",
2753
+ "document-id-after"
2754
+ ],
2755
+ "name": "file-before",
2756
+ "required": false,
2757
+ "hasDynamicHelp": false,
2758
+ "multiple": false,
2759
+ "type": "option"
2760
+ },
2761
+ "file-after": {
2762
+ "description": "Current document",
2763
+ "exclusive": [
2764
+ "data",
2765
+ "file",
2766
+ "document-id",
2767
+ "data-before",
2768
+ "data-after",
2769
+ "document-id-before",
2770
+ "document-id-after"
2771
+ ],
2772
+ "name": "file-after",
2773
+ "required": false,
2774
+ "hasDynamicHelp": false,
2775
+ "multiple": false,
2776
+ "type": "option"
2777
+ },
2778
+ "timeout": {
2779
+ "char": "t",
2780
+ "description": "Execution timeout value in seconds",
2781
+ "name": "timeout",
2782
+ "required": false,
2783
+ "hasDynamicHelp": false,
2784
+ "multiple": false,
2785
+ "type": "option"
2786
+ },
2787
+ "api": {
2788
+ "char": "a",
2789
+ "description": "Sanity API Version to use",
2790
+ "name": "api",
2791
+ "required": false,
2792
+ "hasDynamicHelp": false,
2793
+ "multiple": false,
2794
+ "type": "option"
2795
+ },
2796
+ "dataset": {
2797
+ "description": "The Sanity dataset to use",
2798
+ "name": "dataset",
2799
+ "required": false,
2800
+ "hasDynamicHelp": false,
2801
+ "multiple": false,
2802
+ "type": "option"
2803
+ },
2804
+ "document-id": {
2805
+ "aliases": [
2806
+ "doc",
2807
+ "documentId"
2808
+ ],
2809
+ "description": "Document to fetch and send to function",
2810
+ "exclusive": [
2811
+ "data",
2812
+ "file"
2813
+ ],
2814
+ "name": "document-id",
2815
+ "required": false,
2816
+ "hasDynamicHelp": false,
2817
+ "multiple": false,
2818
+ "type": "option"
2819
+ },
2820
+ "document-id-before": {
2821
+ "description": "Original document",
2822
+ "exclusive": [
2823
+ "data",
2824
+ "file",
2825
+ "document-id",
2826
+ "data-before",
2827
+ "data-after",
2828
+ "file-before",
2829
+ "file-after"
2830
+ ],
2831
+ "name": "document-id-before",
2832
+ "required": false,
2833
+ "hasDynamicHelp": false,
2834
+ "multiple": false,
2835
+ "type": "option"
2836
+ },
2837
+ "document-id-after": {
2838
+ "description": "Current document",
2839
+ "exclusive": [
2840
+ "data",
2841
+ "file",
2842
+ "document-id",
2843
+ "data-before",
2844
+ "data-after",
2845
+ "file-before",
2846
+ "file-after"
2847
+ ],
2848
+ "name": "document-id-after",
2849
+ "required": false,
2850
+ "hasDynamicHelp": false,
2851
+ "multiple": false,
2852
+ "type": "option"
2853
+ },
2854
+ "with-user-token": {
2855
+ "description": "Prime access token from CLI config",
2856
+ "name": "with-user-token",
2612
2857
  "allowNo": false,
2613
2858
  "type": "boolean"
2859
+ },
2860
+ "media-library-id": {
2861
+ "aliases": [
2862
+ "media"
2863
+ ],
2864
+ "description": "Sanity Media Library ID to use",
2865
+ "exclusive": [
2866
+ "project-id",
2867
+ "dataset"
2868
+ ],
2869
+ "name": "media-library-id",
2870
+ "required": false,
2871
+ "hasDynamicHelp": false,
2872
+ "multiple": false,
2873
+ "type": "option"
2614
2874
  }
2615
2875
  },
2616
2876
  "hasDynamicHelp": false,
2617
2877
  "hiddenAliases": [],
2618
- "id": "blueprints:stacks",
2878
+ "id": "functions:test",
2619
2879
  "pluginAlias": "@sanity/runtime-cli",
2620
2880
  "pluginName": "@sanity/runtime-cli",
2621
2881
  "pluginType": "core",
2622
2882
  "strict": true,
2623
- "summary": "List remote Stack deployments for your project or organization",
2883
+ "summary": "Invoke a local Sanity Function",
2624
2884
  "enableJsonFlag": true,
2625
2885
  "needs": [
2626
- "scope"
2886
+ "blueprint"
2627
2887
  ],
2628
2888
  "isESM": true,
2629
2889
  "relativePath": [
2630
2890
  "dist",
2631
2891
  "commands",
2632
- "blueprints",
2633
- "stacks.js"
2892
+ "functions",
2893
+ "test.js"
2634
2894
  ]
2635
2895
  },
2636
2896
  "functions:env:add": {
@@ -2654,7 +2914,8 @@
2654
2914
  },
2655
2915
  "description": "Sets an environment variable in a deployed Sanity Function. If the variable already exists, its value is updated.\n\nEnvironment variables are useful for API keys, configuration values, and other secrets that shouldn't be hardcoded. Changes take effect on the next function invocation.",
2656
2916
  "examples": [
2657
- "<%= config.bin %> <%= command.id %> MyFunction API_URL https://api.example.com/"
2917
+ "<%= config.bin %> <%= command.id %> MyFunction API_URL https://api.example.com/",
2918
+ "<%= config.bin %> <%= command.id %> --stack <name-or-id> MyFunction API_URL https://api.example.com/"
2658
2919
  ],
2659
2920
  "flags": {
2660
2921
  "json": {
@@ -2663,6 +2924,15 @@
2663
2924
  "allowNo": false,
2664
2925
  "type": "boolean"
2665
2926
  },
2927
+ "llms": {
2928
+ "aliases": [
2929
+ "skill"
2930
+ ],
2931
+ "description": "Show agent-oriented guidance for this command",
2932
+ "name": "llms",
2933
+ "allowNo": false,
2934
+ "type": "boolean"
2935
+ },
2666
2936
  "path": {
2667
2937
  "aliases": [
2668
2938
  "blueprint-path"
@@ -2699,7 +2969,6 @@
2699
2969
  },
2700
2970
  "stack": {
2701
2971
  "description": "Stack name or ID to use instead of the locally configured Stack",
2702
- "hidden": true,
2703
2972
  "name": "stack",
2704
2973
  "hasDynamicHelp": false,
2705
2974
  "multiple": false,
@@ -2770,7 +3039,8 @@
2770
3039
  },
2771
3040
  "description": "Displays all environment variables (keys only) configured in a deployed Sanity Function.\n\nUse 'functions env add' to set variables or 'functions env remove' to delete them.",
2772
3041
  "examples": [
2773
- "<%= config.bin %> <%= command.id %> MyFunction"
3042
+ "<%= config.bin %> <%= command.id %> MyFunction",
3043
+ "<%= config.bin %> <%= command.id %> --stack <name-or-id> MyFunction"
2774
3044
  ],
2775
3045
  "flags": {
2776
3046
  "json": {
@@ -2779,6 +3049,15 @@
2779
3049
  "allowNo": false,
2780
3050
  "type": "boolean"
2781
3051
  },
3052
+ "llms": {
3053
+ "aliases": [
3054
+ "skill"
3055
+ ],
3056
+ "description": "Show agent-oriented guidance for this command",
3057
+ "name": "llms",
3058
+ "allowNo": false,
3059
+ "type": "boolean"
3060
+ },
2782
3061
  "path": {
2783
3062
  "aliases": [
2784
3063
  "blueprint-path"
@@ -2815,7 +3094,6 @@
2815
3094
  },
2816
3095
  "stack": {
2817
3096
  "description": "Stack name or ID to use instead of the locally configured Stack",
2818
- "hidden": true,
2819
3097
  "name": "stack",
2820
3098
  "hasDynamicHelp": false,
2821
3099
  "multiple": false,
@@ -2891,7 +3169,8 @@
2891
3169
  },
2892
3170
  "description": "Deletes an environment variable from a deployed Sanity Function. The change takes effect on the next function invocation.\n\nUse 'functions env list' to see current variables before removing.",
2893
3171
  "examples": [
2894
- "<%= config.bin %> <%= command.id %> MyFunction API_URL"
3172
+ "<%= config.bin %> <%= command.id %> MyFunction API_URL",
3173
+ "<%= config.bin %> <%= command.id %> --stack <name-or-id> MyFunction API_URL"
2895
3174
  ],
2896
3175
  "flags": {
2897
3176
  "json": {
@@ -2900,6 +3179,15 @@
2900
3179
  "allowNo": false,
2901
3180
  "type": "boolean"
2902
3181
  },
3182
+ "llms": {
3183
+ "aliases": [
3184
+ "skill"
3185
+ ],
3186
+ "description": "Show agent-oriented guidance for this command",
3187
+ "name": "llms",
3188
+ "allowNo": false,
3189
+ "type": "boolean"
3190
+ },
2903
3191
  "path": {
2904
3192
  "aliases": [
2905
3193
  "blueprint-path"
@@ -2936,7 +3224,6 @@
2936
3224
  },
2937
3225
  "stack": {
2938
3226
  "description": "Stack name or ID to use instead of the locally configured Stack",
2939
- "hidden": true,
2940
3227
  "name": "stack",
2941
3228
  "hasDynamicHelp": false,
2942
3229
  "multiple": false,
@@ -2997,5 +3284,5 @@
2997
3284
  ]
2998
3285
  }
2999
3286
  },
3000
- "version": "17.1.0"
3287
+ "version": "17.2.0-blueprinit.g62f8017"
3001
3288
  }