@sanity/runtime-cli 17.0.0 → 17.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,27 +1,15 @@
1
1
  {
2
2
  "commands": {
3
- "blueprints:add": {
3
+ "functions:add": {
4
4
  "aliases": [],
5
- "args": {
6
- "type": {
7
- "description": "Type of resource to add (only \"function\" is supported)",
8
- "name": "type",
9
- "options": [
10
- "function"
11
- ],
12
- "required": true
13
- }
14
- },
15
- "deprecationOptions": {
16
- "to": "functions add"
17
- },
18
- "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",
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.",
19
7
  "examples": [
20
- "<%= config.bin %> <%= command.id %> function",
21
- "<%= config.bin %> <%= command.id %> function --helpers",
22
- "<%= config.bin %> <%= command.id %> function --name my-function",
23
- "<%= config.bin %> <%= command.id %> function --name my-function --fn-type document-create",
24
- "<%= config.bin %> <%= command.id %> function --name my-function --fn-type document-create --fn-type document-update --lang js"
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"
25
13
  ],
26
14
  "flags": {
27
15
  "json": {
@@ -107,7 +95,7 @@
107
95
  "aliases": [
108
96
  "recipe"
109
97
  ],
110
- "description": "Example to use for the function resource. Discover examples at https://www.sanity.io/exchange/type=recipes/by=sanity",
98
+ "description": "Example to use for the Function",
111
99
  "exclusive": [
112
100
  "name",
113
101
  "fn-type",
@@ -123,21 +111,18 @@
123
111
  },
124
112
  "name": {
125
113
  "char": "n",
126
- "description": "Name of the resource to add",
114
+ "description": "Name of the Function to add",
127
115
  "name": "name",
128
116
  "hasDynamicHelp": false,
129
117
  "multiple": false,
130
118
  "type": "option"
131
119
  },
132
- "fn-type": {
133
- "aliases": [
134
- "function-type"
135
- ],
120
+ "type": {
136
121
  "dependsOn": [
137
122
  "name"
138
123
  ],
139
124
  "description": "Document change event(s) that should trigger the function; you can specify multiple events by specifying this flag multiple times",
140
- "name": "fn-type",
125
+ "name": "type",
141
126
  "hasDynamicHelp": false,
142
127
  "multiple": true,
143
128
  "options": [
@@ -155,11 +140,9 @@
155
140
  },
156
141
  "language": {
157
142
  "aliases": [
158
- "function-language",
159
- "fn-language",
160
143
  "lang"
161
144
  ],
162
- "description": "Language of the new function",
145
+ "description": "Language of the new Function",
163
146
  "name": "language",
164
147
  "default": "ts",
165
148
  "hasDynamicHelp": false,
@@ -182,23 +165,15 @@
182
165
  "allowNo": false,
183
166
  "type": "boolean"
184
167
  },
185
- "fn-helpers": {
186
- "aliases": [
187
- "function-helpers",
188
- "helpers"
189
- ],
190
- "description": "Add helpers to the new function",
191
- "name": "fn-helpers",
168
+ "helpers": {
169
+ "description": "Add helpers to the new Function",
170
+ "name": "helpers",
192
171
  "allowNo": true,
193
172
  "type": "boolean"
194
173
  },
195
- "fn-installer": {
196
- "aliases": [
197
- "function-installer",
198
- "installer"
199
- ],
200
- "description": "Which package manager to use when installing the @sanity/functions helpers",
201
- "name": "fn-installer",
174
+ "installer": {
175
+ "description": "How to install the @sanity/functions helpers",
176
+ "name": "installer",
202
177
  "hasDynamicHelp": false,
203
178
  "multiple": false,
204
179
  "options": [
@@ -222,13 +197,12 @@
222
197
  },
223
198
  "hasDynamicHelp": false,
224
199
  "hiddenAliases": [],
225
- "id": "blueprints:add",
200
+ "id": "functions:add",
226
201
  "pluginAlias": "@sanity/runtime-cli",
227
202
  "pluginName": "@sanity/runtime-cli",
228
203
  "pluginType": "core",
229
- "state": "deprecated",
230
204
  "strict": true,
231
- "summary": "[deprecated] Use \"functions add\" instead",
205
+ "summary": "Add a Function to your Blueprint",
232
206
  "enableJsonFlag": true,
233
207
  "needs": [
234
208
  "blueprint"
@@ -237,20 +211,19 @@
237
211
  "relativePath": [
238
212
  "dist",
239
213
  "commands",
240
- "blueprints",
214
+ "functions",
241
215
  "add.js"
242
216
  ]
243
217
  },
244
- "blueprints:config": {
218
+ "functions:build": {
245
219
  "aliases": [],
246
- "args": {},
247
- "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.",
248
- "examples": [
249
- "<%= config.bin %> <%= command.id %>",
250
- "<%= config.bin %> <%= command.id %> --edit",
251
- "<%= config.bin %> <%= command.id %> --edit --project-id <projectId>",
252
- "<%= config.bin %> <%= command.id %> --edit --project-id <projectId> --stack <name-or-id>"
253
- ],
220
+ "args": {
221
+ "name": {
222
+ "description": "The name of the Sanity Function",
223
+ "name": "name",
224
+ "required": false
225
+ }
226
+ },
254
227
  "flags": {
255
228
  "json": {
256
229
  "description": "Format output as json",
@@ -293,14 +266,8 @@
293
266
  "type": "boolean"
294
267
  },
295
268
  "stack": {
296
- "aliases": [
297
- "stack-id",
298
- "stackId"
299
- ],
300
- "dependsOn": [
301
- "edit"
302
- ],
303
- "description": "Stack name or ID to set in the configuration. Requires --edit flag",
269
+ "description": "Stack name or ID to use instead of the locally configured Stack",
270
+ "hidden": true,
304
271
  "name": "stack",
305
272
  "hasDynamicHelp": false,
306
273
  "multiple": false,
@@ -311,13 +278,11 @@
311
278
  "project",
312
279
  "projectId"
313
280
  ],
314
- "dependsOn": [
315
- "edit"
316
- ],
317
281
  "description": "Sanity project ID used to scope Blueprint and Stack",
318
282
  "exclusive": [
319
283
  "organization-id"
320
284
  ],
285
+ "hidden": true,
321
286
  "name": "project-id",
322
287
  "hasDynamicHelp": false,
323
288
  "multiple": false,
@@ -329,59 +294,70 @@
329
294
  "organizationId",
330
295
  "org"
331
296
  ],
332
- "dependsOn": [
333
- "edit"
334
- ],
335
297
  "description": "Sanity organization ID used to scope Blueprint and Stack",
336
298
  "exclusive": [
337
299
  "project-id"
338
300
  ],
301
+ "hidden": true,
339
302
  "name": "organization-id",
340
303
  "hasDynamicHelp": false,
341
304
  "multiple": false,
342
305
  "type": "option"
343
306
  },
344
- "edit": {
345
- "char": "e",
346
- "description": "Modify the configuration interactively, or directly when combined with ID flags.",
347
- "name": "edit",
348
- "allowNo": false,
349
- "type": "boolean"
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"
350
331
  }
351
332
  },
352
333
  "hasDynamicHelp": false,
334
+ "hidden": true,
353
335
  "hiddenAliases": [],
354
- "id": "blueprints:config",
336
+ "id": "functions:build",
355
337
  "pluginAlias": "@sanity/runtime-cli",
356
338
  "pluginName": "@sanity/runtime-cli",
357
339
  "pluginType": "core",
358
340
  "strict": true,
359
- "summary": "View or edit the local Blueprint configuration",
341
+ "summary": "Build Sanity Function(s) to zip archives",
360
342
  "enableJsonFlag": true,
361
343
  "needs": [
362
- "token",
363
344
  "blueprint"
364
345
  ],
365
346
  "isESM": true,
366
347
  "relativePath": [
367
348
  "dist",
368
349
  "commands",
369
- "blueprints",
370
- "config.js"
350
+ "functions",
351
+ "build.js"
371
352
  ]
372
353
  },
373
- "blueprints:deploy": {
354
+ "functions:dev": {
374
355
  "aliases": [],
375
356
  "args": {},
376
- "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).",
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'.",
377
358
  "examples": [
378
- "<%= config.bin %> <%= command.id %>",
379
- "<%= config.bin %> <%= command.id %> --message \"Enable staging dataset\"",
380
- "<%= config.bin %> <%= command.id %> --no-wait",
381
- "<%= config.bin %> <%= command.id %> --fn-installer npm",
382
- "<%= config.bin %> <%= command.id %> --stack <name-or-id>",
383
- "<%= config.bin %> <%= command.id %> --organization-id <orgId> --stack <name-or-id>",
384
- "<%= config.bin %> <%= command.id %> --new-stack-name <new-name>"
359
+ "<%= config.bin %> <%= command.id %> --host 127.0.0.1 --port 8974",
360
+ "<%= config.bin %> <%= command.id %> --timeout 60"
385
361
  ],
386
362
  "flags": {
387
363
  "json": {
@@ -426,6 +402,7 @@
426
402
  },
427
403
  "stack": {
428
404
  "description": "Stack name or ID to use instead of the locally configured Stack",
405
+ "hidden": true,
429
406
  "name": "stack",
430
407
  "hasDynamicHelp": false,
431
408
  "multiple": false,
@@ -440,6 +417,7 @@
440
417
  "exclusive": [
441
418
  "organization-id"
442
419
  ],
420
+ "hidden": true,
443
421
  "name": "project-id",
444
422
  "hasDynamicHelp": false,
445
423
  "multiple": false,
@@ -455,45 +433,35 @@
455
433
  "exclusive": [
456
434
  "project-id"
457
435
  ],
436
+ "hidden": true,
458
437
  "name": "organization-id",
459
438
  "hasDynamicHelp": false,
460
439
  "multiple": false,
461
440
  "type": "option"
462
441
  },
463
- "message": {
464
- "char": "m",
465
- "description": "Message describing the deployment (e.g. reason for change)",
466
- "name": "message",
442
+ "host": {
443
+ "char": "h",
444
+ "description": "The local network interface at which to listen. [default: \"localhost\"]",
445
+ "name": "host",
446
+ "required": false,
467
447
  "hasDynamicHelp": false,
468
448
  "multiple": false,
469
449
  "type": "option"
470
450
  },
471
- "fn-installer": {
472
- "aliases": [
473
- "function-installer",
474
- "installer"
475
- ],
476
- "description": "Which package manager to use when installing Function dependencies",
477
- "hidden": true,
478
- "name": "fn-installer",
451
+ "port": {
452
+ "char": "p",
453
+ "description": "TCP port to start emulator on. [default: 8080]",
454
+ "name": "port",
455
+ "required": false,
479
456
  "hasDynamicHelp": false,
480
457
  "multiple": false,
481
- "options": [
482
- "npm",
483
- "pnpm",
484
- "yarn"
485
- ],
486
458
  "type": "option"
487
459
  },
488
- "no-wait": {
489
- "description": "Do not wait for Stack deployment to complete",
490
- "name": "no-wait",
491
- "allowNo": false,
492
- "type": "boolean"
493
- },
494
- "new-stack-name": {
495
- "description": "Set a new name for the Stack",
496
- "name": "new-stack-name",
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,
497
465
  "hasDynamicHelp": false,
498
466
  "multiple": false,
499
467
  "type": "option"
@@ -501,32 +469,39 @@
501
469
  },
502
470
  "hasDynamicHelp": false,
503
471
  "hiddenAliases": [],
504
- "id": "blueprints:deploy",
472
+ "id": "functions:dev",
505
473
  "pluginAlias": "@sanity/runtime-cli",
506
474
  "pluginName": "@sanity/runtime-cli",
507
475
  "pluginType": "core",
508
476
  "strict": true,
509
- "summary": "Deploy the local Blueprint to the remote Stack",
477
+ "summary": "Start the Sanity Function emulator",
510
478
  "enableJsonFlag": true,
511
479
  "needs": [
512
- "deployedStack",
513
480
  "blueprint"
514
481
  ],
515
482
  "isESM": true,
516
483
  "relativePath": [
517
484
  "dist",
518
485
  "commands",
519
- "blueprints",
520
- "deploy.js"
486
+ "functions",
487
+ "dev.js"
521
488
  ]
522
489
  },
523
- "blueprints:destroy": {
490
+ "functions:logs": {
524
491
  "aliases": [],
525
- "args": {},
526
- "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).",
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).",
527
500
  "examples": [
528
- "<%= config.bin %> <%= command.id %>",
529
- "<%= config.bin %> <%= command.id %> --stack <name-or-id> --project-id <projectId> --force --no-wait"
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"
530
505
  ],
531
506
  "flags": {
532
507
  "json": {
@@ -570,11 +545,7 @@
570
545
  "type": "boolean"
571
546
  },
572
547
  "stack": {
573
- "aliases": [
574
- "stack-id",
575
- "stackId"
576
- ],
577
- "description": "Stack name or ID to destroy (defaults to the locally configured Stack)",
548
+ "description": "Stack name or ID to use instead of the locally configured Stack",
578
549
  "name": "stack",
579
550
  "hasDynamicHelp": false,
580
551
  "multiple": false,
@@ -585,14 +556,11 @@
585
556
  "project",
586
557
  "projectId"
587
558
  ],
588
- "dependsOn": [
589
- "stack",
590
- "force"
591
- ],
592
559
  "description": "Sanity project ID used to scope Blueprint and Stack",
593
560
  "exclusive": [
594
561
  "organization-id"
595
562
  ],
563
+ "hidden": true,
596
564
  "name": "project-id",
597
565
  "hasDynamicHelp": false,
598
566
  "multiple": false,
@@ -604,62 +572,104 @@
604
572
  "organizationId",
605
573
  "org"
606
574
  ],
607
- "dependsOn": [
608
- "stack",
609
- "force"
610
- ],
611
575
  "description": "Sanity organization ID used to scope Blueprint and Stack",
612
576
  "exclusive": [
613
577
  "project-id"
614
578
  ],
579
+ "hidden": true,
615
580
  "name": "organization-id",
616
581
  "hasDynamicHelp": false,
617
582
  "multiple": false,
618
583
  "type": "option"
619
584
  },
620
- "force": {
621
- "aliases": [
622
- "f"
623
- ],
624
- "description": "Force Stack destruction (skip confirmation)",
625
- "name": "force",
626
- "allowNo": false,
627
- "type": "boolean"
628
- },
629
- "no-wait": {
630
- "description": "Do not wait for Stack destruction to complete",
631
- "name": "no-wait",
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
+ "force": {
616
+ "char": "f",
617
+ "dependsOn": [
618
+ "delete"
619
+ ],
620
+ "description": "Skip confirmation for deleting logs",
621
+ "name": "force",
622
+ "required": false,
623
+ "allowNo": false,
624
+ "type": "boolean"
625
+ },
626
+ "watch": {
627
+ "aliases": [
628
+ "follow"
629
+ ],
630
+ "char": "w",
631
+ "description": "Watch for new logs (streaming mode)",
632
+ "name": "watch",
632
633
  "allowNo": false,
633
634
  "type": "boolean"
634
635
  }
635
636
  },
636
637
  "hasDynamicHelp": false,
637
638
  "hiddenAliases": [],
638
- "id": "blueprints:destroy",
639
+ "id": "functions:logs",
639
640
  "pluginAlias": "@sanity/runtime-cli",
640
641
  "pluginName": "@sanity/runtime-cli",
641
642
  "pluginType": "core",
642
643
  "strict": true,
643
- "summary": "Destroy a remote Stack deployment and its resources",
644
+ "summary": "Retrieve or delete logs for a Sanity Function",
644
645
  "enableJsonFlag": true,
645
646
  "needs": [
646
- "scope"
647
+ "deployedStack",
648
+ "blueprint"
647
649
  ],
648
650
  "isESM": true,
649
651
  "relativePath": [
650
652
  "dist",
651
653
  "commands",
652
- "blueprints",
653
- "destroy.js"
654
+ "functions",
655
+ "logs.js"
654
656
  ]
655
657
  },
656
- "blueprints:doctor": {
658
+ "functions:test": {
657
659
  "aliases": [],
658
- "args": {},
659
- "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.",
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.",
660
668
  "examples": [
661
- "<%= config.bin %> <%= command.id %>",
662
- "<%= config.bin %> <%= command.id %> --fix"
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\" }'"
663
673
  ],
664
674
  "flags": {
665
675
  "json": {
@@ -672,67 +682,321 @@
672
682
  "aliases": [
673
683
  "blueprint-path"
674
684
  ],
675
- "char": "p",
676
- "description": "Path to a Blueprint file or directory containing one",
677
- "env": "SANITY_BLUEPRINT_PATH",
678
- "name": "path",
685
+ "char": "p",
686
+ "description": "Path to a Blueprint file or directory containing one",
687
+ "env": "SANITY_BLUEPRINT_PATH",
688
+ "hidden": true,
689
+ "name": "path",
690
+ "hasDynamicHelp": false,
691
+ "multiple": false,
692
+ "type": "option"
693
+ },
694
+ "trace": {
695
+ "description": "Trace output",
696
+ "hidden": true,
697
+ "name": "trace",
698
+ "allowNo": false,
699
+ "type": "boolean"
700
+ },
701
+ "validate-resources": {
702
+ "description": "Validate resources",
703
+ "hidden": true,
704
+ "name": "validate-resources",
705
+ "allowNo": true,
706
+ "type": "boolean"
707
+ },
708
+ "verbose": {
709
+ "description": "Verbose output",
710
+ "hidden": true,
711
+ "name": "verbose",
712
+ "allowNo": false,
713
+ "type": "boolean"
714
+ },
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"
722
+ },
723
+ "project-id": {
724
+ "aliases": [
725
+ "project",
726
+ "projectId"
727
+ ],
728
+ "description": "Sanity project ID used to scope Blueprint and Stack",
729
+ "exclusive": [
730
+ "organization-id"
731
+ ],
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,
679
953
  "hasDynamicHelp": false,
680
954
  "multiple": false,
681
955
  "type": "option"
682
- },
683
- "trace": {
684
- "description": "Trace output",
685
- "hidden": true,
686
- "name": "trace",
687
- "allowNo": false,
688
- "type": "boolean"
689
- },
690
- "validate-resources": {
691
- "description": "Validate resources",
692
- "hidden": true,
693
- "name": "validate-resources",
694
- "allowNo": true,
695
- "type": "boolean"
696
- },
697
- "verbose": {
698
- "description": "Verbose output; defaults to true",
699
- "name": "verbose",
700
- "allowNo": true,
701
- "type": "boolean"
702
- },
703
- "fix": {
704
- "description": "Interactively fix configuration issues",
705
- "name": "fix",
706
- "allowNo": false,
707
- "type": "boolean"
708
956
  }
709
957
  },
710
958
  "hasDynamicHelp": false,
711
959
  "hiddenAliases": [],
712
- "id": "blueprints:doctor",
960
+ "id": "functions:test",
713
961
  "pluginAlias": "@sanity/runtime-cli",
714
962
  "pluginName": "@sanity/runtime-cli",
715
963
  "pluginType": "core",
716
964
  "strict": true,
717
- "summary": "Diagnose potential issues with local Blueprint and remote Stack configuration",
965
+ "summary": "Invoke a local Sanity Function",
718
966
  "enableJsonFlag": true,
967
+ "needs": [
968
+ "blueprint"
969
+ ],
719
970
  "isESM": true,
720
971
  "relativePath": [
721
972
  "dist",
722
973
  "commands",
723
- "blueprints",
724
- "doctor.js"
974
+ "functions",
975
+ "test.js"
725
976
  ]
726
977
  },
727
- "blueprints:info": {
978
+ "blueprints:add": {
728
979
  "aliases": [],
729
- "args": {},
730
- "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.",
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",
731
994
  "examples": [
732
- "<%= config.bin %> <%= command.id %>",
733
- "<%= config.bin %> <%= command.id %> --stack <name-or-id>",
734
- "<%= config.bin %> <%= command.id %> --project-id <id> --stack <name-or-id>",
735
- "<%= config.bin %> <%= command.id %> --organization-id <orgId> --stack <name-or-id>"
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"
736
1000
  ],
737
1001
  "flags": {
738
1002
  "json": {
@@ -776,10 +1040,8 @@
776
1040
  "type": "boolean"
777
1041
  },
778
1042
  "stack": {
779
- "aliases": [
780
- "id"
781
- ],
782
- "description": "Stack name or ID",
1043
+ "description": "Stack name or ID to use instead of the locally configured Stack",
1044
+ "hidden": true,
783
1045
  "name": "stack",
784
1046
  "hasDynamicHelp": false,
785
1047
  "multiple": false,
@@ -794,6 +1056,7 @@
794
1056
  "exclusive": [
795
1057
  "organization-id"
796
1058
  ],
1059
+ "hidden": true,
797
1060
  "name": "project-id",
798
1061
  "hasDynamicHelp": false,
799
1062
  "multiple": false,
@@ -809,52 +1072,159 @@
809
1072
  "exclusive": [
810
1073
  "project-id"
811
1074
  ],
1075
+ "hidden": true,
812
1076
  "name": "organization-id",
813
1077
  "hasDynamicHelp": false,
814
1078
  "multiple": false,
815
1079
  "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"
816
1196
  }
817
1197
  },
818
1198
  "hasDynamicHelp": false,
819
1199
  "hiddenAliases": [],
820
- "id": "blueprints:info",
1200
+ "id": "blueprints:add",
821
1201
  "pluginAlias": "@sanity/runtime-cli",
822
1202
  "pluginName": "@sanity/runtime-cli",
823
1203
  "pluginType": "core",
1204
+ "state": "deprecated",
824
1205
  "strict": true,
825
- "summary": "Display the status and resources of the remote Stack deployment",
1206
+ "summary": "[deprecated] Use \"functions add\" instead",
826
1207
  "enableJsonFlag": true,
827
1208
  "needs": [
828
- "deployedStack"
1209
+ "blueprint"
829
1210
  ],
830
1211
  "isESM": true,
831
1212
  "relativePath": [
832
1213
  "dist",
833
1214
  "commands",
834
1215
  "blueprints",
835
- "info.js"
1216
+ "add.js"
836
1217
  ]
837
1218
  },
838
- "blueprints:init": {
1219
+ "blueprints:config": {
839
1220
  "aliases": [],
840
- "args": {
841
- "dir": {
842
- "description": "Directory to create the local Blueprint in (defaults to the current directory)",
843
- "name": "dir"
844
- }
845
- },
846
- "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.",
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.",
847
1223
  "examples": [
848
1224
  "<%= config.bin %> <%= command.id %>",
849
- "<%= config.bin %> <%= command.id %> .",
850
- "<%= config.bin %> <%= command.id %> [directory]",
851
- "<%= config.bin %> <%= command.id %> --blueprint-type <json|js|ts>",
852
- "<%= config.bin %> <%= command.id %> --organization-id <organizationId>",
853
- "<%= config.bin %> <%= command.id %> --project-id <projectId>",
854
- "<%= config.bin %> <%= command.id %> --stack-name <newStackName>",
855
- "<%= config.bin %> <%= command.id %> --stack-id <existingStackId>",
856
- "<%= config.bin %> <%= command.id %> new-stack --type <json|js|ts> --org <organizationId> --name <newStackName>",
857
- "<%= config.bin %> <%= command.id %> old-stack --type <json|js|ts> --project-id <projectId> --stack-id <existingStackId>"
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>"
858
1228
  ],
859
1229
  "flags": {
860
1230
  "json": {
@@ -888,50 +1258,27 @@
888
1258
  "hidden": true,
889
1259
  "name": "validate-resources",
890
1260
  "allowNo": true,
891
- "type": "boolean"
892
- },
893
- "verbose": {
894
- "description": "Verbose output",
895
- "hidden": true,
896
- "name": "verbose",
897
- "allowNo": false,
898
- "type": "boolean"
899
- },
900
- "dir": {
901
- "description": "Directory to create the local Blueprint in",
902
- "name": "dir",
903
- "hasDynamicHelp": false,
904
- "multiple": false,
905
- "type": "option"
906
- },
907
- "example": {
908
- "aliases": [
909
- "recipe"
910
- ],
911
- "description": "Example to use for the local Blueprint",
912
- "exclusive": [
913
- "blueprint-type",
914
- "stack-id",
915
- "stack-name"
916
- ],
917
- "name": "example",
918
- "hasDynamicHelp": false,
919
- "multiple": false,
920
- "type": "option"
1261
+ "type": "boolean"
921
1262
  },
922
- "blueprint-type": {
1263
+ "verbose": {
1264
+ "description": "Verbose output",
1265
+ "hidden": true,
1266
+ "name": "verbose",
1267
+ "allowNo": false,
1268
+ "type": "boolean"
1269
+ },
1270
+ "stack": {
923
1271
  "aliases": [
924
- "type"
1272
+ "stack-id",
1273
+ "stackId"
925
1274
  ],
926
- "description": "Blueprint manifest type to use for the local Blueprint",
927
- "name": "blueprint-type",
1275
+ "dependsOn": [
1276
+ "edit"
1277
+ ],
1278
+ "description": "Stack name or ID to set in the configuration. Requires --edit flag",
1279
+ "name": "stack",
928
1280
  "hasDynamicHelp": false,
929
1281
  "multiple": false,
930
- "options": [
931
- "json",
932
- "js",
933
- "ts"
934
- ],
935
1282
  "type": "option"
936
1283
  },
937
1284
  "project-id": {
@@ -939,6 +1286,9 @@
939
1286
  "project",
940
1287
  "projectId"
941
1288
  ],
1289
+ "dependsOn": [
1290
+ "edit"
1291
+ ],
942
1292
  "description": "Sanity project ID used to scope Blueprint and Stack",
943
1293
  "exclusive": [
944
1294
  "organization-id"
@@ -954,6 +1304,9 @@
954
1304
  "organizationId",
955
1305
  "org"
956
1306
  ],
1307
+ "dependsOn": [
1308
+ "edit"
1309
+ ],
957
1310
  "description": "Sanity organization ID used to scope Blueprint and Stack",
958
1311
  "exclusive": [
959
1312
  "project-id"
@@ -963,79 +1316,47 @@
963
1316
  "multiple": false,
964
1317
  "type": "option"
965
1318
  },
966
- "stack-id": {
967
- "aliases": [
968
- "stackId"
969
- ],
970
- "description": "Existing Stack ID used to scope local Blueprint",
971
- "exclusive": [
972
- "stack-name"
973
- ],
974
- "name": "stack-id",
975
- "relationships": [
976
- {
977
- "type": "some",
978
- "flags": [
979
- "project-id",
980
- "organization-id"
981
- ]
982
- }
983
- ],
984
- "hasDynamicHelp": false,
985
- "multiple": false,
986
- "type": "option"
987
- },
988
- "stack-name": {
989
- "aliases": [
990
- "name"
991
- ],
992
- "description": "Name to use for a new Stack provisioned during initialization",
993
- "exclusive": [
994
- "stack-id"
995
- ],
996
- "name": "stack-name",
997
- "relationships": [
998
- {
999
- "type": "some",
1000
- "flags": [
1001
- "project-id",
1002
- "organization-id"
1003
- ]
1004
- }
1005
- ],
1006
- "hasDynamicHelp": false,
1007
- "multiple": false,
1008
- "type": "option"
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"
1009
1325
  }
1010
1326
  },
1011
1327
  "hasDynamicHelp": false,
1012
1328
  "hiddenAliases": [],
1013
- "id": "blueprints:init",
1329
+ "id": "blueprints:config",
1014
1330
  "pluginAlias": "@sanity/runtime-cli",
1015
1331
  "pluginName": "@sanity/runtime-cli",
1016
1332
  "pluginType": "core",
1017
1333
  "strict": true,
1018
- "summary": "Initialize a Blueprint and create a remote Stack",
1334
+ "summary": "View or edit the local Blueprint configuration",
1019
1335
  "enableJsonFlag": true,
1336
+ "needs": [
1337
+ "token",
1338
+ "blueprint"
1339
+ ],
1020
1340
  "isESM": true,
1021
1341
  "relativePath": [
1022
1342
  "dist",
1023
1343
  "commands",
1024
1344
  "blueprints",
1025
- "init.js"
1345
+ "config.js"
1026
1346
  ]
1027
1347
  },
1028
- "blueprints:logs": {
1348
+ "blueprints:deploy": {
1029
1349
  "aliases": [],
1030
1350
  "args": {},
1031
- "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'.",
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).",
1032
1352
  "examples": [
1033
1353
  "<%= config.bin %> <%= command.id %>",
1034
- "<%= config.bin %> <%= command.id %> --watch",
1354
+ "<%= config.bin %> <%= command.id %> --message \"Enable staging dataset\"",
1355
+ "<%= config.bin %> <%= command.id %> --no-wait",
1356
+ "<%= config.bin %> <%= command.id %> --fn-installer npm",
1035
1357
  "<%= config.bin %> <%= command.id %> --stack <name-or-id>",
1036
- "<%= config.bin %> <%= command.id %> --limit 500",
1037
- "<%= config.bin %> <%= command.id %> --since 2026-05-01T00:00:00Z",
1038
- "<%= config.bin %> <%= command.id %> --before 2026-05-01T00:00:00Z"
1358
+ "<%= config.bin %> <%= command.id %> --organization-id <orgId> --stack <name-or-id>",
1359
+ "<%= config.bin %> <%= command.id %> --new-stack-name <new-name>"
1039
1360
  ],
1040
1361
  "flags": {
1041
1362
  "json": {
@@ -1114,43 +1435,40 @@
1114
1435
  "multiple": false,
1115
1436
  "type": "option"
1116
1437
  },
1117
- "watch": {
1118
- "aliases": [
1119
- "follow"
1120
- ],
1121
- "char": "w",
1122
- "description": "Watch for new Stack logs",
1123
- "name": "watch",
1124
- "allowNo": false,
1125
- "type": "boolean"
1126
- },
1127
- "limit": {
1128
- "char": "l",
1129
- "description": "Maximum number of log entries to retrieve (1-500)",
1130
- "exclusive": [
1131
- "watch"
1132
- ],
1133
- "name": "limit",
1438
+ "message": {
1439
+ "char": "m",
1440
+ "description": "Message describing the deployment (e.g. reason for change)",
1441
+ "name": "message",
1134
1442
  "hasDynamicHelp": false,
1135
1443
  "multiple": false,
1136
1444
  "type": "option"
1137
1445
  },
1138
- "since": {
1139
- "description": "Only show logs after this ISO 8601 timestamp",
1140
- "exclusive": [
1141
- "watch"
1446
+ "fn-installer": {
1447
+ "aliases": [
1448
+ "function-installer",
1449
+ "installer"
1142
1450
  ],
1143
- "name": "since",
1451
+ "description": "Which package manager to use when installing Function dependencies",
1452
+ "hidden": true,
1453
+ "name": "fn-installer",
1144
1454
  "hasDynamicHelp": false,
1145
1455
  "multiple": false,
1456
+ "options": [
1457
+ "npm",
1458
+ "pnpm",
1459
+ "yarn"
1460
+ ],
1146
1461
  "type": "option"
1147
1462
  },
1148
- "before": {
1149
- "description": "Only show logs before this ISO 8601 timestamp",
1150
- "exclusive": [
1151
- "watch"
1152
- ],
1153
- "name": "before",
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",
1154
1472
  "hasDynamicHelp": false,
1155
1473
  "multiple": false,
1156
1474
  "type": "option"
@@ -1158,36 +1476,32 @@
1158
1476
  },
1159
1477
  "hasDynamicHelp": false,
1160
1478
  "hiddenAliases": [],
1161
- "id": "blueprints:logs",
1479
+ "id": "blueprints:deploy",
1162
1480
  "pluginAlias": "@sanity/runtime-cli",
1163
1481
  "pluginName": "@sanity/runtime-cli",
1164
1482
  "pluginType": "core",
1165
1483
  "strict": true,
1166
- "summary": "Display logs for the current Blueprint's Stack deployment",
1484
+ "summary": "Deploy the local Blueprint to the remote Stack",
1167
1485
  "enableJsonFlag": true,
1168
1486
  "needs": [
1169
- "deployedStack"
1487
+ "deployedStack",
1488
+ "blueprint"
1170
1489
  ],
1171
1490
  "isESM": true,
1172
1491
  "relativePath": [
1173
1492
  "dist",
1174
1493
  "commands",
1175
1494
  "blueprints",
1176
- "logs.js"
1495
+ "deploy.js"
1177
1496
  ]
1178
1497
  },
1179
- "blueprints:mint-deploy-token": {
1498
+ "blueprints:destroy": {
1180
1499
  "aliases": [],
1181
1500
  "args": {},
1182
- "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.",
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).",
1183
1502
  "examples": [
1184
1503
  "<%= config.bin %> <%= command.id %>",
1185
- "<%= config.bin %> <%= command.id %> --label \"ci-deploy\"",
1186
- "<%= config.bin %> <%= command.id %> --print",
1187
- "export SANITY_AUTH_TOKEN=$(<%= config.bin %> <%= command.id %> --print)",
1188
- "<%= config.bin %> <%= command.id %> --json",
1189
- "<%= config.bin %> <%= command.id %> --project-id <projectId>",
1190
- "<%= config.bin %> <%= command.id %> --organization-id <orgId>"
1504
+ "<%= config.bin %> <%= command.id %> --stack <name-or-id> --project-id <projectId> --force --no-wait"
1191
1505
  ],
1192
1506
  "flags": {
1193
1507
  "json": {
@@ -1231,8 +1545,11 @@
1231
1545
  "type": "boolean"
1232
1546
  },
1233
1547
  "stack": {
1234
- "description": "Stack name or ID to use instead of the locally configured Stack",
1235
- "hidden": true,
1548
+ "aliases": [
1549
+ "stack-id",
1550
+ "stackId"
1551
+ ],
1552
+ "description": "Stack name or ID to destroy (defaults to the locally configured Stack)",
1236
1553
  "name": "stack",
1237
1554
  "hasDynamicHelp": false,
1238
1555
  "multiple": false,
@@ -1243,6 +1560,10 @@
1243
1560
  "project",
1244
1561
  "projectId"
1245
1562
  ],
1563
+ "dependsOn": [
1564
+ "stack",
1565
+ "force"
1566
+ ],
1246
1567
  "description": "Sanity project ID used to scope Blueprint and Stack",
1247
1568
  "exclusive": [
1248
1569
  "organization-id"
@@ -1258,6 +1579,10 @@
1258
1579
  "organizationId",
1259
1580
  "org"
1260
1581
  ],
1582
+ "dependsOn": [
1583
+ "stack",
1584
+ "force"
1585
+ ],
1261
1586
  "description": "Sanity organization ID used to scope Blueprint and Stack",
1262
1587
  "exclusive": [
1263
1588
  "project-id"
@@ -1267,32 +1592,30 @@
1267
1592
  "multiple": false,
1268
1593
  "type": "option"
1269
1594
  },
1270
- "label": {
1271
- "description": "Human-readable label for the robot. Defaults to a generated value.",
1272
- "name": "label",
1273
- "hasDynamicHelp": false,
1274
- "multiple": false,
1275
- "type": "option"
1276
- },
1277
- "print": {
1278
- "char": "P",
1279
- "description": "Print only the raw token to stdout (suitable for shell substitution)",
1280
- "exclusive": [
1281
- "json"
1595
+ "force": {
1596
+ "aliases": [
1597
+ "f"
1282
1598
  ],
1283
- "name": "print",
1599
+ "description": "Force Stack destruction (skip confirmation)",
1600
+ "name": "force",
1601
+ "allowNo": false,
1602
+ "type": "boolean"
1603
+ },
1604
+ "no-wait": {
1605
+ "description": "Do not wait for Stack destruction to complete",
1606
+ "name": "no-wait",
1284
1607
  "allowNo": false,
1285
1608
  "type": "boolean"
1286
1609
  }
1287
1610
  },
1288
1611
  "hasDynamicHelp": false,
1289
1612
  "hiddenAliases": [],
1290
- "id": "blueprints:mint-deploy-token",
1613
+ "id": "blueprints:destroy",
1291
1614
  "pluginAlias": "@sanity/runtime-cli",
1292
1615
  "pluginName": "@sanity/runtime-cli",
1293
1616
  "pluginType": "core",
1294
1617
  "strict": true,
1295
- "summary": "Create a robot API token for deploying Blueprints from CI/CD",
1618
+ "summary": "Destroy a remote Stack deployment and its resources",
1296
1619
  "enableJsonFlag": true,
1297
1620
  "needs": [
1298
1621
  "scope"
@@ -1302,17 +1625,16 @@
1302
1625
  "dist",
1303
1626
  "commands",
1304
1627
  "blueprints",
1305
- "mint-deploy-token.js"
1628
+ "destroy.js"
1306
1629
  ]
1307
1630
  },
1308
- "blueprints:plan": {
1631
+ "blueprints:doctor": {
1309
1632
  "aliases": [],
1310
1633
  "args": {},
1311
- "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.",
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.",
1312
1635
  "examples": [
1313
1636
  "<%= config.bin %> <%= command.id %>",
1314
- "<%= config.bin %> <%= command.id %> --stack <name-or-id>",
1315
- "<%= config.bin %> <%= command.id %> --organization-id <orgId> --stack <name-or-id>"
1637
+ "<%= config.bin %> <%= command.id %> --fix"
1316
1638
  ],
1317
1639
  "flags": {
1318
1640
  "json": {
@@ -1328,7 +1650,6 @@
1328
1650
  "char": "p",
1329
1651
  "description": "Path to a Blueprint file or directory containing one",
1330
1652
  "env": "SANITY_BLUEPRINT_PATH",
1331
- "hidden": true,
1332
1653
  "name": "path",
1333
1654
  "hasDynamicHelp": false,
1334
1655
  "multiple": false,
@@ -1349,79 +1670,44 @@
1349
1670
  "type": "boolean"
1350
1671
  },
1351
1672
  "verbose": {
1352
- "description": "Verbose output",
1353
- "hidden": true,
1673
+ "description": "Verbose output; defaults to true",
1354
1674
  "name": "verbose",
1355
- "allowNo": false,
1356
- "type": "boolean"
1357
- },
1358
- "stack": {
1359
- "description": "Stack name or ID to use instead of the locally configured Stack",
1360
- "name": "stack",
1361
- "hasDynamicHelp": false,
1362
- "multiple": false,
1363
- "type": "option"
1364
- },
1365
- "project-id": {
1366
- "aliases": [
1367
- "project",
1368
- "projectId"
1369
- ],
1370
- "description": "Sanity project ID used to scope Blueprint and Stack",
1371
- "exclusive": [
1372
- "organization-id"
1373
- ],
1374
- "name": "project-id",
1375
- "hasDynamicHelp": false,
1376
- "multiple": false,
1377
- "type": "option"
1675
+ "allowNo": true,
1676
+ "type": "boolean"
1378
1677
  },
1379
- "organization-id": {
1380
- "aliases": [
1381
- "organization",
1382
- "organizationId",
1383
- "org"
1384
- ],
1385
- "description": "Sanity organization ID used to scope Blueprint and Stack",
1386
- "exclusive": [
1387
- "project-id"
1388
- ],
1389
- "name": "organization-id",
1390
- "hasDynamicHelp": false,
1391
- "multiple": false,
1392
- "type": "option"
1678
+ "fix": {
1679
+ "description": "Interactively fix configuration issues",
1680
+ "name": "fix",
1681
+ "allowNo": false,
1682
+ "type": "boolean"
1393
1683
  }
1394
1684
  },
1395
1685
  "hasDynamicHelp": false,
1396
1686
  "hiddenAliases": [],
1397
- "id": "blueprints:plan",
1687
+ "id": "blueprints:doctor",
1398
1688
  "pluginAlias": "@sanity/runtime-cli",
1399
1689
  "pluginName": "@sanity/runtime-cli",
1400
1690
  "pluginType": "core",
1401
1691
  "strict": true,
1402
- "summary": "Preview changes that will be applied to the remote Stack",
1692
+ "summary": "Diagnose potential issues with local Blueprint and remote Stack configuration",
1403
1693
  "enableJsonFlag": true,
1404
- "needs": [
1405
- "token",
1406
- "blueprint"
1407
- ],
1408
1694
  "isESM": true,
1409
1695
  "relativePath": [
1410
1696
  "dist",
1411
1697
  "commands",
1412
1698
  "blueprints",
1413
- "plan.js"
1699
+ "doctor.js"
1414
1700
  ]
1415
1701
  },
1416
- "blueprints:promote": {
1702
+ "blueprints:info": {
1417
1703
  "aliases": [],
1418
1704
  "args": {},
1419
- "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.",
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.",
1420
1706
  "examples": [
1421
1707
  "<%= config.bin %> <%= command.id %>",
1422
1708
  "<%= config.bin %> <%= command.id %> --stack <name-or-id>",
1423
- "<%= config.bin %> <%= command.id %> --project-id <projectId> --stack <name-or-id>",
1424
- "<%= config.bin %> <%= command.id %> --new-stack-name <new-name>"
1709
+ "<%= config.bin %> <%= command.id %> --project-id <id> --stack <name-or-id>",
1710
+ "<%= config.bin %> <%= command.id %> --organization-id <orgId> --stack <name-or-id>"
1425
1711
  ],
1426
1712
  "flags": {
1427
1713
  "json": {
@@ -1468,7 +1754,7 @@
1468
1754
  "aliases": [
1469
1755
  "id"
1470
1756
  ],
1471
- "description": "Stack name or ID to promote",
1757
+ "description": "Stack name or ID",
1472
1758
  "name": "stack",
1473
1759
  "hasDynamicHelp": false,
1474
1760
  "multiple": false,
@@ -1498,56 +1784,52 @@
1498
1784
  "exclusive": [
1499
1785
  "project-id"
1500
1786
  ],
1501
- "hidden": true,
1502
1787
  "name": "organization-id",
1503
1788
  "hasDynamicHelp": false,
1504
1789
  "multiple": false,
1505
1790
  "type": "option"
1506
- },
1507
- "force": {
1508
- "description": "Skip confirmation prompt",
1509
- "name": "force",
1510
- "allowNo": false,
1511
- "type": "boolean"
1512
- },
1513
- "new-stack-name": {
1514
- "description": "Set a new name for the Stack while promoting",
1515
- "name": "new-stack-name",
1516
- "hasDynamicHelp": false,
1517
- "multiple": false,
1518
- "type": "option"
1519
1791
  }
1520
1792
  },
1521
1793
  "hasDynamicHelp": false,
1522
1794
  "hiddenAliases": [],
1523
- "id": "blueprints:promote",
1795
+ "id": "blueprints:info",
1524
1796
  "pluginAlias": "@sanity/runtime-cli",
1525
1797
  "pluginName": "@sanity/runtime-cli",
1526
1798
  "pluginType": "core",
1527
1799
  "strict": true,
1528
- "summary": "Promote a Stack from project scope to organization scope",
1800
+ "summary": "Display the status and resources of the remote Stack deployment",
1529
1801
  "enableJsonFlag": true,
1530
1802
  "needs": [
1531
- "deployedStack",
1532
- "blueprint"
1803
+ "deployedStack"
1533
1804
  ],
1534
1805
  "isESM": true,
1535
1806
  "relativePath": [
1536
1807
  "dist",
1537
1808
  "commands",
1538
1809
  "blueprints",
1539
- "promote.js"
1810
+ "info.js"
1540
1811
  ]
1541
1812
  },
1542
- "blueprints:stacks": {
1813
+ "blueprints:init": {
1543
1814
  "aliases": [],
1544
- "args": {},
1545
- "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.",
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.",
1546
1822
  "examples": [
1547
1823
  "<%= config.bin %> <%= command.id %>",
1548
- "<%= config.bin %> <%= command.id %> --project-id <projectId>",
1824
+ "<%= config.bin %> <%= command.id %> .",
1825
+ "<%= config.bin %> <%= command.id %> [directory]",
1826
+ "<%= config.bin %> <%= command.id %> --blueprint-type <json|js|ts>",
1549
1827
  "<%= config.bin %> <%= command.id %> --organization-id <organizationId>",
1550
- "<%= config.bin %> <%= command.id %> --organization-id <organizationId> --include-projects"
1828
+ "<%= 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>"
1551
1833
  ],
1552
1834
  "flags": {
1553
1835
  "json": {
@@ -1590,12 +1872,41 @@
1590
1872
  "allowNo": false,
1591
1873
  "type": "boolean"
1592
1874
  },
1593
- "stack": {
1594
- "description": "Stack name or ID to use instead of the locally configured Stack",
1595
- "hidden": true,
1596
- "name": "stack",
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",
1597
1903
  "hasDynamicHelp": false,
1598
1904
  "multiple": false,
1905
+ "options": [
1906
+ "json",
1907
+ "js",
1908
+ "ts"
1909
+ ],
1599
1910
  "type": "option"
1600
1911
  },
1601
1912
  "project-id": {
@@ -1605,8 +1916,7 @@
1605
1916
  ],
1606
1917
  "description": "Sanity project ID used to scope Blueprint and Stack",
1607
1918
  "exclusive": [
1608
- "organization-id",
1609
- "include-projects"
1919
+ "organization-id"
1610
1920
  ],
1611
1921
  "name": "project-id",
1612
1922
  "hasDynamicHelp": false,
@@ -1628,46 +1938,79 @@
1628
1938
  "multiple": false,
1629
1939
  "type": "option"
1630
1940
  },
1631
- "include-projects": {
1632
- "dependsOn": [
1633
- "organization-id"
1941
+ "stack-id": {
1942
+ "aliases": [
1943
+ "stackId"
1634
1944
  ],
1635
- "description": "Include Stacks from all projects within the organization. Requires --organization-id.",
1636
- "name": "include-projects",
1637
- "allowNo": false,
1638
- "type": "boolean"
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
+ }
1980
+ ],
1981
+ "hasDynamicHelp": false,
1982
+ "multiple": false,
1983
+ "type": "option"
1639
1984
  }
1640
1985
  },
1641
1986
  "hasDynamicHelp": false,
1642
1987
  "hiddenAliases": [],
1643
- "id": "blueprints:stacks",
1988
+ "id": "blueprints:init",
1644
1989
  "pluginAlias": "@sanity/runtime-cli",
1645
1990
  "pluginName": "@sanity/runtime-cli",
1646
1991
  "pluginType": "core",
1647
1992
  "strict": true,
1648
- "summary": "List remote Stack deployments for your project or organization",
1993
+ "summary": "Initialize a Blueprint and create a remote Stack",
1649
1994
  "enableJsonFlag": true,
1650
- "needs": [
1651
- "scope"
1652
- ],
1653
1995
  "isESM": true,
1654
1996
  "relativePath": [
1655
1997
  "dist",
1656
1998
  "commands",
1657
1999
  "blueprints",
1658
- "stacks.js"
2000
+ "init.js"
1659
2001
  ]
1660
2002
  },
1661
- "functions:add": {
2003
+ "blueprints:logs": {
1662
2004
  "aliases": [],
1663
2005
  "args": {},
1664
- "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.",
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'.",
1665
2007
  "examples": [
1666
2008
  "<%= config.bin %> <%= command.id %>",
1667
- "<%= config.bin %> <%= command.id %> --helpers",
1668
- "<%= config.bin %> <%= command.id %> --name my-function",
1669
- "<%= config.bin %> <%= command.id %> --name my-function --type document-create",
1670
- "<%= config.bin %> <%= command.id %> --name my-function --type document-create --type document-update --lang js"
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"
1671
2014
  ],
1672
2015
  "flags": {
1673
2016
  "json": {
@@ -1712,7 +2055,6 @@
1712
2055
  },
1713
2056
  "stack": {
1714
2057
  "description": "Stack name or ID to use instead of the locally configured Stack",
1715
- "hidden": true,
1716
2058
  "name": "stack",
1717
2059
  "hasDynamicHelp": false,
1718
2060
  "multiple": false,
@@ -1727,7 +2069,6 @@
1727
2069
  "exclusive": [
1728
2070
  "organization-id"
1729
2071
  ],
1730
- "hidden": true,
1731
2072
  "name": "project-id",
1732
2073
  "hasDynamicHelp": false,
1733
2074
  "multiple": false,
@@ -1743,145 +2084,86 @@
1743
2084
  "exclusive": [
1744
2085
  "project-id"
1745
2086
  ],
1746
- "hidden": true,
1747
2087
  "name": "organization-id",
1748
2088
  "hasDynamicHelp": false,
1749
2089
  "multiple": false,
1750
2090
  "type": "option"
1751
2091
  },
1752
- "example": {
1753
- "aliases": [
1754
- "recipe"
1755
- ],
1756
- "description": "Example to use for the Function",
1757
- "exclusive": [
1758
- "name",
1759
- "fn-type",
1760
- "language",
1761
- "javascript",
1762
- "fn-helpers",
1763
- "fn-installer"
1764
- ],
1765
- "name": "example",
1766
- "hasDynamicHelp": false,
1767
- "multiple": false,
1768
- "type": "option"
1769
- },
1770
- "name": {
1771
- "char": "n",
1772
- "description": "Name of the Function to add",
1773
- "name": "name",
1774
- "hasDynamicHelp": false,
1775
- "multiple": false,
1776
- "type": "option"
1777
- },
1778
- "type": {
1779
- "dependsOn": [
1780
- "name"
1781
- ],
1782
- "description": "Document change event(s) that should trigger the function; you can specify multiple events by specifying this flag multiple times",
1783
- "name": "type",
1784
- "hasDynamicHelp": false,
1785
- "multiple": true,
1786
- "options": [
1787
- "document-publish",
1788
- "document-create",
1789
- "document-delete",
1790
- "document-update",
1791
- "media-library-asset-create",
1792
- "media-library-asset-delete",
1793
- "media-library-asset-update",
1794
- "scheduled-function",
1795
- "sync-tag-invalidate"
1796
- ],
1797
- "type": "option"
1798
- },
1799
- "language": {
1800
- "aliases": [
1801
- "lang"
1802
- ],
1803
- "description": "Language of the new Function",
1804
- "name": "language",
1805
- "default": "ts",
1806
- "hasDynamicHelp": false,
1807
- "multiple": false,
1808
- "options": [
1809
- "ts",
1810
- "js"
1811
- ],
1812
- "type": "option"
1813
- },
1814
- "javascript": {
2092
+ "watch": {
1815
2093
  "aliases": [
1816
- "js"
1817
- ],
1818
- "description": "Use JavaScript instead of TypeScript",
1819
- "exclusive": [
1820
- "language"
2094
+ "follow"
1821
2095
  ],
1822
- "name": "javascript",
2096
+ "char": "w",
2097
+ "description": "Watch for new Stack logs",
2098
+ "name": "watch",
1823
2099
  "allowNo": false,
1824
2100
  "type": "boolean"
1825
2101
  },
1826
- "helpers": {
1827
- "description": "Add helpers to the new Function",
1828
- "name": "helpers",
1829
- "allowNo": true,
1830
- "type": "boolean"
1831
- },
1832
- "installer": {
1833
- "description": "How to install the @sanity/functions helpers",
1834
- "name": "installer",
2102
+ "limit": {
2103
+ "char": "l",
2104
+ "description": "Maximum number of log entries to retrieve (1-500)",
2105
+ "exclusive": [
2106
+ "watch"
2107
+ ],
2108
+ "name": "limit",
1835
2109
  "hasDynamicHelp": false,
1836
2110
  "multiple": false,
1837
- "options": [
1838
- "skip",
1839
- "npm",
1840
- "pnpm",
1841
- "yarn"
2111
+ "type": "option"
2112
+ },
2113
+ "since": {
2114
+ "description": "Only show logs after this ISO 8601 timestamp",
2115
+ "exclusive": [
2116
+ "watch"
1842
2117
  ],
2118
+ "name": "since",
2119
+ "hasDynamicHelp": false,
2120
+ "multiple": false,
1843
2121
  "type": "option"
1844
2122
  },
1845
- "install": {
1846
- "char": "i",
1847
- "description": "Shortcut for --fn-installer npm",
2123
+ "before": {
2124
+ "description": "Only show logs before this ISO 8601 timestamp",
1848
2125
  "exclusive": [
1849
- "fn-installer"
2126
+ "watch"
1850
2127
  ],
1851
- "name": "install",
1852
- "allowNo": false,
1853
- "type": "boolean"
2128
+ "name": "before",
2129
+ "hasDynamicHelp": false,
2130
+ "multiple": false,
2131
+ "type": "option"
1854
2132
  }
1855
2133
  },
1856
2134
  "hasDynamicHelp": false,
1857
2135
  "hiddenAliases": [],
1858
- "id": "functions:add",
2136
+ "id": "blueprints:logs",
1859
2137
  "pluginAlias": "@sanity/runtime-cli",
1860
2138
  "pluginName": "@sanity/runtime-cli",
1861
2139
  "pluginType": "core",
1862
2140
  "strict": true,
1863
- "summary": "Add a Function to your Blueprint",
2141
+ "summary": "Display logs for the current Blueprint's Stack deployment",
1864
2142
  "enableJsonFlag": true,
1865
2143
  "needs": [
1866
- "blueprint"
2144
+ "deployedStack"
1867
2145
  ],
1868
2146
  "isESM": true,
1869
2147
  "relativePath": [
1870
2148
  "dist",
1871
2149
  "commands",
1872
- "functions",
1873
- "add.js"
2150
+ "blueprints",
2151
+ "logs.js"
1874
2152
  ]
1875
2153
  },
1876
- "functions:build": {
2154
+ "blueprints:mint-deploy-token": {
1877
2155
  "aliases": [],
1878
- "args": {
1879
- "name": {
1880
- "description": "The name of the Sanity Function",
1881
- "name": "name",
1882
- "required": false
1883
- }
1884
- },
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
+ ],
1885
2167
  "flags": {
1886
2168
  "json": {
1887
2169
  "description": "Format output as json",
@@ -1940,7 +2222,6 @@
1940
2222
  "exclusive": [
1941
2223
  "organization-id"
1942
2224
  ],
1943
- "hidden": true,
1944
2225
  "name": "project-id",
1945
2226
  "hasDynamicHelp": false,
1946
2227
  "multiple": false,
@@ -1956,66 +2237,57 @@
1956
2237
  "exclusive": [
1957
2238
  "project-id"
1958
2239
  ],
1959
- "hidden": true,
1960
2240
  "name": "organization-id",
1961
2241
  "hasDynamicHelp": false,
1962
2242
  "multiple": false,
1963
2243
  "type": "option"
1964
2244
  },
1965
- "fn-installer": {
1966
- "aliases": [
1967
- "function-installer",
1968
- "installer"
1969
- ],
1970
- "description": "Which package manager to use when building Functions",
1971
- "hidden": true,
1972
- "name": "fn-installer",
2245
+ "label": {
2246
+ "description": "Human-readable label for the robot. Defaults to a generated value.",
2247
+ "name": "label",
1973
2248
  "hasDynamicHelp": false,
1974
2249
  "multiple": false,
1975
- "options": [
1976
- "npm",
1977
- "pnpm",
1978
- "yarn"
1979
- ],
1980
2250
  "type": "option"
1981
2251
  },
1982
- "out-dir": {
1983
- "char": "o",
1984
- "description": "Output directory for zip files",
1985
- "name": "out-dir",
1986
- "hasDynamicHelp": false,
1987
- "multiple": false,
1988
- "type": "option"
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"
1989
2261
  }
1990
2262
  },
1991
2263
  "hasDynamicHelp": false,
1992
- "hidden": true,
1993
2264
  "hiddenAliases": [],
1994
- "id": "functions:build",
2265
+ "id": "blueprints:mint-deploy-token",
1995
2266
  "pluginAlias": "@sanity/runtime-cli",
1996
2267
  "pluginName": "@sanity/runtime-cli",
1997
2268
  "pluginType": "core",
1998
2269
  "strict": true,
1999
- "summary": "Build Sanity Function(s) to zip archives",
2270
+ "summary": "Create a robot API token for deploying Blueprints from CI/CD",
2000
2271
  "enableJsonFlag": true,
2001
2272
  "needs": [
2002
- "blueprint"
2273
+ "scope"
2003
2274
  ],
2004
2275
  "isESM": true,
2005
2276
  "relativePath": [
2006
2277
  "dist",
2007
2278
  "commands",
2008
- "functions",
2009
- "build.js"
2279
+ "blueprints",
2280
+ "mint-deploy-token.js"
2010
2281
  ]
2011
2282
  },
2012
- "functions:dev": {
2283
+ "blueprints:plan": {
2013
2284
  "aliases": [],
2014
2285
  "args": {},
2015
- "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'.",
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.",
2016
2287
  "examples": [
2017
- "<%= config.bin %> <%= command.id %> --host 127.0.0.1 --port 8974",
2018
- "<%= config.bin %> <%= command.id %> --timeout 60"
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>"
2019
2291
  ],
2020
2292
  "flags": {
2021
2293
  "json": {
@@ -2060,7 +2332,6 @@
2060
2332
  },
2061
2333
  "stack": {
2062
2334
  "description": "Stack name or ID to use instead of the locally configured Stack",
2063
- "hidden": true,
2064
2335
  "name": "stack",
2065
2336
  "hasDynamicHelp": false,
2066
2337
  "multiple": false,
@@ -2075,7 +2346,6 @@
2075
2346
  "exclusive": [
2076
2347
  "organization-id"
2077
2348
  ],
2078
- "hidden": true,
2079
2349
  "name": "project-id",
2080
2350
  "hasDynamicHelp": false,
2081
2351
  "multiple": false,
@@ -2091,75 +2361,42 @@
2091
2361
  "exclusive": [
2092
2362
  "project-id"
2093
2363
  ],
2094
- "hidden": true,
2095
2364
  "name": "organization-id",
2096
2365
  "hasDynamicHelp": false,
2097
2366
  "multiple": false,
2098
2367
  "type": "option"
2099
- },
2100
- "host": {
2101
- "char": "h",
2102
- "description": "The local network interface at which to listen. [default: \"localhost\"]",
2103
- "name": "host",
2104
- "required": false,
2105
- "hasDynamicHelp": false,
2106
- "multiple": false,
2107
- "type": "option"
2108
- },
2109
- "port": {
2110
- "char": "p",
2111
- "description": "TCP port to start emulator on. [default: 8080]",
2112
- "name": "port",
2113
- "required": false,
2114
- "hasDynamicHelp": false,
2115
- "multiple": false,
2116
- "type": "option"
2117
- },
2118
- "timeout": {
2119
- "char": "t",
2120
- "description": "Maximum execution time for all functions, in seconds. Takes precedence over function-specific `timeout`",
2121
- "name": "timeout",
2122
- "required": false,
2123
- "hasDynamicHelp": false,
2124
- "multiple": false,
2125
- "type": "option"
2126
2368
  }
2127
2369
  },
2128
2370
  "hasDynamicHelp": false,
2129
2371
  "hiddenAliases": [],
2130
- "id": "functions:dev",
2372
+ "id": "blueprints:plan",
2131
2373
  "pluginAlias": "@sanity/runtime-cli",
2132
2374
  "pluginName": "@sanity/runtime-cli",
2133
2375
  "pluginType": "core",
2134
2376
  "strict": true,
2135
- "summary": "Start the Sanity Function emulator",
2377
+ "summary": "Preview changes that will be applied to the remote Stack",
2136
2378
  "enableJsonFlag": true,
2137
2379
  "needs": [
2380
+ "token",
2138
2381
  "blueprint"
2139
2382
  ],
2140
2383
  "isESM": true,
2141
2384
  "relativePath": [
2142
2385
  "dist",
2143
2386
  "commands",
2144
- "functions",
2145
- "dev.js"
2387
+ "blueprints",
2388
+ "plan.js"
2146
2389
  ]
2147
2390
  },
2148
- "functions:logs": {
2391
+ "blueprints:promote": {
2149
2392
  "aliases": [],
2150
- "args": {
2151
- "name": {
2152
- "description": "The name of the Sanity Function",
2153
- "name": "name",
2154
- "required": false
2155
- }
2156
- },
2157
- "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).",
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.",
2158
2395
  "examples": [
2159
- "<%= config.bin %> <%= command.id %> <name>",
2160
- "<%= config.bin %> <%= command.id %> <name> --json",
2161
- "<%= config.bin %> <%= command.id %> <name> --limit 100",
2162
- "<%= config.bin %> <%= command.id %> <name> --delete"
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>"
2163
2400
  ],
2164
2401
  "flags": {
2165
2402
  "json": {
@@ -2203,7 +2440,10 @@
2203
2440
  "type": "boolean"
2204
2441
  },
2205
2442
  "stack": {
2206
- "description": "Stack name or ID to use instead of the locally configured Stack",
2443
+ "aliases": [
2444
+ "id"
2445
+ ],
2446
+ "description": "Stack name or ID to promote",
2207
2447
  "name": "stack",
2208
2448
  "hasDynamicHelp": false,
2209
2449
  "multiple": false,
@@ -2218,7 +2458,6 @@
2218
2458
  "exclusive": [
2219
2459
  "organization-id"
2220
2460
  ],
2221
- "hidden": true,
2222
2461
  "name": "project-id",
2223
2462
  "hasDynamicHelp": false,
2224
2463
  "multiple": false,
@@ -2240,66 +2479,28 @@
2240
2479
  "multiple": false,
2241
2480
  "type": "option"
2242
2481
  },
2243
- "limit": {
2244
- "char": "l",
2245
- "description": "Total number of log entries to retrieve",
2246
- "name": "limit",
2247
- "required": false,
2248
- "default": 50,
2249
- "hasDynamicHelp": false,
2250
- "multiple": false,
2251
- "type": "option"
2252
- },
2253
- "utc": {
2254
- "char": "u",
2255
- "description": "Show dates in UTC time zone",
2256
- "name": "utc",
2257
- "required": false,
2258
- "allowNo": false,
2259
- "type": "boolean"
2260
- },
2261
- "delete": {
2262
- "char": "d",
2263
- "description": "Delete all logs for the function",
2264
- "exclusive": [
2265
- "limit",
2266
- "json"
2267
- ],
2268
- "name": "delete",
2269
- "required": false,
2270
- "allowNo": false,
2271
- "type": "boolean"
2272
- },
2273
2482
  "force": {
2274
- "char": "f",
2275
- "dependsOn": [
2276
- "delete"
2277
- ],
2278
- "description": "Skip confirmation for deleting logs",
2279
- "name": "force",
2280
- "required": false,
2281
- "allowNo": false,
2282
- "type": "boolean"
2283
- },
2284
- "watch": {
2285
- "aliases": [
2286
- "follow"
2287
- ],
2288
- "char": "w",
2289
- "description": "Watch for new logs (streaming mode)",
2290
- "name": "watch",
2483
+ "description": "Skip confirmation prompt",
2484
+ "name": "force",
2291
2485
  "allowNo": false,
2292
2486
  "type": "boolean"
2487
+ },
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"
2293
2494
  }
2294
2495
  },
2295
2496
  "hasDynamicHelp": false,
2296
2497
  "hiddenAliases": [],
2297
- "id": "functions:logs",
2498
+ "id": "blueprints:promote",
2298
2499
  "pluginAlias": "@sanity/runtime-cli",
2299
2500
  "pluginName": "@sanity/runtime-cli",
2300
2501
  "pluginType": "core",
2301
2502
  "strict": true,
2302
- "summary": "Retrieve or delete logs for a Sanity Function",
2503
+ "summary": "Promote a Stack from project scope to organization scope",
2303
2504
  "enableJsonFlag": true,
2304
2505
  "needs": [
2305
2506
  "deployedStack",
@@ -2309,25 +2510,19 @@
2309
2510
  "relativePath": [
2310
2511
  "dist",
2311
2512
  "commands",
2312
- "functions",
2313
- "logs.js"
2513
+ "blueprints",
2514
+ "promote.js"
2314
2515
  ]
2315
2516
  },
2316
- "functions:test": {
2517
+ "blueprints:stacks": {
2317
2518
  "aliases": [],
2318
- "args": {
2319
- "name": {
2320
- "description": "The name of the Sanity Function",
2321
- "name": "name",
2322
- "required": false
2323
- }
2324
- },
2325
- "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.",
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.",
2326
2521
  "examples": [
2327
- "<%= config.bin %> <%= command.id %> <name> --data '{ \"id\": 1 }'",
2328
- "<%= config.bin %> <%= command.id %> <name> --file 'payload.json'",
2329
- "<%= config.bin %> <%= command.id %> <name> --data '{ \"id\": 1 }' --timeout 60",
2330
- "<%= config.bin %> <%= command.id %> <name> --event update --data-before '{ \"title\": \"before\" }' --data-after '{ \"title\": \"after\" }'"
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"
2331
2526
  ],
2332
2527
  "flags": {
2333
2528
  "json": {
@@ -2385,7 +2580,8 @@
2385
2580
  ],
2386
2581
  "description": "Sanity project ID used to scope Blueprint and Stack",
2387
2582
  "exclusive": [
2388
- "organization-id"
2583
+ "organization-id",
2584
+ "include-projects"
2389
2585
  ],
2390
2586
  "name": "project-id",
2391
2587
  "hasDynamicHelp": false,
@@ -2407,230 +2603,34 @@
2407
2603
  "multiple": false,
2408
2604
  "type": "option"
2409
2605
  },
2410
- "data": {
2411
- "char": "d",
2412
- "description": "Data to send to the function",
2413
- "exclusive": [
2414
- "file",
2415
- "document-id"
2416
- ],
2417
- "name": "data",
2418
- "required": false,
2419
- "hasDynamicHelp": false,
2420
- "multiple": false,
2421
- "type": "option"
2422
- },
2423
- "data-before": {
2424
- "description": "Original document",
2425
- "exclusive": [
2426
- "data",
2427
- "file",
2428
- "document-id",
2429
- "file-before",
2430
- "file-after",
2431
- "document-id-before",
2432
- "document-id-after"
2433
- ],
2434
- "name": "data-before",
2435
- "required": false,
2436
- "hasDynamicHelp": false,
2437
- "multiple": false,
2438
- "type": "option"
2439
- },
2440
- "data-after": {
2441
- "description": "Current document",
2442
- "exclusive": [
2443
- "data",
2444
- "file",
2445
- "document-id",
2446
- "file-before",
2447
- "file-after",
2448
- "document-id-before",
2449
- "document-id-after"
2450
- ],
2451
- "name": "data-after",
2452
- "required": false,
2453
- "hasDynamicHelp": false,
2454
- "multiple": false,
2455
- "type": "option"
2456
- },
2457
- "event": {
2458
- "char": "e",
2459
- "description": "Type of event (create, update, delete)",
2460
- "name": "event",
2461
- "required": false,
2462
- "hasDynamicHelp": false,
2463
- "multiple": false,
2464
- "options": [
2465
- "create",
2466
- "update",
2467
- "delete"
2468
- ],
2469
- "type": "option"
2470
- },
2471
- "file": {
2472
- "char": "f",
2473
- "description": "Read data from file and send to the function",
2474
- "exclusive": [
2475
- "data",
2476
- "document-id"
2477
- ],
2478
- "name": "file",
2479
- "required": false,
2480
- "hasDynamicHelp": false,
2481
- "multiple": false,
2482
- "type": "option"
2483
- },
2484
- "file-before": {
2485
- "description": "Original document",
2486
- "exclusive": [
2487
- "data",
2488
- "file",
2489
- "document-id",
2490
- "data-before",
2491
- "data-after",
2492
- "document-id-before",
2493
- "document-id-after"
2494
- ],
2495
- "name": "file-before",
2496
- "required": false,
2497
- "hasDynamicHelp": false,
2498
- "multiple": false,
2499
- "type": "option"
2500
- },
2501
- "file-after": {
2502
- "description": "Current document",
2503
- "exclusive": [
2504
- "data",
2505
- "file",
2506
- "document-id",
2507
- "data-before",
2508
- "data-after",
2509
- "document-id-before",
2510
- "document-id-after"
2511
- ],
2512
- "name": "file-after",
2513
- "required": false,
2514
- "hasDynamicHelp": false,
2515
- "multiple": false,
2516
- "type": "option"
2517
- },
2518
- "timeout": {
2519
- "char": "t",
2520
- "description": "Execution timeout value in seconds",
2521
- "name": "timeout",
2522
- "required": false,
2523
- "hasDynamicHelp": false,
2524
- "multiple": false,
2525
- "type": "option"
2526
- },
2527
- "api": {
2528
- "char": "a",
2529
- "description": "Sanity API Version to use",
2530
- "name": "api",
2531
- "required": false,
2532
- "hasDynamicHelp": false,
2533
- "multiple": false,
2534
- "type": "option"
2535
- },
2536
- "dataset": {
2537
- "description": "The Sanity dataset to use",
2538
- "name": "dataset",
2539
- "required": false,
2540
- "hasDynamicHelp": false,
2541
- "multiple": false,
2542
- "type": "option"
2543
- },
2544
- "document-id": {
2545
- "aliases": [
2546
- "doc",
2547
- "documentId"
2548
- ],
2549
- "description": "Document to fetch and send to function",
2550
- "exclusive": [
2551
- "data",
2552
- "file"
2553
- ],
2554
- "name": "document-id",
2555
- "required": false,
2556
- "hasDynamicHelp": false,
2557
- "multiple": false,
2558
- "type": "option"
2559
- },
2560
- "document-id-before": {
2561
- "description": "Original document",
2562
- "exclusive": [
2563
- "data",
2564
- "file",
2565
- "document-id",
2566
- "data-before",
2567
- "data-after",
2568
- "file-before",
2569
- "file-after"
2570
- ],
2571
- "name": "document-id-before",
2572
- "required": false,
2573
- "hasDynamicHelp": false,
2574
- "multiple": false,
2575
- "type": "option"
2576
- },
2577
- "document-id-after": {
2578
- "description": "Current document",
2579
- "exclusive": [
2580
- "data",
2581
- "file",
2582
- "document-id",
2583
- "data-before",
2584
- "data-after",
2585
- "file-before",
2586
- "file-after"
2606
+ "include-projects": {
2607
+ "dependsOn": [
2608
+ "organization-id"
2587
2609
  ],
2588
- "name": "document-id-after",
2589
- "required": false,
2590
- "hasDynamicHelp": false,
2591
- "multiple": false,
2592
- "type": "option"
2593
- },
2594
- "with-user-token": {
2595
- "description": "Prime access token from CLI config",
2596
- "name": "with-user-token",
2610
+ "description": "Include Stacks from all projects within the organization. Requires --organization-id.",
2611
+ "name": "include-projects",
2597
2612
  "allowNo": false,
2598
2613
  "type": "boolean"
2599
- },
2600
- "media-library-id": {
2601
- "aliases": [
2602
- "media"
2603
- ],
2604
- "description": "Sanity Media Library ID to use",
2605
- "exclusive": [
2606
- "project-id",
2607
- "dataset"
2608
- ],
2609
- "name": "media-library-id",
2610
- "required": false,
2611
- "hasDynamicHelp": false,
2612
- "multiple": false,
2613
- "type": "option"
2614
2614
  }
2615
2615
  },
2616
2616
  "hasDynamicHelp": false,
2617
2617
  "hiddenAliases": [],
2618
- "id": "functions:test",
2618
+ "id": "blueprints:stacks",
2619
2619
  "pluginAlias": "@sanity/runtime-cli",
2620
2620
  "pluginName": "@sanity/runtime-cli",
2621
2621
  "pluginType": "core",
2622
2622
  "strict": true,
2623
- "summary": "Invoke a local Sanity Function",
2623
+ "summary": "List remote Stack deployments for your project or organization",
2624
2624
  "enableJsonFlag": true,
2625
2625
  "needs": [
2626
- "blueprint"
2626
+ "scope"
2627
2627
  ],
2628
2628
  "isESM": true,
2629
2629
  "relativePath": [
2630
2630
  "dist",
2631
2631
  "commands",
2632
- "functions",
2633
- "test.js"
2632
+ "blueprints",
2633
+ "stacks.js"
2634
2634
  ]
2635
2635
  },
2636
2636
  "functions:env:add": {
@@ -2997,5 +2997,5 @@
2997
2997
  ]
2998
2998
  }
2999
2999
  },
3000
- "version": "17.0.0"
3000
+ "version": "17.1.0"
3001
3001
  }