@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
@@ -41,11 +41,15 @@
41
41
  }
42
42
  ],
43
43
  "flags": {
44
- "project-id": {
44
+ "project": {
45
+ "aliases": [
46
+ "project-id"
47
+ ],
45
48
  "char": "p",
49
+ "deprecateAliases": true,
46
50
  "description": "Project ID for {projectId} placeholders and project-hosted APIs (overrides CLI configuration)",
47
51
  "helpGroup": "OVERRIDE",
48
- "name": "project-id",
52
+ "name": "project",
49
53
  "hasDynamicHelp": false,
50
54
  "helpValue": "<id>",
51
55
  "multiple": false,
@@ -873,6 +877,8 @@
873
877
  "aliases": [
874
878
  "project-id"
875
879
  ],
880
+ "char": "p",
881
+ "deprecateAliases": true,
876
882
  "description": "Project ID to use for the studio",
877
883
  "exclusive": [
878
884
  "create-project",
@@ -1449,7 +1455,7 @@
1449
1455
  "description": "Upload an image using the configured project"
1450
1456
  },
1451
1457
  {
1452
- "command": "<%= config.bin %> <%= command.id %> --file ./brief.pdf --type file --content-type application/pdf --project-id abc123 --dataset production",
1458
+ "command": "<%= config.bin %> <%= command.id %> --file ./brief.pdf --type file --content-type application/pdf --project abc123 --dataset production",
1453
1459
  "description": "Upload a file with explicit project, dataset, and MIME type"
1454
1460
  },
1455
1461
  {
@@ -1458,11 +1464,15 @@
1458
1464
  }
1459
1465
  ],
1460
1466
  "flags": {
1461
- "project-id": {
1467
+ "project": {
1468
+ "aliases": [
1469
+ "project-id"
1470
+ ],
1462
1471
  "char": "p",
1472
+ "deprecateAliases": true,
1463
1473
  "description": "Project ID to upload the asset to (overrides CLI configuration)",
1464
1474
  "helpGroup": "OVERRIDE",
1465
- "name": "project-id",
1475
+ "name": "project",
1466
1476
  "hasDynamicHelp": false,
1467
1477
  "helpValue": "<id>",
1468
1478
  "multiple": false,
@@ -1583,11 +1593,15 @@
1583
1593
  }
1584
1594
  ],
1585
1595
  "flags": {
1586
- "project-id": {
1596
+ "project": {
1597
+ "aliases": [
1598
+ "project-id"
1599
+ ],
1587
1600
  "char": "p",
1601
+ "deprecateAliases": true,
1588
1602
  "description": "Project ID to disable backups for (overrides CLI configuration)",
1589
1603
  "helpGroup": "OVERRIDE",
1590
- "name": "project-id",
1604
+ "name": "project",
1591
1605
  "hasDynamicHelp": false,
1592
1606
  "helpValue": "<id>",
1593
1607
  "multiple": false,
@@ -1640,11 +1654,15 @@
1640
1654
  }
1641
1655
  ],
1642
1656
  "flags": {
1643
- "project-id": {
1657
+ "project": {
1658
+ "aliases": [
1659
+ "project-id"
1660
+ ],
1644
1661
  "char": "p",
1662
+ "deprecateAliases": true,
1645
1663
  "description": "Project ID to download backup from (overrides CLI configuration)",
1646
1664
  "helpGroup": "OVERRIDE",
1647
- "name": "project-id",
1665
+ "name": "project",
1648
1666
  "hasDynamicHelp": false,
1649
1667
  "helpValue": "<id>",
1650
1668
  "multiple": false,
@@ -1717,11 +1735,15 @@
1717
1735
  }
1718
1736
  ],
1719
1737
  "flags": {
1720
- "project-id": {
1738
+ "project": {
1739
+ "aliases": [
1740
+ "project-id"
1741
+ ],
1721
1742
  "char": "p",
1743
+ "deprecateAliases": true,
1722
1744
  "description": "Project ID to enable backups for (overrides CLI configuration)",
1723
1745
  "helpGroup": "OVERRIDE",
1724
- "name": "project-id",
1746
+ "name": "project",
1725
1747
  "hasDynamicHelp": false,
1726
1748
  "helpValue": "<id>",
1727
1749
  "multiple": false,
@@ -1774,11 +1796,15 @@
1774
1796
  }
1775
1797
  ],
1776
1798
  "flags": {
1777
- "project-id": {
1799
+ "project": {
1800
+ "aliases": [
1801
+ "project-id"
1802
+ ],
1778
1803
  "char": "p",
1804
+ "deprecateAliases": true,
1779
1805
  "description": "Project ID to list backups for (overrides CLI configuration)",
1780
1806
  "helpGroup": "OVERRIDE",
1781
- "name": "project-id",
1807
+ "name": "project",
1782
1808
  "hasDynamicHelp": false,
1783
1809
  "helpValue": "<id>",
1784
1810
  "multiple": false,
@@ -1825,6 +1851,179 @@
1825
1851
  "list.js"
1826
1852
  ]
1827
1853
  },
1854
+ "cors:add": {
1855
+ "aliases": [],
1856
+ "args": {
1857
+ "origin": {
1858
+ "description": "Origin to allow (e.g., https://example.com)",
1859
+ "name": "origin",
1860
+ "required": true
1861
+ }
1862
+ },
1863
+ "description": "Add a CORS origin to the project",
1864
+ "examples": [
1865
+ {
1866
+ "command": "<%= config.bin %> <%= command.id %>",
1867
+ "description": "Interactively add a CORS origin"
1868
+ },
1869
+ {
1870
+ "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
1871
+ "description": "Add a localhost origin without credentials"
1872
+ },
1873
+ {
1874
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
1875
+ "description": "Add a production origin with credentials allowed"
1876
+ },
1877
+ {
1878
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project abc123",
1879
+ "description": "Add a CORS origin for a specific project"
1880
+ }
1881
+ ],
1882
+ "flags": {
1883
+ "project": {
1884
+ "aliases": [
1885
+ "project-id"
1886
+ ],
1887
+ "char": "p",
1888
+ "deprecateAliases": true,
1889
+ "description": "Project ID to add CORS origin to (overrides CLI configuration)",
1890
+ "helpGroup": "OVERRIDE",
1891
+ "name": "project",
1892
+ "hasDynamicHelp": false,
1893
+ "helpValue": "<id>",
1894
+ "multiple": false,
1895
+ "type": "option"
1896
+ },
1897
+ "credentials": {
1898
+ "description": "Allow credentials (token/cookie) to be sent from this origin",
1899
+ "name": "credentials",
1900
+ "required": false,
1901
+ "allowNo": true,
1902
+ "type": "boolean"
1903
+ },
1904
+ "yes": {
1905
+ "char": "y",
1906
+ "description": "Confirm risky wildcard origins without prompting",
1907
+ "name": "yes",
1908
+ "allowNo": false,
1909
+ "type": "boolean"
1910
+ }
1911
+ },
1912
+ "hasDynamicHelp": false,
1913
+ "hiddenAliases": [],
1914
+ "id": "cors:add",
1915
+ "pluginAlias": "@sanity/cli",
1916
+ "pluginName": "@sanity/cli",
1917
+ "pluginType": "core",
1918
+ "strict": true,
1919
+ "isESM": true,
1920
+ "relativePath": [
1921
+ "dist",
1922
+ "commands",
1923
+ "cors",
1924
+ "add.js"
1925
+ ]
1926
+ },
1927
+ "cors:delete": {
1928
+ "aliases": [],
1929
+ "args": {
1930
+ "origin": {
1931
+ "description": "Origin to delete (will prompt if not provided)",
1932
+ "name": "origin",
1933
+ "required": false
1934
+ }
1935
+ },
1936
+ "description": "Delete a CORS origin from the project",
1937
+ "examples": [
1938
+ {
1939
+ "command": "<%= config.bin %> <%= command.id %>",
1940
+ "description": "Interactively select and delete a CORS origin"
1941
+ },
1942
+ {
1943
+ "command": "<%= config.bin %> <%= command.id %> https://example.com",
1944
+ "description": "Delete a specific CORS origin"
1945
+ },
1946
+ {
1947
+ "command": "<%= config.bin %> <%= command.id %> --project abc123",
1948
+ "description": "Delete a CORS origin from a specific project"
1949
+ }
1950
+ ],
1951
+ "flags": {
1952
+ "project": {
1953
+ "aliases": [
1954
+ "project-id"
1955
+ ],
1956
+ "char": "p",
1957
+ "deprecateAliases": true,
1958
+ "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
1959
+ "helpGroup": "OVERRIDE",
1960
+ "name": "project",
1961
+ "hasDynamicHelp": false,
1962
+ "helpValue": "<id>",
1963
+ "multiple": false,
1964
+ "type": "option"
1965
+ }
1966
+ },
1967
+ "hasDynamicHelp": false,
1968
+ "hiddenAliases": [],
1969
+ "id": "cors:delete",
1970
+ "pluginAlias": "@sanity/cli",
1971
+ "pluginName": "@sanity/cli",
1972
+ "pluginType": "core",
1973
+ "strict": true,
1974
+ "isESM": true,
1975
+ "relativePath": [
1976
+ "dist",
1977
+ "commands",
1978
+ "cors",
1979
+ "delete.js"
1980
+ ]
1981
+ },
1982
+ "cors:list": {
1983
+ "aliases": [],
1984
+ "args": {},
1985
+ "description": "List CORS origins for the project",
1986
+ "examples": [
1987
+ {
1988
+ "command": "<%= config.bin %> <%= command.id %>",
1989
+ "description": "List CORS origins for the project"
1990
+ },
1991
+ {
1992
+ "command": "<%= config.bin %> <%= command.id %> --project abc123",
1993
+ "description": "List CORS origins for a specific project"
1994
+ }
1995
+ ],
1996
+ "flags": {
1997
+ "project": {
1998
+ "aliases": [
1999
+ "project-id"
2000
+ ],
2001
+ "char": "p",
2002
+ "deprecateAliases": true,
2003
+ "description": "Project ID to list CORS origins for (overrides CLI configuration)",
2004
+ "helpGroup": "OVERRIDE",
2005
+ "name": "project",
2006
+ "hasDynamicHelp": false,
2007
+ "helpValue": "<id>",
2008
+ "multiple": false,
2009
+ "type": "option"
2010
+ }
2011
+ },
2012
+ "hasDynamicHelp": false,
2013
+ "hiddenAliases": [],
2014
+ "id": "cors:list",
2015
+ "pluginAlias": "@sanity/cli",
2016
+ "pluginName": "@sanity/cli",
2017
+ "pluginType": "core",
2018
+ "strict": true,
2019
+ "isESM": true,
2020
+ "relativePath": [
2021
+ "dist",
2022
+ "commands",
2023
+ "cors",
2024
+ "list.js"
2025
+ ]
2026
+ },
1828
2027
  "context:build": {
1829
2028
  "aliases": [],
1830
2029
  "args": {
@@ -2288,167 +2487,6 @@
2288
2487
  "update.js"
2289
2488
  ]
2290
2489
  },
2291
- "cors:add": {
2292
- "aliases": [],
2293
- "args": {
2294
- "origin": {
2295
- "description": "Origin to allow (e.g., https://example.com)",
2296
- "name": "origin",
2297
- "required": true
2298
- }
2299
- },
2300
- "description": "Add a CORS origin to the project",
2301
- "examples": [
2302
- {
2303
- "command": "<%= config.bin %> <%= command.id %>",
2304
- "description": "Interactively add a CORS origin"
2305
- },
2306
- {
2307
- "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
2308
- "description": "Add a localhost origin without credentials"
2309
- },
2310
- {
2311
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
2312
- "description": "Add a production origin with credentials allowed"
2313
- },
2314
- {
2315
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project-id abc123",
2316
- "description": "Add a CORS origin for a specific project"
2317
- }
2318
- ],
2319
- "flags": {
2320
- "project-id": {
2321
- "char": "p",
2322
- "description": "Project ID to add CORS origin to (overrides CLI configuration)",
2323
- "helpGroup": "OVERRIDE",
2324
- "name": "project-id",
2325
- "hasDynamicHelp": false,
2326
- "helpValue": "<id>",
2327
- "multiple": false,
2328
- "type": "option"
2329
- },
2330
- "credentials": {
2331
- "description": "Allow credentials (token/cookie) to be sent from this origin",
2332
- "name": "credentials",
2333
- "required": false,
2334
- "allowNo": true,
2335
- "type": "boolean"
2336
- },
2337
- "yes": {
2338
- "char": "y",
2339
- "description": "Confirm risky wildcard origins without prompting",
2340
- "name": "yes",
2341
- "allowNo": false,
2342
- "type": "boolean"
2343
- }
2344
- },
2345
- "hasDynamicHelp": false,
2346
- "hiddenAliases": [],
2347
- "id": "cors:add",
2348
- "pluginAlias": "@sanity/cli",
2349
- "pluginName": "@sanity/cli",
2350
- "pluginType": "core",
2351
- "strict": true,
2352
- "isESM": true,
2353
- "relativePath": [
2354
- "dist",
2355
- "commands",
2356
- "cors",
2357
- "add.js"
2358
- ]
2359
- },
2360
- "cors:delete": {
2361
- "aliases": [],
2362
- "args": {
2363
- "origin": {
2364
- "description": "Origin to delete (will prompt if not provided)",
2365
- "name": "origin",
2366
- "required": false
2367
- }
2368
- },
2369
- "description": "Delete a CORS origin from the project",
2370
- "examples": [
2371
- {
2372
- "command": "<%= config.bin %> <%= command.id %>",
2373
- "description": "Interactively select and delete a CORS origin"
2374
- },
2375
- {
2376
- "command": "<%= config.bin %> <%= command.id %> https://example.com",
2377
- "description": "Delete a specific CORS origin"
2378
- },
2379
- {
2380
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2381
- "description": "Delete a CORS origin from a specific project"
2382
- }
2383
- ],
2384
- "flags": {
2385
- "project-id": {
2386
- "char": "p",
2387
- "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
2388
- "helpGroup": "OVERRIDE",
2389
- "name": "project-id",
2390
- "hasDynamicHelp": false,
2391
- "helpValue": "<id>",
2392
- "multiple": false,
2393
- "type": "option"
2394
- }
2395
- },
2396
- "hasDynamicHelp": false,
2397
- "hiddenAliases": [],
2398
- "id": "cors:delete",
2399
- "pluginAlias": "@sanity/cli",
2400
- "pluginName": "@sanity/cli",
2401
- "pluginType": "core",
2402
- "strict": true,
2403
- "isESM": true,
2404
- "relativePath": [
2405
- "dist",
2406
- "commands",
2407
- "cors",
2408
- "delete.js"
2409
- ]
2410
- },
2411
- "cors:list": {
2412
- "aliases": [],
2413
- "args": {},
2414
- "description": "List CORS origins for the project",
2415
- "examples": [
2416
- {
2417
- "command": "<%= config.bin %> <%= command.id %>",
2418
- "description": "List CORS origins for the project"
2419
- },
2420
- {
2421
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2422
- "description": "List CORS origins for a specific project"
2423
- }
2424
- ],
2425
- "flags": {
2426
- "project-id": {
2427
- "char": "p",
2428
- "description": "Project ID to list CORS origins for (overrides CLI configuration)",
2429
- "helpGroup": "OVERRIDE",
2430
- "name": "project-id",
2431
- "hasDynamicHelp": false,
2432
- "helpValue": "<id>",
2433
- "multiple": false,
2434
- "type": "option"
2435
- }
2436
- },
2437
- "hasDynamicHelp": false,
2438
- "hiddenAliases": [],
2439
- "id": "cors:list",
2440
- "pluginAlias": "@sanity/cli",
2441
- "pluginName": "@sanity/cli",
2442
- "pluginType": "core",
2443
- "strict": true,
2444
- "isESM": true,
2445
- "relativePath": [
2446
- "dist",
2447
- "commands",
2448
- "cors",
2449
- "list.js"
2450
- ]
2451
- },
2452
2490
  "datasets:copy": {
2453
2491
  "aliases": [],
2454
2492
  "args": {
@@ -2503,11 +2541,15 @@
2503
2541
  }
2504
2542
  ],
2505
2543
  "flags": {
2506
- "project-id": {
2544
+ "project": {
2545
+ "aliases": [
2546
+ "project-id"
2547
+ ],
2507
2548
  "char": "p",
2549
+ "deprecateAliases": true,
2508
2550
  "description": "Project ID to copy dataset in (overrides CLI configuration)",
2509
2551
  "helpGroup": "OVERRIDE",
2510
- "name": "project-id",
2552
+ "name": "project",
2511
2553
  "hasDynamicHelp": false,
2512
2554
  "helpValue": "<id>",
2513
2555
  "multiple": false,
@@ -2636,11 +2678,15 @@
2636
2678
  }
2637
2679
  ],
2638
2680
  "flags": {
2639
- "project-id": {
2681
+ "project": {
2682
+ "aliases": [
2683
+ "project-id"
2684
+ ],
2640
2685
  "char": "p",
2686
+ "deprecateAliases": true,
2641
2687
  "description": "Project ID to create dataset in (overrides CLI configuration)",
2642
2688
  "helpGroup": "OVERRIDE",
2643
- "name": "project-id",
2689
+ "name": "project",
2644
2690
  "hasDynamicHelp": false,
2645
2691
  "helpValue": "<id>",
2646
2692
  "multiple": false,
@@ -2714,11 +2760,15 @@
2714
2760
  }
2715
2761
  ],
2716
2762
  "flags": {
2717
- "project-id": {
2763
+ "project": {
2764
+ "aliases": [
2765
+ "project-id"
2766
+ ],
2718
2767
  "char": "p",
2768
+ "deprecateAliases": true,
2719
2769
  "description": "Project ID to delete dataset from (overrides CLI configuration)",
2720
2770
  "helpGroup": "OVERRIDE",
2721
- "name": "project-id",
2771
+ "name": "project",
2722
2772
  "hasDynamicHelp": false,
2723
2773
  "helpValue": "<id>",
2724
2774
  "multiple": false,
@@ -2784,11 +2834,15 @@
2784
2834
  }
2785
2835
  ],
2786
2836
  "flags": {
2787
- "project-id": {
2837
+ "project": {
2838
+ "aliases": [
2839
+ "project-id"
2840
+ ],
2788
2841
  "char": "p",
2842
+ "deprecateAliases": true,
2789
2843
  "description": "Project ID to export dataset from (overrides CLI configuration)",
2790
2844
  "helpGroup": "OVERRIDE",
2791
- "name": "project-id",
2845
+ "name": "project",
2792
2846
  "hasDynamicHelp": false,
2793
2847
  "helpValue": "<id>",
2794
2848
  "multiple": false,
@@ -2958,24 +3012,17 @@
2958
3012
  "allowNo": false,
2959
3013
  "type": "boolean"
2960
3014
  },
2961
- "project-id": {
3015
+ "project": {
3016
+ "aliases": [
3017
+ "project-id"
3018
+ ],
2962
3019
  "char": "p",
3020
+ "deprecateAliases": true,
2963
3021
  "description": "Project ID to import to (overrides CLI configuration)",
2964
3022
  "helpGroup": "OVERRIDE",
2965
- "name": "project-id",
2966
- "hasDynamicHelp": false,
2967
- "helpValue": "<id>",
2968
- "multiple": false,
2969
- "type": "option"
2970
- },
2971
- "project": {
2972
- "deprecated": {
2973
- "to": "project-id"
2974
- },
2975
- "description": "Project ID to import to",
2976
- "hidden": true,
2977
3023
  "name": "project",
2978
3024
  "hasDynamicHelp": false,
3025
+ "helpValue": "<id>",
2979
3026
  "multiple": false,
2980
3027
  "type": "option"
2981
3028
  },
@@ -3038,16 +3085,20 @@
3038
3085
  "description": "List datasets for the project"
3039
3086
  },
3040
3087
  {
3041
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3088
+ "command": "<%= config.bin %> <%= command.id %> --project abc123",
3042
3089
  "description": "List datasets for a specific project"
3043
3090
  }
3044
3091
  ],
3045
3092
  "flags": {
3046
- "project-id": {
3093
+ "project": {
3094
+ "aliases": [
3095
+ "project-id"
3096
+ ],
3047
3097
  "char": "p",
3098
+ "deprecateAliases": true,
3048
3099
  "description": "Project ID to list datasets for (overrides CLI configuration)",
3049
3100
  "helpGroup": "OVERRIDE",
3050
- "name": "project-id",
3101
+ "name": "project",
3051
3102
  "hasDynamicHelp": false,
3052
3103
  "helpValue": "<id>",
3053
3104
  "multiple": false,
@@ -3223,16 +3274,20 @@
3223
3274
  "description": "Open configured $EDITOR and replace the document with the given content on each save. Use JSON5 file extension and parser for simplified syntax."
3224
3275
  },
3225
3276
  {
3226
- "command": "<%= config.bin %> <%= command.id %> myDocument.json --project-id abc123",
3277
+ "command": "<%= config.bin %> <%= command.id %> myDocument.json --project abc123",
3227
3278
  "description": "Create documents in a specific project"
3228
3279
  }
3229
3280
  ],
3230
3281
  "flags": {
3231
- "project-id": {
3282
+ "project": {
3283
+ "aliases": [
3284
+ "project-id"
3285
+ ],
3232
3286
  "char": "p",
3287
+ "deprecateAliases": true,
3233
3288
  "description": "Project ID to create document(s) in (overrides CLI configuration)",
3234
3289
  "helpGroup": "OVERRIDE",
3235
- "name": "project-id",
3290
+ "name": "project",
3236
3291
  "hasDynamicHelp": false,
3237
3292
  "helpValue": "<id>",
3238
3293
  "multiple": false,
@@ -3330,16 +3385,20 @@
3330
3385
  "description": "Delete the document with ID \"doc1\" and \"doc2\""
3331
3386
  },
3332
3387
  {
3333
- "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
3388
+ "command": "<%= config.bin %> <%= command.id %> myDocId --project abc123",
3334
3389
  "description": "Delete a document from a specific project"
3335
3390
  }
3336
3391
  ],
3337
3392
  "flags": {
3338
- "project-id": {
3393
+ "project": {
3394
+ "aliases": [
3395
+ "project-id"
3396
+ ],
3339
3397
  "char": "p",
3398
+ "deprecateAliases": true,
3340
3399
  "description": "Project ID to delete from (overrides CLI configuration)",
3341
3400
  "helpGroup": "OVERRIDE",
3342
- "name": "project-id",
3401
+ "name": "project",
3343
3402
  "hasDynamicHelp": false,
3344
3403
  "helpValue": "<id>",
3345
3404
  "multiple": false,
@@ -3397,16 +3456,20 @@
3397
3456
  "description": "Get document from a specific dataset"
3398
3457
  },
3399
3458
  {
3400
- "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
3459
+ "command": "<%= config.bin %> <%= command.id %> myDocId --project abc123",
3401
3460
  "description": "Get a document from a specific project"
3402
3461
  }
3403
3462
  ],
3404
3463
  "flags": {
3405
- "project-id": {
3464
+ "project": {
3465
+ "aliases": [
3466
+ "project-id"
3467
+ ],
3406
3468
  "char": "p",
3469
+ "deprecateAliases": true,
3407
3470
  "description": "Project ID to get document from (overrides CLI configuration)",
3408
3471
  "helpGroup": "OVERRIDE",
3409
- "name": "project-id",
3472
+ "name": "project",
3410
3473
  "hasDynamicHelp": false,
3411
3474
  "helpValue": "<id>",
3412
3475
  "multiple": false,
@@ -3470,16 +3533,20 @@
3470
3533
  "description": "Use API version v2021-06-07 and do a query"
3471
3534
  },
3472
3535
  {
3473
- "command": "<%= config.bin %> <%= command.id %> '*[_type == \"post\"]' --project-id abc123 --dataset production",
3536
+ "command": "<%= config.bin %> <%= command.id %> '*[_type == \"post\"]' --project abc123 --dataset production",
3474
3537
  "description": "Query documents in a specific project and dataset"
3475
3538
  }
3476
3539
  ],
3477
3540
  "flags": {
3478
- "project-id": {
3541
+ "project": {
3542
+ "aliases": [
3543
+ "project-id"
3544
+ ],
3479
3545
  "char": "p",
3546
+ "deprecateAliases": true,
3480
3547
  "description": "Project ID to query (overrides CLI configuration)",
3481
3548
  "helpGroup": "OVERRIDE",
3482
- "name": "project-id",
3549
+ "name": "project",
3483
3550
  "hasDynamicHelp": false,
3484
3551
  "helpValue": "<id>",
3485
3552
  "multiple": false,
@@ -3513,17 +3580,6 @@
3513
3580
  "name": "pretty",
3514
3581
  "allowNo": false,
3515
3582
  "type": "boolean"
3516
- },
3517
- "project": {
3518
- "deprecated": {
3519
- "to": "project-id"
3520
- },
3521
- "description": "Project ID to query",
3522
- "hidden": true,
3523
- "name": "project",
3524
- "hasDynamicHelp": false,
3525
- "multiple": false,
3526
- "type": "option"
3527
3583
  }
3528
3584
  },
3529
3585
  "hasDynamicHelp": false,
@@ -3565,15 +3621,19 @@
3565
3621
  "description": "Report out info level validation markers too"
3566
3622
  },
3567
3623
  {
3568
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
3624
+ "command": "<%= config.bin %> <%= command.id %> --project abc123 --dataset production",
3569
3625
  "description": "Validate documents in a specific project and dataset"
3570
3626
  }
3571
3627
  ],
3572
3628
  "flags": {
3573
- "project-id": {
3629
+ "project": {
3630
+ "aliases": [
3631
+ "project-id"
3632
+ ],
3574
3633
  "char": "p",
3634
+ "deprecateAliases": true,
3575
3635
  "description": "Override the project ID used. By default, this is derived from the given workspace",
3576
- "name": "project-id",
3636
+ "name": "project",
3577
3637
  "hasDynamicHelp": false,
3578
3638
  "helpValue": "<id>",
3579
3639
  "multiple": false,
@@ -3782,16 +3842,20 @@
3782
3842
  "description": "List GraphQL endpoints for the project"
3783
3843
  },
3784
3844
  {
3785
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3845
+ "command": "<%= config.bin %> <%= command.id %> --project abc123",
3786
3846
  "description": "List GraphQL endpoints for a specific project"
3787
3847
  }
3788
3848
  ],
3789
3849
  "flags": {
3790
- "project-id": {
3850
+ "project": {
3851
+ "aliases": [
3852
+ "project-id"
3853
+ ],
3791
3854
  "char": "p",
3855
+ "deprecateAliases": true,
3792
3856
  "description": "Project ID to list GraphQL endpoints for (overrides CLI configuration)",
3793
3857
  "helpGroup": "OVERRIDE",
3794
- "name": "project-id",
3858
+ "name": "project",
3795
3859
  "hasDynamicHelp": false,
3796
3860
  "helpValue": "<id>",
3797
3861
  "multiple": false,
@@ -3839,16 +3903,20 @@
3839
3903
  "description": "Undeploy GraphQL API without confirmation prompt"
3840
3904
  },
3841
3905
  {
3842
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
3906
+ "command": "<%= config.bin %> <%= command.id %> --project abc123 --dataset production",
3843
3907
  "description": "Undeploy GraphQL API for a specific project and dataset"
3844
3908
  }
3845
3909
  ],
3846
3910
  "flags": {
3847
- "project-id": {
3911
+ "project": {
3912
+ "aliases": [
3913
+ "project-id"
3914
+ ],
3848
3915
  "char": "p",
3916
+ "deprecateAliases": true,
3849
3917
  "description": "Project ID to undeploy GraphQL API from (overrides CLI configuration)",
3850
3918
  "helpGroup": "OVERRIDE",
3851
- "name": "project-id",
3919
+ "name": "project",
3852
3920
  "hasDynamicHelp": false,
3853
3921
  "helpValue": "<id>",
3854
3922
  "multiple": false,
@@ -3857,7 +3925,6 @@
3857
3925
  "api": {
3858
3926
  "description": "Undeploy API with this ID",
3859
3927
  "exclusive": [
3860
- "project-id",
3861
3928
  "project"
3862
3929
  ],
3863
3930
  "name": "api",
@@ -3882,18 +3949,6 @@
3882
3949
  "allowNo": false,
3883
3950
  "type": "boolean"
3884
3951
  },
3885
- "project": {
3886
- "deprecated": {
3887
- "to": "project-id"
3888
- },
3889
- "description": "Project ID to delete GraphQL API for",
3890
- "hidden": true,
3891
- "name": "project",
3892
- "required": false,
3893
- "hasDynamicHelp": false,
3894
- "multiple": false,
3895
- "type": "option"
3896
- },
3897
3952
  "tag": {
3898
3953
  "description": "Tag to undeploy GraphQL API from",
3899
3954
  "name": "tag",
@@ -3935,16 +3990,20 @@
3935
3990
  "description": "Print details of webhook delivery attempt with ID abc123"
3936
3991
  },
3937
3992
  {
3938
- "command": "<%= config.bin %> <%= command.id %> abc123 --project-id projectId",
3993
+ "command": "<%= config.bin %> <%= command.id %> abc123 --project projectId",
3939
3994
  "description": "Get attempt details for a specific project"
3940
3995
  }
3941
3996
  ],
3942
3997
  "flags": {
3943
- "project-id": {
3998
+ "project": {
3999
+ "aliases": [
4000
+ "project-id"
4001
+ ],
3944
4002
  "char": "p",
4003
+ "deprecateAliases": true,
3945
4004
  "description": "Project ID to view webhook attempt for (overrides CLI configuration)",
3946
4005
  "helpGroup": "OVERRIDE",
3947
- "name": "project-id",
4006
+ "name": "project",
3948
4007
  "hasDynamicHelp": false,
3949
4008
  "helpValue": "<id>",
3950
4009
  "multiple": false,
@@ -3978,16 +4037,20 @@
3978
4037
  "description": "Create a new webhook for the project"
3979
4038
  },
3980
4039
  {
3981
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
4040
+ "command": "<%= config.bin %> <%= command.id %> --project abc123",
3982
4041
  "description": "Create a webhook for a specific project"
3983
4042
  }
3984
4043
  ],
3985
4044
  "flags": {
3986
- "project-id": {
4045
+ "project": {
4046
+ "aliases": [
4047
+ "project-id"
4048
+ ],
3987
4049
  "char": "p",
4050
+ "deprecateAliases": true,
3988
4051
  "description": "Project ID to create webhook for (overrides CLI configuration)",
3989
4052
  "helpGroup": "OVERRIDE",
3990
- "name": "project-id",
4053
+ "name": "project",
3991
4054
  "hasDynamicHelp": false,
3992
4055
  "helpValue": "<id>",
3993
4056
  "multiple": false,
@@ -4031,16 +4094,20 @@
4031
4094
  "description": "Delete a specific webhook by name"
4032
4095
  },
4033
4096
  {
4034
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
4097
+ "command": "<%= config.bin %> <%= command.id %> --project abc123",
4035
4098
  "description": "Delete a webhook from a specific project"
4036
4099
  }
4037
4100
  ],
4038
4101
  "flags": {
4039
- "project-id": {
4102
+ "project": {
4103
+ "aliases": [
4104
+ "project-id"
4105
+ ],
4040
4106
  "char": "p",
4107
+ "deprecateAliases": true,
4041
4108
  "description": "Project ID to delete webhook from (overrides CLI configuration)",
4042
4109
  "helpGroup": "OVERRIDE",
4043
- "name": "project-id",
4110
+ "name": "project",
4044
4111
  "hasDynamicHelp": false,
4045
4112
  "helpValue": "<id>",
4046
4113
  "multiple": false,
@@ -4074,16 +4141,20 @@
4074
4141
  "description": "List webhooks for the project"
4075
4142
  },
4076
4143
  {
4077
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
4144
+ "command": "<%= config.bin %> <%= command.id %> --project abc123",
4078
4145
  "description": "List webhooks for a specific project"
4079
4146
  }
4080
4147
  ],
4081
4148
  "flags": {
4082
- "project-id": {
4149
+ "project": {
4150
+ "aliases": [
4151
+ "project-id"
4152
+ ],
4083
4153
  "char": "p",
4154
+ "deprecateAliases": true,
4084
4155
  "description": "Project ID to list webhooks for (overrides CLI configuration)",
4085
4156
  "helpGroup": "OVERRIDE",
4086
- "name": "project-id",
4157
+ "name": "project",
4087
4158
  "hasDynamicHelp": false,
4088
4159
  "helpValue": "<id>",
4089
4160
  "multiple": false,
@@ -4127,16 +4198,20 @@
4127
4198
  "description": "Show log entries for a specific webhook by name"
4128
4199
  },
4129
4200
  {
4130
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
4201
+ "command": "<%= config.bin %> <%= command.id %> --project abc123",
4131
4202
  "description": "Show log entries for a specific project"
4132
4203
  }
4133
4204
  ],
4134
4205
  "flags": {
4135
- "project-id": {
4206
+ "project": {
4207
+ "aliases": [
4208
+ "project-id"
4209
+ ],
4136
4210
  "char": "p",
4211
+ "deprecateAliases": true,
4137
4212
  "description": "Project ID to view webhook logs for (overrides CLI configuration)",
4138
4213
  "helpGroup": "OVERRIDE",
4139
- "name": "project-id",
4214
+ "name": "project",
4140
4215
  "hasDynamicHelp": false,
4141
4216
  "helpValue": "<id>",
4142
4217
  "multiple": false,
@@ -4290,11 +4365,15 @@
4290
4365
  }
4291
4366
  ],
4292
4367
  "flags": {
4293
- "project-id": {
4368
+ "project": {
4369
+ "aliases": [
4370
+ "project-id"
4371
+ ],
4294
4372
  "char": "p",
4373
+ "deprecateAliases": true,
4295
4374
  "description": "Project ID to delete media aspect from (overrides CLI configuration)",
4296
4375
  "helpGroup": "OVERRIDE",
4297
- "name": "project-id",
4376
+ "name": "project",
4298
4377
  "hasDynamicHelp": false,
4299
4378
  "helpValue": "<id>",
4300
4379
  "multiple": false,
@@ -4351,11 +4430,15 @@
4351
4430
  }
4352
4431
  ],
4353
4432
  "flags": {
4354
- "project-id": {
4433
+ "project": {
4434
+ "aliases": [
4435
+ "project-id"
4436
+ ],
4355
4437
  "char": "p",
4438
+ "deprecateAliases": true,
4356
4439
  "description": "Project ID to deploy media aspect to (overrides CLI configuration)",
4357
4440
  "helpGroup": "OVERRIDE",
4358
- "name": "project-id",
4441
+ "name": "project",
4359
4442
  "hasDynamicHelp": false,
4360
4443
  "helpValue": "<id>",
4361
4444
  "multiple": false,
@@ -4415,11 +4498,15 @@
4415
4498
  }
4416
4499
  ],
4417
4500
  "flags": {
4418
- "project-id": {
4501
+ "project": {
4502
+ "aliases": [
4503
+ "project-id"
4504
+ ],
4419
4505
  "char": "p",
4506
+ "deprecateAliases": true,
4420
4507
  "description": "Project ID to export media from (overrides CLI configuration)",
4421
4508
  "helpGroup": "OVERRIDE",
4422
- "name": "project-id",
4509
+ "name": "project",
4423
4510
  "hasDynamicHelp": false,
4424
4511
  "helpValue": "<id>",
4425
4512
  "multiple": false,
@@ -4501,11 +4588,15 @@
4501
4588
  }
4502
4589
  ],
4503
4590
  "flags": {
4504
- "project-id": {
4591
+ "project": {
4592
+ "aliases": [
4593
+ "project-id"
4594
+ ],
4505
4595
  "char": "p",
4596
+ "deprecateAliases": true,
4506
4597
  "description": "Project ID to import media to (overrides CLI configuration)",
4507
4598
  "helpGroup": "OVERRIDE",
4508
- "name": "project-id",
4599
+ "name": "project",
4509
4600
  "hasDynamicHelp": false,
4510
4601
  "helpValue": "<id>",
4511
4602
  "multiple": false,
@@ -4832,9 +4923,16 @@
4832
4923
  "type": "boolean"
4833
4924
  },
4834
4925
  "project": {
4835
- "description": "Project ID of the dataset to migrate. Defaults to the projectId configured in your Sanity CLI config.",
4926
+ "aliases": [
4927
+ "project-id"
4928
+ ],
4929
+ "char": "p",
4930
+ "deprecateAliases": true,
4931
+ "description": "Project ID of the dataset to migrate (overrides CLI configuration)",
4932
+ "helpGroup": "OVERRIDE",
4836
4933
  "name": "project",
4837
4934
  "hasDynamicHelp": false,
4935
+ "helpValue": "<id>",
4838
4936
  "multiple": false,
4839
4937
  "type": "option"
4840
4938
  }
@@ -5379,15 +5477,21 @@
5379
5477
  "description": "List locally recorded unclaimed projects"
5380
5478
  },
5381
5479
  {
5382
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
5480
+ "command": "<%= config.bin %> <%= command.id %> --project abc123",
5383
5481
  "description": "Show recovery details for one project"
5384
5482
  }
5385
5483
  ],
5386
5484
  "flags": {
5387
- "project-id": {
5485
+ "project": {
5486
+ "aliases": [
5487
+ "project-id"
5488
+ ],
5489
+ "char": "p",
5490
+ "deprecateAliases": true,
5388
5491
  "description": "Project ID to recover",
5389
- "name": "project-id",
5492
+ "name": "project",
5390
5493
  "hasDynamicHelp": false,
5494
+ "helpValue": "<id>",
5391
5495
  "multiple": false,
5392
5496
  "type": "option"
5393
5497
  }
@@ -5424,11 +5528,15 @@
5424
5528
  }
5425
5529
  ],
5426
5530
  "flags": {
5427
- "project-id": {
5531
+ "project": {
5532
+ "aliases": [
5533
+ "project-id"
5534
+ ],
5428
5535
  "char": "p",
5536
+ "deprecateAliases": true,
5429
5537
  "description": "Project ID to delete schema from (overrides CLI configuration)",
5430
5538
  "helpGroup": "OVERRIDE",
5431
- "name": "project-id",
5539
+ "name": "project",
5432
5540
  "hasDynamicHelp": false,
5433
5541
  "helpValue": "<id>",
5434
5542
  "multiple": false,
@@ -5914,6 +6022,48 @@
5914
6022
  "status.js"
5915
6023
  ]
5916
6024
  },
6025
+ "typegen:generate": {
6026
+ "aliases": [],
6027
+ "args": {},
6028
+ "description": "Sanity TypeGen\n\nConfiguration:\nThis command can utilize configuration settings defined in a `sanity-typegen.json` file. These settings include:\n\n- \"path\": Specifies a glob pattern to locate your TypeScript or JavaScript files.\n Default: \"./src/**/*.{ts,tsx,js,jsx}\"\n\n- \"schema\": Defines the path to your Sanity schema file. This file should be generated using the `sanity schema extract` command.\n Default: \"schema.json\"\n\n- \"generates\": Indicates the path where the generated TypeScript type definitions will be saved.\n Default: \"./sanity.types.ts\"\n\nThe default configuration values listed above are used if not overridden in your `sanity-typegen.json` configuration file. To customize the behavior of the type generation, adjust these properties in the configuration file according to your project's needs.\n\nNote:\n- The `sanity schema extract` command is a prerequisite for extracting your Sanity Studio schema into a `schema.json` file, which is then used by the `sanity typegen generate` command to generate type definitions.\n- To generate types for several datasets, list them in `typegen.resources` in `sanity.cli.ts` (beta). Each resource uses its own `schema` file, or the schema bound to its dataset when `schema` is omitted. With `--watch`, a schema bound to a dataset is fetched once, when the watcher starts. Restart it after deploying a schema.",
6029
+ "examples": [
6030
+ {
6031
+ "command": "<%= config.bin %> <%= command.id %>",
6032
+ "description": "Generate TypeScript type definitions from a Sanity Studio schema extracted using the `sanity schema extract` command."
6033
+ }
6034
+ ],
6035
+ "flags": {
6036
+ "config-path": {
6037
+ "description": "[Default: sanity-typegen.json] Specifies the path to the typegen configuration file. This file should be a JSON file that contains settings for the type generation process.",
6038
+ "name": "config-path",
6039
+ "hasDynamicHelp": false,
6040
+ "multiple": false,
6041
+ "type": "option"
6042
+ },
6043
+ "watch": {
6044
+ "description": "[Default: false] Run the typegen in watch mode",
6045
+ "name": "watch",
6046
+ "allowNo": false,
6047
+ "type": "boolean"
6048
+ }
6049
+ },
6050
+ "hasDynamicHelp": false,
6051
+ "hiddenAliases": [
6052
+ "typegen:generate"
6053
+ ],
6054
+ "id": "typegen:generate",
6055
+ "pluginAlias": "@sanity/cli",
6056
+ "pluginName": "@sanity/cli",
6057
+ "pluginType": "core",
6058
+ "strict": true,
6059
+ "isESM": true,
6060
+ "relativePath": [
6061
+ "dist",
6062
+ "commands",
6063
+ "typegen",
6064
+ "generate.js"
6065
+ ]
6066
+ },
5917
6067
  "tokens:create": {
5918
6068
  "aliases": [],
5919
6069
  "args": {
@@ -5934,7 +6084,7 @@
5934
6084
  "description": "Create an organization token with Context, Blueprints and project access"
5935
6085
  },
5936
6086
  {
5937
- "command": "<%= config.bin %> <%= command.id %> \"My Token\" --project-id abc123 --role=editor",
6087
+ "command": "<%= config.bin %> <%= command.id %> \"My Token\" --project abc123 --role=editor",
5938
6088
  "description": "Create a project token with editor role"
5939
6089
  },
5940
6090
  {
@@ -5958,11 +6108,15 @@
5958
6108
  "allowNo": false,
5959
6109
  "type": "boolean"
5960
6110
  },
5961
- "project-id": {
6111
+ "project": {
6112
+ "aliases": [
6113
+ "project-id"
6114
+ ],
5962
6115
  "char": "p",
6116
+ "deprecateAliases": true,
5963
6117
  "description": "Project ID to create token in (overrides CLI configuration)",
5964
6118
  "helpGroup": "OVERRIDE",
5965
- "name": "project-id",
6119
+ "name": "project",
5966
6120
  "hasDynamicHelp": false,
5967
6121
  "helpValue": "<id>",
5968
6122
  "multiple": false,
@@ -6061,7 +6215,7 @@
6061
6215
  "description": "Delete a specific token without confirmation prompt"
6062
6216
  },
6063
6217
  {
6064
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
6218
+ "command": "<%= config.bin %> <%= command.id %> --project abc123",
6065
6219
  "description": "Delete a token from a specific project"
6066
6220
  }
6067
6221
  ],
@@ -6069,7 +6223,7 @@
6069
6223
  "organization": {
6070
6224
  "description": "Delete a token managed by this organization",
6071
6225
  "exclusive": [
6072
- "project-id"
6226
+ "project"
6073
6227
  ],
6074
6228
  "name": "organization",
6075
6229
  "hasDynamicHelp": false,
@@ -6077,11 +6231,15 @@
6077
6231
  "multiple": false,
6078
6232
  "type": "option"
6079
6233
  },
6080
- "project-id": {
6234
+ "project": {
6235
+ "aliases": [
6236
+ "project-id"
6237
+ ],
6081
6238
  "char": "p",
6239
+ "deprecateAliases": true,
6082
6240
  "description": "Project ID to delete token from (overrides CLI configuration)",
6083
6241
  "helpGroup": "OVERRIDE",
6084
- "name": "project-id",
6242
+ "name": "project",
6085
6243
  "hasDynamicHelp": false,
6086
6244
  "helpValue": "<id>",
6087
6245
  "multiple": false,
@@ -6130,7 +6288,7 @@
6130
6288
  "description": "List tokens in JSON format"
6131
6289
  },
6132
6290
  {
6133
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
6291
+ "command": "<%= config.bin %> <%= command.id %> --project abc123",
6134
6292
  "description": "List tokens for a specific project"
6135
6293
  }
6136
6294
  ],
@@ -6145,7 +6303,7 @@
6145
6303
  "organization": {
6146
6304
  "description": "List tokens managed by this organization",
6147
6305
  "exclusive": [
6148
- "project-id"
6306
+ "project"
6149
6307
  ],
6150
6308
  "name": "organization",
6151
6309
  "hasDynamicHelp": false,
@@ -6153,11 +6311,15 @@
6153
6311
  "multiple": false,
6154
6312
  "type": "option"
6155
6313
  },
6156
- "project-id": {
6314
+ "project": {
6315
+ "aliases": [
6316
+ "project-id"
6317
+ ],
6157
6318
  "char": "p",
6319
+ "deprecateAliases": true,
6158
6320
  "description": "Project ID to list tokens for (overrides CLI configuration)",
6159
6321
  "helpGroup": "OVERRIDE",
6160
- "name": "project-id",
6322
+ "name": "project",
6161
6323
  "hasDynamicHelp": false,
6162
6324
  "helpValue": "<id>",
6163
6325
  "multiple": false,
@@ -6236,48 +6398,6 @@
6236
6398
  "rotate.js"
6237
6399
  ]
6238
6400
  },
6239
- "typegen:generate": {
6240
- "aliases": [],
6241
- "args": {},
6242
- "description": "Sanity TypeGen\n\nConfiguration:\nThis command can utilize configuration settings defined in a `sanity-typegen.json` file. These settings include:\n\n- \"path\": Specifies a glob pattern to locate your TypeScript or JavaScript files.\n Default: \"./src/**/*.{ts,tsx,js,jsx}\"\n\n- \"schema\": Defines the path to your Sanity schema file. This file should be generated using the `sanity schema extract` command.\n Default: \"schema.json\"\n\n- \"generates\": Indicates the path where the generated TypeScript type definitions will be saved.\n Default: \"./sanity.types.ts\"\n\nThe default configuration values listed above are used if not overridden in your `sanity-typegen.json` configuration file. To customize the behavior of the type generation, adjust these properties in the configuration file according to your project's needs.\n\nNote:\n- The `sanity schema extract` command is a prerequisite for extracting your Sanity Studio schema into a `schema.json` file, which is then used by the `sanity typegen generate` command to generate type definitions.\n- To generate types for several datasets, list them in `typegen.resources` in `sanity.cli.ts` (beta). Each resource uses its own `schema` file, or the schema bound to its dataset when `schema` is omitted. With `--watch`, a schema bound to a dataset is fetched once, when the watcher starts. Restart it after deploying a schema.",
6243
- "examples": [
6244
- {
6245
- "command": "<%= config.bin %> <%= command.id %>",
6246
- "description": "Generate TypeScript type definitions from a Sanity Studio schema extracted using the `sanity schema extract` command."
6247
- }
6248
- ],
6249
- "flags": {
6250
- "config-path": {
6251
- "description": "[Default: sanity-typegen.json] Specifies the path to the typegen configuration file. This file should be a JSON file that contains settings for the type generation process.",
6252
- "name": "config-path",
6253
- "hasDynamicHelp": false,
6254
- "multiple": false,
6255
- "type": "option"
6256
- },
6257
- "watch": {
6258
- "description": "[Default: false] Run the typegen in watch mode",
6259
- "name": "watch",
6260
- "allowNo": false,
6261
- "type": "boolean"
6262
- }
6263
- },
6264
- "hasDynamicHelp": false,
6265
- "hiddenAliases": [
6266
- "typegen:generate"
6267
- ],
6268
- "id": "typegen:generate",
6269
- "pluginAlias": "@sanity/cli",
6270
- "pluginName": "@sanity/cli",
6271
- "pluginType": "core",
6272
- "strict": true,
6273
- "isESM": true,
6274
- "relativePath": [
6275
- "dist",
6276
- "commands",
6277
- "typegen",
6278
- "generate.js"
6279
- ]
6280
- },
6281
6401
  "users:invite": {
6282
6402
  "aliases": [],
6283
6403
  "args": {
@@ -6302,16 +6422,20 @@
6302
6422
  "description": "Send a new user invite to the email \"pippi@sanity.io\", as administrator"
6303
6423
  },
6304
6424
  {
6305
- "command": "<%= config.bin %> <%= command.id %> pippi@sanity.io --project-id abc123",
6425
+ "command": "<%= config.bin %> <%= command.id %> pippi@sanity.io --project abc123",
6306
6426
  "description": "Invite a user to a specific project"
6307
6427
  }
6308
6428
  ],
6309
6429
  "flags": {
6310
- "project-id": {
6430
+ "project": {
6431
+ "aliases": [
6432
+ "project-id"
6433
+ ],
6311
6434
  "char": "p",
6435
+ "deprecateAliases": true,
6312
6436
  "description": "Project ID to invite user to (overrides CLI configuration)",
6313
6437
  "helpGroup": "OVERRIDE",
6314
- "name": "project-id",
6438
+ "name": "project",
6315
6439
  "hasDynamicHelp": false,
6316
6440
  "helpValue": "<id>",
6317
6441
  "multiple": false,
@@ -6360,16 +6484,20 @@
6360
6484
  "description": "List all users, sorted by role"
6361
6485
  },
6362
6486
  {
6363
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
6487
+ "command": "<%= config.bin %> <%= command.id %> --project abc123",
6364
6488
  "description": "List users for a specific project"
6365
6489
  }
6366
6490
  ],
6367
6491
  "flags": {
6368
- "project-id": {
6492
+ "project": {
6493
+ "aliases": [
6494
+ "project-id"
6495
+ ],
6369
6496
  "char": "p",
6497
+ "deprecateAliases": true,
6370
6498
  "description": "Project ID to list users for (overrides CLI configuration)",
6371
6499
  "helpGroup": "OVERRIDE",
6372
- "name": "project-id",
6500
+ "name": "project",
6373
6501
  "hasDynamicHelp": false,
6374
6502
  "helpValue": "<id>",
6375
6503
  "multiple": false,
@@ -7365,7 +7493,7 @@
7365
7493
  "description": "Create a dataset alias for the project",
7366
7494
  "examples": [
7367
7495
  {
7368
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123 conference conf-2025",
7496
+ "command": "<%= config.bin %> <%= command.id %> --project abc123 conference conf-2025",
7369
7497
  "description": "Create alias in a specific project"
7370
7498
  },
7371
7499
  {
@@ -7382,11 +7510,15 @@
7382
7510
  }
7383
7511
  ],
7384
7512
  "flags": {
7385
- "project-id": {
7513
+ "project": {
7514
+ "aliases": [
7515
+ "project-id"
7516
+ ],
7386
7517
  "char": "p",
7518
+ "deprecateAliases": true,
7387
7519
  "description": "Project ID to create dataset alias in (overrides CLI configuration)",
7388
7520
  "helpGroup": "OVERRIDE",
7389
- "name": "project-id",
7521
+ "name": "project",
7390
7522
  "hasDynamicHelp": false,
7391
7523
  "helpValue": "<id>",
7392
7524
  "multiple": false,
@@ -7432,11 +7564,15 @@
7432
7564
  }
7433
7565
  ],
7434
7566
  "flags": {
7435
- "project-id": {
7567
+ "project": {
7568
+ "aliases": [
7569
+ "project-id"
7570
+ ],
7436
7571
  "char": "p",
7572
+ "deprecateAliases": true,
7437
7573
  "description": "Project ID to delete dataset alias from (overrides CLI configuration)",
7438
7574
  "helpGroup": "OVERRIDE",
7439
- "name": "project-id",
7575
+ "name": "project",
7440
7576
  "hasDynamicHelp": false,
7441
7577
  "helpValue": "<id>",
7442
7578
  "multiple": false,
@@ -7501,11 +7637,15 @@
7501
7637
  }
7502
7638
  ],
7503
7639
  "flags": {
7504
- "project-id": {
7640
+ "project": {
7641
+ "aliases": [
7642
+ "project-id"
7643
+ ],
7505
7644
  "char": "p",
7645
+ "deprecateAliases": true,
7506
7646
  "description": "Project ID to link dataset alias in (overrides CLI configuration)",
7507
7647
  "helpGroup": "OVERRIDE",
7508
- "name": "project-id",
7648
+ "name": "project",
7509
7649
  "hasDynamicHelp": false,
7510
7650
  "helpValue": "<id>",
7511
7651
  "multiple": false,
@@ -7562,11 +7702,15 @@
7562
7702
  }
7563
7703
  ],
7564
7704
  "flags": {
7565
- "project-id": {
7705
+ "project": {
7706
+ "aliases": [
7707
+ "project-id"
7708
+ ],
7566
7709
  "char": "p",
7710
+ "deprecateAliases": true,
7567
7711
  "description": "Project ID to unlink dataset alias in (overrides CLI configuration)",
7568
7712
  "helpGroup": "OVERRIDE",
7569
- "name": "project-id",
7713
+ "name": "project",
7570
7714
  "hasDynamicHelp": false,
7571
7715
  "helpValue": "<id>",
7572
7716
  "multiple": false,
@@ -7614,11 +7758,15 @@
7614
7758
  }
7615
7759
  ],
7616
7760
  "flags": {
7617
- "project-id": {
7761
+ "project": {
7762
+ "aliases": [
7763
+ "project-id"
7764
+ ],
7618
7765
  "char": "p",
7766
+ "deprecateAliases": true,
7619
7767
  "description": "Project ID to disable embeddings for (overrides CLI configuration)",
7620
7768
  "helpGroup": "OVERRIDE",
7621
- "name": "project-id",
7769
+ "name": "project",
7622
7770
  "hasDynamicHelp": false,
7623
7771
  "helpValue": "<id>",
7624
7772
  "multiple": false,
@@ -7668,11 +7816,15 @@
7668
7816
  }
7669
7817
  ],
7670
7818
  "flags": {
7671
- "project-id": {
7819
+ "project": {
7820
+ "aliases": [
7821
+ "project-id"
7822
+ ],
7672
7823
  "char": "p",
7824
+ "deprecateAliases": true,
7673
7825
  "description": "Project ID to enable embeddings for (overrides CLI configuration)",
7674
7826
  "helpGroup": "OVERRIDE",
7675
- "name": "project-id",
7827
+ "name": "project",
7676
7828
  "hasDynamicHelp": false,
7677
7829
  "helpValue": "<id>",
7678
7830
  "multiple": false,
@@ -7728,11 +7880,15 @@
7728
7880
  }
7729
7881
  ],
7730
7882
  "flags": {
7731
- "project-id": {
7883
+ "project": {
7884
+ "aliases": [
7885
+ "project-id"
7886
+ ],
7732
7887
  "char": "p",
7888
+ "deprecateAliases": true,
7733
7889
  "description": "Project ID to check embeddings status for (overrides CLI configuration)",
7734
7890
  "helpGroup": "OVERRIDE",
7735
- "name": "project-id",
7891
+ "name": "project",
7736
7892
  "hasDynamicHelp": false,
7737
7893
  "helpValue": "<id>",
7738
7894
  "multiple": false,
@@ -7774,11 +7930,15 @@
7774
7930
  }
7775
7931
  ],
7776
7932
  "flags": {
7777
- "project-id": {
7933
+ "project": {
7934
+ "aliases": [
7935
+ "project-id"
7936
+ ],
7778
7937
  "char": "p",
7938
+ "deprecateAliases": true,
7779
7939
  "description": "Project ID to get dataset visibility for (overrides CLI configuration)",
7780
7940
  "helpGroup": "OVERRIDE",
7781
- "name": "project-id",
7941
+ "name": "project",
7782
7942
  "hasDynamicHelp": false,
7783
7943
  "helpValue": "<id>",
7784
7944
  "multiple": false,
@@ -7833,11 +7993,15 @@
7833
7993
  }
7834
7994
  ],
7835
7995
  "flags": {
7836
- "project-id": {
7996
+ "project": {
7997
+ "aliases": [
7998
+ "project-id"
7999
+ ],
7837
8000
  "char": "p",
8001
+ "deprecateAliases": true,
7838
8002
  "description": "Project ID to set dataset visibility for (overrides CLI configuration)",
7839
8003
  "helpGroup": "OVERRIDE",
7840
- "name": "project-id",
8004
+ "name": "project",
7841
8005
  "hasDynamicHelp": false,
7842
8006
  "helpValue": "<id>",
7843
8007
  "multiple": false,
@@ -7863,5 +8027,5 @@
7863
8027
  ]
7864
8028
  }
7865
8029
  },
7866
- "version": "8.23.0"
8030
+ "version": "8.25.0"
7867
8031
  }