@sanity/cli 8.23.0 → 8.25.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 (90) hide show
  1. package/README.md +401 -87
  2. package/bin/run.js +7 -1
  3. package/dist/actions/codemods/dashboard.js +136 -8
  4. package/dist/actions/codemods/dashboard.js.map +1 -1
  5. package/dist/actions/codemods/types.js.map +1 -1
  6. package/dist/actions/dev/devAction.js +48 -44
  7. package/dist/actions/dev/devAction.js.map +1 -1
  8. package/dist/actions/init/initHelpers.js +1 -1
  9. package/dist/actions/init/initHelpers.js.map +1 -1
  10. package/dist/actions/init/initStudio.js +1 -1
  11. package/dist/actions/init/initStudio.js.map +1 -1
  12. package/dist/actions/init/project/getOrCreateDataset.js +10 -12
  13. package/dist/actions/init/project/getOrCreateDataset.js.map +1 -1
  14. package/dist/actions/init/project/getOrCreateProject.js +7 -5
  15. package/dist/actions/init/project/getOrCreateProject.js.map +1 -1
  16. package/dist/actions/init/project/promptUserForOrganization.js +6 -4
  17. package/dist/actions/init/project/promptUserForOrganization.js.map +1 -1
  18. package/dist/commands/api.js +1 -1
  19. package/dist/commands/api.js.map +1 -1
  20. package/dist/commands/assets/upload.js +1 -1
  21. package/dist/commands/assets/upload.js.map +1 -1
  22. package/dist/commands/codemod.js +1 -0
  23. package/dist/commands/codemod.js.map +1 -1
  24. package/dist/commands/cors/add.js +1 -1
  25. package/dist/commands/cors/add.js.map +1 -1
  26. package/dist/commands/cors/delete.js +1 -1
  27. package/dist/commands/cors/delete.js.map +1 -1
  28. package/dist/commands/cors/list.js +1 -1
  29. package/dist/commands/cors/list.js.map +1 -1
  30. package/dist/commands/datasets/alias/create.js +1 -1
  31. package/dist/commands/datasets/alias/create.js.map +1 -1
  32. package/dist/commands/datasets/import.js +0 -8
  33. package/dist/commands/datasets/import.js.map +1 -1
  34. package/dist/commands/datasets/list.js +1 -1
  35. package/dist/commands/datasets/list.js.map +1 -1
  36. package/dist/commands/documents/create.js +1 -1
  37. package/dist/commands/documents/create.js.map +1 -1
  38. package/dist/commands/documents/delete.js +1 -1
  39. package/dist/commands/documents/delete.js.map +1 -1
  40. package/dist/commands/documents/get.js +1 -1
  41. package/dist/commands/documents/get.js.map +1 -1
  42. package/dist/commands/documents/query.js +1 -9
  43. package/dist/commands/documents/query.js.map +1 -1
  44. package/dist/commands/documents/validate.js +2 -2
  45. package/dist/commands/documents/validate.js.map +1 -1
  46. package/dist/commands/graphql/list.js +1 -1
  47. package/dist/commands/graphql/list.js.map +1 -1
  48. package/dist/commands/graphql/undeploy.js +1 -11
  49. package/dist/commands/graphql/undeploy.js.map +1 -1
  50. package/dist/commands/hooks/attempt.js +1 -1
  51. package/dist/commands/hooks/attempt.js.map +1 -1
  52. package/dist/commands/hooks/create.js +1 -1
  53. package/dist/commands/hooks/create.js.map +1 -1
  54. package/dist/commands/hooks/delete.js +1 -1
  55. package/dist/commands/hooks/delete.js.map +1 -1
  56. package/dist/commands/hooks/list.js +1 -1
  57. package/dist/commands/hooks/list.js.map +1 -1
  58. package/dist/commands/hooks/logs.js +1 -1
  59. package/dist/commands/hooks/logs.js.map +1 -1
  60. package/dist/commands/init.js +3 -5
  61. package/dist/commands/init.js.map +1 -1
  62. package/dist/commands/migrations/run.js +5 -5
  63. package/dist/commands/migrations/run.js.map +1 -1
  64. package/dist/commands/projects/unclaimed.js +6 -5
  65. package/dist/commands/projects/unclaimed.js.map +1 -1
  66. package/dist/commands/tokens/create.js +4 -4
  67. package/dist/commands/tokens/create.js.map +1 -1
  68. package/dist/commands/tokens/delete.js +2 -2
  69. package/dist/commands/tokens/delete.js.map +1 -1
  70. package/dist/commands/tokens/list.js +2 -2
  71. package/dist/commands/tokens/list.js.map +1 -1
  72. package/dist/commands/users/invite.js +1 -1
  73. package/dist/commands/users/invite.js.map +1 -1
  74. package/dist/commands/users/list.js +1 -1
  75. package/dist/commands/users/list.js.map +1 -1
  76. package/dist/exports/invokeSanityCli/index.js +1 -1
  77. package/dist/exports/invokeSanityCli/index.js.map +1 -1
  78. package/dist/hooks/prerun/injectEnvVariables.js +1 -1
  79. package/dist/hooks/prerun/injectEnvVariables.js.map +1 -1
  80. package/dist/util/searchChoices.js +52 -0
  81. package/dist/util/searchChoices.js.map +1 -0
  82. package/dist/util/sharedFlags.js +8 -4
  83. package/dist/util/sharedFlags.js.map +1 -1
  84. package/dist/util/warnOnNonProductionEnvironment.js +4 -3
  85. package/dist/util/warnOnNonProductionEnvironment.js.map +1 -1
  86. package/oclif.manifest.json +515 -351
  87. package/package.json +8 -8
  88. package/dist/util/getSanityEnv.js +0 -8
  89. package/dist/util/getSanityEnv.js.map +0 -1
  90. package/templates/shopify/.gitignore +0 -26
