@sanity/cli 6.0.0-alpha.20 → 6.0.0-alpha.21

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 (227) hide show
  1. package/README.md +405 -225
  2. package/dist/actions/auth/authServer.js +13 -11
  3. package/dist/actions/auth/authServer.js.map +1 -1
  4. package/dist/actions/auth/login/getProvider.js +43 -39
  5. package/dist/actions/auth/login/getProvider.js.map +1 -1
  6. package/dist/actions/auth/login/getSSOProvider.js +25 -19
  7. package/dist/actions/auth/login/getSSOProvider.js.map +1 -1
  8. package/dist/actions/auth/login/login.js +12 -33
  9. package/dist/actions/auth/login/login.js.map +1 -1
  10. package/dist/actions/auth/types.js.map +1 -1
  11. package/dist/actions/codemods/reactIconsV3.js +2 -2
  12. package/dist/actions/codemods/reactIconsV3.js.map +1 -1
  13. package/dist/actions/debug/formatters.js +22 -0
  14. package/dist/actions/debug/formatters.js.map +1 -0
  15. package/dist/actions/dev/getDashboardAppUrl.js +3 -3
  16. package/dist/actions/dev/getDashboardAppUrl.js.map +1 -1
  17. package/dist/actions/documents/validateDocuments.worker.js +2 -2
  18. package/dist/actions/documents/validateDocuments.worker.js.map +1 -1
  19. package/dist/actions/documents/validation/reporters/prettyReporter/formatDocumentValidation.js +1 -1
  20. package/dist/actions/documents/validation/reporters/prettyReporter/formatDocumentValidation.js.map +1 -1
  21. package/dist/actions/documents/validation/reporters/prettyReporter/tree.js +108 -0
  22. package/dist/actions/documents/validation/reporters/prettyReporter/tree.js.map +1 -0
  23. package/dist/actions/graphql/SchemaError.js +4 -26
  24. package/dist/actions/graphql/SchemaError.js.map +1 -1
  25. package/dist/actions/graphql/extractFromSanitySchema.js +3 -4
  26. package/dist/actions/graphql/extractFromSanitySchema.js.map +1 -1
  27. package/dist/actions/graphql/extractGraphQLAPIs.js +150 -0
  28. package/dist/actions/graphql/extractGraphQLAPIs.js.map +1 -0
  29. package/dist/actions/graphql/extractGraphQLAPIs.worker.js +12 -0
  30. package/dist/actions/graphql/extractGraphQLAPIs.worker.js.map +1 -0
  31. package/dist/actions/graphql/gen1/index.js +5 -5
  32. package/dist/actions/graphql/gen1/index.js.map +1 -1
  33. package/dist/actions/graphql/gen2/index.js +6 -6
  34. package/dist/actions/graphql/gen2/index.js.map +1 -1
  35. package/dist/actions/graphql/gen3/generateTypeQueries.js +2 -3
  36. package/dist/actions/graphql/gen3/generateTypeQueries.js.map +1 -1
  37. package/dist/actions/graphql/gen3/index.js +6 -7
  38. package/dist/actions/graphql/gen3/index.js.map +1 -1
  39. package/dist/actions/graphql/getGraphQLAPIs.js +12 -35
  40. package/dist/actions/graphql/getGraphQLAPIs.js.map +1 -1
  41. package/dist/actions/graphql/getGraphQLAPIs.worker.js +75 -106
  42. package/dist/actions/graphql/getGraphQLAPIs.worker.js.map +1 -1
  43. package/dist/actions/graphql/helpers.js +13 -0
  44. package/dist/actions/graphql/helpers.js.map +1 -1
  45. package/dist/actions/graphql/resolveGraphQLApisFromWorkspaces.js +187 -0
  46. package/dist/actions/graphql/resolveGraphQLApisFromWorkspaces.js.map +1 -0
  47. package/dist/actions/graphql/types.js +1 -1
  48. package/dist/actions/graphql/types.js.map +1 -1
  49. package/dist/actions/init/bootstrapLocalTemplate.js +2 -1
  50. package/dist/actions/init/bootstrapLocalTemplate.js.map +1 -1
  51. package/dist/actions/init/bootstrapRemoteTemplate.js +6 -5
  52. package/dist/actions/init/bootstrapRemoteTemplate.js.map +1 -1
  53. package/dist/actions/init/createPackageManifest.js +5 -0
  54. package/dist/actions/init/createPackageManifest.js.map +1 -1
  55. package/dist/actions/init/templates/appQuickstart.js +2 -1
  56. package/dist/actions/init/templates/appQuickstart.js.map +1 -1
  57. package/dist/actions/init/templates/appSanityUi.js +2 -1
  58. package/dist/actions/init/templates/appSanityUi.js.map +1 -1
  59. package/dist/actions/init/types.js.map +1 -1
  60. package/dist/actions/media/importMedia.js +1 -2
  61. package/dist/actions/media/importMedia.js.map +1 -1
  62. package/dist/actions/projects/getManageUrl.js +1 -2
  63. package/dist/actions/projects/getManageUrl.js.map +1 -1
  64. package/dist/actions/schema/validateSchema.worker.js +1 -3
  65. package/dist/actions/schema/validateSchema.worker.js.map +1 -1
  66. package/dist/actions/telemetry/isTrueish.js +10 -0
  67. package/dist/actions/telemetry/isTrueish.js.map +1 -0
  68. package/dist/actions/telemetry/resolveConsent.js +2 -1
  69. package/dist/actions/telemetry/resolveConsent.js.map +1 -1
  70. package/dist/actions/telemetry/setConsent.js +2 -1
  71. package/dist/actions/telemetry/setConsent.js.map +1 -1
  72. package/dist/actions/versions/findSanityModulesVersions.js +1 -2
  73. package/dist/actions/versions/findSanityModulesVersions.js.map +1 -1
  74. package/dist/commands/backup/disable.js +21 -1
  75. package/dist/commands/backup/disable.js.map +1 -1
  76. package/dist/commands/backup/download.js +18 -4
  77. package/dist/commands/backup/download.js.map +1 -1
  78. package/dist/commands/backup/enable.js +21 -1
  79. package/dist/commands/backup/enable.js.map +1 -1
  80. package/dist/commands/backup/list.js +15 -1
  81. package/dist/commands/backup/list.js.map +1 -1
  82. package/dist/commands/cors/add.js +19 -1
  83. package/dist/commands/cors/add.js.map +1 -1
  84. package/dist/commands/cors/delete.js +21 -1
  85. package/dist/commands/cors/delete.js.map +1 -1
  86. package/dist/commands/cors/list.js +21 -1
  87. package/dist/commands/cors/list.js.map +1 -1
  88. package/dist/commands/dataset/alias/create.js +4 -2
  89. package/dist/commands/dataset/alias/create.js.map +1 -1
  90. package/dist/commands/dataset/alias/delete.js +4 -2
  91. package/dist/commands/dataset/alias/delete.js.map +1 -1
  92. package/dist/commands/dataset/alias/link.js +4 -2
  93. package/dist/commands/dataset/alias/link.js.map +1 -1
  94. package/dist/commands/dataset/alias/unlink.js +4 -2
  95. package/dist/commands/dataset/alias/unlink.js.map +1 -1
  96. package/dist/commands/dataset/copy.js +4 -2
  97. package/dist/commands/dataset/copy.js.map +1 -1
  98. package/dist/commands/dataset/create.js +4 -2
  99. package/dist/commands/dataset/create.js.map +1 -1
  100. package/dist/commands/dataset/delete.js +4 -2
  101. package/dist/commands/dataset/delete.js.map +1 -1
  102. package/dist/commands/dataset/embeddings/disable.js +4 -2
  103. package/dist/commands/dataset/embeddings/disable.js.map +1 -1
  104. package/dist/commands/dataset/embeddings/enable.js +6 -4
  105. package/dist/commands/dataset/embeddings/enable.js.map +1 -1
  106. package/dist/commands/dataset/embeddings/status.js +4 -2
  107. package/dist/commands/dataset/embeddings/status.js.map +1 -1
  108. package/dist/commands/dataset/export.js +7 -11
  109. package/dist/commands/dataset/export.js.map +1 -1
  110. package/dist/commands/dataset/list.js +4 -2
  111. package/dist/commands/dataset/list.js.map +1 -1
  112. package/dist/commands/dataset/visibility/get.js +4 -2
  113. package/dist/commands/dataset/visibility/get.js.map +1 -1
  114. package/dist/commands/dataset/visibility/set.js +4 -2
  115. package/dist/commands/dataset/visibility/set.js.map +1 -1
  116. package/dist/commands/debug.js +2 -1
  117. package/dist/commands/debug.js.map +1 -1
  118. package/dist/commands/documents/create.js +15 -5
  119. package/dist/commands/documents/create.js.map +1 -1
  120. package/dist/commands/documents/delete.js +17 -6
  121. package/dist/commands/documents/delete.js.map +1 -1
  122. package/dist/commands/documents/get.js +15 -6
  123. package/dist/commands/documents/get.js.map +1 -1
  124. package/dist/commands/documents/query.js +24 -12
  125. package/dist/commands/documents/query.js.map +1 -1
  126. package/dist/commands/documents/validate.js +29 -9
  127. package/dist/commands/documents/validate.js.map +1 -1
  128. package/dist/commands/graphql/deploy.js +55 -28
  129. package/dist/commands/graphql/deploy.js.map +1 -1
  130. package/dist/commands/graphql/list.js +14 -1
  131. package/dist/commands/graphql/list.js.map +1 -1
  132. package/dist/commands/graphql/undeploy.js +36 -14
  133. package/dist/commands/graphql/undeploy.js.map +1 -1
  134. package/dist/commands/hook/attempt.js +21 -1
  135. package/dist/commands/hook/attempt.js.map +1 -1
  136. package/dist/commands/hook/create.js +22 -2
  137. package/dist/commands/hook/create.js.map +1 -1
  138. package/dist/commands/hook/delete.js +21 -1
  139. package/dist/commands/hook/delete.js.map +1 -1
  140. package/dist/commands/hook/list.js +21 -1
  141. package/dist/commands/hook/list.js.map +1 -1
  142. package/dist/commands/hook/logs.js +19 -1
  143. package/dist/commands/hook/logs.js.map +1 -1
  144. package/dist/commands/init.js +13 -6
  145. package/dist/commands/init.js.map +1 -1
  146. package/dist/commands/login.js +13 -6
  147. package/dist/commands/login.js.map +1 -1
  148. package/dist/commands/logout.js +8 -6
  149. package/dist/commands/logout.js.map +1 -1
  150. package/dist/commands/media/create-aspect.js +3 -3
  151. package/dist/commands/media/create-aspect.js.map +1 -1
  152. package/dist/commands/media/delete-aspect.js +8 -1
  153. package/dist/commands/media/delete-aspect.js.map +1 -1
  154. package/dist/commands/media/deploy-aspect.js +20 -3
  155. package/dist/commands/media/deploy-aspect.js.map +1 -1
  156. package/dist/commands/media/export.js +8 -1
  157. package/dist/commands/media/export.js.map +1 -1
  158. package/dist/commands/media/import.js +9 -2
  159. package/dist/commands/media/import.js.map +1 -1
  160. package/dist/commands/schema/delete.js +19 -6
  161. package/dist/commands/schema/delete.js.map +1 -1
  162. package/dist/commands/schema/deploy.js +8 -2
  163. package/dist/commands/schema/deploy.js.map +1 -1
  164. package/dist/commands/tokens/add.js +23 -1
  165. package/dist/commands/tokens/add.js.map +1 -1
  166. package/dist/commands/tokens/delete.js +19 -1
  167. package/dist/commands/tokens/delete.js.map +1 -1
  168. package/dist/commands/tokens/list.js +19 -1
  169. package/dist/commands/tokens/list.js.map +1 -1
  170. package/dist/commands/users/invite.js +23 -1
  171. package/dist/commands/users/invite.js.map +1 -1
  172. package/dist/commands/users/list.js +23 -1
  173. package/dist/commands/users/list.js.map +1 -1
  174. package/dist/hooks/prerun/flushTelemetry.worker.js +1 -1
  175. package/dist/hooks/prerun/flushTelemetry.worker.js.map +1 -1
  176. package/dist/hooks/prerun/setupTelemetry.js +2 -1
  177. package/dist/hooks/prerun/setupTelemetry.js.map +1 -1
  178. package/dist/prompts/promptForProject.js.map +1 -1
  179. package/dist/{actions/auth/login/promptProviders.js → prompts/promptForProviders.js} +3 -3
  180. package/dist/prompts/promptForProviders.js.map +1 -0
  181. package/dist/services/auth.js +36 -3
  182. package/dist/services/auth.js.map +1 -1
  183. package/dist/services/docs.js +2 -2
  184. package/dist/services/docs.js.map +1 -1
  185. package/dist/services/getUrlHeaders.js +0 -2
  186. package/dist/services/getUrlHeaders.js.map +1 -1
  187. package/dist/services/projects.js +4 -2
  188. package/dist/services/projects.js.map +1 -1
  189. package/dist/services/telemetry.js +2 -1
  190. package/dist/services/telemetry.js.map +1 -1
  191. package/dist/util/createExpiringConfig.js +64 -0
  192. package/dist/util/createExpiringConfig.js.map +1 -0
  193. package/dist/util/detectFramework.js +135 -0
  194. package/dist/util/detectFramework.js.map +1 -0
  195. package/dist/util/extractDocumentsFromNdjsonOrTarball.js +1 -2
  196. package/dist/util/extractDocumentsFromNdjsonOrTarball.js.map +1 -1
  197. package/dist/util/isSchemaError.js +11 -0
  198. package/dist/util/isSchemaError.js.map +1 -0
  199. package/dist/util/isTar.js +8 -0
  200. package/dist/util/isTar.js.map +1 -0
  201. package/dist/util/sharedFlags.js +44 -14
  202. package/dist/util/sharedFlags.js.map +1 -1
  203. package/dist/util/telemetry/cleanupOldTelemetryFiles.js +30 -0
  204. package/dist/util/telemetry/cleanupOldTelemetryFiles.js.map +1 -0
  205. package/dist/util/telemetry/createTelemetryStore.js +95 -0
  206. package/dist/util/telemetry/createTelemetryStore.js.map +1 -0
  207. package/dist/util/telemetry/createTraceId.js +10 -0
  208. package/dist/util/telemetry/createTraceId.js.map +1 -0
  209. package/dist/util/telemetry/findTelemetryFiles.js +35 -0
  210. package/dist/util/telemetry/findTelemetryFiles.js.map +1 -0
  211. package/dist/util/telemetry/flushTelemetryFiles.js +118 -0
  212. package/dist/util/telemetry/flushTelemetryFiles.js.map +1 -0
  213. package/dist/util/telemetry/generateTelemetryFilePath.js +30 -0
  214. package/dist/util/telemetry/generateTelemetryFilePath.js.map +1 -0
  215. package/dist/util/telemetry/logger.js +59 -0
  216. package/dist/util/telemetry/logger.js.map +1 -0
  217. package/dist/util/telemetry/readNDJSON.js +28 -0
  218. package/dist/util/telemetry/readNDJSON.js.map +1 -0
  219. package/dist/util/telemetry/telemetryStoreDebug.js +7 -0
  220. package/dist/util/telemetry/telemetryStoreDebug.js.map +1 -0
  221. package/dist/util/telemetry/trace.js +150 -0
  222. package/dist/util/telemetry/trace.js.map +1 -0
  223. package/dist/util/update/updateChecker.js +2 -1
  224. package/dist/util/update/updateChecker.js.map +1 -1
  225. package/oclif.manifest.json +966 -529
  226. package/package.json +19 -22
  227. package/dist/actions/auth/login/promptProviders.js.map +0 -1
