@sanity/cli 6.3.2 → 6.4.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.
Files changed (69) hide show
  1. package/README.md +16 -10
  2. package/dist/actions/init/bootstrapLocalTemplate.js +16 -1
  3. package/dist/actions/init/bootstrapLocalTemplate.js.map +1 -1
  4. package/dist/actions/init/initApp.js +72 -0
  5. package/dist/actions/init/initApp.js.map +1 -0
  6. package/dist/actions/init/initHelpers.js +37 -0
  7. package/dist/actions/init/initHelpers.js.map +1 -0
  8. package/dist/actions/init/initNextJs.js +246 -0
  9. package/dist/actions/init/initNextJs.js.map +1 -0
  10. package/dist/actions/init/initStudio.js +127 -0
  11. package/dist/actions/init/initStudio.js.map +1 -0
  12. package/dist/actions/init/scaffoldTemplate.js +114 -0
  13. package/dist/actions/init/scaffoldTemplate.js.map +1 -0
  14. package/dist/actions/init/templates/appQuickstart.js +2 -1
  15. package/dist/actions/init/templates/appQuickstart.js.map +1 -1
  16. package/dist/actions/init/templates/appSanityUi.js +2 -1
  17. package/dist/actions/init/templates/appSanityUi.js.map +1 -1
  18. package/dist/actions/init/templates/shopify.js +6 -6
  19. package/dist/actions/init/templates/shopify.js.map +1 -1
  20. package/dist/actions/init/templates/shopifyOnline.js +2 -2
  21. package/dist/actions/init/templates/shopifyOnline.js.map +1 -1
  22. package/dist/actions/mcp/detectAvailableEditors.js +16 -3
  23. package/dist/actions/mcp/detectAvailableEditors.js.map +1 -1
  24. package/dist/actions/mcp/editorConfigs.js +192 -132
  25. package/dist/actions/mcp/editorConfigs.js.map +1 -1
  26. package/dist/actions/mcp/setupMCP.js +4 -1
  27. package/dist/actions/mcp/setupMCP.js.map +1 -1
  28. package/dist/actions/mcp/writeMCPConfig.js +2 -2
  29. package/dist/actions/mcp/writeMCPConfig.js.map +1 -1
  30. package/dist/actions/schema/extractSchema.js +5 -7
  31. package/dist/actions/schema/extractSchema.js.map +1 -1
  32. package/dist/commands/datasets/copy.js +14 -0
  33. package/dist/commands/datasets/copy.js.map +1 -1
  34. package/dist/commands/init.js +149 -482
  35. package/dist/commands/init.js.map +1 -1
  36. package/dist/commands/mcp/configure.js +1 -1
  37. package/dist/commands/mcp/configure.js.map +1 -1
  38. package/dist/hooks/prerun/injectEnvVariables.js +3 -5
  39. package/dist/hooks/prerun/injectEnvVariables.js.map +1 -1
  40. package/dist/services/datasets.js +2 -1
  41. package/dist/services/datasets.js.map +1 -1
  42. package/dist/telemetry/init.telemetry.js.map +1 -1
  43. package/dist/util/packageManager/installationInfo/detectPackages.js +13 -7
  44. package/dist/util/packageManager/installationInfo/detectPackages.js.map +1 -1
  45. package/dist/util/update/fetchUpdateInfo.js +40 -0
  46. package/dist/util/update/fetchUpdateInfo.js.map +1 -0
  47. package/dist/util/update/fetchUpdateInfo.worker.js +19 -0
  48. package/dist/util/update/fetchUpdateInfo.worker.js.map +1 -0
  49. package/dist/util/update/getRunnerUpdateCommand.js +33 -0
  50. package/dist/util/update/getRunnerUpdateCommand.js.map +1 -0
  51. package/dist/util/update/getUpdateCommand.js +6 -7
  52. package/dist/util/update/getUpdateCommand.js.map +1 -1
  53. package/dist/util/update/packageRunner.js +10 -0
  54. package/dist/util/update/packageRunner.js.map +1 -0
  55. package/dist/util/update/resolveRunnerPackage.js +45 -0
  56. package/dist/util/update/resolveRunnerPackage.js.map +1 -0
  57. package/dist/util/update/resolveUpdateTarget.js +31 -0
  58. package/dist/util/update/resolveUpdateTarget.js.map +1 -0
  59. package/dist/util/update/showNotificationUpdate.js +8 -6
  60. package/dist/util/update/showNotificationUpdate.js.map +1 -1
  61. package/dist/util/update/updateChecker.js +73 -38
  62. package/dist/util/update/updateChecker.js.map +1 -1
  63. package/oclif.manifest.json +540 -525
  64. package/package.json +6 -6
  65. package/templates/app-quickstart/src/App.tsx +2 -2
  66. package/templates/app-sanity-ui/src/App.tsx +2 -2
  67. package/templates/shopify/schemaTypes/objects/hotspot/imageWithProductHotspotsType.ts +1 -1
  68. package/dist/util/update/fetchLatestVersion.js +0 -21
  69. package/dist/util/update/fetchLatestVersion.js.map +0 -1
@@ -1454,6 +1454,10 @@
1454
1454
  "command": "<%= config.bin %> <%= command.id %> --skip-history source target",
1455
1455
  "description": "Copy without preserving document history (faster for large datasets)"
1456
1456
  },
1457
+ {
1458
+ "command": "<%= config.bin %> <%= command.id %> --skip-content-releases source target",
1459
+ "description": "Copy without content release documents"
1460
+ },
1457
1461
  {
1458
1462
  "command": "<%= config.bin %> <%= command.id %> --detach source target",
1459
1463
  "description": "Start copy job without waiting for completion"
@@ -1540,6 +1544,17 @@
1540
1544
  "multiple": false,
1541
1545
  "type": "option"
1542
1546
  },