package/README.md CHANGED
@@ -36,14 +36,24 @@ Code for sanity cli
36
36
  - [`sanity context build KNOWLEDGEBASEID`](#sanity-context-build-knowledgebaseid)
37
37
  - [`sanity context create`](#sanity-context-create)
38
38
  - [`sanity context delete KNOWLEDGEBASEID`](#sanity-context-delete-knowledgebaseid)
39
+ - [`sanity context entries get KNOWLEDGEBASEID PATH`](#sanity-context-entries-get-knowledgebaseid-path)
40
+ - [`sanity context entries list KNOWLEDGEBASEID`](#sanity-context-entries-list-knowledgebaseid)
41
+ - [`sanity context entries rebuild KNOWLEDGEBASEID PATH`](#sanity-context-entries-rebuild-knowledgebaseid-path)
39
42
  - [`sanity context get KNOWLEDGEBASEID`](#sanity-context-get-knowledgebaseid)
40
43
  - [`sanity context imports create KNOWLEDGEBASEID`](#sanity-context-imports-create-knowledgebaseid)
41
44
  - [`sanity context imports delete KNOWLEDGEBASEID IMPORTID`](#sanity-context-imports-delete-knowledgebaseid-importid)
42
45
  - [`sanity context imports download KNOWLEDGEBASEID IMPORTID`](#sanity-context-imports-download-knowledgebaseid-importid)
43
46
  - [`sanity context imports get KNOWLEDGEBASEID IMPORTID`](#sanity-context-imports-get-knowledgebaseid-importid)
44
47
  - [`sanity context imports list KNOWLEDGEBASEID`](#sanity-context-imports-list-knowledgebaseid)
48
+ - [`sanity context issues apply KNOWLEDGEBASEID ISSUEID`](#sanity-context-issues-apply-knowledgebaseid-issueid)
49
+ - [`sanity context issues dismiss KNOWLEDGEBASEID ISSUEID`](#sanity-context-issues-dismiss-knowledgebaseid-issueid)
50
+ - [`sanity context issues get KNOWLEDGEBASEID ISSUEID`](#sanity-context-issues-get-knowledgebaseid-issueid)
51
+ - [`sanity context issues list KNOWLEDGEBASEID`](#sanity-context-issues-list-knowledgebaseid)
52
+ - [`sanity context issues reopen KNOWLEDGEBASEID ISSUEID`](#sanity-context-issues-reopen-knowledgebaseid-issueid)
53
+ - [`sanity context issues resolve KNOWLEDGEBASEID ISSUEID`](#sanity-context-issues-resolve-knowledgebaseid-issueid)
45
54
  - [`sanity context jobs get KNOWLEDGEBASEID JOBID`](#sanity-context-jobs-get-knowledgebaseid-jobid)
46
55
  - [`sanity context list`](#sanity-context-list)
56
+ - [`sanity context query QUERY`](#sanity-context-query-query)
47
57
  - [`sanity context refresh KNOWLEDGEBASEID`](#sanity-context-refresh-knowledgebaseid)
48
58
  - [`sanity context update KNOWLEDGEBASEID`](#sanity-context-update-knowledgebaseid)
49
59
  - [`sanity cors add ORIGIN`](#sanity-cors-add-origin)
@@ -189,8 +199,8 @@ FLAGS
189
199
  --project-hosted Force the request to the project API host (<projectId>.api.sanity.io)
190
200
 
191
201
  OVERRIDE FLAGS
192
- -d, --dataset=<name> Dataset for {dataset} placeholders (overrides CLI configuration)
193
- -p, --project-id=<id> Project ID for {projectId} placeholders and project-hosted APIs (overrides CLI configuration)
202
+ -d, --dataset=<name> Dataset for {dataset} placeholders (overrides CLI configuration)
203
+ -p, --project=<id> Project ID for {projectId} placeholders and project-hosted APIs (overrides CLI configuration)
194
204
 
195
205
  DESCRIPTION
196
206
  Make an authenticated HTTP request to a Sanity API
@@ -264,8 +274,8 @@ FLAGS
264
274
  <options: image|file>
265
275
 
266
276
  OVERRIDE FLAGS
267
- -d, --dataset=<name> Dataset to upload the asset to (overrides CLI configuration)
268
- -p, --project-id=<id> Project ID to upload the asset to (overrides CLI configuration)
277
+ -d, --dataset=<name> Dataset to upload the asset to (overrides CLI configuration)
278
+ -p, --project=<id> Project ID to upload the asset to (overrides CLI configuration)
269
279
 
270
280
  DESCRIPTION
271
281
  Upload one image or file to a Sanity dataset, from a local path or a URL, and print the asset document as JSON
@@ -277,8 +287,8 @@ EXAMPLES
277
287
 
278
288
  Upload a file with explicit project, dataset, and MIME type
279
289
 
280
- $ sanity assets upload --file ./brief.pdf --type file --content-type application/pdf --project-id abc123 \
281
- --dataset production
290
+ $ sanity assets upload --file ./brief.pdf --type file --content-type application/pdf --project abc123 --dataset \
291
+ production
282
292
 
283
293
  Have Sanity fetch an image from a public URL
284
294
 
@@ -297,7 +307,7 @@ ARGUMENTS
297
307
  [DATASET] Dataset name to disable backup for
298
308
 
299
309
  OVERRIDE FLAGS
300
- -p, --project-id=<id> Project ID to disable backups for (overrides CLI configuration)
310
+ -p, --project=<id> Project ID to disable backups for (overrides CLI configuration)
301
311
 
302
312
  DESCRIPTION
303
313
  Disable backup for a dataset
@@ -331,7 +341,7 @@ FLAGS
331
341
  --overwrite Allows overwriting of existing backup file
332
342
 
333
343
  OVERRIDE FLAGS
334
- -p, --project-id=<id> Project ID to download backup from (overrides CLI configuration)
344
+ -p, --project=<id> Project ID to download backup from (overrides CLI configuration)
335
345
 
336
346
  DESCRIPTION
337
347
  Download a dataset backup to a local file
@@ -366,7 +376,7 @@ ARGUMENTS
366
376
  [DATASET] Dataset name to enable backup for
367
377
 
368
378
  OVERRIDE FLAGS
369
- -p, --project-id=<id> Project ID to enable backups for (overrides CLI configuration)
379
+ -p, --project=<id> Project ID to enable backups for (overrides CLI configuration)
370
380
 
371
381
  DESCRIPTION
372
382
  Enable backup for a dataset
@@ -398,7 +408,7 @@ FLAGS
398
408
  --before=<value> Only return backups before this date (exclusive, YYYY-MM-DD format)
399
409
 
400
410
  OVERRIDE FLAGS
401
- -p, --project-id=<id> Project ID to list backups for (overrides CLI configuration)
411
+ -p, --project=<id> Project ID to list backups for (overrides CLI configuration)
402
412
 
403
413
  DESCRIPTION
404
414
  List available backups for a dataset
@@ -1060,6 +1070,89 @@ EXAMPLES
1060
1070
  $ sanity context delete kb-abc123 --yes
1061
1071
  ```
1062
1072
 
1073
+ ## `sanity context entries get KNOWLEDGEBASEID PATH`
1074
+
1075
+ Get an entry and its content
1076
+
1077
+ ```
1078
+ USAGE
1079
+ $ sanity context entries get KNOWLEDGEBASEID PATH [--json]
1080
+
1081
+ ARGUMENTS
1082
+ KNOWLEDGEBASEID Knowledge base ID
1083
+ PATH Entry path, as listed by `sanity context entries list`
1084
+
1085
+ GLOBAL FLAGS
1086
+ --json Format output as json.
1087
+
1088
+ DESCRIPTION
1089
+ Get an entry and its content
1090
+
1091
+ EXAMPLES
1092
+ Print an entry and its content
1093
+
1094
+ $ sanity context entries get kb-abc123 billing/refunds
1095
+
1096
+ Output the entry, including citations, as JSON
1097
+
1098
+ $ sanity context entries get kb-abc123 billing/refunds --json
1099
+ ```
1100
+
1101
+ ## `sanity context entries list KNOWLEDGEBASEID`
1102
+
1103
+ List the entries a knowledge base build produced
1104
+
1105
+ ```
1106
+ USAGE
1107
+ $ sanity context entries list KNOWLEDGEBASEID [--json]
1108
+
1109
+ ARGUMENTS
1110
+ KNOWLEDGEBASEID Knowledge base ID
1111
+
1112
+ GLOBAL FLAGS
1113
+ --json Format output as json.
1114
+
1115
+ DESCRIPTION
1116
+ List the entries a knowledge base build produced
1117
+
1118
+ EXAMPLES
1119
+ List all entries for a knowledge base
1120
+
1121
+ $ sanity context entries list kb-abc123
1122
+
1123
+ Output entries as JSON
1124
+
1125
+ $ sanity context entries list kb-abc123 --json
1126
+ ```
1127
+
1128
+ ## `sanity context entries rebuild KNOWLEDGEBASEID PATH`
1129
+
1130
+ Rebuild one entry from its sources
1131
+
1132
+ ```
1133
+ USAGE
1134
+ $ sanity context entries rebuild KNOWLEDGEBASEID PATH [--watch]
1135
+
1136
+ ARGUMENTS
1137
+ KNOWLEDGEBASEID Knowledge base ID
1138
+ PATH Entry path, as listed by `sanity context entries list`
1139
+
1140
+ FLAGS
1141
+ --watch Wait for the rebuild to finish, exiting non-zero if it fails
1142
+
1143
+ DESCRIPTION
1144
+ Rebuild one entry from its sources
1145
+
1146
+ EXAMPLES
1147
+ Start a rebuild and return the job ID
1148
+
1149
+ $ sanity context entries rebuild kb-abc123 billing/refunds
1150
+
1151
+ Rebuild an entry and wait for it to finish (non-zero exit on failure)
1152
+
1153
+ $ sanity context entries rebuild kb-abc123 billing/refunds --watch
1154
+ ```
1155
+
1063
1156
  ## `sanity context get KNOWLEDGEBASEID`
1064
1157
 
1065
1158
  Get details of a knowledge base
@@ -1239,6 +1332,192 @@ EXAMPLES
1239
1332
  $ sanity context imports list kb-abc123 --json
1240
1333
  ```
1241
1334
 
1335
+ ## `sanity context issues apply KNOWLEDGEBASEID ISSUEID`
1336
+
1337
+ Accept and apply issues to a knowledge base
1338
+
1339
+ ```
1340
+ USAGE
1341
+ $ sanity context issues apply KNOWLEDGEBASEID ISSUEID... [--watch]
1342
+
1343
+ ARGUMENTS
1344
+ KNOWLEDGEBASEID Knowledge base ID
1345
+ ISSUEID... ID of an issue to accept and apply (pass several to apply them in one batch). Conflicts can't be
1346
+ applied; resolve them with `sanity context issues resolve`
1347
+
1348
+ FLAGS
1349
+ --watch Wait for the apply to finish, exiting non-zero if it fails
1350
+
1351
+ DESCRIPTION
1352
+ Accept and apply issues to a knowledge base
1353
+
1354
+ EXAMPLES
1355
+ Accept and apply two issues in one batch
1356
+
1357
+ $ sanity context issues apply kb-abc123 issue.def456 issue.ghi789
1358
+
1359
+ Apply an issue and wait for it to finish (non-zero exit on failure)
1360
+
1361
+ $ sanity context issues apply kb-abc123 issue.def456 --watch
1362
+ ```
1363
+
1364
+ ## `sanity context issues dismiss KNOWLEDGEBASEID ISSUEID`
1365
+
1366
+ Dismiss an issue
1367
+
1368
+ ```
1369
+ USAGE
1370
+ $ sanity context issues dismiss KNOWLEDGEBASEID ISSUEID
1371
+
1372
+ ARGUMENTS
1373
+ KNOWLEDGEBASEID Knowledge base ID
1374
+ ISSUEID Issue ID
1375
+
1376
+ DESCRIPTION
1377
+ Dismiss an issue
1378
+
1379
+ Dismissing is permanent: dismissed issues can't be reopened.
1380
+
1381
+ EXAMPLES
1382
+ Dismiss an issue
1383
+
1384
+ $ sanity context issues dismiss kb-abc123 issue.def456
1385
+ ```
1386
+
1387
+ ## `sanity context issues get KNOWLEDGEBASEID ISSUEID`
1388
+
1389
+ Get details of an issue
1390
+
1391
+ ```
1392
+ USAGE
1393
+ $ sanity context issues get KNOWLEDGEBASEID ISSUEID [--json]
1394
+
1395
+ ARGUMENTS
1396
+ KNOWLEDGEBASEID Knowledge base ID
1397
+ ISSUEID Issue ID
1398
+
1399
+ GLOBAL FLAGS
1400
+ --json Format output as json.
1401
+
1402
+ DESCRIPTION
1403
+ Get details of an issue
1404
+
1405
+ EXAMPLES
1406
+ Get details of a specific issue
1407
+
1408
+ $ sanity context issues get kb-abc123 issue.def456
1409
+
1410
+ Output the issue as JSON
1411
+
1412
+ $ sanity context issues get kb-abc123 issue.def456 --json
1413
+ ```
1414
+
1415
+ ## `sanity context issues list KNOWLEDGEBASEID`
1416
+
1417
+ List issues found by knowledge base builds
1418
+
1419
+ ```
1420
+ USAGE
1421
+ $ sanity context issues list KNOWLEDGEBASEID [--json] [--kind
1422
+ add_entry|conflict|gap|merge_entry|remove_entry|split_entry|update_required] [--scope <path>] [--severity
1423
+ critical|suggestion] [--status open|accepted|rejected]
1424
+
1425
+ ARGUMENTS
1426
+ KNOWLEDGEBASEID Knowledge base ID
1427
+
1428
+ FLAGS
1429
+ --kind=<option> Only list issues of this kind
1430
+ <options: add_entry|conflict|gap|merge_entry|remove_entry|split_entry|update_required>
1431
+ --scope=<path> Only list issues about this entry path or anything under it (`*` for knowledge-base-wide issues)
1432
+ --severity=<option> Only list issues of this severity
1433
+ <options: critical|suggestion>
1434
+ --status=<option> Only list issues with this status (rejected = dismissed, accepted = resolved or applied)
1435
+ <options: open|accepted|rejected>
1436
+
1437
+ GLOBAL FLAGS
1438
+ --json Format output as json.
1439
+
1440
+ DESCRIPTION
1441
+ List issues found by knowledge base builds
1442
+
1443
+ EXAMPLES
1444
+ List all issues for a knowledge base
1445
+
1446
+ $ sanity context issues list kb-abc123
1447
+
1448
+ List issues awaiting triage
1449
+
1450
+ $ sanity context issues list kb-abc123 --status open
1451
+
1452
+ List critical conflicts
1453
+
1454
+ $ sanity context issues list kb-abc123 --kind conflict --severity critical
1455
+
1456
+ List issues about entries under billing/
1457
+
1458
+ $ sanity context issues list kb-abc123 --scope billing
1459
+
1460
+ Output issues as JSON
1461
+
1462
+ $ sanity context issues list kb-abc123 --json
1463
+ ```
1464
+
1465
+ ## `sanity context issues reopen KNOWLEDGEBASEID ISSUEID`
1466
+
1467
+ Reopen a resolved conflict issue
1468
+
1469
+ ```
1470
+ USAGE
1471
+ $ sanity context issues reopen KNOWLEDGEBASEID ISSUEID
1472
+
1473
+ ARGUMENTS
1474
+ KNOWLEDGEBASEID Knowledge base ID
1475
+ ISSUEID Issue ID
1476
+
1477
+ DESCRIPTION
1478
+ Reopen a resolved conflict issue
1479
+
1480
+ EXAMPLES
1481
+ Return a resolved conflict issue to triage
1482
+
1483
+ $ sanity context issues reopen kb-abc123 issue.def456
1484
+ ```
1485
+
1486
+ ## `sanity context issues resolve KNOWLEDGEBASEID ISSUEID`
1487
+
1488
+ Resolve a conflict issue by choosing the correct side
1489
+
1490
+ ```
1491
+ USAGE
1492
+ $ sanity context issues resolve KNOWLEDGEBASEID ISSUEID [--side <value>] [--watch]
1493
+
1494
+ ARGUMENTS
1495
+ KNOWLEDGEBASEID Knowledge base ID
1496
+ ISSUEID Issue ID
1497
+
1498
+ FLAGS
1499
+ --side=<value> Index of the correct side, as listed by `sanity context issues get`
1500
+ --watch Wait for the entry rewrite to finish, exiting non-zero if it fails
1501
+
1502
+ DESCRIPTION
1503
+ Resolve a conflict issue by choosing the correct side
1504
+
1505
+ Resolving also creates a standing instruction that future builds follow. `sanity context issues reopen` removes it.
1506
+
1507
+ EXAMPLES
1508
+ Interactively choose the correct side of a conflict
1509
+
1510
+ $ sanity context issues resolve kb-abc123 issue.def456
1511
+
1512
+ Choose side 1 and wait for the entry to be rewritten
1513
+
1514
+ $ sanity context issues resolve kb-abc123 issue.def456 --side 1 --watch
1515
+
1516
+ Keep the entry as it is (for a conflict on a single entry)
1517
+
1518
+ $ sanity context issues resolve kb-abc123 issue.def456 --side 0
1519
+ ```
1520
+
1242
1521
  ## `sanity context jobs get KNOWLEDGEBASEID JOBID`
1243
1522
 
1244
1523
  Get the status of a knowledge base job
@@ -1301,6 +1580,40 @@ EXAMPLES
1301
1580
  $ sanity context list --organization org-abc123 --json
1302
1581
  ```
1303
1582
 
1583
+ ## `sanity context query QUERY`
1584
+
1585
+ Query an organization's Context documents with GROQ
1586
+
1587
+ ```
1588
+ USAGE
1589
+ $ sanity context query QUERY [--json] [--organization <id>] [--params <json>]
1590
+
1591
+ ARGUMENTS
1592
+ QUERY GROQ query to run against the organization's Context documents
1593
+
1594
+ FLAGS
1595
+ --params=<json> Query parameters as a JSON object
1596
+
1597
+ GLOBAL FLAGS
1598
+ --json Format output as json.
1599
+
1600
+ OVERRIDE FLAGS
1601
+ --organization=<id> Organization to query (overrides CLI configuration)
1602
+
1603
+ DESCRIPTION
1604
+ Query an organization's Context documents with GROQ
1605
+
1606
+ EXAMPLES
1607
+ List open issues across all knowledge bases
1608
+
1609
+ $ sanity context query '*[_type == "sanity.context.issue" && status == "open"]{_id, knowledgeBaseId}'
1610
+
1611
+ List the entry paths of one knowledge base as plain JSON
1612
+
1613
+ $ sanity context query '*[_type == "sanity.context.entry" && knowledgeBaseId == $kb].path' --params '{"kb": \
1614
+ "kb-abc123"}' --json
1615
+ ```
1616
+
1304
1617
  ## `sanity context refresh KNOWLEDGEBASEID`
1305
1618
 
1306
1619
  Refresh a knowledge base: re-check sources and apply what changed
@@ -1373,7 +1686,7 @@ FLAGS
1373
1686
  --[no-]credentials Allow credentials (token/cookie) to be sent from this origin
1374
1687
 
1375
1688
  OVERRIDE FLAGS
1376
- -p, --project-id=<id> Project ID to add CORS origin to (overrides CLI configuration)
1689
+ -p, --project=<id> Project ID to add CORS origin to (overrides CLI configuration)
1377
1690
 
1378
1691
  DESCRIPTION
1379
1692
  Add a CORS origin to the project
@@ -1393,7 +1706,7 @@ EXAMPLES
1393
1706
 
1394
1707
  Add a CORS origin for a specific project
1395
1708
 
1396
- $ sanity cors add https://myapp.com --project-id abc123
1709
+ $ sanity cors add https://myapp.com --project abc123
1397
1710
  ```
1398
1711
 
1399
1712
  ## `sanity cors delete [ORIGIN]`
@@ -1408,7 +1721,7 @@ ARGUMENTS
1408
1721
  [ORIGIN] Origin to delete (will prompt if not provided)
1409
1722
 
1410
1723
  OVERRIDE FLAGS
1411
- -p, --project-id=<id> Project ID to delete CORS origin from (overrides CLI configuration)
1724
+ -p, --project=<id> Project ID to delete CORS origin from (overrides CLI configuration)
1412
1725
 
1413
1726
  DESCRIPTION
1414
1727
  Delete a CORS origin from the project
@@ -1424,7 +1737,7 @@ EXAMPLES
1424
1737
 
1425
1738
  Delete a CORS origin from a specific project
1426
1739
 
1427
- $ sanity cors delete --project-id abc123
1740
+ $ sanity cors delete --project abc123
1428
1741
  ```
1429
1742
 
1430
1743
  ## `sanity cors list`
@@ -1436,7 +1749,7 @@ USAGE
1436
1749
  $ sanity cors list [-p <id>]
1437
1750
 
1438
1751
  OVERRIDE FLAGS
1439
- -p, --project-id=<id> Project ID to list CORS origins for (overrides CLI configuration)
1752
+ -p, --project=<id> Project ID to list CORS origins for (overrides CLI configuration)
1440
1753
 
1441
1754
  DESCRIPTION
1442
1755
  List CORS origins for the project
@@ -1448,7 +1761,7 @@ EXAMPLES
1448
1761
 
1449
1762
  List CORS origins for a specific project
1450
1763
 
1451
- $ sanity cors list --project-id abc123
1764
+ $ sanity cors list --project abc123
1452
1765
  ```
1453
1766
 
1454
1767
  ## `sanity datasets alias create [ALIASNAME] [TARGETDATASET]`
@@ -1464,7 +1777,7 @@ ARGUMENTS
1464
1777
  [TARGETDATASET] Target dataset name to link the alias to
1465
1778
 
1466
1779
  OVERRIDE FLAGS
1467
- -p, --project-id=<id> Project ID to create dataset alias in (overrides CLI configuration)
1780
+ -p, --project=<id> Project ID to create dataset alias in (overrides CLI configuration)
1468
1781
 
1469
1782
  DESCRIPTION
1470
1783
  Create a dataset alias for the project
@@ -1472,7 +1785,7 @@ DESCRIPTION
1472
1785
  EXAMPLES
1473
1786
  Create alias in a specific project
1474
1787
 
1475
- $ sanity datasets alias create --project-id abc123 conference conf-2025
1788
+ $ sanity datasets alias create --project abc123 conference conf-2025
1476
1789
 
1477
1790
  Create an alias with interactive prompts
1478
1791
 
@@ -1502,7 +1815,7 @@ FLAGS
1502
1815
  --force Skip confirmation prompt and delete immediately
1503
1816
 
1504
1817
  OVERRIDE FLAGS
1505
- -p, --project-id=<id> Project ID to delete dataset alias from (overrides CLI configuration)
1818
+ -p, --project=<id> Project ID to delete dataset alias from (overrides CLI configuration)
1506
1819
 
1507
1820
  DESCRIPTION
1508
1821
  Delete a dataset alias from the project
@@ -1533,7 +1846,7 @@ FLAGS
1533
1846
  --force Skip confirmation prompt when relinking existing alias
1534
1847
 
1535
1848
  OVERRIDE FLAGS
1536
- -p, --project-id=<id> Project ID to link dataset alias in (overrides CLI configuration)
1849
+ -p, --project=<id> Project ID to link dataset alias in (overrides CLI configuration)
1537
1850
 
1538
1851
  DESCRIPTION
1539
1852
  Link a dataset alias to a dataset in the project
@@ -1571,7 +1884,7 @@ FLAGS
1571
1884
  --force Skip confirmation prompt and unlink immediately
1572
1885
 
1573
1886
  OVERRIDE FLAGS
1574
- -p, --project-id=<id> Project ID to unlink dataset alias in (overrides CLI configuration)
1887
+ -p, --project=<id> Project ID to unlink dataset alias in (overrides CLI configuration)
1575
1888
 
1576
1889
  DESCRIPTION
1577
1890
  Unlink a dataset alias from its dataset in the project
@@ -1613,7 +1926,7 @@ FLAGS
1613
1926
  --skip-history Don't preserve document history on copy
1614
1927
 
1615
1928
  OVERRIDE FLAGS
1616
- -p, --project-id=<id> Project ID to copy dataset in (overrides CLI configuration)
1929
+ -p, --project=<id> Project ID to copy dataset in (overrides CLI configuration)
1617
1930
 
1618
1931
  DESCRIPTION
1619
1932
  Copy a dataset or manage copy jobs
@@ -1675,7 +1988,7 @@ FLAGS
1675
1988
  <options: custom|private|public>
1676
1989
 
1677
1990
  OVERRIDE FLAGS
1678
- -p, --project-id=<id> Project ID to create dataset in (overrides CLI configuration)
1991
+ -p, --project=<id> Project ID to create dataset in (overrides CLI configuration)
1679
1992
 
1680
1993
  DESCRIPTION
1681
1994
  Create a new dataset for the project
@@ -1709,7 +2022,7 @@ FLAGS
1709
2022
  --force Do not prompt for delete confirmation - forcefully delete
1710
2023
 
1711
2024
  OVERRIDE FLAGS
1712
- -p, --project-id=<id> Project ID to delete dataset from (overrides CLI configuration)
2025
+ -p, --project=<id> Project ID to delete dataset from (overrides CLI configuration)
1713
2026
 
1714
2027
  DESCRIPTION
1715
2028
  Delete a dataset from the project
@@ -1736,7 +2049,7 @@ ARGUMENTS
1736
2049
  [DATASET] Dataset name to disable embeddings for
1737
2050
 
1738
2051
  OVERRIDE FLAGS
1739
- -p, --project-id=<id> Project ID to disable embeddings for (overrides CLI configuration)
2052
+ -p, --project=<id> Project ID to disable embeddings for (overrides CLI configuration)
1740
2053
 
1741
2054
  DESCRIPTION
1742
2055
  Disable embeddings for a dataset
@@ -1763,7 +2076,7 @@ FLAGS
1763
2076
  --wait Wait for embeddings processing to complete before returning
1764
2077
 
1765
2078
  OVERRIDE FLAGS
1766
- -p, --project-id=<id> Project ID to enable embeddings for (overrides CLI configuration)
2079
+ -p, --project=<id> Project ID to enable embeddings for (overrides CLI configuration)
1767
2080
 
1768
2081
  DESCRIPTION
1769
2082
  Enable embeddings for a dataset
@@ -1794,7 +2107,7 @@ ARGUMENTS
1794
2107
  [DATASET] The name of the dataset to check embeddings status for
1795
2108
 
1796
2109
  OVERRIDE FLAGS
1797
- -p, --project-id=<id> Project ID to check embeddings status for (overrides CLI configuration)
2110
+ -p, --project=<id> Project ID to check embeddings status for (overrides CLI configuration)
1798
2111
 
1799
2112
  DESCRIPTION
1800
2113
  Show embeddings settings and status for a dataset
@@ -1832,7 +2145,7 @@ FLAGS
1832
2145
  --types=<value> Defines which document types to export (comma-separated)
1833
2146
 
1834
2147
  OVERRIDE FLAGS
1835
- -p, --project-id=<id> Project ID to export dataset from (overrides CLI configuration)
2148
+ -p, --project=<id> Project ID to export dataset from (overrides CLI configuration)
1836
2149
 
1837
2150
  DESCRIPTION
1838
2151
  Export a dataset to a local gzipped tarball. Assets returning 401, 403, or 404 are excluded from the export.
@@ -1887,7 +2200,7 @@ FLAGS
1887
2200
  --skip-cross-dataset-references Skips references to other datasets
1888
2201
 
1889
2202
  OVERRIDE FLAGS
1890
- -p, --project-id=<id> Project ID to import to (overrides CLI configuration)
2203
+ -p, --project=<id> Project ID to import to (overrides CLI configuration)
1891
2204
 
1892
2205
  DESCRIPTION
1893
2206
  Import documents to a Sanity dataset
@@ -1919,7 +2232,7 @@ USAGE
1919
2232
  $ sanity datasets list [-p <id>]
1920
2233
 
1921
2234
  OVERRIDE FLAGS
1922
- -p, --project-id=<id> Project ID to list datasets for (overrides CLI configuration)
2235
+ -p, --project=<id> Project ID to list datasets for (overrides CLI configuration)
1923
2236
 
1924
2237
  DESCRIPTION
1925
2238
  List datasets for the project
@@ -1931,7 +2244,7 @@ EXAMPLES
1931
2244
 
1932
2245
  List datasets for a specific project
1933
2246
 
1934
- $ sanity datasets list --project-id abc123
2247
+ $ sanity datasets list --project abc123
1935
2248
  ```
1936
2249
 
1937
2250
  ## `sanity datasets visibility get DATASET`
@@ -1946,7 +2259,7 @@ ARGUMENTS
1946
2259
  DATASET The name of the dataset to get visibility for
1947
2260
 
1948
2261
  OVERRIDE FLAGS
1949
- -p, --project-id=<id> Project ID to get dataset visibility for (overrides CLI configuration)
2262
+ -p, --project=<id> Project ID to get dataset visibility for (overrides CLI configuration)
1950
2263
 
1951
2264
  DESCRIPTION
1952
2265
  Get the visibility of a dataset
@@ -1970,7 +2283,7 @@ ARGUMENTS
1970
2283
  MODE (public|private) The visibility mode to set
1971
2284
 
1972
2285
  OVERRIDE FLAGS
1973
- -p, --project-id=<id> Project ID to set dataset visibility for (overrides CLI configuration)
2286
+ -p, --project=<id> Project ID to set dataset visibility for (overrides CLI configuration)
1974
2287
 
1975
2288
  DESCRIPTION
1976
2289
  Set the visibility of a dataset
@@ -2224,8 +2537,8 @@ FLAGS
2224
2537
  --watch Write the documents whenever the target file or buffer changes
2225
2538
 
2226
2539
  OVERRIDE FLAGS
2227
- -d, --dataset=<name> Dataset to create document(s) in (overrides CLI configuration)
2228
- -p, --project-id=<id> Project ID to create document(s) in (overrides CLI configuration)
2540
+ -d, --dataset=<name> Dataset to create document(s) in (overrides CLI configuration)
2541
+ -p, --project=<id> Project ID to create document(s) in (overrides CLI configuration)
2229
2542
 
2230
2543
  DESCRIPTION
2231
2544
  Create one or more documents
@@ -2251,7 +2564,7 @@ EXAMPLES
2251
2564
 
2252
2565
  Create documents in a specific project
2253
2566
 
2254
- $ sanity documents create myDocument.json --project-id abc123
2567
+ $ sanity documents create myDocument.json --project abc123
2255
2568
  ```
2256
2569
 
2257
2570
  ## `sanity documents delete ID [IDS]`
@@ -2267,8 +2580,8 @@ ARGUMENTS
2267
2580
  [IDS...] Additional document IDs to delete
2268
2581
 
2269
2582
  OVERRIDE FLAGS
2270
- -d, --dataset=<name> Dataset to delete from (overrides CLI configuration)
2271
- -p, --project-id=<id> Project ID to delete from (overrides CLI configuration)
2583
+ -d, --dataset=<name> Dataset to delete from (overrides CLI configuration)
2584
+ -p, --project=<id> Project ID to delete from (overrides CLI configuration)
2272
2585
 
2273
2586
  DESCRIPTION
2274
2587
  Delete one or more documents from the project's configured dataset
@@ -2292,7 +2605,7 @@ EXAMPLES
2292
2605
 
2293
2606
  Delete a document from a specific project
2294
2607
 
2295
- $ sanity documents delete myDocId --project-id abc123
2608
+ $ sanity documents delete myDocId --project abc123
2296
2609
  ```
2297
2610
 
2298
2611
  ## `sanity documents get DOCUMENTID`
@@ -2310,8 +2623,8 @@ FLAGS
2310
2623
  --pretty Colorize JSON output
2311
2624
 
2312
2625
  OVERRIDE FLAGS
2313
- -d, --dataset=<name> Dataset to get document from (overrides CLI configuration)
2314
- -p, --project-id=<id> Project ID to get document from (overrides CLI configuration)
2626
+ -d, --dataset=<name> Dataset to get document from (overrides CLI configuration)
2627
+ -p, --project=<id> Project ID to get document from (overrides CLI configuration)
2315
2628
 
2316
2629
  DESCRIPTION
2317
2630
  Get and print a document by ID
@@ -2331,7 +2644,7 @@ EXAMPLES
2331
2644
 
2332
2645
  Get a document from a specific project
2333
2646
 
2334
- $ sanity documents get myDocId --project-id abc123
2647
+ $ sanity documents get myDocId --project abc123
2335
2648
  ```
2336
2649
 
2337
2650
  ## `sanity documents query QUERY`
@@ -2351,8 +2664,8 @@ FLAGS
2351
2664
  --pretty Colorize JSON output
2352
2665
 
2353
2666
  OVERRIDE FLAGS
2354
- -d, --dataset=<name> Dataset to query (overrides CLI configuration)
2355
- -p, --project-id=<id> Project ID to query (overrides CLI configuration)
2667
+ -d, --dataset=<name> Dataset to query (overrides CLI configuration)
2668
+ -p, --project=<id> Project ID to query (overrides CLI configuration)
2356
2669
 
2357
2670
  DESCRIPTION
2358
2671
  Query for documents
@@ -2372,7 +2685,7 @@ EXAMPLES
2372
2685
 
2373
2686
  Query documents in a specific project and dataset
2374
2687
 
2375
- $ sanity documents query '*[_type == "post"]' --project-id abc123 --dataset production
2688
+ $ sanity documents query '*[_type == "post"]' --project abc123 --dataset production
2376
2689
  ```
2377
2690
 
2378
2691
  ## `sanity documents validate`
@@ -2388,7 +2701,7 @@ USAGE
2388
2701
  FLAGS
2389
2702
  -d, --dataset=<name> Override the dataset used. By default, this is derived from the given
2390
2703
  workspace
2391
- -p, --project-id=<id> Override the project ID used. By default, this is derived from the
2704
+ -p, --project=<id> Override the project ID used. By default, this is derived from the
2392
2705
  given workspace
2393
2706
  -y, --yes Skips the first confirmation prompt
2394
2707
  --file=<value> Path to an NDJSON file or tar archive containing an NDJSON file
@@ -2426,7 +2739,7 @@ EXAMPLES
2426
2739
 
2427
2740
  Validate documents in a specific project and dataset
2428
2741
 
2429
- $ sanity documents validate --project-id abc123 --dataset production
2742
+ $ sanity documents validate --project abc123 --dataset production
2430
2743
  ```
2431
2744
 
2432
2745
  ## `sanity exec SCRIPT`
@@ -2784,7 +3097,7 @@ USAGE
2784
3097
  $ sanity graphql list [-p <id>]
2785
3098
 
2786
3099
  OVERRIDE FLAGS
2787
- -p, --project-id=<id> Project ID to list GraphQL endpoints for (overrides CLI configuration)
3100
+ -p, --project=<id> Project ID to list GraphQL endpoints for (overrides CLI configuration)
2788
3101
 
2789
3102
  DESCRIPTION
2790
3103
  List deployed GraphQL endpoints for the project
@@ -2796,7 +3109,7 @@ EXAMPLES
2796
3109
 
2797
3110
  List GraphQL endpoints for a specific project
2798
3111
 
2799
- $ sanity graphql list --project-id abc123
3112
+ $ sanity graphql list --project abc123
2800
3113
  ```
2801
3114
 
2802
3115
  ## `sanity graphql undeploy`
@@ -2805,7 +3118,7 @@ Remove a deployed GraphQL API
2805
3118
 
2806
3119
  ```
2807
3120
  USAGE
2808
- $ sanity graphql undeploy [--api <value> | -p <id> | ] [-d <name>] [--force] [--tag <value>]
3121
+ $ sanity graphql undeploy [--api <value> | -p <id>] [-d <name>] [--force] [--tag <value>]
2809
3122
 
2810
3123
  FLAGS
2811
3124
  --api=<value> Undeploy API with this ID
@@ -2813,8 +3126,8 @@ FLAGS
2813
3126
  --tag=<value> [default: default] Tag to undeploy GraphQL API from
2814
3127
 
2815
3128
  OVERRIDE FLAGS
2816
- -d, --dataset=<name> Dataset to undeploy GraphQL API from (overrides CLI configuration)
2817
- -p, --project-id=<id> Project ID to undeploy GraphQL API from (overrides CLI configuration)
3129
+ -d, --dataset=<name> Dataset to undeploy GraphQL API from (overrides CLI configuration)
3130
+ -p, --project=<id> Project ID to undeploy GraphQL API from (overrides CLI configuration)
2818
3131
 
2819
3132
  DESCRIPTION
2820
3133
  Remove a deployed GraphQL API
@@ -2842,7 +3155,7 @@ EXAMPLES
2842
3155
 
2843
3156
  Undeploy GraphQL API for a specific project and dataset
2844
3157
 
2845
- $ sanity graphql undeploy --project-id abc123 --dataset production
3158
+ $ sanity graphql undeploy --project abc123 --dataset production
2846
3159
  ```
2847
3160
 
2848
3161
  ## `sanity help [COMMAND]`
@@ -2875,7 +3188,7 @@ ARGUMENTS
2875
3188
  ATTEMPTID The delivery attempt ID to get details for
2876
3189
 
2877
3190
  OVERRIDE FLAGS
2878
- -p, --project-id=<id> Project ID to view webhook attempt for (overrides CLI configuration)
3191
+ -p, --project=<id> Project ID to view webhook attempt for (overrides CLI configuration)
2879
3192
 
2880
3193
  DESCRIPTION
2881
3194
  Print details of a given webhook delivery attempt
@@ -2887,7 +3200,7 @@ EXAMPLES
2887
3200
 
2888
3201
  Get attempt details for a specific project
2889
3202
 
2890
- $ sanity hooks attempt abc123 --project-id projectId
3203
+ $ sanity hooks attempt abc123 --project projectId
2891
3204
  ```
2892
3205
 
2893
3206
  ## `sanity hooks create`
@@ -2899,7 +3212,7 @@ USAGE
2899
3212
  $ sanity hooks create [-p <id>]
2900
3213
 
2901
3214
  OVERRIDE FLAGS
2902
- -p, --project-id=<id> Project ID to create webhook for (overrides CLI configuration)
3215
+ -p, --project=<id> Project ID to create webhook for (overrides CLI configuration)
2903
3216
 
2904
3217
  DESCRIPTION
2905
3218
  Create a new webhook for the project
@@ -2911,7 +3224,7 @@ EXAMPLES
2911
3224
 
2912
3225
  Create a webhook for a specific project
2913
3226
 
2914
- $ sanity hooks create --project-id abc123
3227
+ $ sanity hooks create --project abc123
2915
3228
  ```
2916
3229
 
2917
3230
  ## `sanity hooks delete [NAME]`
@@ -2926,7 +3239,7 @@ ARGUMENTS
2926
3239
  [NAME] Name of webhook to delete (will prompt if not provided)
2927
3240
 
2928
3241
  OVERRIDE FLAGS
2929
- -p, --project-id=<id> Project ID to delete webhook from (overrides CLI configuration)
3242
+ -p, --project=<id> Project ID to delete webhook from (overrides CLI configuration)
2930
3243
 
2931
3244
  DESCRIPTION
2932
3245
  Delete a webhook from the project
@@ -2942,7 +3255,7 @@ EXAMPLES
2942
3255
 
2943
3256
  Delete a webhook from a specific project
2944
3257
 
2945
- $ sanity hooks delete --project-id abc123
3258
+ $ sanity hooks delete --project abc123
2946
3259
  ```
2947
3260
 
2948
3261
  ## `sanity hooks list`
@@ -2954,7 +3267,7 @@ USAGE
2954
3267
  $ sanity hooks list [-p <id>]
2955
3268
 
2956
3269
  OVERRIDE FLAGS
2957
- -p, --project-id=<id> Project ID to list webhooks for (overrides CLI configuration)
3270
+ -p, --project=<id> Project ID to list webhooks for (overrides CLI configuration)
2958
3271
 
2959
3272
  DESCRIPTION
2960
3273
  List webhooks for the project
@@ -2966,7 +3279,7 @@ EXAMPLES
2966
3279
 
2967
3280
  List webhooks for a specific project
2968
3281
 
2969
- $ sanity hooks list --project-id abc123
3282
+ $ sanity hooks list --project abc123
2970
3283
  ```
2971
3284
 
2972
3285
  ## `sanity hooks logs [NAME]`
@@ -2984,7 +3297,7 @@ FLAGS
2984
3297
  --detailed Include detailed payload and attempts
2985
3298
 
2986
3299
  OVERRIDE FLAGS
2987
- -p, --project-id=<id> Project ID to view webhook logs for (overrides CLI configuration)
3300
+ -p, --project=<id> Project ID to view webhook logs for (overrides CLI configuration)
2988
3301
 
2989
3302
  DESCRIPTION
2990
3303
  Show log entries for project webhooks
@@ -3000,7 +3313,7 @@ EXAMPLES
3000
3313
 
3001
3314
  Show log entries for a specific project
3002
3315
 
3003
- $ sanity hooks logs --project-id abc123
3316
+ $ sanity hooks logs --project abc123
3004
3317
  ```
3005
3318
 
3006
3319
  ## `sanity init`
@@ -3012,10 +3325,11 @@ USAGE
3012
3325
  $ sanity init [--json] [--auto-updates | --bare] [--coupon <code> | --project-plan <name>] [--dashboard
3013
3326
  | | --env <filename>] [--dataset <name> | --dataset-default] [--git <message> | ] [--import-dataset] [--install | ]
3014
3327
  [--mcp] [--nextjs-add-config-files] [--nextjs-append-env] [--nextjs-embed-studio] [--organization <id>]
3015
- [--output-path <path> | ] [--overwrite-files] [--package-manager <manager> | ] [--project <id> | | --project-name
3016
- <name>] [--provider <provider>] [--skills] [--template <template> | ] [--typescript | ] [--visibility <mode>] [-y]
3328
+ [--output-path <path> | ] [--overwrite-files] [--package-manager <manager> | ] [-p <id> | | --project-name <name>]
3329
+ [--provider <provider>] [--skills] [--template <template> | ] [--typescript | ] [--visibility <mode>] [-y]
3017
3330
 
3018
3331
  FLAGS
3332
+ -p, --project=<id> Project ID to use for the studio
3019
3333
  -y, --yes Unattended mode, answers "yes" to any "yes/no" prompt and otherwise uses defaults
3020
3334
  --[no-]auto-updates Enable auto updates of studio versions
3021
3335
  --bare Skip the Studio initialization and only print the selected project ID and dataset
@@ -3033,7 +3347,6 @@ FLAGS
3033
3347
  --output-path=<path> Path to write studio project to
3034
3348
  --[no-]overwrite-files Overwrite existing files
3035
3349
  --package-manager=<manager> Specify which package manager to use [allowed: npm, yarn, pnpm]
3036
- --project=<id> Project ID to use for the studio
3037
3350
  --project-name=<name> Create a new project with the given name
3038
3351
  --project-plan=<name> Optionally select a plan for a new project
3039
3352
  --provider=<provider> Login provider to use
@@ -3253,7 +3566,7 @@ FLAGS
3253
3566
  --media-library-id=<value> The id of the target media library
3254
3567
 
3255
3568
  OVERRIDE FLAGS
3256
- -p, --project-id=<id> Project ID to delete media aspect from (overrides CLI configuration)
3569
+ -p, --project=<id> Project ID to delete media aspect from (overrides CLI configuration)
3257
3570
 
3258
3571
  DESCRIPTION
3259
3572
  Delete an aspect definition
@@ -3280,7 +3593,7 @@ FLAGS
3280
3593
  --media-library-id=<value> The id of the target media library
3281
3594
 
3282
3595
  OVERRIDE FLAGS
3283
- -p, --project-id=<id> Project ID to deploy media aspect to (overrides CLI configuration)
3596
+ -p, --project=<id> Project ID to deploy media aspect to (overrides CLI configuration)
3284
3597
 
3285
3598
  DESCRIPTION
3286
3599
  Deploy an aspect
@@ -3314,7 +3627,7 @@ FLAGS
3314
3627
  --overwrite Overwrite any file with the same name
3315
3628
 
3316
3629
  OVERRIDE FLAGS
3317
- -p, --project-id=<id> Project ID to export media from (overrides CLI configuration)
3630
+ -p, --project=<id> Project ID to export media from (overrides CLI configuration)
3318
3631
 
3319
3632
  DESCRIPTION
3320
3633
  Export file and image assets from a media library (excludes video)
@@ -3355,7 +3668,7 @@ FLAGS
3355
3668
  aspect data). Only applies to directory and archive imports
3356
3669
 
3357
3670
  OVERRIDE FLAGS
3358
- -p, --project-id=<id> Project ID to import media to (overrides CLI configuration)
3671
+ -p, --project=<id> Project ID to import media to (overrides CLI configuration)
3359
3672
 
3360
3673
  DESCRIPTION
3361
3674
  Import a set of assets to the target media library.
@@ -3430,7 +3743,7 @@ Run a migration against a dataset
3430
3743
  ```
3431
3744
  USAGE
3432
3745
  $ sanity migrations run [ID] [--api-version <value>] [--concurrency <value>] [--confirm] [--dataset <value>]
3433
- [--dry-run] [--from-export <value>] [--progress] [--project <value>]
3746
+ [--dry-run] [--from-export <value>] [--progress] [-p <id>]
3434
3747
 
3435
3748
  ARGUMENTS
3436
3749
  [ID] ID
@@ -3445,8 +3758,9 @@ FLAGS
3445
3758
  --from-export=<value> Use a local dataset export as source for migration instead of calling the Sanity API. Note:
3446
3759
  this is only supported for dry runs.
3447
3760
  --[no-]progress Display progress during migration (default: true). Use --no-progress to hide output.
3448
- --project=<value> Project ID of the dataset to migrate. Defaults to the projectId configured in your Sanity CLI
3449
- config.
3761
+
3762
+ OVERRIDE FLAGS
3763
+ -p, --project=<id> Project ID of the dataset to migrate (overrides CLI configuration)
3450
3764
 
3451
3765
  DESCRIPTION
3452
3766
  Run a migration against a dataset
@@ -3832,10 +4146,10 @@ Recover details for unclaimed projects created on this machine
3832
4146
 
3833
4147
  ```
3834
4148
  USAGE
3835
- $ sanity projects unclaimed [--project-id <value>]
4149
+ $ sanity projects unclaimed [-p <id>]
3836
4150
 
3837
4151
  FLAGS
3838
- --project-id=<value> Project ID to recover
4152
+ -p, --project=<id> Project ID to recover
3839
4153
 
3840
4154
  DESCRIPTION
3841
4155
  Recover details for unclaimed projects created on this machine
@@ -3847,7 +4161,7 @@ EXAMPLES
3847
4161
 
3848
4162
  Show recovery details for one project
3849
4163
 
3850
- $ sanity projects unclaimed --project-id abc123
4164
+ $ sanity projects unclaimed --project abc123
3851
4165
  ```
3852
4166
 
3853
4167
  ## `sanity schemas delete`
@@ -3865,7 +4179,7 @@ FLAGS
3865
4179
  --verbose Enable verbose logging
3866
4180
 
3867
4181
  OVERRIDE FLAGS
3868
- -p, --project-id=<id> Project ID to delete schema from (overrides CLI configuration)
4182
+ -p, --project=<id> Project ID to delete schema from (overrides CLI configuration)
3869
4183
 
3870
4184
  DESCRIPTION
3871
4185
  Delete schema documents by id
@@ -4121,7 +4435,7 @@ FLAGS
4121
4435
  --role=viewer Role to assign on the project (defaults to viewer in unattended mode)
4122
4436
 
4123
4437
  OVERRIDE FLAGS
4124
- -p, --project-id=<id> Project ID to create token in (overrides CLI configuration)
4438
+ -p, --project=<id> Project ID to create token in (overrides CLI configuration)
4125
4439
  --organization=<id> Organization to create an organization token in (overrides CLI configuration)
4126
4440
 
4127
4441
  GLOBAL FLAGS
@@ -4141,7 +4455,7 @@ EXAMPLES
4141
4455
 
4142
4456
  Create a project token with editor role
4143
4457
 
4144
- $ sanity tokens create "My Token" --project-id abc123 --role=editor
4458
+ $ sanity tokens create "My Token" --project abc123 --role=editor
4145
4459
 
4146
4460
  Create a project token in unattended mode
4147
4461
 
@@ -4172,7 +4486,7 @@ FLAGS
4172
4486
  --organization=<id> Delete a token managed by this organization
4173
4487
 
4174
4488
  OVERRIDE FLAGS
4175
- -p, --project-id=<id> Project ID to delete token from (overrides CLI configuration)
4489
+ -p, --project=<id> Project ID to delete token from (overrides CLI configuration)
4176
4490
 
4177
4491
  DESCRIPTION
4178
4492
  Delete an API token from a project or organization
@@ -4200,7 +4514,7 @@ EXAMPLES
4200
4514
 
4201
4515
  Delete a token from a specific project
4202
4516
 
4203
- $ sanity tokens delete --project-id abc123
4517
+ $ sanity tokens delete --project abc123
4204
4518
  ```
4205
4519
 
4206
4520
  ## `sanity tokens list`
@@ -4215,7 +4529,7 @@ FLAGS
4215
4529
  --organization=<id> List tokens managed by this organization
4216
4530
 
4217
4531
  OVERRIDE FLAGS
4218
- -p, --project-id=<id> Project ID to list tokens for (overrides CLI configuration)
4532
+ -p, --project=<id> Project ID to list tokens for (overrides CLI configuration)
4219
4533
 
4220
4534
  GLOBAL FLAGS
4221
4535
  --json Format output as json.
@@ -4238,7 +4552,7 @@ EXAMPLES
4238
4552
 
4239
4553
  List tokens for a specific project
4240
4554
 
4241
- $ sanity tokens list --project-id abc123
4555
+ $ sanity tokens list --project abc123
4242
4556
  ```
4243
4557
 
4244
4558
  ## `sanity tokens rotate`
@@ -4371,7 +4685,7 @@ FLAGS
4371
4685
  --role=<value> Role to invite the user as
4372
4686
 
4373
4687
  OVERRIDE FLAGS
4374
- -p, --project-id=<id> Project ID to invite user to (overrides CLI configuration)
4688
+ -p, --project=<id> Project ID to invite user to (overrides CLI configuration)
4375
4689
 
4376
4690
  DESCRIPTION
4377
4691
  Invite a new user to the project
@@ -4391,7 +4705,7 @@ EXAMPLES
4391
4705
 
4392
4706
  Invite a user to a specific project
4393
4707
 
4394
- $ sanity users invite pippi@sanity.io --project-id abc123
4708
+ $ sanity users invite pippi@sanity.io --project abc123
4395
4709
  ```
4396
4710
 
4397
4711
  ## `sanity users list`
@@ -4411,7 +4725,7 @@ FLAGS
4411
4725
  <options: id|name|role|date>
4412
4726
 
4413
4727
  OVERRIDE FLAGS
4414
- -p, --project-id=<id> Project ID to list users for (overrides CLI configuration)
4728
+ -p, --project=<id> Project ID to list users for (overrides CLI configuration)
4415
4729
 
4416
4730
  DESCRIPTION
4417
4731
  List project members
@@ -4431,7 +4745,7 @@ EXAMPLES
4431
4745
 
4432
4746
  List users for a specific project
4433
4747
 
4434
- $ sanity users list --project-id abc123
4748
+ $ sanity users list --project abc123
4435
4749
  ```
4436
4750
 
4437
4751
  ## `sanity versions`