@@ -912,7 +912,18 @@
912
912
  "description": "Disable backup for the production dataset"
913
913
  }
914
914
  ],
915
- "flags": {},
915
+ "flags": {
916
+ "project-id": {
917
+ "char": "p",
918
+ "description": "Project ID to disable backups for (overrides CLI configuration)",
919
+ "helpGroup": "OVERRIDE",
920
+ "name": "project-id",
921
+ "hasDynamicHelp": false,
922
+ "helpValue": "<id>",
923
+ "multiple": false,
924
+ "type": "option"
925
+ }
926
+ },
916
927
  "hasDynamicHelp": false,
917
928
  "hiddenAliases": [],
918
929
  "id": "backup:disable",
@@ -957,6 +968,16 @@
957
968
  }
958
969
  ],
959
970
  "flags": {
971
+ "project-id": {
972
+ "char": "p",
973
+ "description": "Project ID to download backup from (overrides CLI configuration)",
974
+ "helpGroup": "OVERRIDE",
975
+ "name": "project-id",
976
+ "hasDynamicHelp": false,
977
+ "helpValue": "<id>",
978
+ "multiple": false,
979
+ "type": "option"
980
+ },
960
981
  "backup-id": {
961
982
  "description": "The backup ID to download",
962
983
  "name": "backup-id",
@@ -1021,7 +1042,18 @@
1021
1042
  "description": "Enable backup for the production dataset"
1022
1043
  }
1023
1044
  ],
1024
- "flags": {},
1045
+ "flags": {
1046
+ "project-id": {
1047
+ "char": "p",
1048
+ "description": "Project ID to enable backups for (overrides CLI configuration)",
1049
+ "helpGroup": "OVERRIDE",
1050
+ "name": "project-id",
1051
+ "hasDynamicHelp": false,
1052
+ "helpValue": "<id>",
1053
+ "multiple": false,
1054
+ "type": "option"
1055
+ }
1056
+ },
1025
1057
  "hasDynamicHelp": false,
1026
1058
  "hiddenAliases": [],
1027
1059
  "id": "backup:enable",
@@ -1066,6 +1098,16 @@
1066
1098
  }
1067
1099
  ],