1547
+ "skip-content-releases": {
1548
+ "description": "Don't copy content release documents to the target dataset",
1549
+ "exclusive": [
1550
+ "list",
1551
+ "attach"
1552
+ ],
1553
+ "name": "skip-content-releases",
1554
+ "required": false,
1555
+ "allowNo": false,
1556
+ "type": "boolean"
1557
+ },
1543
1558
  "skip-history": {
1544
1559
  "description": "Don't preserve document history on copy",
1545
1560
  "exclusive": [
@@ -3155,7 +3170,7 @@
3155
3170
  "mcp:configure": {
3156
3171
  "aliases": [],
3157
3172
  "args": {},
3158
- "description": "Configure Sanity MCP server for AI editors (Claude Code, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, VS Code)",
3173
+ "description": "Configure Sanity MCP server for AI editors (Antigravity, Claude Code, Cline, Cline CLI, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, MCPorter, OpenCode, VS Code, VS Code Insiders, Zed)",
3159
3174
  "examples": [
3160
3175
  {
3161
3176
  "command": "<%= config.bin %> <%= command.id %>",
@@ -3178,81 +3193,58 @@
3178
3193
  "configure.js"
3179
3194
  ]
3180
3195
  },
3181
- "media:create-aspect": {
3182
- "aliases": [],
3183
- "args": {},
3184
- "description": "Create a new aspect definition file",
3185
- "examples": [
3186
- {
3187
- "command": "<%= config.bin %> <%= command.id %>",
3188
- "description": "Create a new aspect definition file"
3189
- }
3190
- ],
3191
- "flags": {},
3192
- "hasDynamicHelp": false,
3193
- "hiddenAliases": [],
3194
- "id": "media:create-aspect",
3195
- "pluginAlias": "@sanity/cli",
3196
- "pluginName": "@sanity/cli",
3197
- "pluginType": "core",
3198
- "strict": true,
3199
- "isESM": true,
3200
- "relativePath": [
3201
- "dist",
3202
- "commands",
3203
- "media",
3204
- "create-aspect.js"
3205
- ]
3206
- },
3207
- "media:delete-aspect": {
3196
+ "openapi:get": {
3208
3197
  "aliases": [],
3209
3198
  "args": {
3210
- "aspectName": {
3211
- "description": "Name of the aspect to delete",
3212
- "name": "aspectName",
3199
+ "slug": {
3200
+ "description": "Slug of the OpenAPI specification to retrieve",
3201
+ "name": "slug",
3213
3202
  "required": true
3214
3203
  }
3215
3204
  },
3216
- "description": "Delete an aspect definition",
3205
+ "description": "Get an OpenAPI specification by slug",
3217
3206
  "examples": [
3218
3207
  {
3219
- "command": "<%= config.bin %> <%= command.id %> someAspect",
3220
- "description": "Delete the aspect named \"someAspect\""
3208
+ "command": "<%= config.bin %> <%= command.id %> query",
3209
+ "description": "Get a specification (YAML format, default)"
3210
+ },
3211
+ {
3212
+ "command": "<%= config.bin %> <%= command.id %> query --format=json",
3213
+ "description": "Get specification in JSON format"
3214
+ },
3215
+ {
3216
+ "command": "<%= config.bin %> <%= command.id %> query --web",
3217
+ "description": "Open specification in browser"
3218
+ },
3219
+ {
3220
+ "command": "<%= config.bin %> <%= command.id %> query > query-api.yaml",
3221
+ "description": "Pipe to file"
3221
3222
  }
3222
3223
  ],
3223
3224
  "flags": {
3224
- "project-id": {
3225
- "char": "p",
3226
- "description": "Project ID to delete media aspect from (overrides CLI configuration)",
3227
- "helpGroup": "OVERRIDE",
3228
- "name": "project-id",
3229
- "hasDynamicHelp": false,
3230
- "helpValue": "<id>",
3231
- "multiple": false,
3232
- "type": "option"
3233
- },
3234
- "media-library-id": {
3235
- "description": "The id of the target media library",
3236
- "name": "media-library-id",
3237
- "required": false,
3225
+ "format": {
3226
+ "description": "Output format: yaml (default), json",
3227
+ "name": "format",
3228
+ "default": "yaml",
3238
3229
  "hasDynamicHelp": false,
3239
3230
  "multiple": false,
3231
+ "options": [
3232
+ "yaml",
3233
+ "json"
3234
+ ],
3240
3235
  "type": "option"
3241
3236
  },
3242
- "yes": {
3243
- "aliases": [
3244
- "y"
3245
- ],
3246
- "description": "Skip confirmation prompt",
3247
- "name": "yes",
3248
- "required": false,
3237
+ "web": {
3238
+ "char": "w",
3239
+ "description": "Open in web browser",
3240
+ "name": "web",
3249
3241
  "allowNo": false,
3250
3242
  "type": "boolean"
3251
3243
  }
3252
3244
  },
3253
3245
  "hasDynamicHelp": false,
3254
3246
  "hiddenAliases": [],
3255
- "id": "media:delete-aspect",
3247
+ "id": "openapi:get",
3256
3248
  "pluginAlias": "@sanity/cli",
3257
3249
  "pluginName": "@sanity/cli",
3258
3250
  "pluginType": "core",
@@ -3261,60 +3253,46 @@
3261
3253
  "relativePath": [
3262
3254
  "dist",
3263
3255
  "commands",
3264
- "media",
3265
- "delete-aspect.js"
3256
+ "openapi",
3257
+ "get.js"
3266
3258
  ]
3267
3259
  },
3268
- "media:deploy-aspect": {
3260
+ "openapi:list": {
3269
3261
  "aliases": [],
3270
- "args": {
3271
- "aspectName": {
3272
- "description": "Name of the aspect to deploy",
3273
- "name": "aspectName",
3274
- "required": false
3275
- }
3276
- },
3277
- "description": "Deploy an aspect",
3262
+ "args": {},
3263
+ "description": "List all available OpenAPI specifications",
3278
3264
  "examples": [
3279
3265
  {
3280
- "command": "<%= config.bin %> <%= command.id %> someAspect",
3281
- "description": "Deploy the aspect named \"someAspect\""
3266
+ "command": "<%= config.bin %> <%= command.id %>",
3267
+ "description": "List all available OpenAPI specs"
3282
3268
  },
3283
3269
  {
3284
- "command": "<%= config.bin %> <%= command.id %> --all",
3285
- "description": "Deploy all aspects"
3270
+ "command": "<%= config.bin %> <%= command.id %> --json",
3271
+ "description": "List with JSON output"
3272
+ },
3273
+ {
3274
+ "command": "<%= config.bin %> <%= command.id %> --web",
3275
+ "description": "Open HTTP Reference in browser"
3286
3276
  }
3287
3277
  ],
3288
3278
  "flags": {
3289
- "project-id": {
3290
- "char": "p",
3291
- "description": "Project ID to deploy media aspect to (overrides CLI configuration)",
3292
- "helpGroup": "OVERRIDE",
3293
- "name": "project-id",
3294
- "hasDynamicHelp": false,
3295
- "helpValue": "<id>",
3296
- "multiple": false,
3297
- "type": "option"
3298
- },
3299
- "all": {
3300
- "description": "Deploy all aspects",
3301
- "name": "all",
3302
- "required": false,
3279
+ "json": {
3280
+ "description": "Output JSON",
3281
+ "name": "json",
3303
3282
  "allowNo": false,
3304
3283
  "type": "boolean"
3305
3284
  },
3306
- "media-library-id": {
3307
- "description": "The id of the target media library",
3308
- "name": "media-library-id",
3309
- "required": false,
3310
- "hasDynamicHelp": false,
3311
- "multiple": false,
3312
- "type": "option"
3285
+ "web": {
3286
+ "char": "w",
3287
+ "description": "Open HTTP Reference in web browser",
3288
+ "name": "web",
3289
+ "allowNo": false,
3290
+ "type": "boolean"
3313
3291
  }
3314
3292
  },
3315
3293
  "hasDynamicHelp": false,
3316
3294
  "hiddenAliases": [],
3317
- "id": "media:deploy-aspect",
3295
+ "id": "openapi:list",
3318
3296
  "pluginAlias": "@sanity/cli",
3319
3297
  "pluginName": "@sanity/cli",
3320
3298
  "pluginType": "core",
@@ -3323,75 +3301,88 @@
3323
3301
  "relativePath": [
3324
3302
  "dist",
3325
3303
  "commands",
3326
- "media",
3327
- "deploy-aspect.js"
3304
+ "openapi",
3305
+ "list.js"
3328
3306
  ]
3329
3307
  },
3330
- "media:export": {
3308
+ "projects:create": {
3331
3309
  "aliases": [],
3332
3310
  "args": {
3333
- "destination": {
3334
- "description": "Output destination file path",
3335
- "name": "destination"
3311
+ "projectName": {
3312
+ "description": "Name of the project to create",
3313
+ "name": "projectName",
3314
+ "required": false
3336
3315
  }
3337
3316
  },
3338
- "description": "Export file and image assets from a media library (excludes video)",
3317
+ "description": "Create a new Sanity project",
3339
3318
  "examples": [
3340
3319
  {
3341
3320
  "command": "<%= config.bin %> <%= command.id %>",
3342
- "description": "Export media library interactively"
3321
+ "description": "Interactively create a project"
3343
3322
  },
3344
3323
  {
3345
- "command": "<%= config.bin %> <%= command.id %> output.tar.gz",
3346
- "description": "Export media library to output.tar.gz"
3324
+ "command": "<%= config.bin %> <%= command.id %> \"My New Project\"",
3325
+ "description": "Create a project named \"My New Project\""
3347
3326
  },
3348
3327
  {
3349
- "command": "<%= config.bin %> <%= command.id %> --media-library-id my-library-id",
3350
- "description": "Export specific media library"
3328
+ "command": "<%= config.bin %> <%= command.id %> \"My Project\" --organization=my-org",
3329
+ "description": "Create a project in a specific organization"
3330
+ },
3331
+ {
3332
+ "command": "<%= config.bin %> <%= command.id %> \"My Project\" --dataset=staging --dataset-visibility=private",
3333
+ "description": "Create a project with a private dataset named \"staging\""
3334
+ },
3335
+ {
3336
+ "command": "<%= config.bin %> <%= command.id %> \"CI Project\" --yes --json",
3337
+ "description": "Create a project non-interactively with JSON output"
3351
3338
  }
3352
3339
  ],
3353
3340
  "flags": {
3354
- "project-id": {
3355
- "char": "p",
3356
- "description": "Project ID to export media from (overrides CLI configuration)",
3357
- "helpGroup": "OVERRIDE",
3358
- "name": "project-id",
3341
+ "dataset": {
3342
+ "description": "Create a dataset. Prompts for visibility unless specified or --yes used",
3343
+ "name": "dataset",
3359
3344
  "hasDynamicHelp": false,
3360
- "helpValue": "<id>",
3361
3345
  "multiple": false,
3362
3346
  "type": "option"
3363
3347
  },
3364
- "asset-concurrency": {
3365
- "description": "Concurrent number of asset downloads",
3366
- "name": "asset-concurrency",
3367
- "default": 8,
3348
+ "dataset-visibility": {
3349
+ "description": "Dataset visibility: public or private",
3350
+ "name": "dataset-visibility",
3368
3351
  "hasDynamicHelp": false,
3369
3352
  "multiple": false,
3353
+ "options": [
3354
+ "private",
3355
+ "public"
3356
+ ],
3370
3357
  "type": "option"
3371
3358
  },
3372
- "media-library-id": {
3373
- "description": "The id of the target media library",
3374
- "name": "media-library-id",
3359
+ "json": {
3360
+ "description": "Output in JSON format",
3361
+ "name": "json",
3362
+ "allowNo": false,
3363
+ "type": "boolean"
3364
+ },
3365
+ "organization": {
3366
+ "description": "Organization to create the project in",
3367
+ "name": "organization",
3375
3368
  "hasDynamicHelp": false,
3369
+ "helpValue": "<slug|id>",
3376
3370
  "multiple": false,
3377
3371
  "type": "option"
3378
3372
  },
3379
- "no-compress": {
3380
- "description": "Skips compressing tarball entries (still generates a gzip file)",
3381
- "name": "no-compress",
3382
- "allowNo": false,
3383
- "type": "boolean"
3384
- },
3385
- "overwrite": {
3386
- "description": "Overwrite any file with the same name",
3387
- "name": "overwrite",
3373
+ "yes": {
3374
+ "char": "y",
3375
+ "description": "Skip prompts and use defaults (project: \"My Sanity Project\", dataset: production, visibility: public)",
3376
+ "name": "yes",
3388
3377
  "allowNo": false,
3389
3378
  "type": "boolean"
3390
3379
  }
3391
3380
  },
3392
3381
  "hasDynamicHelp": false,
3393
- "hiddenAliases": [],
3394
- "id": "media:export",
3382
+ "hiddenAliases": [
3383
+ "project:create"
3384
+ ],
3385
+ "id": "projects:create",
3395
3386
  "pluginAlias": "@sanity/cli",
3396
3387
  "pluginName": "@sanity/cli",
3397
3388
  "pluginType": "core",
@@ -3400,62 +3391,58 @@
3400
3391
  "relativePath": [
3401
3392
  "dist",
3402
3393
  "commands",
3403
- "media",
3404
- "export.js"
3394
+ "projects",
3395
+ "create.js"
3405
3396
  ]
3406
3397
  },
3407
- "media:import": {
3398
+ "projects:list": {
3408
3399
  "aliases": [],
3409
- "args": {
3410
- "source": {
3411
- "description": "Image file or folder to import from",
3412
- "name": "source",
3413
- "required": true
3414
- }
3415
- },
3416
- "description": "Import a set of assets to the target media library.",
3400
+ "args": {},
3401
+ "description": "List your projects",
3417
3402
  "examples": [
3418
3403
  {
3419
- "command": "<%= config.bin %> <%= command.id %> products",
3420
- "description": "Import all assets from the \"products\" directory"
3421
- },
3422
- {
3423
- "command": "<%= config.bin %> <%= command.id %> gallery.tar.gz",
3424
- "description": "Import all assets from \"gallery\" archive"
3404
+ "command": "<%= config.bin %> <%= command.id %>",
3405
+ "description": "List projects"
3425
3406
  },
3426
3407
  {
3427
- "command": "<%= config.bin %> <%= command.id %> products --replace-aspects",
3428
- "description": "Import all assets from the \"products\" directory and replace aspects"
3408
+ "command": "<%= config.bin %> <%= command.id %> --sort=members --order=asc",
3409
+ "description": "List projects sorted by member count, ascending"
3429
3410
  }
3430
3411
  ],
3431
3412
  "flags": {
3432
- "project-id": {
3433
- "char": "p",
3434
- "description": "Project ID to import media to (overrides CLI configuration)",
3435
- "helpGroup": "OVERRIDE",
3436
- "name": "project-id",
3413
+ "order": {
3414
+ "description": "Sort direction",
3415
+ "name": "order",
3416
+ "default": "desc",
3437
3417
  "hasDynamicHelp": false,
3438
- "helpValue": "<id>",
3439
3418
  "multiple": false,
3419
+ "options": [
3420
+ "asc",
3421
+ "desc"
3422
+ ],
3440
3423
  "type": "option"
3441
3424
  },
3442
- "media-library-id": {
3443
- "description": "The id of the target media library",
3444
- "name": "media-library-id",
3425
+ "sort": {
3426
+ "description": "Sort field",
3427
+ "name": "sort",
3428
+ "default": "created",
3445
3429
  "hasDynamicHelp": false,
3446
3430
  "multiple": false,
3431
+ "options": [
3432
+ "id",
3433
+ "members",
3434
+ "name",
3435
+ "url",
3436
+ "created"
3437
+ ],
3447
3438
  "type": "option"
3448
- },
3449
- "replace-aspects": {
3450
- "description": "Replace existing aspect data. All versions will be replaced (e.g. published and draft aspect data)",
3451
- "name": "replace-aspects",
3452
- "allowNo": false,
3453
- "type": "boolean"
3454
3439
  }
3455
3440
  },
3456
3441
  "hasDynamicHelp": false,
3457
- "hiddenAliases": [],
3458
- "id": "media:import",
3442
+ "hiddenAliases": [
3443
+ "project:list"
3444
+ ],
3445
+ "id": "projects:list",
3459
3446
  "pluginAlias": "@sanity/cli",
3460
3447
  "pluginName": "@sanity/cli",
3461
3448
  "pluginType": "core",
@@ -3464,62 +3451,80 @@
3464
3451
  "relativePath": [
3465
3452
  "dist",
3466
3453
  "commands",
3467
- "media",
3468
- "import.js"
3454
+ "projects",
3455
+ "list.js"
3469
3456
  ]
3470
3457
  },
3471
- "openapi:get": {
3458
+ "schemas:delete": {
3472
3459
  "aliases": [],
3473
- "args": {
3474
- "slug": {
3475
- "description": "Slug of the OpenAPI specification to retrieve",
3476
- "name": "slug",
3477
- "required": true
3478
- }
3479
- },
3480
- "description": "Get an OpenAPI specification by slug",
3460
+ "args": {},
3461
+ "description": "Delete schema documents by id",
3481
3462
  "examples": [
3482
3463
  {
3483
- "command": "<%= config.bin %> <%= command.id %> query",
3484
- "description": "Get a specification (YAML format, default)"
3485
- },
3486
- {
3487
- "command": "<%= config.bin %> <%= command.id %> query --format=json",
3488
- "description": "Get specification in JSON format"
3489
- },
3490
- {
3491
- "command": "<%= config.bin %> <%= command.id %> query --web",
3492
- "description": "Open specification in browser"
3464
+ "command": "<%= config.bin %> <%= command.id %> --ids sanity.workspace.schema.workspaceName",
3465
+ "description": "Delete a single schema"
3493
3466
  },
3494
3467
  {
3495
- "command": "<%= config.bin %> <%= command.id %> query > query-api.yaml",
3496
- "description": "Pipe to file"
3468
+ "command": "<%= config.bin %> <%= command.id %> --ids sanity.workspace.schema.workspaceName,prefix.sanity.workspace.schema.otherWorkspace",
3469
+ "description": "Delete multiple schemas"
3497
3470
  }
3498
3471
  ],
3499
3472
  "flags": {
3500
- "format": {
3501
- "description": "Output format: yaml (default), json",
3502
- "name": "format",
3503
- "default": "yaml",
3473
+ "project-id": {
3474
+ "char": "p",
3475
+ "description": "Project ID to delete schema from (overrides CLI configuration)",
3476
+ "helpGroup": "OVERRIDE",
3477
+ "name": "project-id",
3504
3478
  "hasDynamicHelp": false,
3479
+ "helpValue": "<id>",
3505
3480
  "multiple": false,
3506
- "options": [
3507
- "yaml",
3508
- "json"
3509
- ],
3510
3481
  "type": "option"
3511
3482
  },
3512
- "web": {
3513
- "char": "w",
3514
- "description": "Open in web browser",
3515
- "name": "web",
3483
+ "dataset": {
3484
+ "char": "d",
3485
+ "description": "Delete schemas from a specific dataset",
3486
+ "name": "dataset",
3487
+ "hasDynamicHelp": false,
3488
+ "helpValue": "<name>",
3489
+ "multiple": false,
3490
+ "type": "option"
3491
+ },
3492
+ "extract-manifest": {
3493
+ "description": "Generate manifest file (disable with --no-extract-manifest)",
3494
+ "hidden": true,
3495
+ "name": "extract-manifest",
3496
+ "allowNo": true,
3497
+ "type": "boolean"
3498
+ },
3499
+ "ids": {
3500
+ "description": "Comma-separated list of schema ids to delete",
3501
+ "name": "ids",
3502
+ "required": true,
3503
+ "hasDynamicHelp": false,
3504
+ "multiple": false,
3505
+ "type": "option"
3506
+ },
3507
+ "manifest-dir": {
3508
+ "description": "Directory containing manifest file",
3509
+ "hidden": true,
3510
+ "name": "manifest-dir",
3511
+ "default": "./dist/static",
3512
+ "hasDynamicHelp": false,
3513
+ "multiple": false,
3514
+ "type": "option"
3515
+ },
3516
+ "verbose": {
3517
+ "description": "Enable verbose logging",
3518
+ "name": "verbose",
3516
3519
  "allowNo": false,
3517
3520
  "type": "boolean"
3518
3521
  }
3519
3522
  },
3520
3523
  "hasDynamicHelp": false,
3521
- "hiddenAliases": [],
3522
- "id": "openapi:get",
3524
+ "hiddenAliases": [
3525
+ "schema:delete"
3526
+ ],
3527
+ "id": "schemas:delete",
3523
3528
  "pluginAlias": "@sanity/cli",
3524
3529
  "pluginName": "@sanity/cli",
3525
3530
  "pluginType": "core",
@@ -3528,46 +3533,68 @@
3528
3533
  "relativePath": [
3529
3534
  "dist",
3530
3535
  "commands",
3531
- "openapi",
3532
- "get.js"
3536
+ "schemas",
3537
+ "delete.js"
3533
3538
  ]
3534
3539
  },
3535
- "openapi:list": {
3540
+ "schemas:deploy": {
3536
3541
  "aliases": [],
3537
3542
  "args": {},
3538
- "description": "List all available OpenAPI specifications",
3543
+ "description": "Deploy schema documents into workspace datasets.\n\nNote: This command is experimental and subject to change.\n\nRegenerates a manifest file by default. To re-use an existing manifest, use --no-extract-manifest.",
3539
3544
  "examples": [
3540
3545
  {
3541
3546
  "command": "<%= config.bin %> <%= command.id %>",
3542
- "description": "List all available OpenAPI specs"
3543
- },
3544
- {
3545
- "command": "<%= config.bin %> <%= command.id %> --json",
3546
- "description": "List with JSON output"
3547
+ "description": "Deploy all workspace schemas"
3547
3548
  },
3548
3549
  {
3549
- "command": "<%= config.bin %> <%= command.id %> --web",
3550
- "description": "Open HTTP Reference in browser"
3550
+ "command": "<%= config.bin %> <%= command.id %> --workspace default",
3551
+ "description": "Deploy the schema for only the workspace \"default\""
3551
3552
  }
3552
3553
  ],
3553
3554
  "flags": {
3554
- "json": {
3555
- "description": "Output JSON",
3556
- "name": "json",
3557
- "allowNo": false,
3555
+ "extract-manifest": {
3556
+ "description": "Regenerate manifest before deploying (use --no-extract-manifest to skip)",
3557
+ "name": "extract-manifest",
3558
+ "allowNo": true,
3558
3559
  "type": "boolean"
3559
3560
  },
3560
- "web": {
3561
- "char": "w",
3562
- "description": "Open HTTP Reference in web browser",
3563
- "name": "web",
3561
+ "manifest-dir": {
3562
+ "description": "Directory containing manifest file",
3563
+ "name": "manifest-dir",
3564
+ "default": "./dist/static",
3565
+ "hasDynamicHelp": false,
3566
+ "helpValue": "<directory>",
3567
+ "multiple": false,
3568
+ "type": "option"
3569
+ },
3570
+ "tag": {
3571
+ "description": "Add a tag suffix to the schema id",
3572
+ "name": "tag",
3573
+ "hasDynamicHelp": false,
3574
+ "helpValue": "<tag>",
3575
+ "multiple": false,
3576
+ "type": "option"
3577
+ },
3578
+ "verbose": {
3579
+ "description": "Print detailed information during deployment",
3580
+ "name": "verbose",
3564
3581
  "allowNo": false,
3565
3582
  "type": "boolean"
3583
+ },
3584
+ "workspace": {
3585
+ "description": "The name of the workspace to deploy a schema for",
3586
+ "name": "workspace",
3587
+ "hasDynamicHelp": false,
3588
+ "helpValue": "<name>",
3589
+ "multiple": false,
3590
+ "type": "option"
3566
3591
  }
3567
3592
  },
3568
3593
  "hasDynamicHelp": false,
3569
- "hiddenAliases": [],
3570
- "id": "openapi:list",
3594
+ "hiddenAliases": [
3595
+ "schema:deploy"
3596
+ ],
3597
+ "id": "schemas:deploy",
3571
3598
  "pluginAlias": "@sanity/cli",
3572
3599
  "pluginName": "@sanity/cli",
3573
3600
  "pluginType": "core",
@@ -3576,88 +3603,79 @@
3576
3603
  "relativePath": [
3577
3604
  "dist",
3578
3605
  "commands",
3579
- "openapi",
3580
- "list.js"
3606
+ "schemas",
3607
+ "deploy.js"
3581
3608
  ]
3582
3609
  },
3583
- "projects:create": {
3610
+ "schemas:extract": {
3584
3611
  "aliases": [],
3585
- "args": {
3586
- "projectName": {
3587
- "description": "Name of the project to create",
3588
- "name": "projectName",
3589
- "required": false
3590
- }
3591
- },
3592
- "description": "Create a new Sanity project",
3612
+ "args": {},
3613
+ "description": "Extract a JSON representation of a Sanity schema within a Studio context.\n\nNote: This command is experimental and subject to change.",
3593
3614
  "examples": [
3594
3615
  {
3595
- "command": "<%= config.bin %> <%= command.id %>",
3596
- "description": "Interactively create a project"
3597
- },
3598
- {
3599
- "command": "<%= config.bin %> <%= command.id %> \"My New Project\"",
3600
- "description": "Create a project named \"My New Project\""
3601
- },
3602
- {
3603
- "command": "<%= config.bin %> <%= command.id %> \"My Project\" --organization=my-org",
3604
- "description": "Create a project in a specific organization"
3616
+ "command": "<%= config.bin %> <%= command.id %> --workspace default",
3617
+ "description": "Extracts schema types in a Sanity project with more than one workspace"
3605
3618
  },
3606
3619
  {
3607
- "command": "<%= config.bin %> <%= command.id %> \"My Project\" --dataset=staging --dataset-visibility=private",
3608
- "description": "Create a project with a private dataset named \"staging\""
3620
+ "command": "<%= config.bin %> <%= command.id %> --watch",
3621
+ "description": "Watch mode - re-extract on changes"
3609
3622
  },
3610
3623
  {
3611
- "command": "<%= config.bin %> <%= command.id %> \"CI Project\" --yes --json",
3612
- "description": "Create a project non-interactively with JSON output"
3624
+ "command": "<%= config.bin %> <%= command.id %> --watch --watch-patterns \"lib/**/*.ts\"",
3625
+ "description": "Watch with custom glob patterns"
3613
3626
  }
3614
3627
  ],
3615
3628
  "flags": {
3616
- "dataset": {
3617
- "description": "Create a dataset. Prompts for visibility unless specified or --yes used",
3618
- "name": "dataset",
3629
+ "enforce-required-fields": {
3630
+ "description": "Makes the schema generated treat fields marked as required as non-optional",
3631
+ "name": "enforce-required-fields",
3632
+ "allowNo": false,
3633
+ "type": "boolean"
3634
+ },
3635
+ "format": {
3636
+ "description": "Output format (currently only groq-type-nodes)",
3637
+ "name": "format",
3638
+ "default": "groq-type-nodes",
3619
3639
  "hasDynamicHelp": false,
3640
+ "helpValue": "<format>",
3620
3641
  "multiple": false,
3621
3642
  "type": "option"
3622
3643
  },
3623
- "dataset-visibility": {
3624
- "description": "Dataset visibility: public or private",
3625
- "name": "dataset-visibility",
3644
+ "path": {
3645
+ "description": "Optional path to specify destination of the schema file",
3646
+ "name": "path",
3626
3647
  "hasDynamicHelp": false,
3627
3648
  "multiple": false,
3628
- "options": [
3629
- "private",
3630
- "public"
3631
- ],
3632
3649
  "type": "option"
3633
3650
  },
3634
- "json": {
3635
- "description": "Output in JSON format",
3636
- "name": "json",
3651
+ "watch": {
3652
+ "description": "Enable watch mode to re-extract schema on file changes",
3653
+ "name": "watch",
3637
3654
  "allowNo": false,
3638
3655
  "type": "boolean"
3639
3656
  },
3640
- "organization": {
3641
- "description": "Organization to create the project in",
3642
- "name": "organization",
3657
+ "watch-patterns": {
3658
+ "description": "Additional glob pattern(s) to watch (can be specified multiple times)",
3659
+ "name": "watch-patterns",
3660
+ "hasDynamicHelp": false,
3661
+ "helpValue": "<glob>",
3662
+ "multiple": true,
3663
+ "type": "option"
3664
+ },
3665
+ "workspace": {
3666
+ "description": "The name of the workspace to generate a schema for",
3667
+ "name": "workspace",
3643
3668
  "hasDynamicHelp": false,
3644
- "helpValue": "<slug|id>",
3669
+ "helpValue": "<name>",
3645
3670
  "multiple": false,
3646
3671
  "type": "option"
3647
- },
3648
- "yes": {
3649
- "char": "y",
3650
- "description": "Skip prompts and use defaults (project: \"My Sanity Project\", dataset: production, visibility: public)",
3651
- "name": "yes",
3652
- "allowNo": false,
3653
- "type": "boolean"
3654
3672
  }
3655
3673
  },
3656
3674
  "hasDynamicHelp": false,
3657
3675
  "hiddenAliases": [
3658
- "project:create"
3676
+ "schema:extract"
3659
3677
  ],
3660
- "id": "projects:create",
3678
+ "id": "schemas:extract",
3661
3679
  "pluginAlias": "@sanity/cli",
3662
3680
  "pluginName": "@sanity/cli",
3663
3681
  "pluginType": "core",
@@ -3666,58 +3684,70 @@
3666
3684
  "relativePath": [
3667
3685
  "dist",
3668
3686
  "commands",
3669
- "projects",
3670
- "create.js"
3687
+ "schemas",
3688
+ "extract.js"
3671
3689
  ]
3672
3690
  },
3673
- "projects:list": {
3691
+ "schemas:list": {
3674
3692
  "aliases": [],
3675
3693
  "args": {},
3676
- "description": "List your projects",
3694
+ "description": "List all schemas in the current dataset.\n\nNote: This command is experimental and subject to change.\n\nRegenerates a manifest file by default. To reuse an existing manifest, use --no-extract-manifest.",
3677
3695
  "examples": [
3678
3696
  {
3679
3697
  "command": "<%= config.bin %> <%= command.id %>",
3680
- "description": "List projects"
3698
+ "description": "List all schemas found in any workspace dataset in a table"
3681
3699
  },
3682
3700
  {
3683
- "command": "<%= config.bin %> <%= command.id %> --sort=members --order=asc",
3684
- "description": "List projects sorted by member count, ascending"
3701
+ "command": "<%= config.bin %> <%= command.id %> --id _.schemas.workspaceName",
3702
+ "description": "Get a schema for a given id"
3703
+ },
3704
+ {
3705
+ "command": "<%= config.bin %> <%= command.id %> --json",
3706
+ "description": "Get stored schemas as pretty-printed json-array"
3707
+ },
3708
+ {
3709
+ "command": "<%= config.bin %> <%= command.id %> --json --id _.schemas.workspaceName",
3710
+ "description": "Get singular stored schema as pretty-printed json-object"
3685
3711
  }
3686
3712
  ],
3687
3713
  "flags": {
3688
- "order": {
3689
- "description": "Sort direction",
3690
- "name": "order",
3691
- "default": "desc",
3714
+ "extract-manifest": {
3715
+ "description": "Regenerate manifest before listing (use --no-extract-manifest to skip)",
3716
+ "hidden": true,
3717
+ "name": "extract-manifest",
3718
+ "allowNo": true,
3719
+ "type": "boolean"
3720
+ },
3721
+ "id": {
3722
+ "description": "Fetch a single schema by id",
3723
+ "name": "id",
3692
3724
  "hasDynamicHelp": false,
3725
+ "helpValue": "<schema_id>",
3693
3726
  "multiple": false,
3694
- "options": [
3695
- "asc",
3696
- "desc"
3697
- ],
3698
3727
  "type": "option"
3699
3728
  },
3700
- "sort": {
3701
- "description": "Sort field",
3702
- "name": "sort",
3703
- "default": "created",
3729
+ "json": {
3730
+ "description": "Get schema as json",
3731
+ "name": "json",
3732
+ "allowNo": false,
3733
+ "type": "boolean"
3734
+ },
3735
+ "manifest-dir": {
3736
+ "description": "Directory containing manifest file",
3737
+ "hidden": true,
3738
+ "name": "manifest-dir",
3739
+ "default": "./dist/static",
3704
3740
  "hasDynamicHelp": false,
3741
+ "helpValue": "<directory>",
3705
3742
  "multiple": false,
3706
- "options": [
3707
- "id",
3708
- "members",
3709
- "name",
3710
- "url",
3711
- "created"
3712
- ],
3713
3743
  "type": "option"
3714
3744
  }
3715
3745
  },
3716
3746
  "hasDynamicHelp": false,
3717
3747
  "hiddenAliases": [
3718
- "project:list"
3748
+ "schema:list"
3719
3749
  ],
3720
- "id": "projects:list",
3750
+ "id": "schemas:list",
3721
3751
  "pluginAlias": "@sanity/cli",
3722
3752
  "pluginName": "@sanity/cli",
3723
3753
  "pluginType": "core",
@@ -3726,80 +3756,79 @@
3726
3756
  "relativePath": [
3727
3757
  "dist",
3728
3758
  "commands",
3729
- "projects",
3759
+ "schemas",
3730
3760
  "list.js"
3731
3761
  ]
3732
3762
  },
3733
- "schemas:delete": {
3763
+ "schemas:validate": {
3734
3764
  "aliases": [],
3735
3765
  "args": {},
3736
- "description": "Delete schema documents by id",
3766
+ "description": "Validates all schema types specified in a workspace",
3737
3767
  "examples": [
3738
3768
  {
3739
- "command": "<%= config.bin %> <%= command.id %> --ids sanity.workspace.schema.workspaceName",
3740
- "description": "Delete a single schema"
3769
+ "command": "<%= config.bin %> <%= command.id %> --workspace default",
3770
+ "description": "Validates all schema types in a Sanity project with more than one workspace"
3741
3771
  },
3742
3772
  {
3743
- "command": "<%= config.bin %> <%= command.id %> --ids sanity.workspace.schema.workspaceName,prefix.sanity.workspace.schema.otherWorkspace",
3744
- "description": "Delete multiple schemas"
3773
+ "command": "<%= config.bin %> <%= command.id %> > report.txt",
3774
+ "description": "Save the results of the report into a file"
3775
+ },
3776
+ {
3777
+ "command": "<%= config.bin %> <%= command.id %> --level error",
3778
+ "description": "Report out only errors"
3779
+ },
3780
+ {
3781
+ "command": "<%= config.bin %> <%= command.id %> --debug-metafile-path metafile.json",
3782
+ "description": "Generate a report which can be analyzed with https://esbuild.github.io/analyze/"
3745
3783
  }
3746
3784
  ],
3747
3785
  "flags": {
3748
- "project-id": {
3749
- "char": "p",
3750
- "description": "Project ID to delete schema from (overrides CLI configuration)",
3751
- "helpGroup": "OVERRIDE",
3752
- "name": "project-id",
3786
+ "debug-metafile-path": {
3787
+ "description": "Optional path where a metafile will be written for build analysis. Only written on successful validation. Can be analyzed at https://esbuild.github.io/analyze/",
3788
+ "helpGroup": "DEBUG",
3789
+ "name": "debug-metafile-path",
3753
3790
  "hasDynamicHelp": false,
3754
- "helpValue": "<id>",
3755
3791
  "multiple": false,
3756
3792
  "type": "option"
3757
3793
  },
3758
- "dataset": {
3759
- "char": "d",
3760
- "description": "Delete schemas from a specific dataset",
3761
- "name": "dataset",
3794
+ "format": {
3795
+ "description": "The output format used to print schema errors and warnings",
3796
+ "name": "format",
3797
+ "default": "pretty",
3762
3798
  "hasDynamicHelp": false,
3763
- "helpValue": "<name>",
3764
3799
  "multiple": false,
3800
+ "options": [
3801
+ "pretty",
3802
+ "ndjson",
3803
+ "json"
3804
+ ],
3765
3805
  "type": "option"
3766
3806
  },
3767
- "extract-manifest": {
3768
- "description": "Generate manifest file (disable with --no-extract-manifest)",
3769
- "hidden": true,
3770
- "name": "extract-manifest",
3771
- "allowNo": true,
3772
- "type": "boolean"
3773
- },
3774
- "ids": {
3775
- "description": "Comma-separated list of schema ids to delete",
3776
- "name": "ids",
3777
- "required": true,
3807
+ "level": {
3808
+ "description": "The minimum level reported out",
3809
+ "name": "level",
3810
+ "default": "warning",
3778
3811
  "hasDynamicHelp": false,
3779
3812
  "multiple": false,
3813
+ "options": [
3814
+ "error",
3815
+ "warning"
3816
+ ],
3780
3817
  "type": "option"
3781
3818
  },
3782
- "manifest-dir": {
3783
- "description": "Directory containing manifest file",
3784
- "hidden": true,
3785
- "name": "manifest-dir",
3786
- "default": "./dist/static",
3819
+ "workspace": {
3820
+ "description": "The name of the workspace to use when validating all schema types",
3821
+ "name": "workspace",
3787
3822
  "hasDynamicHelp": false,
3788
3823
  "multiple": false,
3789
3824
  "type": "option"
3790
- },
3791
- "verbose": {
3792
- "description": "Enable verbose logging",
3793
- "name": "verbose",
3794
- "allowNo": false,
3795
- "type": "boolean"
3796
3825
  }
3797
3826
  },
3798
3827
  "hasDynamicHelp": false,
3799
3828
  "hiddenAliases": [
3800
- "schema:delete"
3829
+ "schema:validate"
3801
3830
  ],
3802
- "id": "schemas:delete",
3831
+ "id": "schemas:validate",
3803
3832
  "pluginAlias": "@sanity/cli",
3804
3833
  "pluginName": "@sanity/cli",
3805
3834
  "pluginType": "core",
@@ -3809,67 +3838,84 @@
3809
3838
  "dist",
3810
3839
  "commands",
3811
3840
  "schemas",
3812
- "delete.js"
3841
+ "validate.js"
3813
3842
  ]
3814
3843
  },
3815
- "schemas:deploy": {
3844
+ "media:create-aspect": {
3816
3845
  "aliases": [],
3817
3846
  "args": {},
3818
- "description": "Deploy schema documents into workspace datasets.\n\nNote: This command is experimental and subject to change.\n\nRegenerates a manifest file by default. To re-use an existing manifest, use --no-extract-manifest.",
3847
+ "description": "Create a new aspect definition file",
3819
3848
  "examples": [
3820
3849
  {
3821
3850
  "command": "<%= config.bin %> <%= command.id %>",
3822
- "description": "Deploy all workspace schemas"
3823
- },
3851
+ "description": "Create a new aspect definition file"
3852
+ }
3853
+ ],
3854
+ "flags": {},
3855
+ "hasDynamicHelp": false,
3856
+ "hiddenAliases": [],
3857
+ "id": "media:create-aspect",
3858
+ "pluginAlias": "@sanity/cli",
3859
+ "pluginName": "@sanity/cli",
3860
+ "pluginType": "core",
3861
+ "strict": true,
3862
+ "isESM": true,
3863
+ "relativePath": [
3864
+ "dist",
3865
+ "commands",
3866
+ "media",
3867
+ "create-aspect.js"
3868
+ ]
3869
+ },
3870
+ "media:delete-aspect": {
3871
+ "aliases": [],
3872
+ "args": {
3873
+ "aspectName": {
3874
+ "description": "Name of the aspect to delete",
3875
+ "name": "aspectName",
3876
+ "required": true
3877
+ }
3878
+ },
3879
+ "description": "Delete an aspect definition",
3880
+ "examples": [
3824
3881
  {
3825
- "command": "<%= config.bin %> <%= command.id %> --workspace default",
3826
- "description": "Deploy the schema for only the workspace \"default\""
3882
+ "command": "<%= config.bin %> <%= command.id %> someAspect",
3883
+ "description": "Delete the aspect named \"someAspect\""
3827
3884
  }
3828
3885
  ],
3829
3886
  "flags": {
3830
- "extract-manifest": {
3831
- "description": "Regenerate manifest before deploying (use --no-extract-manifest to skip)",
3832
- "name": "extract-manifest",
3833
- "allowNo": true,
3834
- "type": "boolean"
3835
- },
3836
- "manifest-dir": {
3837
- "description": "Directory containing manifest file",
3838
- "name": "manifest-dir",
3839
- "default": "./dist/static",
3887
+ "project-id": {
3888
+ "char": "p",
3889
+ "description": "Project ID to delete media aspect from (overrides CLI configuration)",
3890
+ "helpGroup": "OVERRIDE",
3891
+ "name": "project-id",
3840
3892
  "hasDynamicHelp": false,
3841
- "helpValue": "<directory>",
3893
+ "helpValue": "<id>",
3842
3894
  "multiple": false,
3843
3895
  "type": "option"
3844
3896
  },
3845
- "tag": {
3846
- "description": "Add a tag suffix to the schema id",
3847
- "name": "tag",
3897
+ "media-library-id": {
3898
+ "description": "The id of the target media library",
3899
+ "name": "media-library-id",
3900
+ "required": false,
3848
3901
  "hasDynamicHelp": false,
3849
- "helpValue": "<tag>",
3850
3902
  "multiple": false,
3851
3903
  "type": "option"
3852
3904
  },
3853
- "verbose": {
3854
- "description": "Print detailed information during deployment",
3855
- "name": "verbose",
3905
+ "yes": {
3906
+ "aliases": [
3907
+ "y"
3908
+ ],
3909
+ "description": "Skip confirmation prompt",
3910
+ "name": "yes",
3911
+ "required": false,
3856
3912
  "allowNo": false,
3857
3913
  "type": "boolean"
3858
- },
3859
- "workspace": {
3860
- "description": "The name of the workspace to deploy a schema for",
3861
- "name": "workspace",
3862
- "hasDynamicHelp": false,
3863
- "helpValue": "<name>",
3864
- "multiple": false,
3865
- "type": "option"
3866
3914
  }
3867
3915
  },
3868
- "hasDynamicHelp": false,
3869
- "hiddenAliases": [
3870
- "schema:deploy"
3871
- ],
3872
- "id": "schemas:deploy",
3916
+ "hasDynamicHelp": false,
3917
+ "hiddenAliases": [],
3918
+ "id": "media:delete-aspect",
3873
3919
  "pluginAlias": "@sanity/cli",
3874
3920
  "pluginName": "@sanity/cli",
3875
3921
  "pluginType": "core",
@@ -3878,79 +3924,60 @@
3878
3924
  "relativePath": [
3879
3925
  "dist",
3880
3926
  "commands",
3881
- "schemas",
3882
- "deploy.js"
3927
+ "media",
3928
+ "delete-aspect.js"
3883
3929
  ]
3884
3930
  },
3885
- "schemas:extract": {
3931
+ "media:deploy-aspect": {
3886
3932
  "aliases": [],
3887
- "args": {},
3888
- "description": "Extract a JSON representation of a Sanity schema within a Studio context.\n\nNote: This command is experimental and subject to change.",
3933
+ "args": {
3934
+ "aspectName": {
3935
+ "description": "Name of the aspect to deploy",
3936
+ "name": "aspectName",
3937
+ "required": false
3938
+ }
3939
+ },
3940
+ "description": "Deploy an aspect",
3889
3941
  "examples": [
3890
3942
  {
3891
- "command": "<%= config.bin %> <%= command.id %> --workspace default",
3892
- "description": "Extracts schema types in a Sanity project with more than one workspace"
3893
- },
3894
- {
3895
- "command": "<%= config.bin %> <%= command.id %> --watch",
3896
- "description": "Watch mode - re-extract on changes"
3943
+ "command": "<%= config.bin %> <%= command.id %> someAspect",
3944
+ "description": "Deploy the aspect named \"someAspect\""
3897
3945
  },
3898
3946
  {
3899
- "command": "<%= config.bin %> <%= command.id %> --watch --watch-patterns \"lib/**/*.ts\"",
3900
- "description": "Watch with custom glob patterns"
3947
+ "command": "<%= config.bin %> <%= command.id %> --all",
3948
+ "description": "Deploy all aspects"
3901
3949
  }
3902
3950
  ],
3903
3951
  "flags": {
3904
- "enforce-required-fields": {
3905
- "description": "Makes the schema generated treat fields marked as required as non-optional",
3906
- "name": "enforce-required-fields",
3907
- "allowNo": false,
3908
- "type": "boolean"
3909
- },
3910
- "format": {
3911
- "description": "Output format (currently only groq-type-nodes)",
3912
- "name": "format",
3913
- "default": "groq-type-nodes",
3914
- "hasDynamicHelp": false,
3915
- "helpValue": "<format>",
3916
- "multiple": false,
3917
- "type": "option"
3918
- },
3919
- "path": {
3920
- "description": "Optional path to specify destination of the schema file",
3921
- "name": "path",
3952
+ "project-id": {
3953
+ "char": "p",
3954
+ "description": "Project ID to deploy media aspect to (overrides CLI configuration)",
3955
+ "helpGroup": "OVERRIDE",
3956
+ "name": "project-id",
3922
3957
  "hasDynamicHelp": false,
3958
+ "helpValue": "<id>",
3923
3959
  "multiple": false,
3924
3960
  "type": "option"
3925
3961
  },
3926
- "watch": {
3927
- "description": "Enable watch mode to re-extract schema on file changes",
3928
- "name": "watch",
3962
+ "all": {
3963
+ "description": "Deploy all aspects",
3964
+ "name": "all",
3965
+ "required": false,
3929
3966
  "allowNo": false,
3930
3967
  "type": "boolean"
3931
3968
  },
3932
- "watch-patterns": {
3933
- "description": "Additional glob pattern(s) to watch (can be specified multiple times)",
3934
- "name": "watch-patterns",
3935
- "hasDynamicHelp": false,
3936
- "helpValue": "<glob>",
3937
- "multiple": true,
3938
- "type": "option"
3939
- },
3940
- "workspace": {
3941
- "description": "The name of the workspace to generate a schema for",
3942
- "name": "workspace",
3969
+ "media-library-id": {
3970
+ "description": "The id of the target media library",
3971
+ "name": "media-library-id",
3972
+ "required": false,
3943
3973
  "hasDynamicHelp": false,
3944
- "helpValue": "<name>",
3945
3974
  "multiple": false,
3946
3975
  "type": "option"
3947
3976
  }
3948
3977
  },
3949
3978
  "hasDynamicHelp": false,
3950
- "hiddenAliases": [
3951
- "schema:extract"
3952
- ],
3953
- "id": "schemas:extract",
3979
+ "hiddenAliases": [],
3980
+ "id": "media:deploy-aspect",
3954
3981
  "pluginAlias": "@sanity/cli",
3955
3982
  "pluginName": "@sanity/cli",
3956
3983
  "pluginType": "core",
@@ -3959,70 +3986,75 @@
3959
3986
  "relativePath": [
3960
3987
  "dist",
3961
3988
  "commands",
3962
- "schemas",
3963
- "extract.js"
3989
+ "media",
3990
+ "deploy-aspect.js"
3964
3991
  ]
3965
3992
  },
3966
- "schemas:list": {
3993
+ "media:export": {
3967
3994
  "aliases": [],
3968
- "args": {},
3969
- "description": "List all schemas in the current dataset.\n\nNote: This command is experimental and subject to change.\n\nRegenerates a manifest file by default. To reuse an existing manifest, use --no-extract-manifest.",
3995
+ "args": {
3996
+ "destination": {
3997
+ "description": "Output destination file path",
3998
+ "name": "destination"
3999
+ }
4000
+ },
4001
+ "description": "Export file and image assets from a media library (excludes video)",
3970
4002
  "examples": [
3971
4003
  {
3972
4004
  "command": "<%= config.bin %> <%= command.id %>",
3973
- "description": "List all schemas found in any workspace dataset in a table"
3974
- },
3975
- {
3976
- "command": "<%= config.bin %> <%= command.id %> --id _.schemas.workspaceName",
3977
- "description": "Get a schema for a given id"
4005
+ "description": "Export media library interactively"
3978
4006
  },
3979
4007
  {
3980
- "command": "<%= config.bin %> <%= command.id %> --json",
3981
- "description": "Get stored schemas as pretty-printed json-array"
4008
+ "command": "<%= config.bin %> <%= command.id %> output.tar.gz",
4009
+ "description": "Export media library to output.tar.gz"
3982
4010
  },
3983
4011
  {
3984
- "command": "<%= config.bin %> <%= command.id %> --json --id _.schemas.workspaceName",
3985
- "description": "Get singular stored schema as pretty-printed json-object"
4012
+ "command": "<%= config.bin %> <%= command.id %> --media-library-id my-library-id",
4013
+ "description": "Export specific media library"
3986
4014
  }
3987
4015
  ],
3988
4016
  "flags": {
3989
- "extract-manifest": {
3990
- "description": "Regenerate manifest before listing (use --no-extract-manifest to skip)",
3991
- "hidden": true,
3992
- "name": "extract-manifest",
3993
- "allowNo": true,
3994
- "type": "boolean"
3995
- },
3996
- "id": {
3997
- "description": "Fetch a single schema by id",
3998
- "name": "id",
4017
+ "project-id": {
4018
+ "char": "p",
4019
+ "description": "Project ID to export media from (overrides CLI configuration)",
4020
+ "helpGroup": "OVERRIDE",
4021
+ "name": "project-id",
3999
4022
  "hasDynamicHelp": false,
4000
- "helpValue": "<schema_id>",
4023
+ "helpValue": "<id>",
4001
4024
  "multiple": false,
4002
4025
  "type": "option"
4003
4026
  },
4004
- "json": {
4005
- "description": "Get schema as json",
4006
- "name": "json",
4007
- "allowNo": false,
4008
- "type": "boolean"
4027
+ "asset-concurrency": {
4028
+ "description": "Concurrent number of asset downloads",
4029
+ "name": "asset-concurrency",
4030
+ "default": 8,
4031
+ "hasDynamicHelp": false,
4032
+ "multiple": false,
4033
+ "type": "option"
4009
4034
  },
4010
- "manifest-dir": {
4011
- "description": "Directory containing manifest file",
4012
- "hidden": true,
4013
- "name": "manifest-dir",
4014
- "default": "./dist/static",
4035
+ "media-library-id": {
4036
+ "description": "The id of the target media library",
4037
+ "name": "media-library-id",
4015
4038
  "hasDynamicHelp": false,
4016
- "helpValue": "<directory>",
4017
4039
  "multiple": false,
4018
4040
  "type": "option"
4041
+ },
4042
+ "no-compress": {
4043
+ "description": "Skips compressing tarball entries (still generates a gzip file)",
4044
+ "name": "no-compress",
4045
+ "allowNo": false,
4046
+ "type": "boolean"
4047
+ },
4048
+ "overwrite": {
4049
+ "description": "Overwrite any file with the same name",
4050
+ "name": "overwrite",
4051
+ "allowNo": false,
4052
+ "type": "boolean"
4019
4053
  }
4020
4054
  },
4021
4055
  "hasDynamicHelp": false,
4022
- "hiddenAliases": [
4023
- "schema:list"
4024
- ],
4025
- "id": "schemas:list",
4056
+ "hiddenAliases": [],
4057
+ "id": "media:export",
4026
4058
  "pluginAlias": "@sanity/cli",
4027
4059
  "pluginName": "@sanity/cli",
4028
4060
  "pluginType": "core",
@@ -4031,79 +4063,62 @@
4031
4063
  "relativePath": [
4032
4064
  "dist",
4033
4065
  "commands",
4034
- "schemas",
4035
- "list.js"
4066
+ "media",
4067
+ "export.js"
4036
4068
  ]
4037
4069
  },
4038
- "schemas:validate": {
4070
+ "media:import": {
4039
4071
  "aliases": [],
4040
- "args": {},
4041
- "description": "Validates all schema types specified in a workspace",
4072
+ "args": {
4073
+ "source": {
4074
+ "description": "Image file or folder to import from",
4075
+ "name": "source",
4076
+ "required": true
4077
+ }
4078
+ },
4079
+ "description": "Import a set of assets to the target media library.",
4042
4080
  "examples": [
4043
4081
  {
4044
- "command": "<%= config.bin %> <%= command.id %> --workspace default",
4045
- "description": "Validates all schema types in a Sanity project with more than one workspace"
4046
- },
4047
- {
4048
- "command": "<%= config.bin %> <%= command.id %> > report.txt",
4049
- "description": "Save the results of the report into a file"
4082
+ "command": "<%= config.bin %> <%= command.id %> products",
4083
+ "description": "Import all assets from the \"products\" directory"
4050
4084
  },
4051
4085
  {
4052
- "command": "<%= config.bin %> <%= command.id %> --level error",
4053
- "description": "Report out only errors"
4086
+ "command": "<%= config.bin %> <%= command.id %> gallery.tar.gz",
4087
+ "description": "Import all assets from \"gallery\" archive"
4054
4088
  },
4055
4089
  {
4056
- "command": "<%= config.bin %> <%= command.id %> --debug-metafile-path metafile.json",
4057
- "description": "Generate a report which can be analyzed with https://esbuild.github.io/analyze/"
4090
+ "command": "<%= config.bin %> <%= command.id %> products --replace-aspects",
4091
+ "description": "Import all assets from the \"products\" directory and replace aspects"
4058
4092
  }
4059
4093
  ],
4060
4094
  "flags": {
4061
- "debug-metafile-path": {
4062
- "description": "Optional path where a metafile will be written for build analysis. Only written on successful validation. Can be analyzed at https://esbuild.github.io/analyze/",
4063
- "helpGroup": "DEBUG",
4064
- "name": "debug-metafile-path",
4065
- "hasDynamicHelp": false,
4066
- "multiple": false,
4067
- "type": "option"
4068
- },
4069
- "format": {
4070
- "description": "The output format used to print schema errors and warnings",
4071
- "name": "format",
4072
- "default": "pretty",
4095
+ "project-id": {
4096
+ "char": "p",
4097
+ "description": "Project ID to import media to (overrides CLI configuration)",
4098
+ "helpGroup": "OVERRIDE",
4099
+ "name": "project-id",
4073
4100
  "hasDynamicHelp": false,
4101
+ "helpValue": "<id>",
4074
4102
  "multiple": false,
4075
- "options": [
4076
- "pretty",
4077
- "ndjson",
4078
- "json"
4079
- ],
4080
4103
  "type": "option"
4081
4104
  },
4082
- "level": {
4083
- "description": "The minimum level reported out",
4084
- "name": "level",
4085
- "default": "warning",
4105
+ "media-library-id": {
4106
+ "description": "The id of the target media library",
4107
+ "name": "media-library-id",
4086
4108
  "hasDynamicHelp": false,
4087
4109
  "multiple": false,
4088
- "options": [
4089
- "error",
4090
- "warning"
4091
- ],
4092
4110
  "type": "option"
4093
4111
  },
4094
- "workspace": {
4095
- "description": "The name of the workspace to use when validating all schema types",
4096
- "name": "workspace",
4097
- "hasDynamicHelp": false,
4098
- "multiple": false,
4099
- "type": "option"
4112
+ "replace-aspects": {
4113
+ "description": "Replace existing aspect data. All versions will be replaced (e.g. published and draft aspect data)",
4114
+ "name": "replace-aspects",
4115
+ "allowNo": false,
4116
+ "type": "boolean"
4100
4117
  }
4101
4118
  },
4102
4119
  "hasDynamicHelp": false,
4103
- "hiddenAliases": [
4104
- "schema:validate"
4105
- ],
4106
- "id": "schemas:validate",
4120
+ "hiddenAliases": [],
4121
+ "id": "media:import",
4107
4122
  "pluginAlias": "@sanity/cli",
4108
4123
  "pluginName": "@sanity/cli",
4109
4124
  "pluginType": "core",
@@ -4112,8 +4127,8 @@
4112
4127
  "relativePath": [
4113
4128
  "dist",
4114
4129
  "commands",
4115
- "schemas",
4116
- "validate.js"
4130
+ "media",
4131
+ "import.js"
4117
4132
  ]
4118
4133
  },
4119
4134
  "telemetry:disable": {
@@ -5067,5 +5082,5 @@
5067
5082
  ]
5068
5083
  }
5069
5084
  },
5070
- "version": "6.3.2"
5085
+ "version": "6.4.0"
5071
5086
  }