1068
1100
  "flags": {
1101
+ "project-id": {
1102
+ "char": "p",
1103
+ "description": "Project ID to list backups for (overrides CLI configuration)",
1104
+ "helpGroup": "OVERRIDE",
1105
+ "name": "project-id",
1106
+ "hasDynamicHelp": false,
1107
+ "helpValue": "<id>",
1108
+ "multiple": false,
1109
+ "type": "option"
1110
+ },
1069
1111
  "after": {
1070
1112
  "description": "Only return backups after this date (inclusive, YYYY-MM-DD format)",
1071
1113
  "name": "after",
@@ -1127,9 +1169,23 @@
1127
1169
  {
1128
1170
  "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
1129
1171
  "description": "Add a production origin with credentials allowed"
1172
+ },
1173
+ {
1174
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project-id abc123",
1175
+ "description": "Add a CORS origin for a specific project"
1130
1176
  }
1131
1177
  ],
1132
1178
  "flags": {
1179
+ "project-id": {
1180
+ "char": "p",
1181
+ "description": "Project ID to add CORS origin to (overrides CLI configuration)",
1182
+ "helpGroup": "OVERRIDE",
1183
+ "name": "project-id",
1184
+ "hasDynamicHelp": false,
1185
+ "helpValue": "<id>",
1186
+ "multiple": false,
1187
+ "type": "option"
1188
+ },
1133
1189
  "credentials": {
1134
1190
  "description": "Allow credentials (token/cookie) to be sent from this origin",
1135
1191
  "name": "credentials",
@@ -1171,9 +1227,24 @@
1171
1227
  {
1172
1228
  "command": "<%= config.bin %> <%= command.id %> https://example.com",
1173
1229
  "description": "Delete a specific CORS origin"
1230
+ },
1231
+ {
1232
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
1233
+ "description": "Delete a CORS origin from a specific project"
1174
1234
  }
1175
1235
  ],
1176
- "flags": {},
1236
+ "flags": {
1237
+ "project-id": {
1238
+ "char": "p",
1239
+ "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
1240
+ "helpGroup": "OVERRIDE",
1241
+ "name": "project-id",
1242
+ "hasDynamicHelp": false,
1243
+ "helpValue": "<id>",
1244
+ "multiple": false,
1245
+ "type": "option"
1246
+ }
1247
+ },
1177
1248
  "hasDynamicHelp": false,
1178
1249
  "hiddenAliases": [],
1179
1250
  "id": "cors:delete",
@@ -1197,9 +1268,24 @@
1197
1268
  {
1198
1269
  "command": "<%= config.bin %> <%= command.id %>",
1199
1270
  "description": "List CORS origins for the current project"
1271
+ },
1272
+ {
1273
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
1274
+ "description": "List CORS origins for a specific project"
1200
1275
  }
1201
1276
  ],
1202
- "flags": {},
1277
+ "flags": {
1278
+ "project-id": {
1279
+ "char": "p",
1280
+ "description": "Project ID to list CORS origins for (overrides CLI configuration)",
1281
+ "helpGroup": "OVERRIDE",
1282
+ "name": "project-id",
1283
+ "hasDynamicHelp": false,
1284
+ "helpValue": "<id>",
1285
+ "multiple": false,
1286
+ "type": "option"
1287
+ }
1288
+ },
1203
1289
  "hasDynamicHelp": false,
1204
1290
  "hiddenAliases": [],
1205
1291
  "id": "cors:list",
@@ -1267,9 +1353,11 @@
1267
1353
  "flags": {
1268
1354
  "project-id": {
1269
1355
  "char": "p",
1270
- "description": "Project ID to use. Overrides the project ID from the Sanity config.",
1356
+ "description": "Project ID to copy dataset in (overrides CLI configuration)",
1357
+ "helpGroup": "OVERRIDE",
1271
1358
  "name": "project-id",
1272
1359
  "hasDynamicHelp": false,
1360
+ "helpValue": "<id>",
1273
1361
  "multiple": false,
1274
1362
  "type": "option"
1275
1363
  },
@@ -1385,9 +1473,11 @@
1385
1473
  "flags": {
1386
1474
  "project-id": {
1387
1475
  "char": "p",
1388
- "description": "Project ID to use. Overrides the project ID from the Sanity config.",
1476
+ "description": "Project ID to create dataset in (overrides CLI configuration)",
1477
+ "helpGroup": "OVERRIDE",
1389
1478
  "name": "project-id",
1390
1479
  "hasDynamicHelp": false,
1480
+ "helpValue": "<id>",
1391
1481
  "multiple": false,
1392
1482
  "type": "option"
1393
1483
  },
@@ -1459,9 +1549,11 @@
1459
1549
  "flags": {
1460
1550
  "project-id": {
1461
1551
  "char": "p",
1462
- "description": "Project ID to use. Overrides the project ID from the Sanity config.",
1552
+ "description": "Project ID to delete dataset from (overrides CLI configuration)",
1553
+ "helpGroup": "OVERRIDE",
1463
1554
  "name": "project-id",
1464
1555
  "hasDynamicHelp": false,
1556
+ "helpValue": "<id>",
1465
1557
  "multiple": false,
1466
1558
  "type": "option"
1467
1559
  },
@@ -1522,9 +1614,11 @@
1522
1614
  "flags": {
1523
1615
  "project-id": {
1524
1616
  "char": "p",
1525
- "description": "Project ID to use. Overrides the project ID from the Sanity config.",
1617
+ "description": "Project ID to export dataset from (overrides CLI configuration)",
1618
+ "helpGroup": "OVERRIDE",
1526
1619
  "name": "project-id",
1527
1620
  "hasDynamicHelp": false,
1621
+ "helpValue": "<id>",
1528
1622
  "multiple": false,
1529
1623
  "type": "option"
1530
1624
  },
@@ -1744,9 +1838,11 @@
1744
1838
  "flags": {
1745
1839
  "project-id": {
1746
1840
  "char": "p",
1747
- "description": "Project ID to use. Overrides the project ID from the Sanity config.",
1841
+ "description": "Project ID to list datasets for (overrides CLI configuration)",
1842
+ "helpGroup": "OVERRIDE",
1748
1843
  "name": "project-id",
1749
1844
  "hasDynamicHelp": false,
1845
+ "helpValue": "<id>",
1750
1846
  "multiple": false,
1751
1847
  "type": "option"
1752
1848
  }
@@ -1916,14 +2012,30 @@
1916
2012
  {
1917
2013
  "command": "<%= config.bin %> <%= command.id %> --id myDocId --watch --replace --json5",
1918
2014
  "description": "Open configured $EDITOR and replace the document with the given content on each save. Use JSON5 file extension and parser for simplified syntax."
2015
+ },
2016
+ {
2017
+ "command": "<%= config.bin %> <%= command.id %> myDocument.json --project-id abc123",
2018
+ "description": "Create documents in a specific project"
1919
2019
  }
1920
2020
  ],
1921
2021
  "flags": {
2022
+ "project-id": {
2023
+ "char": "p",
2024
+ "description": "Project ID to create document(s) in (overrides CLI configuration)",
2025
+ "helpGroup": "OVERRIDE",
2026
+ "name": "project-id",
2027
+ "hasDynamicHelp": false,
2028
+ "helpValue": "<id>",
2029
+ "multiple": false,
2030
+ "type": "option"
2031
+ },
1922
2032
  "dataset": {
1923
2033
  "char": "d",
1924
- "description": "Dataset to create document(s) in (overrides config)",
2034
+ "description": "Dataset to create document(s) in (overrides CLI configuration)",
2035
+ "helpGroup": "OVERRIDE",
1925
2036
  "name": "dataset",
1926
2037
  "hasDynamicHelp": false,
2038
+ "helpValue": "<name>",
1927
2039
  "multiple": false,
1928
2040
  "type": "option"
1929
2041
  },
@@ -2005,13 +2117,30 @@
2005
2117
  {
2006
2118
  "command": "<%= config.bin %> <%= command.id %> doc1 doc2",
2007
2119
  "description": "Delete the document with ID \"doc1\" and \"doc2\""
2120
+ },
2121
+ {
2122
+ "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
2123
+ "description": "Delete a document from a specific project"
2008
2124
  }
2009
2125
  ],
2010
2126
  "flags": {
2127
+ "project-id": {
2128
+ "char": "p",
2129
+ "description": "Project ID to delete from (overrides CLI configuration)",
2130
+ "helpGroup": "OVERRIDE",
2131
+ "name": "project-id",
2132
+ "hasDynamicHelp": false,
2133
+ "helpValue": "<id>",
2134
+ "multiple": false,
2135
+ "type": "option"
2136
+ },
2011
2137
  "dataset": {
2012
- "description": "NAME to override dataset",
2138
+ "char": "d",
2139
+ "description": "Dataset to delete from (overrides CLI configuration)",
2140
+ "helpGroup": "OVERRIDE",
2013
2141
  "name": "dataset",
2014
2142
  "hasDynamicHelp": false,
2143
+ "helpValue": "<name>",
2015
2144
  "multiple": false,
2016
2145
  "type": "option"
2017
2146
  }
@@ -2053,14 +2182,30 @@
2053
2182
  {
2054
2183
  "command": "<%= config.bin %> <%= command.id %> myDocId --dataset production",
2055
2184
  "description": "Get document from a specific dataset"
2185
+ },
2186
+ {
2187
+ "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
2188
+ "description": "Get a document from a specific project"
2056
2189
  }
2057
2190
  ],
2058
2191
  "flags": {
2192
+ "project-id": {
2193
+ "char": "p",
2194
+ "description": "Project ID to get document from (overrides CLI configuration)",
2195
+ "helpGroup": "OVERRIDE",
2196
+ "name": "project-id",
2197
+ "hasDynamicHelp": false,
2198
+ "helpValue": "<id>",
2199
+ "multiple": false,
2200
+ "type": "option"
2201
+ },
2059
2202
  "dataset": {
2060
2203
  "char": "d",
2061
- "description": "Dataset to get document from (overrides config)",
2204
+ "description": "Dataset to get document from (overrides CLI configuration)",
2205
+ "helpGroup": "OVERRIDE",
2062
2206
  "name": "dataset",
2063
2207
  "hasDynamicHelp": false,
2208
+ "helpValue": "<name>",
2064
2209
  "multiple": false,
2065
2210
  "type": "option"
2066
2211
  },
@@ -2108,9 +2253,33 @@
2108
2253
  {
2109
2254
  "command": "<%= config.bin %> <%= command.id %> '*[_id == \"header\"] { \"headerText\": pt::text(body) }' --api-version v2021-06-07",
2110
2255
  "description": "Use API version v2021-06-07 and do a query"
2256
+ },
2257
+ {
2258
+ "command": "<%= config.bin %> <%= command.id %> '*[_type == \"post\"]' --project-id abc123 --dataset production",
2259
+ "description": "Query documents in a specific project and dataset"
2111
2260
  }
2112
2261
  ],
2113
2262
  "flags": {
2263
+ "project-id": {
2264
+ "char": "p",
2265
+ "description": "Project ID to query (overrides CLI configuration)",
2266
+ "helpGroup": "OVERRIDE",
2267
+ "name": "project-id",
2268
+ "hasDynamicHelp": false,
2269
+ "helpValue": "<id>",
2270
+ "multiple": false,
2271
+ "type": "option"
2272
+ },
2273
+ "dataset": {
2274
+ "char": "d",
2275
+ "description": "Dataset to query (overrides CLI configuration)",
2276
+ "helpGroup": "OVERRIDE",
2277
+ "name": "dataset",
2278
+ "hasDynamicHelp": false,
2279
+ "helpValue": "<name>",
2280
+ "multiple": false,
2281
+ "type": "option"
2282
+ },
2114
2283
  "anonymous": {
2115
2284
  "description": "Send the query without any authorization token",
2116
2285
  "name": "anonymous",
@@ -2125,14 +2294,6 @@
2125
2294
  "multiple": false,
2126
2295
  "type": "option"
2127
2296
  },
2128
- "dataset": {
2129
- "char": "d",
2130
- "description": "Dataset to query (overrides config)",
2131
- "name": "dataset",
2132
- "hasDynamicHelp": false,
2133
- "multiple": false,
2134
- "type": "option"
2135
- },
2136
2297
  "pretty": {
2137
2298
  "description": "Colorize JSON output",
2138
2299
  "name": "pretty",
@@ -2140,8 +2301,11 @@
2140
2301
  "type": "boolean"
2141
2302
  },
2142
2303
  "project": {
2143
- "char": "p",
2144
- "description": "Project ID to query (overrides config)",
2304
+ "deprecated": {
2305
+ "to": "project-id"
2306
+ },
2307
+ "description": "Project ID to query (overrides CLI configuration)",
2308
+ "hidden": true,
2145
2309
  "name": "project",
2146
2310
  "hasDynamicHelp": false,
2147
2311
  "multiple": false,
@@ -2183,14 +2347,30 @@
2183
2347
  {
2184
2348
  "command": "<%= config.bin %> <%= command.id %> --level info",
2185
2349
  "description": "Report out info level validation markers too"
2350
+ },
2351
+ {
2352
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
2353
+ "description": "Validate documents in a specific project and dataset"
2186
2354
  }
2187
2355
  ],
2188
2356
  "flags": {
2357
+ "project-id": {
2358
+ "char": "p",
2359
+ "description": "Override the project ID used. By default, this is derived from the given workspace",
2360
+ "helpGroup": "OVERRIDE",
2361
+ "name": "project-id",
2362
+ "hasDynamicHelp": false,
2363
+ "helpValue": "<id>",
2364
+ "multiple": false,
2365
+ "type": "option"
2366
+ },
2189
2367
  "dataset": {
2190
2368
  "char": "d",
2191
2369
  "description": "Override the dataset used. By default, this is derived from the given workspace",
2370
+ "helpGroup": "OVERRIDE",
2192
2371
  "name": "dataset",
2193
2372
  "hasDynamicHelp": false,
2373
+ "helpValue": "<name>",
2194
2374
  "multiple": false,
2195
2375
  "type": "option"
2196
2376
  },
@@ -2209,7 +2389,7 @@
2209
2389
  "type": "option"
2210
2390
  },
2211
2391
  "level": {
2212
- "description": "The minimum level reported out. Defaults to warning",
2392
+ "description": "The minimum level reported. Defaults to warning",
2213
2393
  "name": "level",
2214
2394
  "default": "warning",
2215
2395
  "hasDynamicHelp": false,
@@ -2230,7 +2410,7 @@
2230
2410
  "type": "option"
2231
2411
  },
2232
2412
  "max-fetch-concurrency": {
2233
- "description": "Specify how many `client.fetch` requests are allow concurrency at once",
2413
+ "description": "Specify how many `client.fetch` requests are allowed to run concurrently",
2234
2414
  "name": "max-fetch-concurrency",
2235
2415
  "default": 25,
2236
2416
  "hasDynamicHelp": false,
@@ -2298,9 +2478,12 @@
2298
2478
  "type": "option"
2299
2479
  },
2300
2480
  "dataset": {
2481
+ "char": "d",
2301
2482
  "description": "Deploy API for the given dataset",
2483
+ "helpGroup": "OVERRIDE",
2302
2484
  "name": "dataset",
2303
2485
  "hasDynamicHelp": false,
2486
+ "helpValue": "<name>",
2304
2487
  "multiple": false,
2305
2488
  "type": "option"
2306
2489
  },
@@ -2377,9 +2560,24 @@
2377
2560
  {
2378
2561
  "command": "<%= config.bin %> <%= command.id %>",
2379
2562
  "description": "List GraphQL endpoints for the current project"
2563
+ },
2564
+ {
2565
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2566
+ "description": "List GraphQL endpoints for a specific project"
2380
2567
  }
2381
2568
  ],
2382
- "flags": {},
2569
+ "flags": {
2570
+ "project-id": {
2571
+ "char": "p",
2572
+ "description": "Project ID to list GraphQL endpoints for (overrides CLI configuration)",
2573
+ "helpGroup": "OVERRIDE",
2574
+ "name": "project-id",
2575
+ "hasDynamicHelp": false,
2576
+ "helpValue": "<id>",
2577
+ "multiple": false,
2578
+ "type": "option"
2579
+ }
2580
+ },
2383
2581
  "hasDynamicHelp": false,
2384
2582
  "hiddenAliases": [],
2385
2583
  "id": "graphql:list",
@@ -2419,11 +2617,29 @@
2419
2617
  {
2420
2618
  "command": "<%= config.bin %> <%= command.id %> --force",
2421
2619
  "description": "Undeploy GraphQL API without confirmation prompt"
2620
+ },
2621
+ {
2622
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
2623
+ "description": "Undeploy GraphQL API for a specific project and dataset"
2422
2624
  }
2423
2625
  ],
2424
2626
  "flags": {
2627
+ "project-id": {
2628
+ "char": "p",
2629
+ "description": "Project ID to undeploy GraphQL API from (overrides CLI configuration)",
2630
+ "helpGroup": "OVERRIDE",
2631
+ "name": "project-id",
2632
+ "hasDynamicHelp": false,
2633
+ "helpValue": "<id>",
2634
+ "multiple": false,
2635
+ "type": "option"
2636
+ },
2425
2637
  "api": {
2426
- "description": "Undeploy API with this ID (project, dataset and tag flags take precedence)",
2638
+ "description": "Undeploy API with this ID",
2639
+ "exclusive": [
2640
+ "project-id",
2641
+ "project"
2642
+ ],
2427
2643
  "name": "api",
2428
2644
  "required": false,
2429
2645
  "hasDynamicHelp": false,
@@ -2431,10 +2647,12 @@
2431
2647
  "type": "option"
2432
2648
  },
2433
2649
  "dataset": {
2650
+ "char": "d",
2434
2651
  "description": "Dataset to undeploy GraphQL API from",
2652
+ "helpGroup": "OVERRIDE",
2435
2653
  "name": "dataset",
2436
- "required": false,
2437
2654
  "hasDynamicHelp": false,
2655
+ "helpValue": "<name>",
2438
2656
  "multiple": false,
2439
2657
  "type": "option"
2440
2658
  },
@@ -2446,7 +2664,11 @@
2446
2664
  "type": "boolean"
2447
2665
  },
2448
2666
  "project": {
2667
+ "deprecated": {
2668
+ "to": "project-id"
2669
+ },
2449
2670
  "description": "Project ID to delete GraphQL API for",
2671
+ "hidden": true,
2450
2672
  "name": "project",
2451
2673
  "required": false,
2452
2674
  "hasDynamicHelp": false,
@@ -2492,9 +2714,24 @@
2492
2714
  {
2493
2715
  "command": "<%= config.bin %> <%= command.id %> abc123",
2494
2716
  "description": "Print details of webhook delivery attempt with ID abc123"
2717
+ },
2718
+ {
2719
+ "command": "<%= config.bin %> <%= command.id %> abc123 --project-id myproject",
2720
+ "description": "Get attempt details for a specific project"
2495
2721
  }
2496
2722
  ],
2497
- "flags": {},
2723
+ "flags": {
2724
+ "project-id": {
2725
+ "char": "p",
2726
+ "description": "Project ID to view webhook attempt for (overrides CLI configuration)",
2727
+ "helpGroup": "OVERRIDE",
2728
+ "name": "project-id",
2729
+ "hasDynamicHelp": false,
2730
+ "helpValue": "<id>",
2731
+ "multiple": false,
2732
+ "type": "option"
2733
+ }
2734
+ },
2498
2735
  "hasDynamicHelp": false,
2499
2736
  "hiddenAliases": [],
2500
2737
  "id": "hook:attempt",
@@ -2518,9 +2755,24 @@
2518
2755
  {
2519
2756
  "command": "<%= config.bin %> <%= command.id %>",
2520
2757
  "description": "Create a new webhook for the current project"
2758
+ },
2759
+ {
2760
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2761
+ "description": "Create a webhook for a specific project"
2521
2762
  }
2522
2763
  ],
2523
- "flags": {},
2764
+ "flags": {
2765
+ "project-id": {
2766
+ "char": "p",
2767
+ "description": "Project ID to create webhook for (overrides CLI configuration)",
2768
+ "helpGroup": "OVERRIDE",
2769
+ "name": "project-id",
2770
+ "hasDynamicHelp": false,
2771
+ "helpValue": "<id>",
2772
+ "multiple": false,
2773
+ "type": "option"
2774
+ }
2775
+ },
2524
2776
  "hasDynamicHelp": false,
2525
2777
  "hiddenAliases": [],
2526
2778
  "id": "hook:create",
@@ -2554,9 +2806,24 @@
2554
2806
  {
2555
2807
  "command": "<%= config.bin %> <%= command.id %> my-hook",
2556
2808
  "description": "Delete a specific hook by name"
2809
+ },
2810
+ {
2811
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2812
+ "description": "Delete a hook from a specific project"
2557
2813
  }
2558
2814
  ],
2559
- "flags": {},
2815
+ "flags": {
2816
+ "project-id": {
2817
+ "char": "p",
2818
+ "description": "Project ID to delete webhook from (overrides CLI configuration)",
2819
+ "helpGroup": "OVERRIDE",
2820
+ "name": "project-id",
2821
+ "hasDynamicHelp": false,
2822
+ "helpValue": "<id>",
2823
+ "multiple": false,
2824
+ "type": "option"
2825
+ }
2826
+ },
2560
2827
  "hasDynamicHelp": false,
2561
2828
  "hiddenAliases": [],
2562
2829
  "id": "hook:delete",
@@ -2580,9 +2847,24 @@
2580
2847
  {
2581
2848
  "command": "<%= config.bin %> <%= command.id %>",
2582
2849
  "description": "List hooks for a given project"
2850
+ },
2851
+ {
2852
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2853
+ "description": "List hooks for a specific project"
2583
2854
  }
2584
2855
  ],
2585
- "flags": {},
2856
+ "flags": {
2857
+ "project-id": {
2858
+ "char": "p",
2859
+ "description": "Project ID to list webhooks for (overrides CLI configuration)",
2860
+ "helpGroup": "OVERRIDE",
2861
+ "name": "project-id",
2862
+ "hasDynamicHelp": false,
2863
+ "helpValue": "<id>",
2864
+ "multiple": false,
2865
+ "type": "option"
2866
+ }
2867
+ },
2586
2868
  "hasDynamicHelp": false,
2587
2869
  "hiddenAliases": [],
2588
2870
  "id": "hook:list",
@@ -2616,9 +2898,23 @@
2616
2898
  {
2617
2899
  "command": "<%= config.bin %> <%= command.id %> [NAME]",
2618
2900
  "description": "List latest log entries for a specific hook by name"
2901
+ },
2902
+ {
2903
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2904
+ "description": "List hook logs for a specific project"
2619
2905
  }
2620
2906
  ],
2621
2907
  "flags": {
2908
+ "project-id": {
2909
+ "char": "p",
2910
+ "description": "Project ID to view webhook logs for (overrides CLI configuration)",
2911
+ "helpGroup": "OVERRIDE",
2912
+ "name": "project-id",
2913
+ "hasDynamicHelp": false,
2914
+ "helpValue": "<id>",
2915
+ "multiple": false,
2916
+ "type": "option"
2917
+ },
2622
2918
  "detailed": {
2623
2919
  "description": "Include detailed payload and attempts",
2624
2920
  "name": "detailed",
@@ -2750,7 +3046,17 @@
2750
3046
  }
2751
3047
  ],
2752
3048
  "flags": {
2753
- "media-library-id": {
3049
+ "project-id": {
3050
+ "char": "p",
3051
+ "description": "Project ID to delete media aspect from (overrides CLI configuration)",
3052
+ "helpGroup": "OVERRIDE",
3053
+ "name": "project-id",
3054
+ "hasDynamicHelp": false,
3055
+ "helpValue": "<id>",
3056
+ "multiple": false,
3057
+ "type": "option"
3058
+ },
3059
+ "media-library-id": {
2754
3060
  "description": "The id of the target media library",
2755
3061
  "name": "media-library-id",
2756
3062
  "required": false,
@@ -2805,6 +3111,16 @@
2805
3111
  }
2806
3112
  ],
2807
3113
  "flags": {
3114
+ "project-id": {
3115
+ "char": "p",
3116
+ "description": "Project ID to deploy media aspect to (overrides CLI configuration)",
3117
+ "helpGroup": "OVERRIDE",
3118
+ "name": "project-id",
3119
+ "hasDynamicHelp": false,
3120
+ "helpValue": "<id>",
3121
+ "multiple": false,
3122
+ "type": "option"
3123
+ },
2808
3124
  "all": {
2809
3125
  "description": "Deploy all aspects",
2810
3126
  "name": "all",
@@ -2860,6 +3176,16 @@
2860
3176
  }
2861
3177
  ],
2862
3178
  "flags": {
3179
+ "project-id": {
3180
+ "char": "p",
3181
+ "description": "Project ID to export media from (overrides CLI configuration)",
3182
+ "helpGroup": "OVERRIDE",
3183
+ "name": "project-id",
3184
+ "hasDynamicHelp": false,
3185
+ "helpValue": "<id>",
3186
+ "multiple": false,
3187
+ "type": "option"
3188
+ },
2863
3189
  "asset-concurrency": {
2864
3190
  "description": "Concurrent number of asset downloads",
2865
3191
  "name": "asset-concurrency",
@@ -2928,6 +3254,16 @@
2928
3254
  }
2929
3255
  ],
2930
3256
  "flags": {
3257
+ "project-id": {
3258
+ "char": "p",
3259
+ "description": "Project ID to import media to (overrides CLI configuration)",
3260
+ "helpGroup": "OVERRIDE",
3261
+ "name": "project-id",
3262
+ "hasDynamicHelp": false,
3263
+ "helpValue": "<id>",
3264
+ "multiple": false,
3265
+ "type": "option"
3266
+ },
2931
3267
  "media-library-id": {
2932
3268
  "description": "The id of the target media library",
2933
3269
  "name": "media-library-id",
@@ -3213,62 +3549,20 @@
3213
3549
  "list.js"
3214
3550
  ]
3215
3551
  },
3216
- "schema:delete": {
3552
+ "telemetry:disable": {
3217
3553
  "aliases": [],
3218
3554
  "args": {},
3219
- "description": "Delete schema documents by id",
3555
+ "description": "Disable telemetry for your logged in user",
3220
3556
  "examples": [
3221
3557
  {
3222
- "command": "<%= config.bin %> <%= command.id %> --ids sanity.workspace.schema.workspaceName",
3223
- "description": "Delete a single schema"
3224
- },
3225
- {
3226
- "command": "<%= config.bin %> <%= command.id %> --ids sanity.workspace.schema.workspaceName,prefix.sanity.workspace.schema.otherWorkspace",
3227
- "description": "Delete multiple schemas"
3558
+ "command": "<%= config.bin %> telemetry <%= command.id %>",
3559
+ "description": "Disable telemetry for your logged in user"
3228
3560
  }
3229
3561
  ],
3230
- "flags": {
3231
- "dataset": {
3232
- "description": "Delete schemas from a specific dataset",
3233
- "name": "dataset",
3234
- "hasDynamicHelp": false,
3235
- "multiple": false,
3236
- "type": "option"
3237
- },
3238
- "extract-manifest": {
3239
- "description": "Generate manifest file (disable with --no-extract-manifest)",
3240
- "hidden": true,
3241
- "name": "extract-manifest",
3242
- "allowNo": true,
3243
- "type": "boolean"
3244
- },
3245
- "ids": {
3246
- "description": "Comma-separated list of schema ids to delete",
3247
- "name": "ids",
3248
- "required": true,
3249
- "hasDynamicHelp": false,
3250
- "multiple": false,
3251
- "type": "option"
3252
- },
3253
- "manifest-dir": {
3254
- "description": "Directory containing manifest file",
3255
- "hidden": true,
3256
- "name": "manifest-dir",
3257
- "default": "./dist/static",
3258
- "hasDynamicHelp": false,
3259
- "multiple": false,
3260
- "type": "option"
3261
- },
3262
- "verbose": {
3263
- "description": "Enable verbose logging",
3264
- "name": "verbose",
3265
- "allowNo": false,
3266
- "type": "boolean"
3267
- }
3268
- },
3562
+ "flags": {},
3269
3563
  "hasDynamicHelp": false,
3270
3564
  "hiddenAliases": [],
3271
- "id": "schema:delete",
3565
+ "id": "telemetry:disable",
3272
3566
  "pluginAlias": "@sanity/cli",
3273
3567
  "pluginName": "@sanity/cli",
3274
3568
  "pluginType": "core",
@@ -3277,66 +3571,24 @@
3277
3571
  "relativePath": [
3278
3572
  "dist",
3279
3573
  "commands",
3280
- "schema",
3281
- "delete.js"
3574
+ "telemetry",
3575
+ "disable.js"
3282
3576
  ]
3283
3577
  },
3284
- "schema:deploy": {
3578
+ "telemetry:enable": {
3285
3579
  "aliases": [],
3286
3580
  "args": {},
3287
- "description": "Deploy schema documents into workspace datasets.\n\n**Note**: This command is experimental and subject to change.\n\nThis operation (re-)generates a manifest file describing the sanity config workspace by default.\nTo re-use an existing manifest file, use --no-extract-manifest.",
3581
+ "description": "Enable telemetry for your logged in user",
3288
3582
  "examples": [
3289
3583
  {
3290
- "command": "<%= config.bin %> <%= command.id %>",
3291
- "description": "Deploy all workspace schemas"
3292
- },
3293
- {
3294
- "command": "<%= config.bin %> <%= command.id %> --workspace default",
3295
- "description": "Deploy the schema for only the workspace \"default\""
3584
+ "command": "<%= config.bin %> telemetry <%= command.id %>",
3585
+ "description": "Enable telemetry for your logged in user"
3296
3586
  }
3297
3587
  ],
3298
- "flags": {
3299
- "extract-manifest": {
3300
- "description": "Disables manifest generation - the command will fail if no manifest exists",
3301
- "name": "extract-manifest",
3302
- "allowNo": true,
3303
- "type": "boolean"
3304
- },
3305
- "manifest-dir": {
3306
- "description": "Directory containing manifest file",
3307
- "name": "manifest-dir",
3308
- "default": "./dist/static",
3309
- "hasDynamicHelp": false,
3310
- "helpValue": "<directory>",
3311
- "multiple": false,
3312
- "type": "option"
3313
- },
3314
- "tag": {
3315
- "description": "Add a tag suffix to the schema id",
3316
- "name": "tag",
3317
- "hasDynamicHelp": false,
3318
- "helpValue": "<tag>",
3319
- "multiple": false,
3320
- "type": "option"
3321
- },
3322
- "verbose": {
3323
- "description": "Print detailed information during deployment",
3324
- "name": "verbose",
3325
- "allowNo": false,
3326
- "type": "boolean"
3327
- },
3328
- "workspace": {
3329
- "description": "The name of the workspace to deploy a schema for",
3330
- "name": "workspace",
3331
- "hasDynamicHelp": false,
3332
- "helpValue": "<name>",
3333
- "multiple": false,
3334
- "type": "option"
3335
- }
3336
- },
3588
+ "flags": {},
3337
3589
  "hasDynamicHelp": false,
3338
3590
  "hiddenAliases": [],
3339
- "id": "schema:deploy",
3591
+ "id": "telemetry:enable",
3340
3592
  "pluginAlias": "@sanity/cli",
3341
3593
  "pluginName": "@sanity/cli",
3342
3594
  "pluginType": "core",
@@ -3345,77 +3597,104 @@
3345
3597
  "relativePath": [
3346
3598
  "dist",
3347
3599
  "commands",
3348
- "schema",
3349
- "deploy.js"
3600
+ "telemetry",
3601
+ "enable.js"
3350
3602
  ]
3351
3603
  },
3352
- "schema:extract": {
3604
+ "telemetry:status": {
3353
3605
  "aliases": [],
3354
3606
  "args": {},
3355
- "description": "Extracts a JSON representation of a Sanity schema within a Studio context.\n\n**Note**: This command is experimental and subject to change.",
3607
+ "description": "Check telemetry consent status for your logged in user",
3356
3608
  "examples": [
3357
3609
  {
3358
- "command": "<%= config.bin %> <%= command.id %> --workspace default",
3359
- "description": "Extracts schema types in a Sanity project with more than one workspace"
3610
+ "command": "<%= config.bin %> telemetry <%= command.id %>",
3611
+ "description": "Check telemetry consent status for your logged in user"
3612
+ }
3613
+ ],
3614
+ "flags": {},
3615
+ "hasDynamicHelp": false,
3616
+ "hiddenAliases": [],
3617
+ "id": "telemetry:status",
3618
+ "pluginAlias": "@sanity/cli",
3619
+ "pluginName": "@sanity/cli",
3620
+ "pluginType": "core",
3621
+ "strict": true,
3622
+ "isESM": true,
3623
+ "relativePath": [
3624
+ "dist",
3625
+ "commands",
3626
+ "telemetry",
3627
+ "status.js"
3628
+ ]
3629
+ },
3630
+ "tokens:add": {
3631
+ "aliases": [],
3632
+ "args": {
3633
+ "label": {
3634
+ "description": "Label for the new token",
3635
+ "name": "label",
3636
+ "required": false
3637
+ }
3638
+ },
3639
+ "description": "Create a new API token for this project",
3640
+ "examples": [
3641
+ {
3642
+ "command": "<%= config.bin %> <%= command.id %> \"My API Token\"",
3643
+ "description": "Create a token with a label"
3360
3644
  },
3361
3645
  {
3362
- "command": "<%= config.bin %> <%= command.id %> --watch",
3363
- "description": "Watch mode - re-extract on changes"
3646
+ "command": "<%= config.bin %> <%= command.id %> \"My API Token\" --role=editor",
3647
+ "description": "Create a token with editor role"
3364
3648
  },
3365
3649
  {
3366
- "command": "<%= config.bin %> <%= command.id %> --watch --watch-patterns \"lib/**/*.ts\"",
3367
- "description": "Watch with custom glob patterns"
3650
+ "command": "<%= config.bin %> <%= command.id %> \"CI Token\" --role=editor --yes",
3651
+ "description": "Create a token in unattended mode"
3652
+ },
3653
+ {
3654
+ "command": "<%= config.bin %> <%= command.id %> \"API Token\" --json",
3655
+ "description": "Output token information as JSON"
3656
+ },
3657
+ {
3658
+ "command": "<%= config.bin %> <%= command.id %> \"My Token\" --project-id abc123 --role=editor",
3659
+ "description": "Create a token for a specific project"
3368
3660
  }
3369
3661
  ],
3370
3662
  "flags": {
3371
- "enforce-required-fields": {
3372
- "description": "Makes the schema generated treat fields marked as required as non-optional",
3373
- "name": "enforce-required-fields",
3374
- "allowNo": false,
3375
- "type": "boolean"
3376
- },
3377
- "format": {
3378
- "description": "Format the schema as GROQ type nodes. Only available format at the moment.",
3379
- "name": "format",
3380
- "default": "groq-type-nodes",
3381
- "hasDynamicHelp": false,
3382
- "helpValue": "<format>",
3383
- "multiple": false,
3384
- "type": "option"
3385
- },
3386
- "path": {
3387
- "description": "Optional path to specify destination of the schema file",
3388
- "name": "path",
3663
+ "project-id": {
3664
+ "char": "p",
3665
+ "description": "Project ID to add token to (overrides CLI configuration)",
3666
+ "helpGroup": "OVERRIDE",
3667
+ "name": "project-id",
3389
3668
  "hasDynamicHelp": false,
3669
+ "helpValue": "<id>",
3390
3670
  "multiple": false,
3391
3671
  "type": "option"
3392
3672
  },
3393
- "watch": {
3394
- "description": "Enable watch mode to re-extract schema on file changes",
3395
- "name": "watch",
3673
+ "json": {
3674
+ "description": "Output as JSON",
3675
+ "name": "json",
3396
3676
  "allowNo": false,
3397
3677
  "type": "boolean"
3398
3678
  },
3399
- "watch-patterns": {
3400
- "description": "Additional glob pattern(s) to watch (can be specified multiple times)",
3401
- "name": "watch-patterns",
3402
- "hasDynamicHelp": false,
3403
- "helpValue": "<glob>",
3404
- "multiple": true,
3405
- "type": "option"
3406
- },
3407
- "workspace": {
3408
- "description": "The name of the workspace to generate a schema for",
3409
- "name": "workspace",
3679
+ "role": {
3680
+ "description": "Role to assign to the token",
3681
+ "name": "role",
3410
3682
  "hasDynamicHelp": false,
3411
- "helpValue": "<name>",
3683
+ "helpValue": "viewer",
3412
3684
  "multiple": false,
3413
3685
  "type": "option"
3686
+ },
3687
+ "yes": {
3688
+ "char": "y",
3689
+ "description": "Skip prompts and use defaults (unattended mode)",
3690
+ "name": "yes",
3691
+ "allowNo": false,
3692
+ "type": "boolean"
3414
3693
  }
3415
3694
  },
3416
3695
  "hasDynamicHelp": false,
3417
3696
  "hiddenAliases": [],
3418
- "id": "schema:extract",
3697
+ "id": "tokens:add",
3419
3698
  "pluginAlias": "@sanity/cli",
3420
3699
  "pluginName": "@sanity/cli",
3421
3700
  "pluginType": "core",
@@ -3424,68 +3703,114 @@
3424
3703
  "relativePath": [
3425
3704
  "dist",
3426
3705
  "commands",
3427
- "schema",
3428
- "extract.js"
3706
+ "tokens",
3707
+ "add.js"
3429
3708
  ]
3430
3709
  },
3431
- "schema:list": {
3710
+ "tokens:delete": {
3432
3711
  "aliases": [],
3433
- "args": {},
3434
- "description": "Lists all schemas in the current dataset.\n\n**Note**: This command is experimental and subject to change.\n\nThis operation (re-)generates a manifest file describing the sanity config workspace by default.\nTo re-use an existing manifest file, use --no-extract-manifest.",
3712
+ "args": {
3713
+ "tokenId": {
3714
+ "description": "Token ID to delete (will prompt if not provided)",
3715
+ "name": "tokenId",
3716
+ "required": false
3717
+ }
3718
+ },
3719
+ "description": "Delete an API token from this project",
3435
3720
  "examples": [
3436
3721
  {
3437
3722
  "command": "<%= config.bin %> <%= command.id %>",
3438
- "description": "List all schemas found in any workspace dataset in a table"
3723
+ "description": "Interactively select and delete a token"
3439
3724
  },
3440
3725
  {
3441
- "command": "<%= config.bin %> <%= command.id %> --id _.schemas.workspaceName",
3442
- "description": "Get a schema for a given id"
3726
+ "command": "<%= config.bin %> <%= command.id %> silJ2lFmK6dONB",
3727
+ "description": "Delete a specific token by ID"
3443
3728
  },
3444
3729
  {
3445
- "command": "<%= config.bin %> <%= command.id %> --json",
3446
- "description": "Get stored schemas as pretty-printed json-array"
3730
+ "command": "<%= config.bin %> <%= command.id %> silJ2lFmK6dONB --yes",
3731
+ "description": "Delete a specific token without confirmation prompt"
3447
3732
  },
3448
3733
  {
3449
- "command": "<%= config.bin %> <%= command.id %> --json --id _.schemas.workspaceName",
3450
- "description": "Get singular stored schema as pretty-printed json-object"
3734
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3735
+ "description": "Delete a token from a specific project"
3451
3736
  }
3452
3737
  ],
3453
3738
  "flags": {
3454
- "extract-manifest": {
3455
- "description": "Disables manifest generation - the command will fail if no manifest exists",
3456
- "hidden": true,
3457
- "name": "extract-manifest",
3458
- "allowNo": true,
3459
- "type": "boolean"
3460
- },
3461
- "id": {
3462
- "description": "Fetch a single schema by id",
3463
- "name": "id",
3739
+ "project-id": {
3740
+ "char": "p",
3741
+ "description": "Project ID to delete token from (overrides CLI configuration)",
3742
+ "helpGroup": "OVERRIDE",
3743
+ "name": "project-id",
3464
3744
  "hasDynamicHelp": false,
3465
- "helpValue": "<schema_id>",
3745
+ "helpValue": "<id>",
3466
3746
  "multiple": false,
3467
3747
  "type": "option"
3468
3748
  },
3469
- "json": {
3470
- "description": "Get schema as json",
3471
- "name": "json",
3749
+ "yes": {
3750
+ "aliases": [
3751
+ "y"
3752
+ ],
3753
+ "description": "Skip confirmation prompt (unattended mode)",
3754
+ "name": "yes",
3755
+ "required": false,
3472
3756
  "allowNo": false,
3473
3757
  "type": "boolean"
3758
+ }
3759
+ },
3760
+ "hasDynamicHelp": false,
3761
+ "hiddenAliases": [],
3762
+ "id": "tokens:delete",
3763
+ "pluginAlias": "@sanity/cli",
3764
+ "pluginName": "@sanity/cli",
3765
+ "pluginType": "core",
3766
+ "strict": true,
3767
+ "isESM": true,
3768
+ "relativePath": [
3769
+ "dist",
3770
+ "commands",
3771
+ "tokens",
3772
+ "delete.js"
3773
+ ]
3774
+ },
3775
+ "tokens:list": {
3776
+ "aliases": [],
3777
+ "args": {},
3778
+ "description": "List API tokens for the current project",
3779
+ "examples": [
3780
+ {
3781
+ "command": "<%= config.bin %> <%= command.id %>",
3782
+ "description": "List tokens for the current project"
3474
3783
  },
3475
- "manifest-dir": {
3476
- "description": "Directory containing manifest file",
3477
- "hidden": true,
3478
- "name": "manifest-dir",
3479
- "default": "./dist/static",
3784
+ {
3785
+ "command": "<%= config.bin %> <%= command.id %> --json",
3786
+ "description": "List tokens in JSON format"
3787
+ },
3788
+ {
3789
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3790
+ "description": "List tokens for a specific project"
3791
+ }
3792
+ ],
3793
+ "flags": {
3794
+ "project-id": {
3795
+ "char": "p",
3796
+ "description": "Project ID to list tokens for (overrides CLI configuration)",
3797
+ "helpGroup": "OVERRIDE",
3798
+ "name": "project-id",
3480
3799
  "hasDynamicHelp": false,
3481
- "helpValue": "<directory>",
3800
+ "helpValue": "<id>",
3482
3801
  "multiple": false,
3483
3802
  "type": "option"
3803
+ },
3804
+ "json": {
3805
+ "description": "Output tokens in JSON format",
3806
+ "name": "json",
3807
+ "allowNo": false,
3808
+ "type": "boolean"
3484
3809
  }
3485
3810
  },
3486
3811
  "hasDynamicHelp": false,
3487
3812
  "hiddenAliases": [],
3488
- "id": "schema:list",
3813
+ "id": "tokens:list",
3489
3814
  "pluginAlias": "@sanity/cli",
3490
3815
  "pluginName": "@sanity/cli",
3491
3816
  "pluginType": "core",
@@ -3494,69 +3819,53 @@
3494
3819
  "relativePath": [
3495
3820
  "dist",
3496
3821
  "commands",
3497
- "schema",
3822
+ "tokens",
3498
3823
  "list.js"
3499
3824
  ]
3500
3825
  },
3501
- "schema:validate": {
3826
+ "users:invite": {
3502
3827
  "aliases": [],
3503
- "args": {},
3504
- "description": "Validates all schema types specified in a workspace",
3828
+ "args": {
3829
+ "email": {
3830
+ "description": "Email address to invite",
3831
+ "name": "email",
3832
+ "required": false
3833
+ }
3834
+ },
3835
+ "description": "Invite a new user to the project",
3505
3836
  "examples": [
3506
3837
  {
3507
- "command": "<%= config.bin %> <%= command.id %> --workspace default",
3508
- "description": "Validates all schema types in a Sanity project with more than one workspace"
3838
+ "command": "<%= config.bin %> <%= command.id %>",
3839
+ "description": "Invite a new user to the project (prompt for details)"
3509
3840
  },
3510
3841
  {
3511
- "command": "<%= config.bin %> <%= command.id %> > report.txt",
3512
- "description": "Save the results of the report into a file"
3842
+ "command": "<%= config.bin %> <%= command.id %> pippi@sanity.io",
3843
+ "description": "Send a new user invite to the email \"pippi@sanity.io\", prompt for role"
3513
3844
  },
3514
3845
  {
3515
- "command": "<%= config.bin %> <%= command.id %> --level error",
3516
- "description": "Report out only errors"
3846
+ "command": "<%= config.bin %> <%= command.id %> pippi@sanity.io --role administrator",
3847
+ "description": "Send a new user invite to the email \"pippi@sanity.io\", as administrator"
3517
3848
  },
3518
3849
  {
3519
- "command": "<%= config.bin %> <%= command.id %> --debug-metafile-path metafile.json",
3520
- "description": "Generate a report which can be analyzed with https://esbuild.github.io/analyze/"
3850
+ "command": "<%= config.bin %> <%= command.id %> pippi@sanity.io --project-id abc123",
3851
+ "description": "Invite a user to a specific project"
3521
3852
  }
3522
3853
  ],
3523
3854
  "flags": {
3524
- "debug-metafile-path": {
3525
- "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/",
3526
- "helpGroup": "DEBUG",
3527
- "name": "debug-metafile-path",
3528
- "hasDynamicHelp": false,
3529
- "multiple": false,
3530
- "type": "option"
3531
- },
3532
- "format": {
3533
- "description": "The output format used to print schema errors and warnings",
3534
- "name": "format",
3535
- "default": "pretty",
3536
- "hasDynamicHelp": false,
3537
- "multiple": false,
3538
- "options": [
3539
- "pretty",
3540
- "ndjson",
3541
- "json"
3542
- ],
3543
- "type": "option"
3544
- },
3545
- "level": {
3546
- "description": "The minimum level reported out",
3547
- "name": "level",
3548
- "default": "warning",
3855
+ "project-id": {
3856
+ "char": "p",
3857
+ "description": "Project ID to invite user to (overrides CLI configuration)",
3858
+ "helpGroup": "OVERRIDE",
3859
+ "name": "project-id",
3549
3860
  "hasDynamicHelp": false,
3861
+ "helpValue": "<id>",
3550
3862
  "multiple": false,
3551
- "options": [
3552
- "error",
3553
- "warning"
3554
- ],
3555
3863
  "type": "option"
3556
3864
  },
3557
- "workspace": {
3558
- "description": "The name of the workspace to use when validating all schema types",
3559
- "name": "workspace",
3865
+ "role": {
3866
+ "description": "Role to invite the user as",
3867
+ "name": "role",
3868
+ "required": false,
3560
3869
  "hasDynamicHelp": false,
3561
3870
  "multiple": false,
3562
3871
  "type": "option"
@@ -3564,7 +3873,7 @@
3564
3873
  },
3565
3874
  "hasDynamicHelp": false,
3566
3875
  "hiddenAliases": [],
3567
- "id": "schema:validate",
3876
+ "id": "users:invite",
3568
3877
  "pluginAlias": "@sanity/cli",
3569
3878
  "pluginName": "@sanity/cli",
3570
3879
  "pluginType": "core",
@@ -3573,24 +3882,85 @@
3573
3882
  "relativePath": [
3574
3883
  "dist",
3575
3884
  "commands",
3576
- "schema",
3577
- "validate.js"
3885
+ "users",
3886
+ "invite.js"
3578
3887
  ]
3579
3888
  },
3580
- "telemetry:disable": {
3889
+ "users:list": {
3581
3890
  "aliases": [],
3582
3891
  "args": {},
3583
- "description": "Disable telemetry for your logged in user",
3892
+ "description": "List all users of the project",
3584
3893
  "examples": [
3585
3894
  {
3586
- "command": "<%= config.bin %> telemetry <%= command.id %>",
3587
- "description": "Disable telemetry for your logged in user"
3895
+ "command": "<%= config.bin %> <%= command.id %>",
3896
+ "description": "List all users of the project"
3897
+ },
3898
+ {
3899
+ "command": "<%= config.bin %> <%= command.id %> --no-invitations --no-robots",
3900
+ "description": "List all users of the project, but exclude pending invitations and robots"
3901
+ },
3902
+ {
3903
+ "command": "<%= config.bin %> <%= command.id %> --sort role",
3904
+ "description": "List all users, sorted by role"
3905
+ },
3906
+ {
3907
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3908
+ "description": "List users for a specific project"
3588
3909
  }
3589
3910
  ],
3590
- "flags": {},
3911
+ "flags": {
3912
+ "project-id": {
3913
+ "char": "p",
3914
+ "description": "Project ID to list users for (overrides CLI configuration)",
3915
+ "helpGroup": "OVERRIDE",
3916
+ "name": "project-id",
3917
+ "hasDynamicHelp": false,
3918
+ "helpValue": "<id>",
3919
+ "multiple": false,
3920
+ "type": "option"
3921
+ },
3922
+ "invitations": {
3923
+ "description": "Includes or excludes pending invitations",
3924
+ "name": "invitations",
3925
+ "allowNo": true,
3926
+ "type": "boolean"
3927
+ },
3928
+ "order": {
3929
+ "description": "Sort output ascending/descending",
3930
+ "name": "order",
3931
+ "default": "asc",
3932
+ "hasDynamicHelp": false,
3933
+ "multiple": false,
3934
+ "options": [
3935
+ "asc",
3936
+ "desc"
3937
+ ],
3938
+ "type": "option"
3939
+ },
3940
+ "robots": {
3941
+ "description": "Includes or excludes robots (token users)",
3942
+ "name": "robots",
3943
+ "allowNo": true,
3944
+ "type": "boolean"
3945
+ },
3946
+ "sort": {
3947
+ "description": "Sort users by specified column",
3948
+ "name": "sort",
3949
+ "default": "date",
3950
+ "hasDynamicHelp": false,
3951
+ "multiple": false,
3952
+ "options": [
3953
+ "id",
3954
+ "name",
3955
+ "role",
3956
+ "date"
3957
+ ],
3958
+ "type": "option"
3959
+ }
3960
+ },
3591
3961
  "hasDynamicHelp": false,
3592
3962
  "hiddenAliases": [],
3593
- "id": "telemetry:disable",
3963
+ "id": "users:list",
3594
3964
  "pluginAlias": "@sanity/cli",
3595
3965
  "pluginName": "@sanity/cli",
3596
3966
  "pluginType": "core",
@@ -3599,116 +3969,79 @@
3599
3969
  "relativePath": [
3600
3970
  "dist",
3601
3971
  "commands",
3602
- "telemetry",
3603
- "disable.js"
3972
+ "users",
3973
+ "list.js"
3604
3974
  ]
3605
3975
  },
3606
- "telemetry:enable": {
3976
+ "schema:delete": {
3607
3977
  "aliases": [],
3608
3978
  "args": {},
3609
- "description": "Enable telemetry for your logged in user",
3610
- "examples": [
3611
- {
3612
- "command": "<%= config.bin %> telemetry <%= command.id %>",
3613
- "description": "Enable telemetry for your logged in user"
3614
- }
3615
- ],
3616
- "flags": {},
3617
- "hasDynamicHelp": false,
3618
- "hiddenAliases": [],
3619
- "id": "telemetry:enable",
3620
- "pluginAlias": "@sanity/cli",
3621
- "pluginName": "@sanity/cli",
3622
- "pluginType": "core",
3623
- "strict": true,
3624
- "isESM": true,
3625
- "relativePath": [
3626
- "dist",
3627
- "commands",
3628
- "telemetry",
3629
- "enable.js"
3630
- ]
3631
- },
3632
- "telemetry:status": {
3633
- "aliases": [],
3634
- "args": {},
3635
- "description": "Check telemetry consent status for your logged in user",
3636
- "examples": [
3637
- {
3638
- "command": "<%= config.bin %> telemetry <%= command.id %>",
3639
- "description": "Check telemetry consent status for your logged in user"
3640
- }
3641
- ],
3642
- "flags": {},
3643
- "hasDynamicHelp": false,
3644
- "hiddenAliases": [],
3645
- "id": "telemetry:status",
3646
- "pluginAlias": "@sanity/cli",
3647
- "pluginName": "@sanity/cli",
3648
- "pluginType": "core",
3649
- "strict": true,
3650
- "isESM": true,
3651
- "relativePath": [
3652
- "dist",
3653
- "commands",
3654
- "telemetry",
3655
- "status.js"
3656
- ]
3657
- },
3658
- "tokens:add": {
3659
- "aliases": [],
3660
- "args": {
3661
- "label": {
3662
- "description": "Label for the new token",
3663
- "name": "label",
3664
- "required": false
3665
- }
3666
- },
3667
- "description": "Create a new API token for this project",
3979
+ "description": "Delete schema documents by id",
3668
3980
  "examples": [
3669
3981
  {
3670
- "command": "<%= config.bin %> <%= command.id %> \"My API Token\"",
3671
- "description": "Create a token with a label"
3672
- },
3673
- {
3674
- "command": "<%= config.bin %> <%= command.id %> \"My API Token\" --role=editor",
3675
- "description": "Create a token with editor role"
3676
- },
3677
- {
3678
- "command": "<%= config.bin %> <%= command.id %> \"CI Token\" --role=editor --yes",
3679
- "description": "Create a token in unattended mode"
3982
+ "command": "<%= config.bin %> <%= command.id %> --ids sanity.workspace.schema.workspaceName",
3983
+ "description": "Delete a single schema"
3680
3984
  },
3681
3985
  {
3682
- "command": "<%= config.bin %> <%= command.id %> \"API Token\" --json",
3683
- "description": "Output token information as JSON"
3986
+ "command": "<%= config.bin %> <%= command.id %> --ids sanity.workspace.schema.workspaceName,prefix.sanity.workspace.schema.otherWorkspace",
3987
+ "description": "Delete multiple schemas"
3684
3988
  }
3685
3989
  ],
3686
3990
  "flags": {
3687
- "json": {
3688
- "description": "Output as JSON",
3689
- "name": "json",
3690
- "allowNo": false,
3991
+ "project-id": {
3992
+ "char": "p",
3993
+ "description": "Project ID to delete schema from (overrides CLI configuration)",
3994
+ "helpGroup": "OVERRIDE",
3995
+ "name": "project-id",
3996
+ "hasDynamicHelp": false,
3997
+ "helpValue": "<id>",
3998
+ "multiple": false,
3999
+ "type": "option"
4000
+ },
4001
+ "dataset": {
4002
+ "char": "d",
4003
+ "description": "Delete schemas from a specific dataset (overrides CLI configuration)",
4004
+ "helpGroup": "OVERRIDE",
4005
+ "name": "dataset",
4006
+ "hasDynamicHelp": false,
4007
+ "helpValue": "<name>",
4008
+ "multiple": false,
4009
+ "type": "option"
4010
+ },
4011
+ "extract-manifest": {
4012
+ "description": "Generate manifest file (disable with --no-extract-manifest)",
4013
+ "hidden": true,
4014
+ "name": "extract-manifest",
4015
+ "allowNo": true,
3691
4016
  "type": "boolean"
3692
4017
  },
3693
- "role": {
3694
- "description": "Role to assign to the token",
3695
- "name": "role",
4018
+ "ids": {
4019
+ "description": "Comma-separated list of schema ids to delete",
4020
+ "name": "ids",
4021
+ "required": true,
3696
4022
  "hasDynamicHelp": false,
3697
- "helpValue": "viewer",
3698
4023
  "multiple": false,
3699
4024
  "type": "option"
3700
4025
  },
3701
- "yes": {
3702
- "char": "y",
3703
- "description": "Skip prompts and use defaults (unattended mode)",
3704
- "name": "yes",
4026
+ "manifest-dir": {
4027
+ "description": "Directory containing manifest file",
4028
+ "hidden": true,
4029
+ "name": "manifest-dir",
4030
+ "default": "./dist/static",
4031
+ "hasDynamicHelp": false,
4032
+ "multiple": false,
4033
+ "type": "option"
4034
+ },
4035
+ "verbose": {
4036
+ "description": "Enable verbose logging",
4037
+ "name": "verbose",
3705
4038
  "allowNo": false,
3706
4039
  "type": "boolean"
3707
4040
  }
3708
4041
  },
3709
4042
  "hasDynamicHelp": false,
3710
4043
  "hiddenAliases": [],
3711
- "id": "tokens:add",
4044
+ "id": "schema:delete",
3712
4045
  "pluginAlias": "@sanity/cli",
3713
4046
  "pluginName": "@sanity/cli",
3714
4047
  "pluginType": "core",
@@ -3717,49 +4050,66 @@
3717
4050
  "relativePath": [
3718
4051
  "dist",
3719
4052
  "commands",
3720
- "tokens",
3721
- "add.js"
4053
+ "schema",
4054
+ "delete.js"
3722
4055
  ]
3723
4056
  },
3724
- "tokens:delete": {
4057
+ "schema:deploy": {
3725
4058
  "aliases": [],
3726
- "args": {
3727
- "tokenId": {
3728
- "description": "Token ID to delete (will prompt if not provided)",
3729
- "name": "tokenId",
3730
- "required": false
3731
- }
3732
- },
3733
- "description": "Delete an API token from this project",
4059
+ "args": {},
4060
+ "description": "Deploy schema documents into workspace datasets.\n\n**Note**: This command is experimental and subject to change.\n\nThis operation (re-)generates a manifest file describing the sanity config workspace by default.\nTo re-use an existing manifest file, use --no-extract-manifest.",
3734
4061
  "examples": [
3735
4062
  {
3736
4063
  "command": "<%= config.bin %> <%= command.id %>",
3737
- "description": "Interactively select and delete a token"
3738
- },
3739
- {
3740
- "command": "<%= config.bin %> <%= command.id %> silJ2lFmK6dONB",
3741
- "description": "Delete a specific token by ID"
4064
+ "description": "Deploy all workspace schemas"
3742
4065
  },
3743
4066
  {
3744
- "command": "<%= config.bin %> <%= command.id %> silJ2lFmK6dONB --yes",
3745
- "description": "Delete a specific token without confirmation prompt"
4067
+ "command": "<%= config.bin %> <%= command.id %> --workspace default",
4068
+ "description": "Deploy the schema for only the workspace \"default\""
3746
4069
  }
3747
4070
  ],
3748
4071
  "flags": {
3749
- "yes": {
3750
- "aliases": [
3751
- "y"
3752
- ],
3753
- "description": "Skip confirmation prompt (unattended mode)",
3754
- "name": "yes",
3755
- "required": false,
4072
+ "extract-manifest": {
4073
+ "description": "Disables manifest generation - the command will fail if no manifest exists",
4074
+ "name": "extract-manifest",
4075
+ "allowNo": true,
4076
+ "type": "boolean"
4077
+ },
4078
+ "manifest-dir": {
4079
+ "description": "Directory containing manifest file",
4080
+ "name": "manifest-dir",
4081
+ "default": "./dist/static",
4082
+ "hasDynamicHelp": false,
4083
+ "helpValue": "<directory>",
4084
+ "multiple": false,
4085
+ "type": "option"
4086
+ },
4087
+ "tag": {
4088
+ "description": "Add a tag suffix to the schema id",
4089
+ "name": "tag",
4090
+ "hasDynamicHelp": false,
4091
+ "helpValue": "<tag>",
4092
+ "multiple": false,
4093
+ "type": "option"
4094
+ },
4095
+ "verbose": {
4096
+ "description": "Print detailed information during deployment",
4097
+ "name": "verbose",
3756
4098
  "allowNo": false,
3757
4099
  "type": "boolean"
4100
+ },
4101
+ "workspace": {
4102
+ "description": "The name of the workspace to deploy a schema for",
4103
+ "name": "workspace",
4104
+ "hasDynamicHelp": false,
4105
+ "helpValue": "<name>",
4106
+ "multiple": false,
4107
+ "type": "option"
3758
4108
  }
3759
4109
  },
3760
4110
  "hasDynamicHelp": false,
3761
4111
  "hiddenAliases": [],
3762
- "id": "tokens:delete",
4112
+ "id": "schema:deploy",
3763
4113
  "pluginAlias": "@sanity/cli",
3764
4114
  "pluginName": "@sanity/cli",
3765
4115
  "pluginType": "core",
@@ -3768,35 +4118,77 @@
3768
4118
  "relativePath": [
3769
4119
  "dist",
3770
4120
  "commands",
3771
- "tokens",
3772
- "delete.js"
4121
+ "schema",
4122
+ "deploy.js"
3773
4123
  ]
3774
4124
  },
3775
- "tokens:list": {
4125
+ "schema:extract": {
3776
4126
  "aliases": [],
3777
4127
  "args": {},
3778
- "description": "List API tokens for the current project",
4128
+ "description": "Extracts a JSON representation of a Sanity schema within a Studio context.\n\n**Note**: This command is experimental and subject to change.",
3779
4129
  "examples": [
3780
4130
  {
3781
- "command": "<%= config.bin %> <%= command.id %>",
3782
- "description": "List tokens for the current project"
4131
+ "command": "<%= config.bin %> <%= command.id %> --workspace default",
4132
+ "description": "Extracts schema types in a Sanity project with more than one workspace"
3783
4133
  },
3784
4134
  {
3785
- "command": "<%= config.bin %> <%= command.id %> --json",
3786
- "description": "List tokens in JSON format"
4135
+ "command": "<%= config.bin %> <%= command.id %> --watch",
4136
+ "description": "Watch mode - re-extract on changes"
4137
+ },
4138
+ {
4139
+ "command": "<%= config.bin %> <%= command.id %> --watch --watch-patterns \"lib/**/*.ts\"",
4140
+ "description": "Watch with custom glob patterns"
3787
4141
  }
3788
4142
  ],
3789
4143
  "flags": {
3790
- "json": {
3791
- "description": "Output tokens in JSON format",
3792
- "name": "json",
4144
+ "enforce-required-fields": {
4145
+ "description": "Makes the schema generated treat fields marked as required as non-optional",
4146
+ "name": "enforce-required-fields",
4147
+ "allowNo": false,
4148
+ "type": "boolean"
4149
+ },
4150
+ "format": {
4151
+ "description": "Format the schema as GROQ type nodes. Only available format at the moment.",
4152
+ "name": "format",
4153
+ "default": "groq-type-nodes",
4154
+ "hasDynamicHelp": false,
4155
+ "helpValue": "<format>",
4156
+ "multiple": false,
4157
+ "type": "option"
4158
+ },
4159
+ "path": {
4160
+ "description": "Optional path to specify destination of the schema file",
4161
+ "name": "path",
4162
+ "hasDynamicHelp": false,
4163
+ "multiple": false,
4164
+ "type": "option"
4165
+ },
4166
+ "watch": {
4167
+ "description": "Enable watch mode to re-extract schema on file changes",
4168
+ "name": "watch",
3793
4169
  "allowNo": false,
3794
4170
  "type": "boolean"
4171
+ },
4172
+ "watch-patterns": {
4173
+ "description": "Additional glob pattern(s) to watch (can be specified multiple times)",
4174
+ "name": "watch-patterns",
4175
+ "hasDynamicHelp": false,
4176
+ "helpValue": "<glob>",
4177
+ "multiple": true,
4178
+ "type": "option"
4179
+ },
4180
+ "workspace": {
4181
+ "description": "The name of the workspace to generate a schema for",
4182
+ "name": "workspace",
4183
+ "hasDynamicHelp": false,
4184
+ "helpValue": "<name>",
4185
+ "multiple": false,
4186
+ "type": "option"
3795
4187
  }
3796
4188
  },
3797
4189
  "hasDynamicHelp": false,
3798
4190
  "hiddenAliases": [],
3799
- "id": "tokens:list",
4191
+ "id": "schema:extract",
3800
4192
  "pluginAlias": "@sanity/cli",
3801
4193
  "pluginName": "@sanity/cli",
3802
4194
  "pluginType": "core",
@@ -3805,47 +4197,68 @@
3805
4197
  "relativePath": [
3806
4198
  "dist",
3807
4199
  "commands",
3808
- "tokens",
3809
- "list.js"
4200
+ "schema",
4201
+ "extract.js"
3810
4202
  ]
3811
4203
  },
3812
- "users:invite": {
4204
+ "schema:list": {
3813
4205
  "aliases": [],
3814
- "args": {
3815
- "email": {
3816
- "description": "Email address to invite",
3817
- "name": "email",
3818
- "required": false
3819
- }
3820
- },
3821
- "description": "Invite a new user to the project",
4206
+ "args": {},
4207
+ "description": "Lists all schemas in the current dataset.\n\n**Note**: This command is experimental and subject to change.\n\nThis operation (re-)generates a manifest file describing the sanity config workspace by default.\nTo re-use an existing manifest file, use --no-extract-manifest.",
3822
4208
  "examples": [
3823
4209
  {
3824
4210
  "command": "<%= config.bin %> <%= command.id %>",
3825
- "description": "Invite a new user to the project (prompt for details)"
4211
+ "description": "List all schemas found in any workspace dataset in a table"
3826
4212
  },
3827
4213
  {
3828
- "command": "<%= config.bin %> <%= command.id %> pippi@sanity.io",
3829
- "description": "Send a new user invite to the email \"pippi@sanity.io\", prompt for role"
4214
+ "command": "<%= config.bin %> <%= command.id %> --id _.schemas.workspaceName",
4215
+ "description": "Get a schema for a given id"
3830
4216
  },
3831
4217
  {
3832
- "command": "<%= config.bin %> <%= command.id %> pippi@sanity.io --role administrator",
3833
- "description": "Send a new user invite to the email \"pippi@sanity.io\", as administrator"
4218
+ "command": "<%= config.bin %> <%= command.id %> --json",
4219
+ "description": "Get stored schemas as pretty-printed json-array"
4220
+ },
4221
+ {
4222
+ "command": "<%= config.bin %> <%= command.id %> --json --id _.schemas.workspaceName",
4223
+ "description": "Get singular stored schema as pretty-printed json-object"
3834
4224
  }
3835
4225
  ],
3836
4226
  "flags": {
3837
- "role": {
3838
- "description": "Role to invite the user as",
3839
- "name": "role",
3840
- "required": false,
4227
+ "extract-manifest": {
4228
+ "description": "Disables manifest generation - the command will fail if no manifest exists",
4229
+ "hidden": true,
4230
+ "name": "extract-manifest",
4231
+ "allowNo": true,
4232
+ "type": "boolean"
4233
+ },
4234
+ "id": {
4235
+ "description": "Fetch a single schema by id",
4236
+ "name": "id",
4237
+ "hasDynamicHelp": false,
4238
+ "helpValue": "<schema_id>",
4239
+ "multiple": false,
4240
+ "type": "option"
4241
+ },
4242
+ "json": {
4243
+ "description": "Get schema as json",
4244
+ "name": "json",
4245
+ "allowNo": false,
4246
+ "type": "boolean"
4247
+ },
4248
+ "manifest-dir": {
4249
+ "description": "Directory containing manifest file",
4250
+ "hidden": true,
4251
+ "name": "manifest-dir",
4252
+ "default": "./dist/static",
3841
4253
  "hasDynamicHelp": false,
4254
+ "helpValue": "<directory>",
3842
4255
  "multiple": false,
3843
4256
  "type": "option"
3844
4257
  }
3845
4258
  },
3846
4259
  "hasDynamicHelp": false,
3847
4260
  "hiddenAliases": [],
3848
- "id": "users:invite",
4261
+ "id": "schema:list",
3849
4262
  "pluginAlias": "@sanity/cli",
3850
4263
  "pluginName": "@sanity/cli",
3851
4264
  "pluginType": "core",
@@ -3854,71 +4267,77 @@
3854
4267
  "relativePath": [
3855
4268
  "dist",
3856
4269
  "commands",
3857
- "users",
3858
- "invite.js"
4270
+ "schema",
4271
+ "list.js"
3859
4272
  ]
3860
4273
  },
3861
- "users:list": {
4274
+ "schema:validate": {
3862
4275
  "aliases": [],
3863
4276
  "args": {},
3864
- "description": "List all users of the project",
4277
+ "description": "Validates all schema types specified in a workspace",
3865
4278
  "examples": [
3866
4279
  {
3867
- "command": "<%= config.bin %> <%= command.id %>",
3868
- "description": "List all users of the project"
4280
+ "command": "<%= config.bin %> <%= command.id %> --workspace default",
4281
+ "description": "Validates all schema types in a Sanity project with more than one workspace"
3869
4282
  },
3870
4283
  {
3871
- "command": "<%= config.bin %> <%= command.id %> --no-invitations --no-robots",
3872
- "description": "List all users of the project, but exclude pending invitations and robots"
4284
+ "command": "<%= config.bin %> <%= command.id %> > report.txt",
4285
+ "description": "Save the results of the report into a file"
3873
4286
  },
3874
4287
  {
3875
- "command": "<%= config.bin %> <%= command.id %> --sort role",
3876
- "description": "List all users, sorted by role"
4288
+ "command": "<%= config.bin %> <%= command.id %> --level error",
4289
+ "description": "Report out only errors"
4290
+ },
4291
+ {
4292
+ "command": "<%= config.bin %> <%= command.id %> --debug-metafile-path metafile.json",
4293
+ "description": "Generate a report which can be analyzed with https://esbuild.github.io/analyze/"
3877
4294
  }
3878
4295
  ],
3879
4296
  "flags": {
3880
- "invitations": {
3881
- "description": "Includes or excludes pending invitations",
3882
- "name": "invitations",
3883
- "allowNo": true,
3884
- "type": "boolean"
4297
+ "debug-metafile-path": {
4298
+ "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/",
4299
+ "helpGroup": "DEBUG",
4300
+ "name": "debug-metafile-path",
4301
+ "hasDynamicHelp": false,
4302
+ "multiple": false,
4303
+ "type": "option"
3885
4304
  },
3886
- "order": {
3887
- "description": "Sort output ascending/descending",
3888
- "name": "order",
3889
- "default": "asc",
4305
+ "format": {
4306
+ "description": "The output format used to print schema errors and warnings",
4307
+ "name": "format",
4308
+ "default": "pretty",
3890
4309
  "hasDynamicHelp": false,
3891
4310
  "multiple": false,
3892
4311
  "options": [
3893
- "asc",
3894
- "desc"
4312
+ "pretty",
4313
+ "ndjson",
4314
+ "json"
3895
4315
  ],
3896
4316
  "type": "option"
3897
4317
  },
3898
- "robots": {
3899
- "description": "Includes or excludes robots (token users)",
3900
- "name": "robots",
3901
- "allowNo": true,
3902
- "type": "boolean"
3903
- },
3904
- "sort": {
3905
- "description": "Sort users by specified column",
3906
- "name": "sort",
3907
- "default": "date",
4318
+ "level": {
4319
+ "description": "The minimum level reported out",
4320
+ "name": "level",
4321
+ "default": "warning",
3908
4322
  "hasDynamicHelp": false,
3909
4323
  "multiple": false,
3910
4324
  "options": [
3911
- "id",
3912
- "name",
3913
- "role",
3914
- "date"
4325
+ "error",
4326
+ "warning"
3915
4327
  ],
3916
4328
  "type": "option"
4329
+ },
4330
+ "workspace": {
4331
+ "description": "The name of the workspace to use when validating all schema types",
4332
+ "name": "workspace",
4333
+ "hasDynamicHelp": false,
4334
+ "multiple": false,
4335
+ "type": "option"
3917
4336
  }
3918
4337
  },
3919
4338
  "hasDynamicHelp": false,
3920
4339
  "hiddenAliases": [],
3921
- "id": "users:list",
4340
+ "id": "schema:validate",
3922
4341
  "pluginAlias": "@sanity/cli",
3923
4342
  "pluginName": "@sanity/cli",
3924
4343
  "pluginType": "core",
@@ -3927,8 +4346,8 @@
3927
4346
  "relativePath": [
3928
4347
  "dist",
3929
4348
  "commands",
3930
- "users",
3931
- "list.js"
4349
+ "schema",
4350
+ "validate.js"
3932
4351
  ]
3933
4352
  },
3934
4353
  "dataset:alias:create": {
@@ -3971,9 +4390,11 @@
3971
4390
  "flags": {
3972
4391
  "project-id": {
3973
4392
  "char": "p",
3974
- "description": "Project ID to use. Overrides the project ID from the Sanity config.",
4393
+ "description": "Project ID to create dataset alias in (overrides CLI configuration)",
4394
+ "helpGroup": "OVERRIDE",
3975
4395
  "name": "project-id",
3976
4396
  "hasDynamicHelp": false,
4397
+ "helpValue": "<id>",
3977
4398
  "multiple": false,
3978
4399
  "type": "option"
3979
4400
  }
@@ -4021,9 +4442,11 @@
4021
4442
  "flags": {
4022
4443
  "project-id": {
4023
4444
  "char": "p",
4024
- "description": "Project ID to use. Overrides the project ID from the Sanity config.",
4445
+ "description": "Project ID to delete dataset alias from (overrides CLI configuration)",
4446
+ "helpGroup": "OVERRIDE",
4025
4447
  "name": "project-id",
4026
4448
  "hasDynamicHelp": false,
4449
+ "helpValue": "<id>",
4027
4450
  "multiple": false,
4028
4451
  "type": "option"
4029
4452
  },
@@ -4091,9 +4514,11 @@
4091
4514
  "flags": {
4092
4515
  "project-id": {
4093
4516
  "char": "p",
4094
- "description": "Project ID to use. Overrides the project ID from the Sanity config.",
4517
+ "description": "Project ID to link dataset alias in (overrides CLI configuration)",
4518
+ "helpGroup": "OVERRIDE",
4095
4519
  "name": "project-id",
4096
4520
  "hasDynamicHelp": false,
4521
+ "helpValue": "<id>",
4097
4522
  "multiple": false,
4098
4523
  "type": "option"
4099
4524
  },
@@ -4152,9 +4577,11 @@
4152
4577
  "flags": {
4153
4578
  "project-id": {
4154
4579
  "char": "p",
4155
- "description": "Project ID to use. Overrides the project ID from the Sanity config.",
4580
+ "description": "Project ID to unlink dataset alias in (overrides CLI configuration)",
4581
+ "helpGroup": "OVERRIDE",
4156
4582
  "name": "project-id",
4157
4583
  "hasDynamicHelp": false,
4584
+ "helpValue": "<id>",
4158
4585
  "multiple": false,
4159
4586
  "type": "option"
4160
4587
  },
@@ -4182,35 +4609,37 @@
4182
4609
  "unlink.js"
4183
4610
  ]
4184
4611
  },
4185
- "dataset:embeddings:disable": {
4612
+ "dataset:visibility:get": {
4186
4613
  "aliases": [],
4187
4614
  "args": {
4188
4615
  "dataset": {
4189
- "description": "Dataset name to disable embeddings for",
4616
+ "description": "The name of the dataset to get visibility for",
4190
4617
  "name": "dataset",
4191
- "required": false
4618
+ "required": true
4192
4619
  }
4193
4620
  },
4194
- "description": "Disable embeddings for a dataset",
4621
+ "description": "Get the visibility of a dataset",
4195
4622
  "examples": [
4196
4623
  {
4197
- "command": "<%= config.bin %> <%= command.id %> production",
4198
- "description": "Disable embeddings for the production dataset"
4624
+ "command": "<%= config.bin %> <%= command.id %> my-dataset",
4625
+ "description": "Check the visibility of a dataset"
4199
4626
  }
4200
4627
  ],
4201
4628
  "flags": {
4202
4629
  "project-id": {
4203
4630
  "char": "p",
4204
- "description": "Project ID to use. Overrides the project ID from the Sanity config.",
4631
+ "description": "Project ID to get dataset visibility for (overrides CLI configuration)",
4632
+ "helpGroup": "OVERRIDE",
4205
4633
  "name": "project-id",
4206
4634
  "hasDynamicHelp": false,
4635
+ "helpValue": "<id>",
4207
4636
  "multiple": false,
4208
4637
  "type": "option"
4209
4638
  }
4210
4639
  },
4211
4640
  "hasDynamicHelp": false,
4212
4641
  "hiddenAliases": [],
4213
- "id": "dataset:embeddings:disable",
4642
+ "id": "dataset:visibility:get",
4214
4643
  "pluginAlias": "@sanity/cli",
4215
4644
  "pluginName": "@sanity/cli",
4216
4645
  "pluginType": "core",
@@ -4220,61 +4649,54 @@
4220
4649
  "dist",
4221
4650
  "commands",
4222
4651
  "dataset",
4223
- "embeddings",
4224
- "disable.js"
4652
+ "visibility",
4653
+ "get.js"
4225
4654
  ]
4226
4655
  },
4227
- "dataset:embeddings:enable": {
4656
+ "dataset:visibility:set": {
4228
4657
  "aliases": [],
4229
4658
  "args": {
4230
4659
  "dataset": {
4231
- "description": "Dataset name to enable embeddings for",
4660
+ "description": "The name of the dataset to set visibility for",
4232
4661
  "name": "dataset",
4233
- "required": false
4662
+ "required": true
4663
+ },
4664
+ "mode": {
4665
+ "description": "The visibility mode to set",
4666
+ "name": "mode",
4667
+ "options": [
4668
+ "public",
4669
+ "private"
4670
+ ],
4671
+ "required": true
4234
4672
  }
4235
4673
  },
4236
- "description": "Enable embeddings for a dataset",
4674
+ "description": "Set the visibility of a dataset",
4237
4675
  "examples": [
4238
4676
  {
4239
- "command": "<%= config.bin %> <%= command.id %> production",
4240
- "description": "Enable embeddings for the production dataset"
4241
- },
4242
- {
4243
- "command": "<%= config.bin %> <%= command.id %> production --projection \"{ title, body }\"",
4244
- "description": "Enable embeddings with a specific projection"
4677
+ "command": "<%= config.bin %> <%= command.id %> my-dataset private",
4678
+ "description": "Make a dataset private"
4245
4679
  },
4246
4680
  {
4247
- "command": "<%= config.bin %> <%= command.id %> production --wait",
4248
- "description": "Enable embeddings and wait for processing to complete"
4681
+ "command": "<%= config.bin %> <%= command.id %> my-dataset public",
4682
+ "description": "Make a dataset public"
4249
4683
  }
4250
4684
  ],
4251
4685
  "flags": {
4252
4686
  "project-id": {
4253
4687
  "char": "p",
4254
- "description": "Project ID to use. Overrides the project ID from the Sanity config.",
4688
+ "description": "Project ID to set dataset visibility for (overrides CLI configuration)",
4689
+ "helpGroup": "OVERRIDE",
4255
4690
  "name": "project-id",
4256
4691
  "hasDynamicHelp": false,
4692
+ "helpValue": "<id>",
4257
4693
  "multiple": false,
4258
4694
  "type": "option"
4259
- },
4260
- "projection": {
4261
- "description": "GROQ projection defining which fields to embed (e.g. \"{ title, body }\")",
4262
- "name": "projection",
4263
- "required": false,
4264
- "hasDynamicHelp": false,
4265
- "multiple": false,
4266
- "type": "option"
4267
- },
4268
- "wait": {
4269
- "description": "Wait for embeddings processing to complete before returning",
4270
- "name": "wait",
4271
- "allowNo": false,
4272
- "type": "boolean"
4273
4695
  }
4274
4696
  },
4275
4697
  "hasDynamicHelp": false,
4276
4698
  "hiddenAliases": [],
4277
- "id": "dataset:embeddings:enable",
4699
+ "id": "dataset:visibility:set",
4278
4700
  "pluginAlias": "@sanity/cli",
4279
4701
  "pluginName": "@sanity/cli",
4280
4702
  "pluginType": "core",
@@ -4284,39 +4706,41 @@
4284
4706
  "dist",
4285
4707
  "commands",
4286
4708
  "dataset",
4287
- "embeddings",
4288
- "enable.js"
4709
+ "visibility",
4710
+ "set.js"
4289
4711
  ]
4290
4712
  },
4291
- "dataset:embeddings:status": {
4713
+ "dataset:embeddings:disable": {
4292
4714
  "aliases": [],
4293
4715
  "args": {
4294
4716
  "dataset": {
4295
- "description": "The name of the dataset to check embeddings status for",
4717
+ "description": "Dataset name to disable embeddings for",
4296
4718
  "name": "dataset",
4297
4719
  "required": false
4298
4720
  }
4299
4721
  },
4300
- "description": "Show embeddings settings and status for a dataset",
4722
+ "description": "Disable embeddings for a dataset",
4301
4723
  "examples": [
4302
4724
  {
4303
4725
  "command": "<%= config.bin %> <%= command.id %> production",
4304
- "description": "Show embeddings status for the production dataset"
4726
+ "description": "Disable embeddings for the production dataset"
4305
4727
  }
4306
4728
  ],
4307
4729
  "flags": {
4308
4730
  "project-id": {
4309
4731
  "char": "p",
4310
- "description": "Project ID to use. Overrides the project ID from the Sanity config.",
4732
+ "description": "Project ID to disable embeddings for (overrides CLI configuration)",
4733
+ "helpGroup": "OVERRIDE",
4311
4734
  "name": "project-id",
4312
4735
  "hasDynamicHelp": false,
4736
+ "helpValue": "<id>",
4313
4737
  "multiple": false,
4314
4738
  "type": "option"
4315
4739
  }
4316
4740
  },
4317
4741
  "hasDynamicHelp": false,
4318
4742
  "hiddenAliases": [],
4319
- "id": "dataset:embeddings:status",
4743
+ "id": "dataset:embeddings:disable",
4320
4744
  "pluginAlias": "@sanity/cli",
4321
4745
  "pluginName": "@sanity/cli",
4322
4746
  "pluginType": "core",
@@ -4327,38 +4751,62 @@
4327
4751
  "commands",
4328
4752
  "dataset",
4329
4753
  "embeddings",
4330
- "status.js"
4754
+ "disable.js"
4331
4755
  ]
4332
4756
  },
4333
- "dataset:visibility:get": {
4757
+ "dataset:embeddings:enable": {
4334
4758
  "aliases": [],
4335
4759
  "args": {
4336
4760
  "dataset": {
4337
- "description": "The name of the dataset to get visibility for",
4761
+ "description": "Dataset name to enable embeddings for",
4338
4762
  "name": "dataset",
4339
- "required": true
4763
+ "required": false
4340
4764
  }
4341
4765
  },
4342
- "description": "Get the visibility of a dataset",
4766
+ "description": "Enable embeddings for a dataset",
4343
4767
  "examples": [
4344
4768
  {
4345
- "command": "<%= config.bin %> <%= command.id %> my-dataset",
4346
- "description": "Check the visibility of a dataset"
4769
+ "command": "<%= config.bin %> <%= command.id %> production",
4770
+ "description": "Enable embeddings for the production dataset"
4771
+ },
4772
+ {
4773
+ "command": "<%= config.bin %> <%= command.id %> production --projection \"{ title, body }\"",
4774
+ "description": "Enable embeddings with a specific projection"
4775
+ },
4776
+ {
4777
+ "command": "<%= config.bin %> <%= command.id %> production --wait",
4778
+ "description": "Enable embeddings and wait for processing to complete"
4347
4779
  }
4348
4780
  ],
4349
4781
  "flags": {
4350
4782
  "project-id": {
4351
4783
  "char": "p",
4352
- "description": "Project ID to use. Overrides the project ID from the Sanity config.",
4784
+ "description": "Project ID to enable embeddings for (overrides CLI configuration)",
4785
+ "helpGroup": "OVERRIDE",
4353
4786
  "name": "project-id",
4354
4787
  "hasDynamicHelp": false,
4788
+ "helpValue": "<id>",
4789
+ "multiple": false,
4790
+ "type": "option"
4791
+ },
4792
+ "projection": {
4793
+ "description": "GROQ projection defining which fields to embed (e.g. \"{ title, body }\")",
4794
+ "name": "projection",
4795
+ "required": false,
4796
+ "hasDynamicHelp": false,
4355
4797
  "multiple": false,
4356
4798
  "type": "option"
4799
+ },
4800
+ "wait": {
4801
+ "description": "Wait for embeddings processing to complete before returning",
4802
+ "name": "wait",
4803
+ "allowNo": false,
4804
+ "type": "boolean"
4357
4805
  }
4358
4806
  },
4359
4807
  "hasDynamicHelp": false,
4360
4808
  "hiddenAliases": [],
4361
- "id": "dataset:visibility:get",
4809
+ "id": "dataset:embeddings:enable",
4362
4810
  "pluginAlias": "@sanity/cli",
4363
4811
  "pluginName": "@sanity/cli",
4364
4812
  "pluginType": "core",
@@ -4368,52 +4816,41 @@
4368
4816
  "dist",
4369
4817
  "commands",
4370
4818
  "dataset",
4371
- "visibility",
4372
- "get.js"
4819
+ "embeddings",
4820
+ "enable.js"
4373
4821
  ]
4374
4822
  },
4375
- "dataset:visibility:set": {
4823
+ "dataset:embeddings:status": {
4376
4824
  "aliases": [],
4377
4825
  "args": {
4378
4826
  "dataset": {
4379
- "description": "The name of the dataset to set visibility for",
4827
+ "description": "The name of the dataset to check embeddings status for",
4380
4828
  "name": "dataset",
4381
- "required": true
4382
- },
4383
- "mode": {
4384
- "description": "The visibility mode to set",
4385
- "name": "mode",
4386
- "options": [
4387
- "public",
4388
- "private"
4389
- ],
4390
- "required": true
4829
+ "required": false
4391
4830
  }
4392
4831
  },
4393
- "description": "Set the visibility of a dataset",
4832
+ "description": "Show embeddings settings and status for a dataset",
4394
4833
  "examples": [
4395
4834
  {
4396
- "command": "<%= config.bin %> <%= command.id %> my-dataset private",
4397
- "description": "Make a dataset private"
4398
- },
4399
- {
4400
- "command": "<%= config.bin %> <%= command.id %> my-dataset public",
4401
- "description": "Make a dataset public"
4835
+ "command": "<%= config.bin %> <%= command.id %> production",
4836
+ "description": "Show embeddings status for the production dataset"
4402
4837
  }
4403
4838
  ],
4404
4839
  "flags": {
4405
4840
  "project-id": {
4406
4841
  "char": "p",
4407
- "description": "Project ID to use. Overrides the project ID from the Sanity config.",
4842
+ "description": "Project ID to check embeddings status for (overrides CLI configuration)",
4843
+ "helpGroup": "OVERRIDE",
4408
4844
  "name": "project-id",
4409
4845
  "hasDynamicHelp": false,
4846
+ "helpValue": "<id>",
4410
4847
  "multiple": false,
4411
4848
  "type": "option"
4412
4849
  }
4413
4850
  },
4414
4851
  "hasDynamicHelp": false,
4415
4852
  "hiddenAliases": [],
4416
- "id": "dataset:visibility:set",
4853
+ "id": "dataset:embeddings:status",
4417
4854
  "pluginAlias": "@sanity/cli",
4418
4855
  "pluginName": "@sanity/cli",
4419
4856
  "pluginType": "core",
@@ -4423,10 +4860,10 @@
4423
4860
  "dist",
4424
4861
  "commands",
4425
4862
  "dataset",
4426
- "visibility",
4427
- "set.js"
4863
+ "embeddings",
4864
+ "status.js"
4428
4865
  ]
4429
4866
  }
4430
4867
  },
4431
- "version": "6.0.0-alpha.20"
4868
+ "version": "6.0.0-alpha.21"
4432
4869
  }