@sanity/cli 8.21.0 → 8.22.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 (74) hide show
  1. package/README.md +106 -47
  2. package/codemods/dashboard.js +111 -0
  3. package/dist/actions/build/buildApp.js +1 -1
  4. package/dist/actions/build/buildApp.js.map +1 -1
  5. package/dist/actions/build/buildStudio.js +1 -1
  6. package/dist/actions/build/buildStudio.js.map +1 -1
  7. package/dist/actions/codemods/dashboard.js +113 -0
  8. package/dist/actions/codemods/dashboard.js.map +1 -0
  9. package/dist/actions/codemods/index.js +2 -0
  10. package/dist/actions/codemods/index.js.map +1 -1
  11. package/dist/actions/codemods/types.js.map +1 -1
  12. package/dist/actions/deploy/deployApp.js +13 -6
  13. package/dist/actions/deploy/deployApp.js.map +1 -1
  14. package/dist/actions/deploy/deployChecks.js +12 -7
  15. package/dist/actions/deploy/deployChecks.js.map +1 -1
  16. package/dist/actions/deploy/deployRunner.js +14 -8
  17. package/dist/actions/deploy/deployRunner.js.map +1 -1
  18. package/dist/actions/deploy/deployStudio.js +39 -4
  19. package/dist/actions/deploy/deployStudio.js.map +1 -1
  20. package/dist/actions/deploy/resolveDeployTarget.js +7 -6
  21. package/dist/actions/deploy/resolveDeployTarget.js.map +1 -1
  22. package/dist/actions/init/project/promptForAppTemplateSetup.js +22 -0
  23. package/dist/actions/init/project/promptForAppTemplateSetup.js.map +1 -1
  24. package/dist/actions/schema/listSchemas.js +2 -3
  25. package/dist/actions/schema/listSchemas.js.map +1 -1
  26. package/dist/actions/typegen/generateResourceTypes.js +11 -8
  27. package/dist/actions/typegen/generateResourceTypes.js.map +1 -1
  28. package/dist/actions/typegen/watchResourceTypes.js +208 -0
  29. package/dist/actions/typegen/watchResourceTypes.js.map +1 -0
  30. package/dist/actions/undeploy/runUndeploy.js +14 -8
  31. package/dist/actions/undeploy/runUndeploy.js.map +1 -1
  32. package/dist/commands/codemod.js +15 -4
  33. package/dist/commands/codemod.js.map +1 -1
  34. package/dist/commands/context/get.js +3 -8
  35. package/dist/commands/context/get.js.map +1 -1
  36. package/dist/commands/context/imports/download.js +3 -8
  37. package/dist/commands/context/imports/download.js.map +1 -1
  38. package/dist/commands/context/imports/get.js +3 -8
  39. package/dist/commands/context/imports/get.js.map +1 -1
  40. package/dist/commands/context/imports/list.js +3 -8
  41. package/dist/commands/context/imports/list.js.map +1 -1
  42. package/dist/commands/context/jobs/get.js +8 -8
  43. package/dist/commands/context/jobs/get.js.map +1 -1
  44. package/dist/commands/context/list.js +2 -6
  45. package/dist/commands/context/list.js.map +1 -1
  46. package/dist/commands/deploy.js +1 -0
  47. package/dist/commands/deploy.js.map +1 -1
  48. package/dist/commands/doctor.js +2 -1
  49. package/dist/commands/doctor.js.map +1 -1
  50. package/dist/commands/openapi/list.js +2 -4
  51. package/dist/commands/openapi/list.js.map +1 -1
  52. package/dist/commands/projects/create.js +3 -6
  53. package/dist/commands/projects/create.js.map +1 -1
  54. package/dist/commands/schemas/list.js +1 -3
  55. package/dist/commands/schemas/list.js.map +1 -1
  56. package/dist/commands/tokens/create.js +2 -5
  57. package/dist/commands/tokens/create.js.map +1 -1
  58. package/dist/commands/tokens/list.js +2 -6
  59. package/dist/commands/tokens/list.js.map +1 -1
  60. package/dist/commands/tokens/rotate.js +2 -5
  61. package/dist/commands/tokens/rotate.js.map +1 -1
  62. package/dist/commands/typegen/generate.js +83 -45
  63. package/dist/commands/typegen/generate.js.map +1 -1
  64. package/dist/commands/undeploy.js +1 -0
  65. package/dist/commands/undeploy.js.map +1 -1
  66. package/dist/commands/whoami.js +5 -11
  67. package/dist/commands/whoami.js.map +1 -1
  68. package/dist/exports/invokeSanityCli/index.js +26 -6
  69. package/dist/exports/invokeSanityCli/index.js.map +1 -1
  70. package/dist/generated/apiRoutes.js +11 -26
  71. package/dist/generated/apiRoutes.js.map +1 -1
  72. package/dist/telemetry/init.telemetry.js.map +1 -1
  73. package/oclif.manifest.json +1323 -1294
  74. package/package.json +6 -5
@@ -377,6 +377,13 @@
377
377
  }
378
378
  ],
379
379
  "flags": {
380
+ "json": {
381
+ "char": "j",
382
+ "description": "Output the result as JSON",
383
+ "name": "json",
384
+ "allowNo": false,
385
+ "type": "boolean"
386
+ },
380
387
  "auto-updates": {
381
388
  "deprecated": true,
382
389
  "description": "Automatically update the studio to the latest version",
@@ -416,13 +423,6 @@
416
423
  "allowNo": false,
417
424
  "type": "boolean"
418
425
  },
419
- "json": {
420
- "char": "j",
421
- "description": "Output the result as JSON",
422
- "name": "json",
423
- "allowNo": false,
424
- "type": "boolean"
425
- },
426
426
  "minify": {
427
427
  "description": "Minify built JavaScript (use --no-minify to skip for faster builds)",
428
428
  "name": "minify",
@@ -476,6 +476,7 @@
476
476
  "pluginName": "@sanity/cli",
477
477
  "pluginType": "core",
478
478
  "strict": true,
479
+ "enableJsonFlag": true,
479
480
  "isESM": true,
480
481
  "relativePath": [
481
482
  "dist",
@@ -572,6 +573,7 @@
572
573
  "pluginName": "@sanity/cli",
573
574
  "pluginType": "core",
574
575
  "strict": false,
576
+ "enableJsonFlag": true,
575
577
  "isESM": true,
576
578
  "relativePath": [
577
579
  "dist",
@@ -1333,12 +1335,6 @@
1333
1335
  }
1334
1336
  ],
1335
1337
  "flags": {
1336
- "dry-run": {
1337
- "description": "Report what would be undeployed without deleting anything",
1338
- "name": "dry-run",
1339
- "allowNo": false,
1340
- "type": "boolean"
1341
- },
1342
1338
  "json": {
1343
1339
  "char": "j",
1344
1340
  "description": "Output the result as JSON",
@@ -1346,6 +1342,12 @@
1346
1342
  "allowNo": false,
1347
1343
  "type": "boolean"
1348
1344
  },
1345
+ "dry-run": {
1346
+ "description": "Report what would be undeployed without deleting anything",
1347
+ "name": "dry-run",
1348
+ "allowNo": false,
1349
+ "type": "boolean"
1350
+ },
1349
1351
  "yes": {
1350
1352
  "char": "y",
1351
1353
  "description": "Unattended mode, answers \"yes\" to any \"yes/no\" prompt and otherwise uses defaults",
@@ -1361,6 +1363,7 @@
1361
1363
  "pluginName": "@sanity/cli",
1362
1364
  "pluginType": "core",
1363
1365
  "strict": true,
1366
+ "enableJsonFlag": true,
1364
1367
  "isESM": true,
1365
1368
  "relativePath": [
1366
1369
  "dist",
@@ -1406,7 +1409,8 @@
1406
1409
  ],
1407
1410
  "flags": {
1408
1411
  "json": {
1409
- "description": "Output as JSON",
1412
+ "description": "Format output as json.",
1413
+ "helpGroup": "GLOBAL",
1410
1414
  "name": "json",
1411
1415
  "allowNo": false,
1412
1416
  "type": "boolean"
@@ -1419,6 +1423,7 @@
1419
1423
  "pluginName": "@sanity/cli",
1420
1424
  "pluginType": "core",
1421
1425
  "strict": true,
1426
+ "enableJsonFlag": true,
1422
1427
  "isESM": true,
1423
1428
  "relativePath": [
1424
1429
  "dist",
@@ -1812,167 +1817,6 @@
1812
1817
  "list.js"
1813
1818
  ]
1814
1819
  },
1815
- "cors:add": {
1816
- "aliases": [],
1817
- "args": {
1818
- "origin": {
1819
- "description": "Origin to allow (e.g., https://example.com)",
1820
- "name": "origin",
1821
- "required": true
1822
- }
1823
- },
1824
- "description": "Add a CORS origin to the project",
1825
- "examples": [
1826
- {
1827
- "command": "<%= config.bin %> <%= command.id %>",
1828
- "description": "Interactively add a CORS origin"
1829
- },
1830
- {
1831
- "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
1832
- "description": "Add a localhost origin without credentials"
1833
- },
1834
- {
1835
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
1836
- "description": "Add a production origin with credentials allowed"
1837
- },
1838
- {
1839
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project-id abc123",
1840
- "description": "Add a CORS origin for a specific project"
1841
- }
1842
- ],
1843
- "flags": {
1844
- "project-id": {
1845
- "char": "p",
1846
- "description": "Project ID to add CORS origin to (overrides CLI configuration)",
1847
- "helpGroup": "OVERRIDE",
1848
- "name": "project-id",
1849
- "hasDynamicHelp": false,
1850
- "helpValue": "<id>",
1851
- "multiple": false,
1852
- "type": "option"
1853
- },
1854
- "credentials": {
1855
- "description": "Allow credentials (token/cookie) to be sent from this origin",
1856
- "name": "credentials",
1857
- "required": false,
1858
- "allowNo": true,
1859
- "type": "boolean"
1860
- },
1861
- "yes": {
1862
- "char": "y",
1863
- "description": "Confirm risky wildcard origins without prompting",
1864
- "name": "yes",
1865
- "allowNo": false,
1866
- "type": "boolean"
1867
- }
1868
- },
1869
- "hasDynamicHelp": false,
1870
- "hiddenAliases": [],
1871
- "id": "cors:add",
1872
- "pluginAlias": "@sanity/cli",
1873
- "pluginName": "@sanity/cli",
1874
- "pluginType": "core",
1875
- "strict": true,
1876
- "isESM": true,
1877
- "relativePath": [
1878
- "dist",
1879
- "commands",
1880
- "cors",
1881
- "add.js"
1882
- ]
1883
- },
1884
- "cors:delete": {
1885
- "aliases": [],
1886
- "args": {
1887
- "origin": {
1888
- "description": "Origin to delete (will prompt if not provided)",
1889
- "name": "origin",
1890
- "required": false
1891
- }
1892
- },
1893
- "description": "Delete a CORS origin from the project",
1894
- "examples": [
1895
- {
1896
- "command": "<%= config.bin %> <%= command.id %>",
1897
- "description": "Interactively select and delete a CORS origin"
1898
- },
1899
- {
1900
- "command": "<%= config.bin %> <%= command.id %> https://example.com",
1901
- "description": "Delete a specific CORS origin"
1902
- },
1903
- {
1904
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
1905
- "description": "Delete a CORS origin from a specific project"
1906
- }
1907
- ],
1908
- "flags": {
1909
- "project-id": {
1910
- "char": "p",
1911
- "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
1912
- "helpGroup": "OVERRIDE",
1913
- "name": "project-id",
1914
- "hasDynamicHelp": false,
1915
- "helpValue": "<id>",
1916
- "multiple": false,
1917
- "type": "option"
1918
- }
1919
- },
1920
- "hasDynamicHelp": false,
1921
- "hiddenAliases": [],
1922
- "id": "cors:delete",
1923
- "pluginAlias": "@sanity/cli",
1924
- "pluginName": "@sanity/cli",
1925
- "pluginType": "core",
1926
- "strict": true,
1927
- "isESM": true,
1928
- "relativePath": [
1929
- "dist",
1930
- "commands",
1931
- "cors",
1932
- "delete.js"
1933
- ]
1934
- },
1935
- "cors:list": {
1936
- "aliases": [],
1937
- "args": {},
1938
- "description": "List CORS origins for the project",
1939
- "examples": [
1940
- {
1941
- "command": "<%= config.bin %> <%= command.id %>",
1942
- "description": "List CORS origins for the project"
1943
- },
1944
- {
1945
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
1946
- "description": "List CORS origins for a specific project"
1947
- }
1948
- ],
1949
- "flags": {
1950
- "project-id": {
1951
- "char": "p",
1952
- "description": "Project ID to list CORS origins for (overrides CLI configuration)",
1953
- "helpGroup": "OVERRIDE",
1954
- "name": "project-id",
1955
- "hasDynamicHelp": false,
1956
- "helpValue": "<id>",
1957
- "multiple": false,
1958
- "type": "option"
1959
- }
1960
- },
1961
- "hasDynamicHelp": false,
1962
- "hiddenAliases": [],
1963
- "id": "cors:list",
1964
- "pluginAlias": "@sanity/cli",
1965
- "pluginName": "@sanity/cli",
1966
- "pluginType": "core",
1967
- "strict": true,
1968
- "isESM": true,
1969
- "relativePath": [
1970
- "dist",
1971
- "commands",
1972
- "cors",
1973
- "list.js"
1974
- ]
1975
- },
1976
1820
  "context:build": {
1977
1821
  "aliases": [],
1978
1822
  "args": {
@@ -2165,7 +2009,8 @@
2165
2009
  ],
2166
2010
  "flags": {
2167
2011
  "json": {
2168
- "description": "Output the knowledge base in JSON format",
2012
+ "description": "Format output as json.",
2013
+ "helpGroup": "GLOBAL",
2169
2014
  "name": "json",
2170
2015
  "allowNo": false,
2171
2016
  "type": "boolean"
@@ -2178,6 +2023,7 @@
2178
2023
  "pluginName": "@sanity/cli",
2179
2024
  "pluginType": "core",
2180
2025
  "strict": true,
2026
+ "enableJsonFlag": true,
2181
2027
  "isESM": true,
2182
2028
  "relativePath": [
2183
2029
  "dist",
@@ -2205,6 +2051,13 @@
2205
2051
  }
2206
2052
  ],
2207
2053
  "flags": {
2054
+ "json": {
2055
+ "description": "Format output as json.",
2056
+ "helpGroup": "GLOBAL",
2057
+ "name": "json",
2058
+ "allowNo": false,
2059
+ "type": "boolean"
2060
+ },
2208
2061
  "organization": {
2209
2062
  "description": "Organization to list knowledge bases for (overrides CLI configuration)",
2210
2063
  "helpGroup": "OVERRIDE",
@@ -2213,12 +2066,6 @@
2213
2066
  "helpValue": "<id>",
2214
2067
  "multiple": false,
2215
2068
  "type": "option"
2216
- },
2217
- "json": {
2218
- "description": "Output knowledge bases in JSON format",
2219
- "name": "json",
2220
- "allowNo": false,
2221
- "type": "boolean"
2222
2069
  }
2223
2070
  },
2224
2071
  "hasDynamicHelp": false,
@@ -2228,6 +2075,7 @@
2228
2075
  "pluginName": "@sanity/cli",
2229
2076
  "pluginType": "core",
2230
2077
  "strict": true,
2078
+ "enableJsonFlag": true,
2231
2079
  "isESM": true,
2232
2080
  "relativePath": [
2233
2081
  "dist",
@@ -2982,53 +2830,214 @@
2982
2830
  "list.js"
2983
2831
  ]
2984
2832
  },
2985
- "docs:browse": {
2986
- "aliases": [],
2987
- "args": {},
2988
- "description": "Open Sanity docs in your browser",
2989
- "flags": {},
2990
- "hasDynamicHelp": false,
2991
- "hiddenAliases": [],
2992
- "id": "docs:browse",
2993
- "pluginAlias": "@sanity/cli",
2994
- "pluginName": "@sanity/cli",
2995
- "pluginType": "core",
2996
- "strict": true,
2997
- "enableJsonFlag": false,
2998
- "isESM": true,
2999
- "relativePath": [
3000
- "dist",
3001
- "commands",
3002
- "docs",
3003
- "browse.js"
3004
- ]
3005
- },
3006
- "docs:read": {
2833
+ "cors:add": {
3007
2834
  "aliases": [],
3008
2835
  "args": {
3009
- "path": {
3010
- "description": "Path or URL to article, found in search results and docs content as links",
3011
- "name": "path",
2836
+ "origin": {
2837
+ "description": "Origin to allow (e.g., https://example.com)",
2838
+ "name": "origin",
3012
2839
  "required": true
3013
2840
  }
3014
2841
  },
3015
- "description": "Read an article in terminal",
2842
+ "description": "Add a CORS origin to the project",
3016
2843
  "examples": [
3017
2844
  {
3018
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
3019
- "description": "Read as markdown in terminal"
2845
+ "command": "<%= config.bin %> <%= command.id %>",
2846
+ "description": "Interactively add a CORS origin"
3020
2847
  },
3021
2848
  {
3022
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
3023
- "description": "Read using full URL"
2849
+ "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
2850
+ "description": "Add a localhost origin without credentials"
3024
2851
  },
3025
2852
  {
3026
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
3027
- "description": "Open in web browser"
2853
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
2854
+ "description": "Add a production origin with credentials allowed"
3028
2855
  },
3029
2856
  {
3030
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
3031
- "description": "Open using full URL in web browser"
2857
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project-id abc123",
2858
+ "description": "Add a CORS origin for a specific project"
2859
+ }
2860
+ ],
2861
+ "flags": {
2862
+ "project-id": {
2863
+ "char": "p",
2864
+ "description": "Project ID to add CORS origin to (overrides CLI configuration)",
2865
+ "helpGroup": "OVERRIDE",
2866
+ "name": "project-id",
2867
+ "hasDynamicHelp": false,
2868
+ "helpValue": "<id>",
2869
+ "multiple": false,
2870
+ "type": "option"
2871
+ },
2872
+ "credentials": {
2873
+ "description": "Allow credentials (token/cookie) to be sent from this origin",
2874
+ "name": "credentials",
2875
+ "required": false,
2876
+ "allowNo": true,
2877
+ "type": "boolean"
2878
+ },
2879
+ "yes": {
2880
+ "char": "y",
2881
+ "description": "Confirm risky wildcard origins without prompting",
2882
+ "name": "yes",
2883
+ "allowNo": false,
2884
+ "type": "boolean"
2885
+ }
2886
+ },
2887
+ "hasDynamicHelp": false,
2888
+ "hiddenAliases": [],
2889
+ "id": "cors:add",
2890
+ "pluginAlias": "@sanity/cli",
2891
+ "pluginName": "@sanity/cli",
2892
+ "pluginType": "core",
2893
+ "strict": true,
2894
+ "isESM": true,
2895
+ "relativePath": [
2896
+ "dist",
2897
+ "commands",
2898
+ "cors",
2899
+ "add.js"
2900
+ ]
2901
+ },
2902
+ "cors:delete": {
2903
+ "aliases": [],
2904
+ "args": {
2905
+ "origin": {
2906
+ "description": "Origin to delete (will prompt if not provided)",
2907
+ "name": "origin",
2908
+ "required": false
2909
+ }
2910
+ },
2911
+ "description": "Delete a CORS origin from the project",
2912
+ "examples": [
2913
+ {
2914
+ "command": "<%= config.bin %> <%= command.id %>",
2915
+ "description": "Interactively select and delete a CORS origin"
2916
+ },
2917
+ {
2918
+ "command": "<%= config.bin %> <%= command.id %> https://example.com",
2919
+ "description": "Delete a specific CORS origin"
2920
+ },
2921
+ {
2922
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2923
+ "description": "Delete a CORS origin from a specific project"
2924
+ }
2925
+ ],
2926
+ "flags": {
2927
+ "project-id": {
2928
+ "char": "p",
2929
+ "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
2930
+ "helpGroup": "OVERRIDE",
2931
+ "name": "project-id",
2932
+ "hasDynamicHelp": false,
2933
+ "helpValue": "<id>",
2934
+ "multiple": false,
2935
+ "type": "option"
2936
+ }
2937
+ },
2938
+ "hasDynamicHelp": false,
2939
+ "hiddenAliases": [],
2940
+ "id": "cors:delete",
2941
+ "pluginAlias": "@sanity/cli",
2942
+ "pluginName": "@sanity/cli",
2943
+ "pluginType": "core",
2944
+ "strict": true,
2945
+ "isESM": true,
2946
+ "relativePath": [
2947
+ "dist",
2948
+ "commands",
2949
+ "cors",
2950
+ "delete.js"
2951
+ ]
2952
+ },
2953
+ "cors:list": {
2954
+ "aliases": [],
2955
+ "args": {},
2956
+ "description": "List CORS origins for the project",
2957
+ "examples": [
2958
+ {
2959
+ "command": "<%= config.bin %> <%= command.id %>",
2960
+ "description": "List CORS origins for the project"
2961
+ },
2962
+ {
2963
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2964
+ "description": "List CORS origins for a specific project"
2965
+ }
2966
+ ],
2967
+ "flags": {
2968
+ "project-id": {
2969
+ "char": "p",
2970
+ "description": "Project ID to list CORS origins for (overrides CLI configuration)",
2971
+ "helpGroup": "OVERRIDE",
2972
+ "name": "project-id",
2973
+ "hasDynamicHelp": false,
2974
+ "helpValue": "<id>",
2975
+ "multiple": false,
2976
+ "type": "option"
2977
+ }
2978
+ },
2979
+ "hasDynamicHelp": false,
2980
+ "hiddenAliases": [],
2981
+ "id": "cors:list",
2982
+ "pluginAlias": "@sanity/cli",
2983
+ "pluginName": "@sanity/cli",
2984
+ "pluginType": "core",
2985
+ "strict": true,
2986
+ "isESM": true,
2987
+ "relativePath": [
2988
+ "dist",
2989
+ "commands",
2990
+ "cors",
2991
+ "list.js"
2992
+ ]
2993
+ },
2994
+ "docs:browse": {
2995
+ "aliases": [],
2996
+ "args": {},
2997
+ "description": "Open Sanity docs in your browser",
2998
+ "flags": {},
2999
+ "hasDynamicHelp": false,
3000
+ "hiddenAliases": [],
3001
+ "id": "docs:browse",
3002
+ "pluginAlias": "@sanity/cli",
3003
+ "pluginName": "@sanity/cli",
3004
+ "pluginType": "core",
3005
+ "strict": true,
3006
+ "enableJsonFlag": false,
3007
+ "isESM": true,
3008
+ "relativePath": [
3009
+ "dist",
3010
+ "commands",
3011
+ "docs",
3012
+ "browse.js"
3013
+ ]
3014
+ },
3015
+ "docs:read": {
3016
+ "aliases": [],
3017
+ "args": {
3018
+ "path": {
3019
+ "description": "Path or URL to article, found in search results and docs content as links",
3020
+ "name": "path",
3021
+ "required": true
3022
+ }
3023
+ },
3024
+ "description": "Read an article in terminal",
3025
+ "examples": [
3026
+ {
3027
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
3028
+ "description": "Read as markdown in terminal"
3029
+ },
3030
+ {
3031
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
3032
+ "description": "Read using full URL"
3033
+ },
3034
+ {
3035
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
3036
+ "description": "Open in web browser"
3037
+ },
3038
+ {
3039
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
3040
+ "description": "Open using full URL in web browser"
3032
3041
  }
3033
3042
  ],
3034
3043
  "flags": {
@@ -3106,320 +3115,69 @@
3106
3115
  "search.js"
3107
3116
  ]
3108
3117
  },
3109
- "graphql:deploy": {
3118
+ "documents:create": {
3110
3119
  "aliases": [],
3111
- "args": {},
3112
- "description": "Deploy a GraphQL API from the current Sanity schema",
3120
+ "args": {
3121
+ "file": {
3122
+ "description": "JSON file to create document(s) from",
3123
+ "name": "file",
3124
+ "required": false
3125
+ }
3126
+ },
3127
+ "description": "Create one or more documents",
3113
3128
  "examples": [
3129
+ {
3130
+ "command": "<%= config.bin %> <%= command.id %> myDocument.json",
3131
+ "description": "Create the document specified in \"myDocument.json\""
3132
+ },
3114
3133
  {
3115
3134
  "command": "<%= config.bin %> <%= command.id %>",
3116
- "description": "Deploy all defined GraphQL APIs"
3135
+ "description": "Open configured $EDITOR and create the specified document(s)"
3117
3136
  },
3118
3137
  {
3119
- "command": "<%= config.bin %> <%= command.id %> --dry-run",
3120
- "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy"
3138
+ "command": "<%= config.bin %> <%= command.id %> --id myDocId --replace",
3139
+ "description": "Fetch document with the ID \"myDocId\" and open configured $EDITOR with the current document content (if any). Replace document with the edited version when the editor closes"
3121
3140
  },
3122
3141
  {
3123
- "command": "<%= config.bin %> <%= command.id %> --api staging --api ios",
3124
- "description": "Deploy only the GraphQL APIs with the IDs \"staging\" and \"ios\""
3142
+ "command": "<%= config.bin %> <%= command.id %> --id myDocId --watch --replace --json5",
3143
+ "description": "Open configured $EDITOR and replace the document with the given content on each save. Use JSON5 file extension and parser for simplified syntax."
3125
3144
  },
3126
3145
  {
3127
- "command": "<%= config.bin %> <%= command.id %> --playground",
3128
- "description": "Deploy all defined GraphQL APIs, overriding any playground setting"
3146
+ "command": "<%= config.bin %> <%= command.id %> myDocument.json --project-id abc123",
3147
+ "description": "Create documents in a specific project"
3129
3148
  }
3130
3149
  ],
3131
3150
  "flags": {
3132
- "api": {
3133
- "description": "Only deploy API with this ID (can be specified multiple times)",
3134
- "name": "api",
3151
+ "project-id": {
3152
+ "char": "p",
3153
+ "description": "Project ID to create document(s) in (overrides CLI configuration)",
3154
+ "helpGroup": "OVERRIDE",
3155
+ "name": "project-id",
3135
3156
  "hasDynamicHelp": false,
3136
- "multiple": true,
3157
+ "helpValue": "<id>",
3158
+ "multiple": false,
3137
3159
  "type": "option"
3138
3160
  },
3139
3161
  "dataset": {
3140
3162
  "char": "d",
3141
- "description": "Deploy API for the given dataset",
3163
+ "description": "Dataset to create document(s) in (overrides CLI configuration)",
3164
+ "helpGroup": "OVERRIDE",
3142
3165
  "name": "dataset",
3143
3166
  "hasDynamicHelp": false,
3144
3167
  "helpValue": "<name>",
3145
3168
  "multiple": false,
3146
3169
  "type": "option"
3147
3170
  },
3148
- "dry-run": {
3149
- "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy",
3150
- "name": "dry-run",
3151
- "allowNo": false,
3152
- "type": "boolean"
3153
- },
3154
- "force": {
3155
- "description": "Deploy API without confirming breaking changes",
3156
- "name": "force",
3157
- "allowNo": false,
3158
- "type": "boolean"
3159
- },
3160
- "generation": {
3161
- "description": "API generation to deploy (defaults to \"gen3\")",
3162
- "name": "generation",
3171
+ "id": {
3172
+ "description": "Specify a document ID to use. Will fetch remote document ID and populate editor.",
3173
+ "name": "id",
3163
3174
  "hasDynamicHelp": false,
3164
3175
  "multiple": false,
3165
- "options": [
3166
- "gen1",
3167
- "gen2",
3168
- "gen3"
3169
- ],
3170
3176
  "type": "option"
3171
3177
  },
3172
- "non-null-document-fields": {
3173
- "description": "Use non-null document fields (_id, _type etc)",
3174
- "name": "non-null-document-fields",
3175
- "allowNo": false,
3176
- "type": "boolean"
3177
- },
3178
- "playground": {
3179
- "description": "Enable GraphQL playground for easier debugging",
3180
- "name": "playground",
3181
- "allowNo": true,
3182
- "type": "boolean"
3183
- },
3184
- "tag": {
3185
- "description": "Deploy API(s) to given tag (defaults to \"default\")",
3186
- "name": "tag",
3187
- "hasDynamicHelp": false,
3188
- "multiple": false,
3189
- "type": "option"
3190
- },
3191
- "with-union-cache": {
3192
- "description": "Cache union types (faster for schemas with many self-references)",
3193
- "name": "with-union-cache",
3194
- "allowNo": false,
3195
- "type": "boolean"
3196
- }
3197
- },
3198
- "hasDynamicHelp": false,
3199
- "hiddenAliases": [],
3200
- "id": "graphql:deploy",
3201
- "pluginAlias": "@sanity/cli",
3202
- "pluginName": "@sanity/cli",
3203
- "pluginType": "core",
3204
- "strict": true,
3205
- "isESM": true,
3206
- "relativePath": [
3207
- "dist",
3208
- "commands",
3209
- "graphql",
3210
- "deploy.js"
3211
- ]
3212
- },
3213
- "graphql:list": {
3214
- "aliases": [],
3215
- "args": {},
3216
- "description": "List deployed GraphQL endpoints for the project",
3217
- "examples": [
3218
- {
3219
- "command": "<%= config.bin %> <%= command.id %>",
3220
- "description": "List GraphQL endpoints for the project"
3221
- },
3222
- {
3223
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3224
- "description": "List GraphQL endpoints for a specific project"
3225
- }
3226
- ],
3227
- "flags": {
3228
- "project-id": {
3229
- "char": "p",
3230
- "description": "Project ID to list GraphQL endpoints for (overrides CLI configuration)",
3231
- "helpGroup": "OVERRIDE",
3232
- "name": "project-id",
3233
- "hasDynamicHelp": false,
3234
- "helpValue": "<id>",
3235
- "multiple": false,
3236
- "type": "option"
3237
- }
3238
- },
3239
- "hasDynamicHelp": false,
3240
- "hiddenAliases": [],
3241
- "id": "graphql:list",
3242
- "pluginAlias": "@sanity/cli",
3243
- "pluginName": "@sanity/cli",
3244
- "pluginType": "core",
3245
- "strict": true,
3246
- "isESM": true,
3247
- "relativePath": [
3248
- "dist",
3249
- "commands",
3250
- "graphql",
3251
- "list.js"
3252
- ]
3253
- },
3254
- "graphql:undeploy": {
3255
- "aliases": [],
3256
- "args": {},
3257
- "description": "Remove a deployed GraphQL API",
3258
- "examples": [
3259
- {
3260
- "command": "<%= config.bin %> <%= command.id %>",
3261
- "description": "Undeploy GraphQL API for current project and dataset"
3262
- },
3263
- {
3264
- "command": "<%= config.bin %> <%= command.id %> --api ios",
3265
- "description": "Undeploy API with ID \"ios\""
3266
- },
3267
- {
3268
- "command": "<%= config.bin %> <%= command.id %> --dataset staging",
3269
- "description": "Undeploy GraphQL API for staging dataset"
3270
- },
3271
- {
3272
- "command": "<%= config.bin %> <%= command.id %> --dataset staging --tag next",
3273
- "description": "Undeploy GraphQL API for staging dataset with \"next\" tag"
3274
- },
3275
- {
3276
- "command": "<%= config.bin %> <%= command.id %> --force",
3277
- "description": "Undeploy GraphQL API without confirmation prompt"
3278
- },
3279
- {
3280
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
3281
- "description": "Undeploy GraphQL API for a specific project and dataset"
3282
- }
3283
- ],
3284
- "flags": {
3285
- "project-id": {
3286
- "char": "p",
3287
- "description": "Project ID to undeploy GraphQL API from (overrides CLI configuration)",
3288
- "helpGroup": "OVERRIDE",
3289
- "name": "project-id",
3290
- "hasDynamicHelp": false,
3291
- "helpValue": "<id>",
3292
- "multiple": false,
3293
- "type": "option"
3294
- },
3295
- "api": {
3296
- "description": "Undeploy API with this ID",
3297
- "exclusive": [
3298
- "project-id",
3299
- "project"
3300
- ],
3301
- "name": "api",
3302
- "required": false,
3303
- "hasDynamicHelp": false,
3304
- "multiple": false,
3305
- "type": "option"
3306
- },
3307
- "dataset": {
3308
- "char": "d",
3309
- "description": "Dataset to undeploy GraphQL API from (overrides CLI configuration)",
3310
- "helpGroup": "OVERRIDE",
3311
- "name": "dataset",
3312
- "hasDynamicHelp": false,
3313
- "helpValue": "<name>",
3314
- "multiple": false,
3315
- "type": "option"
3316
- },
3317
- "force": {
3318
- "description": "Skip confirmation prompt",
3319
- "name": "force",
3320
- "allowNo": false,
3321
- "type": "boolean"
3322
- },
3323
- "project": {
3324
- "deprecated": {
3325
- "to": "project-id"
3326
- },
3327
- "description": "Project ID to delete GraphQL API for",
3328
- "hidden": true,
3329
- "name": "project",
3330
- "required": false,
3331
- "hasDynamicHelp": false,
3332
- "multiple": false,
3333
- "type": "option"
3334
- },
3335
- "tag": {
3336
- "description": "Tag to undeploy GraphQL API from",
3337
- "name": "tag",
3338
- "required": false,
3339
- "default": "default",
3340
- "hasDynamicHelp": false,
3341
- "multiple": false,
3342
- "type": "option"
3343
- }
3344
- },
3345
- "hasDynamicHelp": false,
3346
- "hiddenAliases": [],
3347
- "id": "graphql:undeploy",
3348
- "pluginAlias": "@sanity/cli",
3349
- "pluginName": "@sanity/cli",
3350
- "pluginType": "core",
3351
- "strict": true,
3352
- "isESM": true,
3353
- "relativePath": [
3354
- "dist",
3355
- "commands",
3356
- "graphql",
3357
- "undeploy.js"
3358
- ]
3359
- },
3360
- "documents:create": {
3361
- "aliases": [],
3362
- "args": {
3363
- "file": {
3364
- "description": "JSON file to create document(s) from",
3365
- "name": "file",
3366
- "required": false
3367
- }
3368
- },
3369
- "description": "Create one or more documents",
3370
- "examples": [
3371
- {
3372
- "command": "<%= config.bin %> <%= command.id %> myDocument.json",
3373
- "description": "Create the document specified in \"myDocument.json\""
3374
- },
3375
- {
3376
- "command": "<%= config.bin %> <%= command.id %>",
3377
- "description": "Open configured $EDITOR and create the specified document(s)"
3378
- },
3379
- {
3380
- "command": "<%= config.bin %> <%= command.id %> --id myDocId --replace",
3381
- "description": "Fetch document with the ID \"myDocId\" and open configured $EDITOR with the current document content (if any). Replace document with the edited version when the editor closes"
3382
- },
3383
- {
3384
- "command": "<%= config.bin %> <%= command.id %> --id myDocId --watch --replace --json5",
3385
- "description": "Open configured $EDITOR and replace the document with the given content on each save. Use JSON5 file extension and parser for simplified syntax."
3386
- },
3387
- {
3388
- "command": "<%= config.bin %> <%= command.id %> myDocument.json --project-id abc123",
3389
- "description": "Create documents in a specific project"
3390
- }
3391
- ],
3392
- "flags": {
3393
- "project-id": {
3394
- "char": "p",
3395
- "description": "Project ID to create document(s) in (overrides CLI configuration)",
3396
- "helpGroup": "OVERRIDE",
3397
- "name": "project-id",
3398
- "hasDynamicHelp": false,
3399
- "helpValue": "<id>",
3400
- "multiple": false,
3401
- "type": "option"
3402
- },
3403
- "dataset": {
3404
- "char": "d",
3405
- "description": "Dataset to create document(s) in (overrides CLI configuration)",
3406
- "helpGroup": "OVERRIDE",
3407
- "name": "dataset",
3408
- "hasDynamicHelp": false,
3409
- "helpValue": "<name>",
3410
- "multiple": false,
3411
- "type": "option"
3412
- },
3413
- "id": {
3414
- "description": "Specify a document ID to use. Will fetch remote document ID and populate editor.",
3415
- "name": "id",
3416
- "hasDynamicHelp": false,
3417
- "multiple": false,
3418
- "type": "option"
3419
- },
3420
- "json5": {
3421
- "description": "Use JSON5 file type to allow a \"simplified\" version of JSON",
3422
- "name": "json5",
3178
+ "json5": {
3179
+ "description": "Use JSON5 file type to allow a \"simplified\" version of JSON",
3180
+ "name": "json5",
3423
3181
  "allowNo": false,
3424
3182
  "type": "boolean"
3425
3183
  },
@@ -3830,43 +3588,98 @@
3830
3588
  "validate.js"
3831
3589
  ]
3832
3590
  },
3833
- "hooks:attempt": {
3591
+ "graphql:deploy": {
3834
3592
  "aliases": [],
3835
- "args": {
3836
- "attemptId": {
3837
- "description": "The delivery attempt ID to get details for",
3838
- "name": "attemptId",
3839
- "required": true
3840
- }
3841
- },
3842
- "description": "Print details of a given webhook delivery attempt",
3593
+ "args": {},
3594
+ "description": "Deploy a GraphQL API from the current Sanity schema",
3843
3595
  "examples": [
3844
3596
  {
3845
- "command": "<%= config.bin %> <%= command.id %> abc123",
3846
- "description": "Print details of webhook delivery attempt with ID abc123"
3597
+ "command": "<%= config.bin %> <%= command.id %>",
3598
+ "description": "Deploy all defined GraphQL APIs"
3847
3599
  },
3848
3600
  {
3849
- "command": "<%= config.bin %> <%= command.id %> abc123 --project-id projectId",
3850
- "description": "Get attempt details for a specific project"
3601
+ "command": "<%= config.bin %> <%= command.id %> --dry-run",
3602
+ "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy"
3603
+ },
3604
+ {
3605
+ "command": "<%= config.bin %> <%= command.id %> --api staging --api ios",
3606
+ "description": "Deploy only the GraphQL APIs with the IDs \"staging\" and \"ios\""
3607
+ },
3608
+ {
3609
+ "command": "<%= config.bin %> <%= command.id %> --playground",
3610
+ "description": "Deploy all defined GraphQL APIs, overriding any playground setting"
3851
3611
  }
3852
3612
  ],
3853
3613
  "flags": {
3854
- "project-id": {
3855
- "char": "p",
3856
- "description": "Project ID to view webhook attempt for (overrides CLI configuration)",
3857
- "helpGroup": "OVERRIDE",
3858
- "name": "project-id",
3614
+ "api": {
3615
+ "description": "Only deploy API with this ID (can be specified multiple times)",
3616
+ "name": "api",
3617
+ "hasDynamicHelp": false,
3618
+ "multiple": true,
3619
+ "type": "option"
3620
+ },
3621
+ "dataset": {
3622
+ "char": "d",
3623
+ "description": "Deploy API for the given dataset",
3624
+ "name": "dataset",
3625
+ "hasDynamicHelp": false,
3626
+ "helpValue": "<name>",
3627
+ "multiple": false,
3628
+ "type": "option"
3629
+ },
3630
+ "dry-run": {
3631
+ "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy",
3632
+ "name": "dry-run",
3633
+ "allowNo": false,
3634
+ "type": "boolean"
3635
+ },
3636
+ "force": {
3637
+ "description": "Deploy API without confirming breaking changes",
3638
+ "name": "force",
3639
+ "allowNo": false,
3640
+ "type": "boolean"
3641
+ },
3642
+ "generation": {
3643
+ "description": "API generation to deploy (defaults to \"gen3\")",
3644
+ "name": "generation",
3645
+ "hasDynamicHelp": false,
3646
+ "multiple": false,
3647
+ "options": [
3648
+ "gen1",
3649
+ "gen2",
3650
+ "gen3"
3651
+ ],
3652
+ "type": "option"
3653
+ },
3654
+ "non-null-document-fields": {
3655
+ "description": "Use non-null document fields (_id, _type etc)",
3656
+ "name": "non-null-document-fields",
3657
+ "allowNo": false,
3658
+ "type": "boolean"
3659
+ },
3660
+ "playground": {
3661
+ "description": "Enable GraphQL playground for easier debugging",
3662
+ "name": "playground",
3663
+ "allowNo": true,
3664
+ "type": "boolean"
3665
+ },
3666
+ "tag": {
3667
+ "description": "Deploy API(s) to given tag (defaults to \"default\")",
3668
+ "name": "tag",
3859
3669
  "hasDynamicHelp": false,
3860
- "helpValue": "<id>",
3861
3670
  "multiple": false,
3862
3671
  "type": "option"
3672
+ },
3673
+ "with-union-cache": {
3674
+ "description": "Cache union types (faster for schemas with many self-references)",
3675
+ "name": "with-union-cache",
3676
+ "allowNo": false,
3677
+ "type": "boolean"
3863
3678
  }
3864
3679
  },
3865
3680
  "hasDynamicHelp": false,
3866
- "hiddenAliases": [
3867
- "hook:attempt"
3868
- ],
3869
- "id": "hooks:attempt",
3681
+ "hiddenAliases": [],
3682
+ "id": "graphql:deploy",
3870
3683
  "pluginAlias": "@sanity/cli",
3871
3684
  "pluginName": "@sanity/cli",
3872
3685
  "pluginType": "core",
@@ -3875,28 +3688,28 @@
3875
3688
  "relativePath": [
3876
3689
  "dist",
3877
3690
  "commands",
3878
- "hooks",
3879
- "attempt.js"
3691
+ "graphql",
3692
+ "deploy.js"
3880
3693
  ]
3881
3694
  },
3882
- "hooks:create": {
3695
+ "graphql:list": {
3883
3696
  "aliases": [],
3884
3697
  "args": {},
3885
- "description": "Create a new webhook for the project",
3698
+ "description": "List deployed GraphQL endpoints for the project",
3886
3699
  "examples": [
3887
3700
  {
3888
3701
  "command": "<%= config.bin %> <%= command.id %>",
3889
- "description": "Create a new webhook for the project"
3702
+ "description": "List GraphQL endpoints for the project"
3890
3703
  },
3891
3704
  {
3892
3705
  "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3893
- "description": "Create a webhook for a specific project"
3706
+ "description": "List GraphQL endpoints for a specific project"
3894
3707
  }
3895
3708
  ],
3896
3709
  "flags": {
3897
3710
  "project-id": {
3898
3711
  "char": "p",
3899
- "description": "Project ID to create webhook for (overrides CLI configuration)",
3712
+ "description": "Project ID to list GraphQL endpoints for (overrides CLI configuration)",
3900
3713
  "helpGroup": "OVERRIDE",
3901
3714
  "name": "project-id",
3902
3715
  "hasDynamicHelp": false,
@@ -3906,10 +3719,8 @@
3906
3719
  }
3907
3720
  },
3908
3721
  "hasDynamicHelp": false,
3909
- "hiddenAliases": [
3910
- "hook:create"
3911
- ],
3912
- "id": "hooks:create",
3722
+ "hiddenAliases": [],
3723
+ "id": "graphql:list",
3913
3724
  "pluginAlias": "@sanity/cli",
3914
3725
  "pluginName": "@sanity/cli",
3915
3726
  "pluginType": "core",
@@ -3918,51 +3729,104 @@
3918
3729
  "relativePath": [
3919
3730
  "dist",
3920
3731
  "commands",
3921
- "hooks",
3922
- "create.js"
3732
+ "graphql",
3733
+ "list.js"
3923
3734
  ]
3924
3735
  },
3925
- "hooks:delete": {
3736
+ "graphql:undeploy": {
3926
3737
  "aliases": [],
3927
- "args": {
3928
- "name": {
3929
- "description": "Name of webhook to delete (will prompt if not provided)",
3930
- "name": "name",
3931
- "required": false
3932
- }
3933
- },
3934
- "description": "Delete a webhook from the project",
3738
+ "args": {},
3739
+ "description": "Remove a deployed GraphQL API",
3935
3740
  "examples": [
3936
3741
  {
3937
3742
  "command": "<%= config.bin %> <%= command.id %>",
3938
- "description": "Interactively select and delete a webhook"
3743
+ "description": "Undeploy GraphQL API for current project and dataset"
3939
3744
  },
3940
3745
  {
3941
- "command": "<%= config.bin %> <%= command.id %> my-hook",
3942
- "description": "Delete a specific webhook by name"
3746
+ "command": "<%= config.bin %> <%= command.id %> --api ios",
3747
+ "description": "Undeploy API with ID \"ios\""
3943
3748
  },
3944
3749
  {
3945
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3946
- "description": "Delete a webhook from a specific project"
3750
+ "command": "<%= config.bin %> <%= command.id %> --dataset staging",
3751
+ "description": "Undeploy GraphQL API for staging dataset"
3752
+ },
3753
+ {
3754
+ "command": "<%= config.bin %> <%= command.id %> --dataset staging --tag next",
3755
+ "description": "Undeploy GraphQL API for staging dataset with \"next\" tag"
3756
+ },
3757
+ {
3758
+ "command": "<%= config.bin %> <%= command.id %> --force",
3759
+ "description": "Undeploy GraphQL API without confirmation prompt"
3760
+ },
3761
+ {
3762
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
3763
+ "description": "Undeploy GraphQL API for a specific project and dataset"
3947
3764
  }
3948
3765
  ],
3949
3766
  "flags": {
3950
3767
  "project-id": {
3951
3768
  "char": "p",
3952
- "description": "Project ID to delete webhook from (overrides CLI configuration)",
3769
+ "description": "Project ID to undeploy GraphQL API from (overrides CLI configuration)",
3953
3770
  "helpGroup": "OVERRIDE",
3954
3771
  "name": "project-id",
3955
3772
  "hasDynamicHelp": false,
3956
3773
  "helpValue": "<id>",
3957
3774
  "multiple": false,
3958
3775
  "type": "option"
3776
+ },
3777
+ "api": {
3778
+ "description": "Undeploy API with this ID",
3779
+ "exclusive": [
3780
+ "project-id",
3781
+ "project"
3782
+ ],
3783
+ "name": "api",
3784
+ "required": false,
3785
+ "hasDynamicHelp": false,
3786
+ "multiple": false,
3787
+ "type": "option"
3788
+ },
3789
+ "dataset": {
3790
+ "char": "d",
3791
+ "description": "Dataset to undeploy GraphQL API from (overrides CLI configuration)",
3792
+ "helpGroup": "OVERRIDE",
3793
+ "name": "dataset",
3794
+ "hasDynamicHelp": false,
3795
+ "helpValue": "<name>",
3796
+ "multiple": false,
3797
+ "type": "option"
3798
+ },
3799
+ "force": {
3800
+ "description": "Skip confirmation prompt",
3801
+ "name": "force",
3802
+ "allowNo": false,
3803
+ "type": "boolean"
3804
+ },
3805
+ "project": {
3806
+ "deprecated": {
3807
+ "to": "project-id"
3808
+ },
3809
+ "description": "Project ID to delete GraphQL API for",
3810
+ "hidden": true,
3811
+ "name": "project",
3812
+ "required": false,
3813
+ "hasDynamicHelp": false,
3814
+ "multiple": false,
3815
+ "type": "option"
3816
+ },
3817
+ "tag": {
3818
+ "description": "Tag to undeploy GraphQL API from",
3819
+ "name": "tag",
3820
+ "required": false,
3821
+ "default": "default",
3822
+ "hasDynamicHelp": false,
3823
+ "multiple": false,
3824
+ "type": "option"
3959
3825
  }
3960
3826
  },
3961
3827
  "hasDynamicHelp": false,
3962
- "hiddenAliases": [
3963
- "hook:delete"
3964
- ],
3965
- "id": "hooks:delete",
3828
+ "hiddenAliases": [],
3829
+ "id": "graphql:undeploy",
3966
3830
  "pluginAlias": "@sanity/cli",
3967
3831
  "pluginName": "@sanity/cli",
3968
3832
  "pluginType": "core",
@@ -3971,28 +3835,34 @@
3971
3835
  "relativePath": [
3972
3836
  "dist",
3973
3837
  "commands",
3974
- "hooks",
3975
- "delete.js"
3838
+ "graphql",
3839
+ "undeploy.js"
3976
3840
  ]
3977
3841
  },
3978
- "hooks:list": {
3842
+ "hooks:attempt": {
3979
3843
  "aliases": [],
3980
- "args": {},
3981
- "description": "List webhooks for the project",
3844
+ "args": {
3845
+ "attemptId": {
3846
+ "description": "The delivery attempt ID to get details for",
3847
+ "name": "attemptId",
3848
+ "required": true
3849
+ }
3850
+ },
3851
+ "description": "Print details of a given webhook delivery attempt",
3982
3852
  "examples": [
3983
3853
  {
3984
- "command": "<%= config.bin %> <%= command.id %>",
3985
- "description": "List webhooks for the project"
3854
+ "command": "<%= config.bin %> <%= command.id %> abc123",
3855
+ "description": "Print details of webhook delivery attempt with ID abc123"
3986
3856
  },
3987
3857
  {
3988
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3989
- "description": "List webhooks for a specific project"
3858
+ "command": "<%= config.bin %> <%= command.id %> abc123 --project-id projectId",
3859
+ "description": "Get attempt details for a specific project"
3990
3860
  }
3991
3861
  ],
3992
3862
  "flags": {
3993
3863
  "project-id": {
3994
3864
  "char": "p",
3995
- "description": "Project ID to list webhooks for (overrides CLI configuration)",
3865
+ "description": "Project ID to view webhook attempt for (overrides CLI configuration)",
3996
3866
  "helpGroup": "OVERRIDE",
3997
3867
  "name": "project-id",
3998
3868
  "hasDynamicHelp": false,
@@ -4003,9 +3873,9 @@
4003
3873
  },
4004
3874
  "hasDynamicHelp": false,
4005
3875
  "hiddenAliases": [
4006
- "hook:list"
3876
+ "hook:attempt"
4007
3877
  ],
4008
- "id": "hooks:list",
3878
+ "id": "hooks:attempt",
4009
3879
  "pluginAlias": "@sanity/cli",
4010
3880
  "pluginName": "@sanity/cli",
4011
3881
  "pluginType": "core",
@@ -4015,28 +3885,167 @@
4015
3885
  "dist",
4016
3886
  "commands",
4017
3887
  "hooks",
4018
- "list.js"
3888
+ "attempt.js"
4019
3889
  ]
4020
3890
  },
4021
- "hooks:logs": {
3891
+ "hooks:create": {
4022
3892
  "aliases": [],
4023
- "args": {
4024
- "name": {
4025
- "description": "Name of the webhook to show logs for",
4026
- "name": "name",
4027
- "required": false
4028
- }
4029
- },
4030
- "description": "Show log entries for project webhooks",
3893
+ "args": {},
3894
+ "description": "Create a new webhook for the project",
4031
3895
  "examples": [
4032
3896
  {
4033
3897
  "command": "<%= config.bin %> <%= command.id %>",
4034
- "description": "Show log entries for project webhooks"
3898
+ "description": "Create a new webhook for the project"
4035
3899
  },
4036
3900
  {
4037
- "command": "<%= config.bin %> <%= command.id %> [NAME]",
4038
- "description": "Show log entries for a specific webhook by name"
4039
- },
3901
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3902
+ "description": "Create a webhook for a specific project"
3903
+ }
3904
+ ],
3905
+ "flags": {
3906
+ "project-id": {
3907
+ "char": "p",
3908
+ "description": "Project ID to create webhook for (overrides CLI configuration)",
3909
+ "helpGroup": "OVERRIDE",
3910
+ "name": "project-id",
3911
+ "hasDynamicHelp": false,
3912
+ "helpValue": "<id>",
3913
+ "multiple": false,
3914
+ "type": "option"
3915
+ }
3916
+ },
3917
+ "hasDynamicHelp": false,
3918
+ "hiddenAliases": [
3919
+ "hook:create"
3920
+ ],
3921
+ "id": "hooks:create",
3922
+ "pluginAlias": "@sanity/cli",
3923
+ "pluginName": "@sanity/cli",
3924
+ "pluginType": "core",
3925
+ "strict": true,
3926
+ "isESM": true,
3927
+ "relativePath": [
3928
+ "dist",
3929
+ "commands",
3930
+ "hooks",
3931
+ "create.js"
3932
+ ]
3933
+ },
3934
+ "hooks:delete": {
3935
+ "aliases": [],
3936
+ "args": {
3937
+ "name": {
3938
+ "description": "Name of webhook to delete (will prompt if not provided)",
3939
+ "name": "name",
3940
+ "required": false
3941
+ }
3942
+ },
3943
+ "description": "Delete a webhook from the project",
3944
+ "examples": [
3945
+ {
3946
+ "command": "<%= config.bin %> <%= command.id %>",
3947
+ "description": "Interactively select and delete a webhook"
3948
+ },
3949
+ {
3950
+ "command": "<%= config.bin %> <%= command.id %> my-hook",
3951
+ "description": "Delete a specific webhook by name"
3952
+ },
3953
+ {
3954
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3955
+ "description": "Delete a webhook from a specific project"
3956
+ }
3957
+ ],
3958
+ "flags": {
3959
+ "project-id": {
3960
+ "char": "p",
3961
+ "description": "Project ID to delete webhook from (overrides CLI configuration)",
3962
+ "helpGroup": "OVERRIDE",
3963
+ "name": "project-id",
3964
+ "hasDynamicHelp": false,
3965
+ "helpValue": "<id>",
3966
+ "multiple": false,
3967
+ "type": "option"
3968
+ }
3969
+ },
3970
+ "hasDynamicHelp": false,
3971
+ "hiddenAliases": [
3972
+ "hook:delete"
3973
+ ],
3974
+ "id": "hooks:delete",
3975
+ "pluginAlias": "@sanity/cli",
3976
+ "pluginName": "@sanity/cli",
3977
+ "pluginType": "core",
3978
+ "strict": true,
3979
+ "isESM": true,
3980
+ "relativePath": [
3981
+ "dist",
3982
+ "commands",
3983
+ "hooks",
3984
+ "delete.js"
3985
+ ]
3986
+ },
3987
+ "hooks:list": {
3988
+ "aliases": [],
3989
+ "args": {},
3990
+ "description": "List webhooks for the project",
3991
+ "examples": [
3992
+ {
3993
+ "command": "<%= config.bin %> <%= command.id %>",
3994
+ "description": "List webhooks for the project"
3995
+ },
3996
+ {
3997
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3998
+ "description": "List webhooks for a specific project"
3999
+ }
4000
+ ],
4001
+ "flags": {
4002
+ "project-id": {
4003
+ "char": "p",
4004
+ "description": "Project ID to list webhooks for (overrides CLI configuration)",
4005
+ "helpGroup": "OVERRIDE",
4006
+ "name": "project-id",
4007
+ "hasDynamicHelp": false,
4008
+ "helpValue": "<id>",
4009
+ "multiple": false,
4010
+ "type": "option"
4011
+ }
4012
+ },
4013
+ "hasDynamicHelp": false,
4014
+ "hiddenAliases": [
4015
+ "hook:list"
4016
+ ],
4017
+ "id": "hooks:list",
4018
+ "pluginAlias": "@sanity/cli",
4019
+ "pluginName": "@sanity/cli",
4020
+ "pluginType": "core",
4021
+ "strict": true,
4022
+ "isESM": true,
4023
+ "relativePath": [
4024
+ "dist",
4025
+ "commands",
4026
+ "hooks",
4027
+ "list.js"
4028
+ ]
4029
+ },
4030
+ "hooks:logs": {
4031
+ "aliases": [],
4032
+ "args": {
4033
+ "name": {
4034
+ "description": "Name of the webhook to show logs for",
4035
+ "name": "name",
4036
+ "required": false
4037
+ }
4038
+ },
4039
+ "description": "Show log entries for project webhooks",
4040
+ "examples": [
4041
+ {
4042
+ "command": "<%= config.bin %> <%= command.id %>",
4043
+ "description": "Show log entries for project webhooks"
4044
+ },
4045
+ {
4046
+ "command": "<%= config.bin %> <%= command.id %> [NAME]",
4047
+ "description": "Show log entries for a specific webhook by name"
4048
+ },
4040
4049
  {
4041
4050
  "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
4042
4051
  "description": "Show log entries for a specific project"
@@ -4730,7 +4739,8 @@
4730
4739
  ],
4731
4740
  "flags": {
4732
4741
  "json": {
4733
- "description": "Output JSON",
4742
+ "description": "Format output as json.",
4743
+ "helpGroup": "GLOBAL",
4734
4744
  "name": "json",
4735
4745
  "allowNo": false,
4736
4746
  "type": "boolean"
@@ -4750,6 +4760,7 @@
4750
4760
  "pluginName": "@sanity/cli",
4751
4761
  "pluginType": "core",
4752
4762
  "strict": true,
4763
+ "enableJsonFlag": true,
4753
4764
  "isESM": true,
4754
4765
  "relativePath": [
4755
4766
  "dist",
@@ -5038,6 +5049,13 @@
5038
5049
  }
5039
5050
  ],
5040
5051
  "flags": {
5052
+ "json": {
5053
+ "description": "Format output as json.",
5054
+ "helpGroup": "GLOBAL",
5055
+ "name": "json",
5056
+ "allowNo": false,
5057
+ "type": "boolean"
5058
+ },
5041
5059
  "dataset": {
5042
5060
  "description": "Create a dataset. Prompts for visibility unless specified or --yes used",
5043
5061
  "name": "dataset",
@@ -5056,12 +5074,6 @@
5056
5074
  ],
5057
5075
  "type": "option"
5058
5076
  },
5059
- "json": {
5060
- "description": "Output in JSON format",
5061
- "name": "json",
5062
- "allowNo": false,
5063
- "type": "boolean"
5064
- },
5065
5077
  "organization": {
5066
5078
  "description": "Organization to create the project in",
5067
5079
  "name": "organization",
@@ -5087,6 +5099,7 @@
5087
5099
  "pluginName": "@sanity/cli",
5088
5100
  "pluginType": "core",
5089
5101
  "strict": true,
5102
+ "enableJsonFlag": true,
5090
5103
  "isESM": true,
5091
5104
  "relativePath": [
5092
5105
  "dist",
@@ -5195,20 +5208,83 @@
5195
5208
  "unclaimed.js"
5196
5209
  ]
5197
5210
  },
5198
- "skills:install": {
5211
+ "schemas:delete": {
5199
5212
  "aliases": [],
5200
5213
  "args": {},
5201
- "description": "Install Sanity agent skills for detected AI editors (Antigravity, Claude Code, Cline, Cline CLI, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, VS Code, VS Code Insiders)",
5214
+ "description": "Delete schema documents by id",
5202
5215
  "examples": [
5203
5216
  {
5204
- "command": "<%= config.bin %> <%= command.id %>",
5205
- "description": "Install Sanity agent skills for detected AI editors"
5217
+ "command": "<%= config.bin %> <%= command.id %> --ids sanity.workspace.schema.workspaceName",
5218
+ "description": "Delete a single schema"
5219
+ },
5220
+ {
5221
+ "command": "<%= config.bin %> <%= command.id %> --ids sanity.workspace.schema.workspaceName,prefix.sanity.workspace.schema.otherWorkspace",
5222
+ "description": "Delete multiple schemas"
5206
5223
  }
5207
5224
  ],
5208
- "flags": {},
5225
+ "flags": {
5226
+ "project-id": {
5227
+ "char": "p",
5228
+ "description": "Project ID to delete schema from (overrides CLI configuration)",
5229
+ "helpGroup": "OVERRIDE",
5230
+ "name": "project-id",
5231
+ "hasDynamicHelp": false,
5232
+ "helpValue": "<id>",
5233
+ "multiple": false,
5234
+ "type": "option"
5235
+ },
5236
+ "dataset": {
5237
+ "char": "d",
5238
+ "description": "Delete schemas from a specific dataset",
5239
+ "name": "dataset",
5240
+ "hasDynamicHelp": false,
5241
+ "helpValue": "<name>",
5242
+ "multiple": false,
5243
+ "type": "option"
5244
+ },
5245
+ "extract-manifest": {
5246
+ "description": "Generate manifest file (disable with --no-extract-manifest)",
5247
+ "hidden": true,
5248
+ "name": "extract-manifest",
5249
+ "allowNo": true,
5250
+ "type": "boolean"
5251
+ },
5252
+ "ids": {
5253
+ "description": "Comma-separated list of schema ids to delete",
5254
+ "name": "ids",
5255
+ "required": true,
5256
+ "hasDynamicHelp": false,
5257
+ "multiple": false,
5258
+ "type": "option"
5259
+ },
5260
+ "manifest-dir": {
5261
+ "description": "Directory containing manifest file",
5262
+ "hidden": true,
5263
+ "name": "manifest-dir",
5264
+ "default": "./dist/static",
5265
+ "hasDynamicHelp": false,
5266
+ "multiple": false,
5267
+ "type": "option"
5268
+ },
5269
+ "verbose": {
5270
+ "description": "Enable verbose logging",
5271
+ "name": "verbose",
5272
+ "allowNo": false,
5273
+ "type": "boolean"
5274
+ },
5275
+ "yes": {
5276
+ "char": "y",
5277
+ "description": "Delete schemas without prompting for confirmation",
5278
+ "name": "yes",
5279
+ "allowNo": false,
5280
+ "type": "boolean"
5281
+ }
5282
+ },
5209
5283
  "hasDynamicHelp": false,
5210
- "hiddenAliases": [],
5211
- "id": "skills:install",
5284
+ "hiddenAliases": [
5285
+ "schema:delete"
5286
+ ],
5287
+ "id": "schemas:delete",
5212
5288
  "pluginAlias": "@sanity/cli",
5213
5289
  "pluginName": "@sanity/cli",
5214
5290
  "pluginType": "core",
@@ -5217,76 +5293,68 @@
5217
5293
  "relativePath": [
5218
5294
  "dist",
5219
5295
  "commands",
5220
- "skills",
5221
- "install.js"
5296
+ "schemas",
5297
+ "delete.js"
5222
5298
  ]
5223
5299
  },
5224
- "telemetry:disable": {
5300
+ "schemas:deploy": {
5225
5301
  "aliases": [],
5226
5302
  "args": {},
5227
- "description": "Disable telemetry for your account",
5303
+ "description": "Deploy schema documents into workspace datasets.\n\nNote: This command is experimental and subject to change.\n\nRegenerates a manifest file by default. To re-use an existing manifest, use --no-extract-manifest.",
5228
5304
  "examples": [
5229
5305
  {
5230
- "command": "<%= config.bin %> telemetry <%= command.id %>",
5231
- "description": "Disable telemetry for your account"
5232
- }
5233
- ],
5234
- "flags": {},
5235
- "hasDynamicHelp": false,
5236
- "hiddenAliases": [],
5237
- "id": "telemetry:disable",
5238
- "pluginAlias": "@sanity/cli",
5239
- "pluginName": "@sanity/cli",
5240
- "pluginType": "core",
5241
- "strict": true,
5242
- "isESM": true,
5243
- "relativePath": [
5244
- "dist",
5245
- "commands",
5246
- "telemetry",
5247
- "disable.js"
5248
- ]
5249
- },
5250
- "telemetry:enable": {
5251
- "aliases": [],
5252
- "args": {},
5253
- "description": "Enable telemetry for your account",
5254
- "examples": [
5306
+ "command": "<%= config.bin %> <%= command.id %>",
5307
+ "description": "Deploy all workspace schemas"
5308
+ },
5255
5309
  {
5256
- "command": "<%= config.bin %> telemetry <%= command.id %>",
5257
- "description": "Enable telemetry for your account"
5310
+ "command": "<%= config.bin %> <%= command.id %> --workspace default",
5311
+ "description": "Deploy the schema for only the workspace \"default\""
5258
5312
  }
5259
5313
  ],
5260
- "flags": {},
5261
- "hasDynamicHelp": false,
5262
- "hiddenAliases": [],
5263
- "id": "telemetry:enable",
5264
- "pluginAlias": "@sanity/cli",
5265
- "pluginName": "@sanity/cli",
5266
- "pluginType": "core",
5267
- "strict": true,
5268
- "isESM": true,
5269
- "relativePath": [
5270
- "dist",
5271
- "commands",
5272
- "telemetry",
5273
- "enable.js"
5274
- ]
5275
- },
5276
- "telemetry:status": {
5277
- "aliases": [],
5278
- "args": {},
5279
- "description": "Check telemetry status for your account",
5280
- "examples": [
5281
- {
5282
- "command": "<%= config.bin %> telemetry <%= command.id %>",
5283
- "description": "Check telemetry status for your account"
5314
+ "flags": {
5315
+ "extract-manifest": {
5316
+ "description": "Regenerate manifest before deploying (use --no-extract-manifest to skip)",
5317
+ "name": "extract-manifest",
5318
+ "allowNo": true,
5319
+ "type": "boolean"
5320
+ },
5321
+ "manifest-dir": {
5322
+ "description": "Directory containing manifest file",
5323
+ "name": "manifest-dir",
5324
+ "default": "./dist/static",
5325
+ "hasDynamicHelp": false,
5326
+ "helpValue": "<directory>",
5327
+ "multiple": false,
5328
+ "type": "option"
5329
+ },
5330
+ "tag": {
5331
+ "description": "Add a tag suffix to the schema id",
5332
+ "name": "tag",
5333
+ "hasDynamicHelp": false,
5334
+ "helpValue": "<tag>",
5335
+ "multiple": false,
5336
+ "type": "option"
5337
+ },
5338
+ "verbose": {
5339
+ "description": "Print detailed information during deployment",
5340
+ "name": "verbose",
5341
+ "allowNo": false,
5342
+ "type": "boolean"
5343
+ },
5344
+ "workspace": {
5345
+ "description": "The name of the workspace to deploy a schema for",
5346
+ "name": "workspace",
5347
+ "hasDynamicHelp": false,
5348
+ "helpValue": "<name>",
5349
+ "multiple": false,
5350
+ "type": "option"
5284
5351
  }
5285
- ],
5286
- "flags": {},
5352
+ },
5287
5353
  "hasDynamicHelp": false,
5288
- "hiddenAliases": [],
5289
- "id": "telemetry:status",
5354
+ "hiddenAliases": [
5355
+ "schema:deploy"
5356
+ ],
5357
+ "id": "schemas:deploy",
5290
5358
  "pluginAlias": "@sanity/cli",
5291
5359
  "pluginName": "@sanity/cli",
5292
5360
  "pluginType": "core",
@@ -5295,111 +5363,85 @@
5295
5363
  "relativePath": [
5296
5364
  "dist",
5297
5365
  "commands",
5298
- "telemetry",
5299
- "status.js"
5366
+ "schemas",
5367
+ "deploy.js"
5300
5368
  ]
5301
5369
  },
5302
- "tokens:create": {
5370
+ "schemas:extract": {
5303
5371
  "aliases": [],
5304
- "args": {
5305
- "label": {
5306
- "description": "Label for the new token",
5307
- "name": "label",
5308
- "required": false
5309
- }
5310
- },
5311
- "description": "Create a new API token with access to an organization and its projects",
5372
+ "args": {},
5373
+ "description": "Extract a JSON representation of a Sanity schema within a Studio context.\n\nNote: This command is experimental and subject to change.",
5312
5374
  "examples": [
5313
5375
  {
5314
- "command": "<%= config.bin %> <%= command.id %> \"My API Token\"",
5315
- "description": "Create a token, choosing its access interactively"
5316
- },
5317
- {
5318
- "command": "<%= config.bin %> <%= command.id %> \"CI Token\" --grant context=developer --grant blueprints --grant project:abc123=editor",
5319
- "description": "Create an organization token with Context, Blueprints and project access"
5320
- },
5321
- {
5322
- "command": "<%= config.bin %> <%= command.id %> \"My Token\" --project-id abc123 --role=editor",
5323
- "description": "Create a project token with editor role"
5324
- },
5325
- {
5326
- "command": "<%= config.bin %> <%= command.id %> \"CI Token\" --role=editor --yes",
5327
- "description": "Create a project token in unattended mode"
5376
+ "command": "<%= config.bin %> <%= command.id %> --workspace default",
5377
+ "description": "Extracts schema types in a Sanity project with more than one workspace"
5328
5378
  },
5329
5379
  {
5330
- "command": "<%= config.bin %> <%= command.id %> \"Build Token\" --expires-at 2027-01-01",
5331
- "description": "Create a token that expires on a given date"
5380
+ "command": "<%= config.bin %> <%= command.id %> --watch",
5381
+ "description": "Watch mode - re-extract on changes"
5332
5382
  },
5333
5383
  {
5334
- "command": "<%= config.bin %> <%= command.id %> \"API Token\" --json",
5335
- "description": "Output token information as JSON"
5384
+ "command": "<%= config.bin %> <%= command.id %> --watch --watch-patterns \"lib/**/*.ts\"",
5385
+ "description": "Watch with custom glob patterns"
5336
5386
  }
5337
5387
  ],
5338
5388
  "flags": {
5339
- "project-id": {
5340
- "char": "p",
5341
- "description": "Project ID to create token in (overrides CLI configuration)",
5342
- "helpGroup": "OVERRIDE",
5343
- "name": "project-id",
5344
- "hasDynamicHelp": false,
5345
- "helpValue": "<id>",
5346
- "multiple": false,
5347
- "type": "option"
5389
+ "enforce-required-fields": {
5390
+ "description": "Makes the schema generated treat fields marked as required as non-optional",
5391
+ "name": "enforce-required-fields",
5392
+ "allowNo": false,
5393
+ "type": "boolean"
5348
5394
  },
5349
- "organization": {
5350
- "description": "Organization to create an organization token in (overrides CLI configuration)",
5351
- "helpGroup": "OVERRIDE",
5352
- "name": "organization",
5395
+ "force": {
5396
+ "description": "Overwrite an existing schema file",
5397
+ "name": "force",
5398
+ "allowNo": false,
5399
+ "type": "boolean"
5400
+ },
5401
+ "format": {
5402
+ "description": "Output format (currently only groq-type-nodes)",
5403
+ "name": "format",
5404
+ "default": "groq-type-nodes",
5353
5405
  "hasDynamicHelp": false,
5354
- "helpValue": "<id>",
5406
+ "helpValue": "<format>",
5355
5407
  "multiple": false,
5356
5408
  "type": "option"
5357
5409
  },
5358
- "expires-at": {
5359
- "description": "Date or timestamp the token expires (ISO 8601; tokens never expire by default)",
5360
- "name": "expires-at",
5410
+ "path": {
5411
+ "description": "Optional path to specify destination of the schema file",
5412
+ "name": "path",
5361
5413
  "hasDynamicHelp": false,
5362
- "helpValue": "2027-01-01",
5363
5414
  "multiple": false,
5364
5415
  "type": "option"
5365
5416
  },
5366
- "grant": {
5367
- "description": "Access to grant, as <permission>[=<role>] or project:<projectId>=<role>[,<role>]. Permissions: context, blueprints, media-library, canvas, sdk-apps, access, deploy-studios. Repeatable",
5368
- "name": "grant",
5417
+ "watch": {
5418
+ "description": "Enable watch mode to re-extract schema on file changes",
5419
+ "name": "watch",
5420
+ "allowNo": false,
5421
+ "type": "boolean"
5422
+ },
5423
+ "watch-patterns": {
5424
+ "description": "Additional glob pattern(s) to watch (can be specified multiple times)",
5425
+ "name": "watch-patterns",
5369
5426
  "hasDynamicHelp": false,
5370
- "helpValue": "context=editor",
5427
+ "helpValue": "<glob>",
5371
5428
  "multiple": true,
5372
5429
  "type": "option"
5373
5430
  },
5374
- "json": {
5375
- "description": "Output as JSON",
5376
- "name": "json",
5377
- "allowNo": false,
5378
- "type": "boolean"
5379
- },
5380
- "role": {
5381
- "description": "Role to assign on the project (defaults to viewer in unattended mode)",
5382
- "name": "role",
5431
+ "workspace": {
5432
+ "description": "The name of the workspace to generate a schema for",
5433
+ "name": "workspace",
5383
5434
  "hasDynamicHelp": false,
5384
- "helpValue": "viewer",
5435
+ "helpValue": "<name>",
5385
5436
  "multiple": false,
5386
5437
  "type": "option"
5387
- },
5388
- "yes": {
5389
- "char": "y",
5390
- "description": "Skip prompts and use defaults (unattended mode)",
5391
- "name": "yes",
5392
- "allowNo": false,
5393
- "type": "boolean"
5394
5438
  }
5395
5439
  },
5396
5440
  "hasDynamicHelp": false,
5397
5441
  "hiddenAliases": [
5398
- "tokens:add",
5399
- "token:add",
5400
- "token:create"
5442
+ "schema:extract"
5401
5443
  ],
5402
- "id": "tokens:create",
5444
+ "id": "schemas:extract",
5403
5445
  "pluginAlias": "@sanity/cli",
5404
5446
  "pluginName": "@sanity/cli",
5405
5447
  "pluginType": "core",
@@ -5408,149 +5450,153 @@
5408
5450
  "relativePath": [
5409
5451
  "dist",
5410
5452
  "commands",
5411
- "tokens",
5412
- "create.js"
5453
+ "schemas",
5454
+ "extract.js"
5413
5455
  ]
5414
5456
  },
5415
- "tokens:delete": {
5457
+ "schemas:list": {
5416
5458
  "aliases": [],
5417
- "args": {
5418
- "tokenId": {
5419
- "description": "Token ID to delete (will prompt if not provided)",
5420
- "name": "tokenId",
5421
- "required": false
5422
- }
5423
- },
5424
- "description": "Delete an API token from a project or organization",
5459
+ "args": {},
5460
+ "description": "List all schemas in the current dataset.\n\nNote: This command is experimental and subject to change.\n\nRegenerates a manifest file by default. To reuse an existing manifest, use --no-extract-manifest.",
5425
5461
  "examples": [
5426
- {
5427
- "command": "<%= config.bin %> <%= command.id %> --organization org123",
5428
- "description": "Interactively select and delete an organization token"
5429
- },
5430
- {
5431
- "command": "<%= config.bin %> <%= command.id %> silJ2lFmK6dONB --organization org123 --yes",
5432
- "description": "Delete an organization token without confirmation"
5433
- },
5434
5462
  {
5435
5463
  "command": "<%= config.bin %> <%= command.id %>",
5436
- "description": "Interactively select and delete a token"
5464
+ "description": "List all schemas found in any workspace dataset in a table"
5437
5465
  },
5438
5466
  {
5439
- "command": "<%= config.bin %> <%= command.id %> silJ2lFmK6dONB",
5440
- "description": "Delete a specific token by ID"
5467
+ "command": "<%= config.bin %> <%= command.id %> --id _.schemas.workspaceName",
5468
+ "description": "Get a schema for a given id"
5441
5469
  },
5442
5470
  {
5443
- "command": "<%= config.bin %> <%= command.id %> silJ2lFmK6dONB --yes",
5444
- "description": "Delete a specific token without confirmation prompt"
5471
+ "command": "<%= config.bin %> <%= command.id %> --json",
5472
+ "description": "Get stored schemas as pretty-printed json-array"
5445
5473
  },
5446
5474
  {
5447
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
5448
- "description": "Delete a token from a specific project"
5475
+ "command": "<%= config.bin %> <%= command.id %> --json --id _.schemas.workspaceName",
5476
+ "description": "Get singular stored schema as pretty-printed json-object"
5449
5477
  }
5450
5478
  ],
5451
5479
  "flags": {
5452
- "organization": {
5453
- "description": "Delete a token managed by this organization",
5454
- "exclusive": [
5455
- "project-id"
5456
- ],
5457
- "name": "organization",
5458
- "hasDynamicHelp": false,
5459
- "helpValue": "<id>",
5460
- "multiple": false,
5461
- "type": "option"
5480
+ "json": {
5481
+ "description": "Format output as json.",
5482
+ "helpGroup": "GLOBAL",
5483
+ "name": "json",
5484
+ "allowNo": false,
5485
+ "type": "boolean"
5462
5486
  },
5463
- "project-id": {
5464
- "char": "p",
5465
- "description": "Project ID to delete token from (overrides CLI configuration)",
5466
- "helpGroup": "OVERRIDE",
5467
- "name": "project-id",
5487
+ "extract-manifest": {
5488
+ "description": "Regenerate manifest before listing (use --no-extract-manifest to skip)",
5489
+ "hidden": true,
5490
+ "name": "extract-manifest",
5491
+ "allowNo": true,
5492
+ "type": "boolean"
5493
+ },
5494
+ "id": {
5495
+ "description": "Fetch a single schema by id",
5496
+ "name": "id",
5468
5497
  "hasDynamicHelp": false,
5469
- "helpValue": "<id>",
5498
+ "helpValue": "<schema_id>",
5470
5499
  "multiple": false,
5471
5500
  "type": "option"
5472
5501
  },
5473
- "yes": {
5474
- "char": "y",
5475
- "description": "Skip confirmation prompt (unattended mode)",
5476
- "name": "yes",
5477
- "allowNo": false,
5478
- "type": "boolean"
5502
+ "manifest-dir": {
5503
+ "description": "Directory containing manifest file",
5504
+ "hidden": true,
5505
+ "name": "manifest-dir",
5506
+ "default": "./dist/static",
5507
+ "hasDynamicHelp": false,
5508
+ "helpValue": "<directory>",
5509
+ "multiple": false,
5510
+ "type": "option"
5479
5511
  }
5480
5512
  },
5481
5513
  "hasDynamicHelp": false,
5482
5514
  "hiddenAliases": [
5483
- "token:delete"
5515
+ "schema:list"
5484
5516
  ],
5485
- "id": "tokens:delete",
5517
+ "id": "schemas:list",
5486
5518
  "pluginAlias": "@sanity/cli",
5487
5519
  "pluginName": "@sanity/cli",
5488
5520
  "pluginType": "core",
5489
5521
  "strict": true,
5522
+ "enableJsonFlag": true,
5490
5523
  "isESM": true,
5491
5524
  "relativePath": [
5492
5525
  "dist",
5493
5526
  "commands",
5494
- "tokens",
5495
- "delete.js"
5527
+ "schemas",
5528
+ "list.js"
5496
5529
  ]
5497
5530
  },
5498
- "tokens:list": {
5531
+ "schemas:validate": {
5499
5532
  "aliases": [],
5500
5533
  "args": {},
5501
- "description": "List API tokens for a project or organization",
5534
+ "description": "Validates all schema types specified in a workspace",
5502
5535
  "examples": [
5503
5536
  {
5504
- "command": "<%= config.bin %> <%= command.id %> --organization org123",
5505
- "description": "List tokens managed by an organization"
5537
+ "command": "<%= config.bin %> <%= command.id %> --workspace default",
5538
+ "description": "Validates all schema types in a Sanity project with more than one workspace"
5506
5539
  },
5507
5540
  {
5508
- "command": "<%= config.bin %> <%= command.id %>",
5509
- "description": "List tokens for the project"
5541
+ "command": "<%= config.bin %> <%= command.id %> > report.txt",
5542
+ "description": "Save the results of the report into a file"
5510
5543
  },
5511
5544
  {
5512
- "command": "<%= config.bin %> <%= command.id %> --json",
5513
- "description": "List tokens in JSON format"
5545
+ "command": "<%= config.bin %> <%= command.id %> --level error",
5546
+ "description": "Report out only errors"
5514
5547
  },
5515
5548
  {
5516
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
5517
- "description": "List tokens for a specific project"
5549
+ "command": "<%= config.bin %> <%= command.id %> --debug-metafile-path metafile.json",
5550
+ "description": "Generate a report which can be analyzed with https://esbuild.github.io/analyze/"
5518
5551
  }
5519
5552
  ],
5520
5553
  "flags": {
5521
- "organization": {
5522
- "description": "List tokens managed by this organization",
5523
- "exclusive": [
5524
- "project-id"
5525
- ],
5526
- "name": "organization",
5554
+ "debug-metafile-path": {
5555
+ "description": "Optional path where a metafile will be written for build analysis. Only written on successful validation. Can be analyzed at https://esbuild.github.io/analyze/",
5556
+ "helpGroup": "DEBUG",
5557
+ "name": "debug-metafile-path",
5527
5558
  "hasDynamicHelp": false,
5528
- "helpValue": "<id>",
5529
5559
  "multiple": false,
5530
5560
  "type": "option"
5531
5561
  },
5532
- "project-id": {
5533
- "char": "p",
5534
- "description": "Project ID to list tokens for (overrides CLI configuration)",
5535
- "helpGroup": "OVERRIDE",
5536
- "name": "project-id",
5562
+ "format": {
5563
+ "description": "The output format used to print schema errors and warnings",
5564
+ "name": "format",
5565
+ "default": "pretty",
5537
5566
  "hasDynamicHelp": false,
5538
- "helpValue": "<id>",
5539
5567
  "multiple": false,
5568
+ "options": [
5569
+ "pretty",
5570
+ "ndjson",
5571
+ "json"
5572
+ ],
5540
5573
  "type": "option"
5541
5574
  },
5542
- "json": {
5543
- "description": "Output tokens in JSON format",
5544
- "name": "json",
5545
- "allowNo": false,
5546
- "type": "boolean"
5575
+ "level": {
5576
+ "description": "The minimum level reported out",
5577
+ "name": "level",
5578
+ "default": "warning",
5579
+ "hasDynamicHelp": false,
5580
+ "multiple": false,
5581
+ "options": [
5582
+ "error",
5583
+ "warning"
5584
+ ],
5585
+ "type": "option"
5586
+ },
5587
+ "workspace": {
5588
+ "description": "The name of the workspace to use when validating all schema types",
5589
+ "name": "workspace",
5590
+ "hasDynamicHelp": false,
5591
+ "multiple": false,
5592
+ "type": "option"
5547
5593
  }
5548
5594
  },
5549
5595
  "hasDynamicHelp": false,
5550
5596
  "hiddenAliases": [
5551
- "token:list"
5597
+ "schema:validate"
5552
5598
  ],
5553
- "id": "tokens:list",
5599
+ "id": "schemas:validate",
5554
5600
  "pluginAlias": "@sanity/cli",
5555
5601
  "pluginName": "@sanity/cli",
5556
5602
  "pluginType": "core",
@@ -5559,50 +5605,102 @@
5559
5605
  "relativePath": [
5560
5606
  "dist",
5561
5607
  "commands",
5562
- "tokens",
5563
- "list.js"
5608
+ "schemas",
5609
+ "validate.js"
5564
5610
  ]
5565
5611
  },
5566
- "tokens:rotate": {
5612
+ "skills:install": {
5567
5613
  "aliases": [],
5568
5614
  "args": {},
5569
- "description": "Rotate an API token, replacing its secret with a new one",
5615
+ "description": "Install Sanity agent skills for detected AI editors (Antigravity, Claude Code, Cline, Cline CLI, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, VS Code, VS Code Insiders)",
5570
5616
  "examples": [
5571
5617
  {
5572
- "command": "echo \"$SANITY_TOKEN\" | <%= config.bin %> <%= command.id %>",
5573
- "description": "Rotate the token piped on standard input"
5574
- },
5575
- {
5576
- "command": "<%= config.bin %> <%= command.id %> < token.txt",
5577
- "description": "Rotate a token read from a file"
5578
- },
5618
+ "command": "<%= config.bin %> <%= command.id %>",
5619
+ "description": "Install Sanity agent skills for detected AI editors"
5620
+ }
5621
+ ],
5622
+ "flags": {},
5623
+ "hasDynamicHelp": false,
5624
+ "hiddenAliases": [],
5625
+ "id": "skills:install",
5626
+ "pluginAlias": "@sanity/cli",
5627
+ "pluginName": "@sanity/cli",
5628
+ "pluginType": "core",
5629
+ "strict": true,
5630
+ "isESM": true,
5631
+ "relativePath": [
5632
+ "dist",
5633
+ "commands",
5634
+ "skills",
5635
+ "install.js"
5636
+ ]
5637
+ },
5638
+ "telemetry:disable": {
5639
+ "aliases": [],
5640
+ "args": {},
5641
+ "description": "Disable telemetry for your account",
5642
+ "examples": [
5579
5643
  {
5580
- "command": "echo \"$SANITY_TOKEN\" | <%= config.bin %> <%= command.id %> --json",
5581
- "description": "Output the rotated token as JSON"
5644
+ "command": "<%= config.bin %> telemetry <%= command.id %>",
5645
+ "description": "Disable telemetry for your account"
5582
5646
  }
5583
5647
  ],
5584
- "flags": {
5585
- "json": {
5586
- "description": "Output as JSON",
5587
- "name": "json",
5588
- "allowNo": false,
5589
- "type": "boolean"
5590
- },
5591
- "token": {
5592
- "char": "t",
5593
- "description": "Token to rotate (prefer standard input to keep it out of shell history)",
5594
- "name": "token",
5595
- "hasDynamicHelp": false,
5596
- "helpValue": "<token>",
5597
- "multiple": false,
5598
- "type": "option"
5648
+ "flags": {},
5649
+ "hasDynamicHelp": false,
5650
+ "hiddenAliases": [],
5651
+ "id": "telemetry:disable",
5652
+ "pluginAlias": "@sanity/cli",
5653
+ "pluginName": "@sanity/cli",
5654
+ "pluginType": "core",
5655
+ "strict": true,
5656
+ "isESM": true,
5657
+ "relativePath": [
5658
+ "dist",
5659
+ "commands",
5660
+ "telemetry",
5661
+ "disable.js"
5662
+ ]
5663
+ },
5664
+ "telemetry:enable": {
5665
+ "aliases": [],
5666
+ "args": {},
5667
+ "description": "Enable telemetry for your account",
5668
+ "examples": [
5669
+ {
5670
+ "command": "<%= config.bin %> telemetry <%= command.id %>",
5671
+ "description": "Enable telemetry for your account"
5599
5672
  }
5600
- },
5673
+ ],
5674
+ "flags": {},
5601
5675
  "hasDynamicHelp": false,
5602
- "hiddenAliases": [
5603
- "token:rotate"
5676
+ "hiddenAliases": [],
5677
+ "id": "telemetry:enable",
5678
+ "pluginAlias": "@sanity/cli",
5679
+ "pluginName": "@sanity/cli",
5680
+ "pluginType": "core",
5681
+ "strict": true,
5682
+ "isESM": true,
5683
+ "relativePath": [
5684
+ "dist",
5685
+ "commands",
5686
+ "telemetry",
5687
+ "enable.js"
5688
+ ]
5689
+ },
5690
+ "telemetry:status": {
5691
+ "aliases": [],
5692
+ "args": {},
5693
+ "description": "Check telemetry status for your account",
5694
+ "examples": [
5695
+ {
5696
+ "command": "<%= config.bin %> telemetry <%= command.id %>",
5697
+ "description": "Check telemetry status for your account"
5698
+ }
5604
5699
  ],
5605
- "id": "tokens:rotate",
5700
+ "flags": {},
5701
+ "hasDynamicHelp": false,
5702
+ "hiddenAliases": [],
5703
+ "id": "telemetry:status",
5606
5704
  "pluginAlias": "@sanity/cli",
5607
5705
  "pluginName": "@sanity/cli",
5608
5706
  "pluginType": "core",
@@ -5611,14 +5709,14 @@
5611
5709
  "relativePath": [
5612
5710
  "dist",
5613
5711
  "commands",
5614
- "tokens",
5615
- "rotate.js"
5712
+ "telemetry",
5713
+ "status.js"
5616
5714
  ]
5617
5715
  },
5618
5716
  "typegen:generate": {
5619
5717
  "aliases": [],
5620
5718
  "args": {},
5621
- "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.",
5719
+ "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.",
5622
5720
  "examples": [
5623
5721
  {
5624
5722
  "command": "<%= config.bin %> <%= command.id %>",
@@ -5657,24 +5755,53 @@
5657
5755
  "generate.js"
5658
5756
  ]
5659
5757
  },
5660
- "schemas:delete": {
5758
+ "tokens:create": {
5661
5759
  "aliases": [],
5662
- "args": {},
5663
- "description": "Delete schema documents by id",
5760
+ "args": {
5761
+ "label": {
5762
+ "description": "Label for the new token",
5763
+ "name": "label",
5764
+ "required": false
5765
+ }
5766
+ },
5767
+ "description": "Create a new API token with access to an organization and its projects",
5664
5768
  "examples": [
5665
5769
  {
5666
- "command": "<%= config.bin %> <%= command.id %> --ids sanity.workspace.schema.workspaceName",
5667
- "description": "Delete a single schema"
5770
+ "command": "<%= config.bin %> <%= command.id %> \"My API Token\"",
5771
+ "description": "Create a token, choosing its access interactively"
5668
5772
  },
5669
5773
  {
5670
- "command": "<%= config.bin %> <%= command.id %> --ids sanity.workspace.schema.workspaceName,prefix.sanity.workspace.schema.otherWorkspace",
5671
- "description": "Delete multiple schemas"
5774
+ "command": "<%= config.bin %> <%= command.id %> \"CI Token\" --grant context=developer --grant blueprints --grant project:abc123=editor",
5775
+ "description": "Create an organization token with Context, Blueprints and project access"
5776
+ },
5777
+ {
5778
+ "command": "<%= config.bin %> <%= command.id %> \"My Token\" --project-id abc123 --role=editor",
5779
+ "description": "Create a project token with editor role"
5780
+ },
5781
+ {
5782
+ "command": "<%= config.bin %> <%= command.id %> \"CI Token\" --role=editor --yes",
5783
+ "description": "Create a project token in unattended mode"
5784
+ },
5785
+ {
5786
+ "command": "<%= config.bin %> <%= command.id %> \"Build Token\" --expires-at 2027-01-01",
5787
+ "description": "Create a token that expires on a given date"
5788
+ },
5789
+ {
5790
+ "command": "<%= config.bin %> <%= command.id %> \"API Token\" --json",
5791
+ "description": "Output token information as JSON"
5672
5792
  }
5673
5793
  ],
5674
5794
  "flags": {
5795
+ "json": {
5796
+ "description": "Format output as json.",
5797
+ "helpGroup": "GLOBAL",
5798
+ "name": "json",
5799
+ "allowNo": false,
5800
+ "type": "boolean"
5801
+ },
5675
5802
  "project-id": {
5676
5803
  "char": "p",
5677
- "description": "Project ID to delete schema from (overrides CLI configuration)",
5804
+ "description": "Project ID to create token in (overrides CLI configuration)",
5678
5805
  "helpGroup": "OVERRIDE",
5679
5806
  "name": "project-id",
5680
5807
  "hasDynamicHelp": false,
@@ -5682,48 +5809,42 @@
5682
5809
  "multiple": false,
5683
5810
  "type": "option"
5684
5811
  },
5685
- "dataset": {
5686
- "char": "d",
5687
- "description": "Delete schemas from a specific dataset",
5688
- "name": "dataset",
5812
+ "organization": {
5813
+ "description": "Organization to create an organization token in (overrides CLI configuration)",
5814
+ "helpGroup": "OVERRIDE",
5815
+ "name": "organization",
5816
+ "hasDynamicHelp": false,
5817
+ "helpValue": "<id>",
5818
+ "multiple": false,
5819
+ "type": "option"
5820
+ },
5821
+ "expires-at": {
5822
+ "description": "Date or timestamp the token expires (ISO 8601; tokens never expire by default)",
5823
+ "name": "expires-at",
5689
5824
  "hasDynamicHelp": false,
5690
- "helpValue": "<name>",
5825
+ "helpValue": "2027-01-01",
5691
5826
  "multiple": false,
5692
5827
  "type": "option"
5693
5828
  },
5694
- "extract-manifest": {
5695
- "description": "Generate manifest file (disable with --no-extract-manifest)",
5696
- "hidden": true,
5697
- "name": "extract-manifest",
5698
- "allowNo": true,
5699
- "type": "boolean"
5700
- },
5701
- "ids": {
5702
- "description": "Comma-separated list of schema ids to delete",
5703
- "name": "ids",
5704
- "required": true,
5829
+ "grant": {
5830
+ "description": "Access to grant, as <permission>[=<role>] or project:<projectId>=<role>[,<role>]. Permissions: context, blueprints, media-library, canvas, sdk-apps, access, deploy-studios. Repeatable",
5831
+ "name": "grant",
5705
5832
  "hasDynamicHelp": false,
5706
- "multiple": false,
5833
+ "helpValue": "context=editor",
5834
+ "multiple": true,
5707
5835
  "type": "option"
5708
5836
  },
5709
- "manifest-dir": {
5710
- "description": "Directory containing manifest file",
5711
- "hidden": true,
5712
- "name": "manifest-dir",
5713
- "default": "./dist/static",
5837
+ "role": {
5838
+ "description": "Role to assign on the project (defaults to viewer in unattended mode)",
5839
+ "name": "role",
5714
5840
  "hasDynamicHelp": false,
5841
+ "helpValue": "viewer",
5715
5842
  "multiple": false,
5716
5843
  "type": "option"
5717
5844
  },
5718
- "verbose": {
5719
- "description": "Enable verbose logging",
5720
- "name": "verbose",
5721
- "allowNo": false,
5722
- "type": "boolean"
5723
- },
5724
5845
  "yes": {
5725
5846
  "char": "y",
5726
- "description": "Delete schemas without prompting for confirmation",
5847
+ "description": "Skip prompts and use defaults (unattended mode)",
5727
5848
  "name": "yes",
5728
5849
  "allowNo": false,
5729
5850
  "type": "boolean"
@@ -5731,166 +5852,95 @@
5731
5852
  },
5732
5853
  "hasDynamicHelp": false,
5733
5854
  "hiddenAliases": [
5734
- "schema:delete"
5855
+ "tokens:add",
5856
+ "token:add",
5857
+ "token:create"
5735
5858
  ],
5736
- "id": "schemas:delete",
5859
+ "id": "tokens:create",
5737
5860
  "pluginAlias": "@sanity/cli",
5738
5861
  "pluginName": "@sanity/cli",
5739
5862
  "pluginType": "core",
5740
5863
  "strict": true,
5864
+ "enableJsonFlag": true,
5741
5865
  "isESM": true,
5742
5866
  "relativePath": [
5743
5867
  "dist",
5744
5868
  "commands",
5745
- "schemas",
5746
- "delete.js"
5869
+ "tokens",
5870
+ "create.js"
5747
5871
  ]
5748
5872
  },
5749
- "schemas:deploy": {
5873
+ "tokens:delete": {
5750
5874
  "aliases": [],
5751
- "args": {},
5752
- "description": "Deploy schema documents into workspace datasets.\n\nNote: This command is experimental and subject to change.\n\nRegenerates a manifest file by default. To re-use an existing manifest, use --no-extract-manifest.",
5875
+ "args": {
5876
+ "tokenId": {
5877
+ "description": "Token ID to delete (will prompt if not provided)",
5878
+ "name": "tokenId",
5879
+ "required": false
5880
+ }
5881
+ },
5882
+ "description": "Delete an API token from a project or organization",
5753
5883
  "examples": [
5754
5884
  {
5755
- "command": "<%= config.bin %> <%= command.id %>",
5756
- "description": "Deploy all workspace schemas"
5885
+ "command": "<%= config.bin %> <%= command.id %> --organization org123",
5886
+ "description": "Interactively select and delete an organization token"
5757
5887
  },
5758
5888
  {
5759
- "command": "<%= config.bin %> <%= command.id %> --workspace default",
5760
- "description": "Deploy the schema for only the workspace \"default\""
5761
- }
5762
- ],
5763
- "flags": {
5764
- "extract-manifest": {
5765
- "description": "Regenerate manifest before deploying (use --no-extract-manifest to skip)",
5766
- "name": "extract-manifest",
5767
- "allowNo": true,
5768
- "type": "boolean"
5769
- },
5770
- "manifest-dir": {
5771
- "description": "Directory containing manifest file",
5772
- "name": "manifest-dir",
5773
- "default": "./dist/static",
5774
- "hasDynamicHelp": false,
5775
- "helpValue": "<directory>",
5776
- "multiple": false,
5777
- "type": "option"
5778
- },
5779
- "tag": {
5780
- "description": "Add a tag suffix to the schema id",
5781
- "name": "tag",
5782
- "hasDynamicHelp": false,
5783
- "helpValue": "<tag>",
5784
- "multiple": false,
5785
- "type": "option"
5889
+ "command": "<%= config.bin %> <%= command.id %> silJ2lFmK6dONB --organization org123 --yes",
5890
+ "description": "Delete an organization token without confirmation"
5786
5891
  },
5787
- "verbose": {
5788
- "description": "Print detailed information during deployment",
5789
- "name": "verbose",
5790
- "allowNo": false,
5791
- "type": "boolean"
5892
+ {
5893
+ "command": "<%= config.bin %> <%= command.id %>",
5894
+ "description": "Interactively select and delete a token"
5792
5895
  },
5793
- "workspace": {
5794
- "description": "The name of the workspace to deploy a schema for",
5795
- "name": "workspace",
5796
- "hasDynamicHelp": false,
5797
- "helpValue": "<name>",
5798
- "multiple": false,
5799
- "type": "option"
5800
- }
5801
- },
5802
- "hasDynamicHelp": false,
5803
- "hiddenAliases": [
5804
- "schema:deploy"
5805
- ],
5806
- "id": "schemas:deploy",
5807
- "pluginAlias": "@sanity/cli",
5808
- "pluginName": "@sanity/cli",
5809
- "pluginType": "core",
5810
- "strict": true,
5811
- "isESM": true,
5812
- "relativePath": [
5813
- "dist",
5814
- "commands",
5815
- "schemas",
5816
- "deploy.js"
5817
- ]
5818
- },
5819
- "schemas:extract": {
5820
- "aliases": [],
5821
- "args": {},
5822
- "description": "Extract a JSON representation of a Sanity schema within a Studio context.\n\nNote: This command is experimental and subject to change.",
5823
- "examples": [
5824
5896
  {
5825
- "command": "<%= config.bin %> <%= command.id %> --workspace default",
5826
- "description": "Extracts schema types in a Sanity project with more than one workspace"
5897
+ "command": "<%= config.bin %> <%= command.id %> silJ2lFmK6dONB",
5898
+ "description": "Delete a specific token by ID"
5827
5899
  },
5828
5900
  {
5829
- "command": "<%= config.bin %> <%= command.id %> --watch",
5830
- "description": "Watch mode - re-extract on changes"
5901
+ "command": "<%= config.bin %> <%= command.id %> silJ2lFmK6dONB --yes",
5902
+ "description": "Delete a specific token without confirmation prompt"
5831
5903
  },
5832
5904
  {
5833
- "command": "<%= config.bin %> <%= command.id %> --watch --watch-patterns \"lib/**/*.ts\"",
5834
- "description": "Watch with custom glob patterns"
5905
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
5906
+ "description": "Delete a token from a specific project"
5835
5907
  }
5836
5908
  ],
5837
5909
  "flags": {
5838
- "enforce-required-fields": {
5839
- "description": "Makes the schema generated treat fields marked as required as non-optional",
5840
- "name": "enforce-required-fields",
5841
- "allowNo": false,
5842
- "type": "boolean"
5843
- },
5844
- "force": {
5845
- "description": "Overwrite an existing schema file",
5846
- "name": "force",
5847
- "allowNo": false,
5848
- "type": "boolean"
5849
- },
5850
- "format": {
5851
- "description": "Output format (currently only groq-type-nodes)",
5852
- "name": "format",
5853
- "default": "groq-type-nodes",
5910
+ "organization": {
5911
+ "description": "Delete a token managed by this organization",
5912
+ "exclusive": [
5913
+ "project-id"
5914
+ ],
5915
+ "name": "organization",
5854
5916
  "hasDynamicHelp": false,
5855
- "helpValue": "<format>",
5917
+ "helpValue": "<id>",
5856
5918
  "multiple": false,
5857
5919
  "type": "option"
5858
5920
  },
5859
- "path": {
5860
- "description": "Optional path to specify destination of the schema file",
5861
- "name": "path",
5921
+ "project-id": {
5922
+ "char": "p",
5923
+ "description": "Project ID to delete token from (overrides CLI configuration)",
5924
+ "helpGroup": "OVERRIDE",
5925
+ "name": "project-id",
5862
5926
  "hasDynamicHelp": false,
5927
+ "helpValue": "<id>",
5863
5928
  "multiple": false,
5864
5929
  "type": "option"
5865
5930
  },
5866
- "watch": {
5867
- "description": "Enable watch mode to re-extract schema on file changes",
5868
- "name": "watch",
5931
+ "yes": {
5932
+ "char": "y",
5933
+ "description": "Skip confirmation prompt (unattended mode)",
5934
+ "name": "yes",
5869
5935
  "allowNo": false,
5870
5936
  "type": "boolean"
5871
- },
5872
- "watch-patterns": {
5873
- "description": "Additional glob pattern(s) to watch (can be specified multiple times)",
5874
- "name": "watch-patterns",
5875
- "hasDynamicHelp": false,
5876
- "helpValue": "<glob>",
5877
- "multiple": true,
5878
- "type": "option"
5879
- },
5880
- "workspace": {
5881
- "description": "The name of the workspace to generate a schema for",
5882
- "name": "workspace",
5883
- "hasDynamicHelp": false,
5884
- "helpValue": "<name>",
5885
- "multiple": false,
5886
- "type": "option"
5887
5937
  }
5888
5938
  },
5889
5939
  "hasDynamicHelp": false,
5890
5940
  "hiddenAliases": [
5891
- "schema:extract"
5941
+ "token:delete"
5892
5942
  ],
5893
- "id": "schemas:extract",
5943
+ "id": "tokens:delete",
5894
5944
  "pluginAlias": "@sanity/cli",
5895
5945
  "pluginName": "@sanity/cli",
5896
5946
  "pluginType": "core",
@@ -5899,161 +5949,132 @@
5899
5949
  "relativePath": [
5900
5950
  "dist",
5901
5951
  "commands",
5902
- "schemas",
5903
- "extract.js"
5952
+ "tokens",
5953
+ "delete.js"
5904
5954
  ]
5905
5955
  },
5906
- "schemas:list": {
5956
+ "tokens:list": {
5907
5957
  "aliases": [],
5908
5958
  "args": {},
5909
- "description": "List all schemas in the current dataset.\n\nNote: This command is experimental and subject to change.\n\nRegenerates a manifest file by default. To reuse an existing manifest, use --no-extract-manifest.",
5959
+ "description": "List API tokens for a project or organization",
5910
5960
  "examples": [
5911
5961
  {
5912
- "command": "<%= config.bin %> <%= command.id %>",
5913
- "description": "List all schemas found in any workspace dataset in a table"
5962
+ "command": "<%= config.bin %> <%= command.id %> --organization org123",
5963
+ "description": "List tokens managed by an organization"
5914
5964
  },
5915
5965
  {
5916
- "command": "<%= config.bin %> <%= command.id %> --id _.schemas.workspaceName",
5917
- "description": "Get a schema for a given id"
5966
+ "command": "<%= config.bin %> <%= command.id %>",
5967
+ "description": "List tokens for the project"
5918
5968
  },
5919
5969
  {
5920
5970
  "command": "<%= config.bin %> <%= command.id %> --json",
5921
- "description": "Get stored schemas as pretty-printed json-array"
5971
+ "description": "List tokens in JSON format"
5922
5972
  },
5923
5973
  {
5924
- "command": "<%= config.bin %> <%= command.id %> --json --id _.schemas.workspaceName",
5925
- "description": "Get singular stored schema as pretty-printed json-object"
5974
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
5975
+ "description": "List tokens for a specific project"
5926
5976
  }
5927
5977
  ],
5928
5978
  "flags": {
5929
- "extract-manifest": {
5930
- "description": "Regenerate manifest before listing (use --no-extract-manifest to skip)",
5931
- "hidden": true,
5932
- "name": "extract-manifest",
5933
- "allowNo": true,
5934
- "type": "boolean"
5935
- },
5936
- "id": {
5937
- "description": "Fetch a single schema by id",
5938
- "name": "id",
5939
- "hasDynamicHelp": false,
5940
- "helpValue": "<schema_id>",
5941
- "multiple": false,
5942
- "type": "option"
5943
- },
5944
5979
  "json": {
5945
- "description": "Get schema as json",
5980
+ "description": "Format output as json.",
5981
+ "helpGroup": "GLOBAL",
5946
5982
  "name": "json",
5947
5983
  "allowNo": false,
5948
5984
  "type": "boolean"
5949
5985
  },
5950
- "manifest-dir": {
5951
- "description": "Directory containing manifest file",
5952
- "hidden": true,
5953
- "name": "manifest-dir",
5954
- "default": "./dist/static",
5986
+ "organization": {
5987
+ "description": "List tokens managed by this organization",
5988
+ "exclusive": [
5989
+ "project-id"
5990
+ ],
5991
+ "name": "organization",
5992
+ "hasDynamicHelp": false,
5993
+ "helpValue": "<id>",
5994
+ "multiple": false,
5995
+ "type": "option"
5996
+ },
5997
+ "project-id": {
5998
+ "char": "p",
5999
+ "description": "Project ID to list tokens for (overrides CLI configuration)",
6000
+ "helpGroup": "OVERRIDE",
6001
+ "name": "project-id",
5955
6002
  "hasDynamicHelp": false,
5956
- "helpValue": "<directory>",
6003
+ "helpValue": "<id>",
5957
6004
  "multiple": false,
5958
6005
  "type": "option"
5959
6006
  }
5960
6007
  },
5961
6008
  "hasDynamicHelp": false,
5962
6009
  "hiddenAliases": [
5963
- "schema:list"
6010
+ "token:list"
5964
6011
  ],
5965
- "id": "schemas:list",
6012
+ "id": "tokens:list",
5966
6013
  "pluginAlias": "@sanity/cli",
5967
6014
  "pluginName": "@sanity/cli",
5968
6015
  "pluginType": "core",
5969
6016
  "strict": true,
6017
+ "enableJsonFlag": true,
5970
6018
  "isESM": true,
5971
6019
  "relativePath": [
5972
6020
  "dist",
5973
6021
  "commands",
5974
- "schemas",
6022
+ "tokens",
5975
6023
  "list.js"
5976
6024
  ]
5977
6025
  },
5978
- "schemas:validate": {
6026
+ "tokens:rotate": {
5979
6027
  "aliases": [],
5980
6028
  "args": {},
5981
- "description": "Validates all schema types specified in a workspace",
6029
+ "description": "Rotate an API token, replacing its secret with a new one",
5982
6030
  "examples": [
5983
6031
  {
5984
- "command": "<%= config.bin %> <%= command.id %> --workspace default",
5985
- "description": "Validates all schema types in a Sanity project with more than one workspace"
5986
- },
5987
- {
5988
- "command": "<%= config.bin %> <%= command.id %> > report.txt",
5989
- "description": "Save the results of the report into a file"
6032
+ "command": "echo \"$SANITY_TOKEN\" | <%= config.bin %> <%= command.id %>",
6033
+ "description": "Rotate the token piped on standard input"
5990
6034
  },
5991
6035
  {
5992
- "command": "<%= config.bin %> <%= command.id %> --level error",
5993
- "description": "Report out only errors"
6036
+ "command": "<%= config.bin %> <%= command.id %> < token.txt",
6037
+ "description": "Rotate a token read from a file"
5994
6038
  },
5995
6039
  {
5996
- "command": "<%= config.bin %> <%= command.id %> --debug-metafile-path metafile.json",
5997
- "description": "Generate a report which can be analyzed with https://esbuild.github.io/analyze/"
6040
+ "command": "echo \"$SANITY_TOKEN\" | <%= config.bin %> <%= command.id %> --json",
6041
+ "description": "Output the rotated token as JSON"
5998
6042
  }
5999
6043
  ],
6000
6044
  "flags": {
6001
- "debug-metafile-path": {
6002
- "description": "Optional path where a metafile will be written for build analysis. Only written on successful validation. Can be analyzed at https://esbuild.github.io/analyze/",
6003
- "helpGroup": "DEBUG",
6004
- "name": "debug-metafile-path",
6005
- "hasDynamicHelp": false,
6006
- "multiple": false,
6007
- "type": "option"
6008
- },
6009
- "format": {
6010
- "description": "The output format used to print schema errors and warnings",
6011
- "name": "format",
6012
- "default": "pretty",
6013
- "hasDynamicHelp": false,
6014
- "multiple": false,
6015
- "options": [
6016
- "pretty",
6017
- "ndjson",
6018
- "json"
6019
- ],
6020
- "type": "option"
6021
- },
6022
- "level": {
6023
- "description": "The minimum level reported out",
6024
- "name": "level",
6025
- "default": "warning",
6026
- "hasDynamicHelp": false,
6027
- "multiple": false,
6028
- "options": [
6029
- "error",
6030
- "warning"
6031
- ],
6032
- "type": "option"
6045
+ "json": {
6046
+ "description": "Format output as json.",
6047
+ "helpGroup": "GLOBAL",
6048
+ "name": "json",
6049
+ "allowNo": false,
6050
+ "type": "boolean"
6033
6051
  },
6034
- "workspace": {
6035
- "description": "The name of the workspace to use when validating all schema types",
6036
- "name": "workspace",
6052
+ "token": {
6053
+ "char": "t",
6054
+ "description": "Token to rotate (prefer standard input to keep it out of shell history)",
6055
+ "name": "token",
6037
6056
  "hasDynamicHelp": false,
6057
+ "helpValue": "<token>",
6038
6058
  "multiple": false,
6039
6059
  "type": "option"
6040
6060
  }
6041
6061
  },
6042
6062
  "hasDynamicHelp": false,
6043
6063
  "hiddenAliases": [
6044
- "schema:validate"
6064
+ "token:rotate"
6045
6065
  ],
6046
- "id": "schemas:validate",
6066
+ "id": "tokens:rotate",
6047
6067
  "pluginAlias": "@sanity/cli",
6048
6068
  "pluginName": "@sanity/cli",
6049
6069
  "pluginType": "core",
6050
6070
  "strict": true,
6071
+ "enableJsonFlag": true,
6051
6072
  "isESM": true,
6052
6073
  "relativePath": [
6053
6074
  "dist",
6054
6075
  "commands",
6055
- "schemas",
6056
- "validate.js"
6076
+ "tokens",
6077
+ "rotate.js"
6057
6078
  ]
6058
6079
  },
6059
6080
  "users:invite": {
@@ -6460,7 +6481,8 @@
6460
6481
  ],
6461
6482
  "flags": {
6462
6483
  "json": {
6463
- "description": "Output the download URL in JSON format",
6484
+ "description": "Format output as json.",
6485
+ "helpGroup": "GLOBAL",
6464
6486
  "name": "json",
6465
6487
  "allowNo": false,
6466
6488
  "type": "boolean"
@@ -6473,6 +6495,7 @@
6473
6495
  "pluginName": "@sanity/cli",
6474
6496
  "pluginType": "core",
6475
6497
  "strict": true,
6498
+ "enableJsonFlag": true,
6476
6499
  "isESM": true,
6477
6500
  "relativePath": [
6478
6501
  "dist",
@@ -6509,7 +6532,8 @@
6509
6532
  ],
6510
6533
  "flags": {
6511
6534
  "json": {
6512
- "description": "Output the import in JSON format",
6535
+ "description": "Format output as json.",
6536
+ "helpGroup": "GLOBAL",
6513
6537
  "name": "json",
6514
6538
  "allowNo": false,
6515
6539
  "type": "boolean"
@@ -6522,6 +6546,7 @@
6522
6546
  "pluginName": "@sanity/cli",
6523
6547
  "pluginType": "core",
6524
6548
  "strict": true,
6549
+ "enableJsonFlag": true,
6525
6550
  "isESM": true,
6526
6551
  "relativePath": [
6527
6552
  "dist",
@@ -6547,21 +6572,194 @@
6547
6572
  "description": "List all imports for a knowledge base"
6548
6573
  },
6549
6574
  {
6550
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
6551
- "description": "Output imports as JSON"
6575
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
6576
+ "description": "Output imports as JSON"
6577
+ }
6578
+ ],
6579
+ "flags": {
6580
+ "json": {
6581
+ "description": "Format output as json.",
6582
+ "helpGroup": "GLOBAL",
6583
+ "name": "json",
6584
+ "allowNo": false,
6585
+ "type": "boolean"
6586
+ }
6587
+ },
6588
+ "hasDynamicHelp": false,
6589
+ "hiddenAliases": [],
6590
+ "id": "context:imports:list",
6591
+ "pluginAlias": "@sanity/cli",
6592
+ "pluginName": "@sanity/cli",
6593
+ "pluginType": "core",
6594
+ "strict": true,
6595
+ "enableJsonFlag": true,
6596
+ "isESM": true,
6597
+ "relativePath": [
6598
+ "dist",
6599
+ "commands",
6600
+ "context",
6601
+ "imports",
6602
+ "list.js"
6603
+ ]
6604
+ },
6605
+ "context:jobs:get": {
6606
+ "aliases": [],
6607
+ "args": {
6608
+ "knowledgeBaseId": {
6609
+ "description": "Knowledge base ID",
6610
+ "name": "knowledgeBaseId",
6611
+ "required": true
6612
+ },
6613
+ "jobId": {
6614
+ "description": "Job ID",
6615
+ "name": "jobId",
6616
+ "required": true
6617
+ }
6618
+ },
6619
+ "description": "Get the status of a knowledge base job",
6620
+ "examples": [
6621
+ {
6622
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456",
6623
+ "description": "Get the current status of a job"
6624
+ },
6625
+ {
6626
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456 --watch",
6627
+ "description": "Wait for the job to finish (non-zero exit if it does not succeed)"
6628
+ }
6629
+ ],
6630
+ "flags": {
6631
+ "json": {
6632
+ "description": "Format output as json.",
6633
+ "helpGroup": "GLOBAL",
6634
+ "name": "json",
6635
+ "allowNo": false,
6636
+ "type": "boolean"
6637
+ },
6638
+ "watch": {
6639
+ "description": "Poll until the job reaches a terminal state",
6640
+ "name": "watch",
6641
+ "allowNo": false,
6642
+ "type": "boolean"
6643
+ }
6644
+ },
6645
+ "hasDynamicHelp": false,
6646
+ "hiddenAliases": [],
6647
+ "id": "context:jobs:get",
6648
+ "pluginAlias": "@sanity/cli",
6649
+ "pluginName": "@sanity/cli",
6650
+ "pluginType": "core",
6651
+ "strict": true,
6652
+ "enableJsonFlag": true,
6653
+ "isESM": true,
6654
+ "relativePath": [
6655
+ "dist",
6656
+ "commands",
6657
+ "context",
6658
+ "jobs",
6659
+ "get.js"
6660
+ ]
6661
+ },
6662
+ "datasets:embeddings:disable": {
6663
+ "aliases": [],
6664
+ "args": {
6665
+ "dataset": {
6666
+ "description": "Dataset name to disable embeddings for",
6667
+ "name": "dataset",
6668
+ "required": false
6669
+ }
6670
+ },
6671
+ "description": "Disable embeddings for a dataset",
6672
+ "examples": [
6673
+ {
6674
+ "command": "<%= config.bin %> <%= command.id %> production",
6675
+ "description": "Disable embeddings for the production dataset"
6676
+ }
6677
+ ],
6678
+ "flags": {
6679
+ "project-id": {
6680
+ "char": "p",
6681
+ "description": "Project ID to disable embeddings for (overrides CLI configuration)",
6682
+ "helpGroup": "OVERRIDE",
6683
+ "name": "project-id",
6684
+ "hasDynamicHelp": false,
6685
+ "helpValue": "<id>",
6686
+ "multiple": false,
6687
+ "type": "option"
6688
+ }
6689
+ },
6690
+ "hasDynamicHelp": false,
6691
+ "hiddenAliases": [
6692
+ "dataset:embeddings:disable"
6693
+ ],
6694
+ "id": "datasets:embeddings:disable",
6695
+ "pluginAlias": "@sanity/cli",
6696
+ "pluginName": "@sanity/cli",
6697
+ "pluginType": "core",
6698
+ "strict": true,
6699
+ "isESM": true,
6700
+ "relativePath": [
6701
+ "dist",
6702
+ "commands",
6703
+ "datasets",
6704
+ "embeddings",
6705
+ "disable.js"
6706
+ ]
6707
+ },
6708
+ "datasets:embeddings:enable": {
6709
+ "aliases": [],
6710
+ "args": {
6711
+ "dataset": {
6712
+ "description": "Dataset name to enable embeddings for",
6713
+ "name": "dataset",
6714
+ "required": false
6715
+ }
6716
+ },
6717
+ "description": "Enable embeddings for a dataset",
6718
+ "examples": [
6719
+ {
6720
+ "command": "<%= config.bin %> <%= command.id %> production",
6721
+ "description": "Enable embeddings for the production dataset"
6722
+ },
6723
+ {
6724
+ "command": "<%= config.bin %> <%= command.id %> production --projection \"{ title, body }\"",
6725
+ "description": "Enable embeddings with a specific projection"
6726
+ },
6727
+ {
6728
+ "command": "<%= config.bin %> <%= command.id %> production --wait",
6729
+ "description": "Enable embeddings and wait for processing to complete"
6552
6730
  }
6553
6731
  ],
6554
6732
  "flags": {
6555
- "json": {
6556
- "description": "Output imports in JSON format",
6557
- "name": "json",
6733
+ "project-id": {
6734
+ "char": "p",
6735
+ "description": "Project ID to enable embeddings for (overrides CLI configuration)",
6736
+ "helpGroup": "OVERRIDE",
6737
+ "name": "project-id",
6738
+ "hasDynamicHelp": false,
6739
+ "helpValue": "<id>",
6740
+ "multiple": false,
6741
+ "type": "option"
6742
+ },
6743
+ "projection": {
6744
+ "description": "GROQ projection defining which fields to embed (e.g. \"{ title, body }\")",
6745
+ "name": "projection",
6746
+ "required": false,
6747
+ "hasDynamicHelp": false,
6748
+ "multiple": false,
6749
+ "type": "option"
6750
+ },
6751
+ "wait": {
6752
+ "description": "Wait for embeddings processing to complete before returning",
6753
+ "name": "wait",
6558
6754
  "allowNo": false,
6559
6755
  "type": "boolean"
6560
6756
  }
6561
6757
  },
6562
6758
  "hasDynamicHelp": false,
6563
- "hiddenAliases": [],
6564
- "id": "context:imports:list",
6759
+ "hiddenAliases": [
6760
+ "dataset:embeddings:enable"
6761
+ ],
6762
+ "id": "datasets:embeddings:enable",
6565
6763
  "pluginAlias": "@sanity/cli",
6566
6764
  "pluginName": "@sanity/cli",
6567
6765
  "pluginType": "core",
@@ -6570,53 +6768,44 @@
6570
6768
  "relativePath": [
6571
6769
  "dist",
6572
6770
  "commands",
6573
- "context",
6574
- "imports",
6575
- "list.js"
6771
+ "datasets",
6772
+ "embeddings",
6773
+ "enable.js"
6576
6774
  ]
6577
6775
  },
6578
- "context:jobs:get": {
6776
+ "datasets:embeddings:status": {
6579
6777
  "aliases": [],
6580
6778
  "args": {
6581
- "knowledgeBaseId": {
6582
- "description": "Knowledge base ID",
6583
- "name": "knowledgeBaseId",
6584
- "required": true
6585
- },
6586
- "jobId": {
6587
- "description": "Job ID",
6588
- "name": "jobId",
6589
- "required": true
6779
+ "dataset": {
6780
+ "description": "The name of the dataset to check embeddings status for",
6781
+ "name": "dataset",
6782
+ "required": false
6590
6783
  }
6591
6784
  },
6592
- "description": "Get the status of a knowledge base job",
6785
+ "description": "Show embeddings settings and status for a dataset",
6593
6786
  "examples": [
6594
6787
  {
6595
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456",
6596
- "description": "Get the current status of a job"
6597
- },
6598
- {
6599
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456 --watch",
6600
- "description": "Wait for the job to finish (non-zero exit if it does not succeed)"
6788
+ "command": "<%= config.bin %> <%= command.id %> production",
6789
+ "description": "Show embeddings status for the production dataset"
6601
6790
  }
6602
6791
  ],
6603
6792
  "flags": {
6604
- "json": {
6605
- "description": "Output the job in JSON format",
6606
- "name": "json",
6607
- "allowNo": false,
6608
- "type": "boolean"
6609
- },
6610
- "watch": {
6611
- "description": "Poll until the job reaches a terminal state",
6612
- "name": "watch",
6613
- "allowNo": false,
6614
- "type": "boolean"
6793
+ "project-id": {
6794
+ "char": "p",
6795
+ "description": "Project ID to check embeddings status for (overrides CLI configuration)",
6796
+ "helpGroup": "OVERRIDE",
6797
+ "name": "project-id",
6798
+ "hasDynamicHelp": false,
6799
+ "helpValue": "<id>",
6800
+ "multiple": false,
6801
+ "type": "option"
6615
6802
  }
6616
6803
  },
6617
6804
  "hasDynamicHelp": false,
6618
- "hiddenAliases": [],
6619
- "id": "context:jobs:get",
6805
+ "hiddenAliases": [
6806
+ "dataset:embeddings:status"
6807
+ ],
6808
+ "id": "datasets:embeddings:status",
6620
6809
  "pluginAlias": "@sanity/cli",
6621
6810
  "pluginName": "@sanity/cli",
6622
6811
  "pluginType": "core",
@@ -6625,9 +6814,9 @@
6625
6814
  "relativePath": [
6626
6815
  "dist",
6627
6816
  "commands",
6628
- "context",
6629
- "jobs",
6630
- "get.js"
6817
+ "datasets",
6818
+ "embeddings",
6819
+ "status.js"
6631
6820
  ]
6632
6821
  },
6633
6822
  "datasets:alias:create": {
@@ -6879,166 +7068,6 @@
6879
7068
  "unlink.js"
6880
7069
  ]
6881
7070
  },
6882
- "datasets:embeddings:disable": {
6883
- "aliases": [],
6884
- "args": {
6885
- "dataset": {
6886
- "description": "Dataset name to disable embeddings for",
6887
- "name": "dataset",
6888
- "required": false
6889
- }
6890
- },
6891
- "description": "Disable embeddings for a dataset",
6892
- "examples": [
6893
- {
6894
- "command": "<%= config.bin %> <%= command.id %> production",
6895
- "description": "Disable embeddings for the production dataset"
6896
- }
6897
- ],
6898
- "flags": {
6899
- "project-id": {
6900
- "char": "p",
6901
- "description": "Project ID to disable embeddings for (overrides CLI configuration)",
6902
- "helpGroup": "OVERRIDE",
6903
- "name": "project-id",
6904
- "hasDynamicHelp": false,
6905
- "helpValue": "<id>",
6906
- "multiple": false,
6907
- "type": "option"
6908
- }
6909
- },
6910
- "hasDynamicHelp": false,
6911
- "hiddenAliases": [
6912
- "dataset:embeddings:disable"
6913
- ],
6914
- "id": "datasets:embeddings:disable",
6915
- "pluginAlias": "@sanity/cli",
6916
- "pluginName": "@sanity/cli",
6917
- "pluginType": "core",
6918
- "strict": true,
6919
- "isESM": true,
6920
- "relativePath": [
6921
- "dist",
6922
- "commands",
6923
- "datasets",
6924
- "embeddings",
6925
- "disable.js"
6926
- ]
6927
- },
6928
- "datasets:embeddings:enable": {
6929
- "aliases": [],
6930
- "args": {
6931
- "dataset": {
6932
- "description": "Dataset name to enable embeddings for",
6933
- "name": "dataset",
6934
- "required": false
6935
- }
6936
- },
6937
- "description": "Enable embeddings for a dataset",
6938
- "examples": [
6939
- {
6940
- "command": "<%= config.bin %> <%= command.id %> production",
6941
- "description": "Enable embeddings for the production dataset"
6942
- },
6943
- {
6944
- "command": "<%= config.bin %> <%= command.id %> production --projection \"{ title, body }\"",
6945
- "description": "Enable embeddings with a specific projection"
6946
- },
6947
- {
6948
- "command": "<%= config.bin %> <%= command.id %> production --wait",
6949
- "description": "Enable embeddings and wait for processing to complete"
6950
- }
6951
- ],
6952
- "flags": {
6953
- "project-id": {
6954
- "char": "p",
6955
- "description": "Project ID to enable embeddings for (overrides CLI configuration)",
6956
- "helpGroup": "OVERRIDE",
6957
- "name": "project-id",
6958
- "hasDynamicHelp": false,
6959
- "helpValue": "<id>",
6960
- "multiple": false,
6961
- "type": "option"
6962
- },
6963
- "projection": {
6964
- "description": "GROQ projection defining which fields to embed (e.g. \"{ title, body }\")",
6965
- "name": "projection",
6966
- "required": false,
6967
- "hasDynamicHelp": false,
6968
- "multiple": false,
6969
- "type": "option"
6970
- },
6971
- "wait": {
6972
- "description": "Wait for embeddings processing to complete before returning",
6973
- "name": "wait",
6974
- "allowNo": false,
6975
- "type": "boolean"
6976
- }
6977
- },
6978
- "hasDynamicHelp": false,
6979
- "hiddenAliases": [
6980
- "dataset:embeddings:enable"
6981
- ],
6982
- "id": "datasets:embeddings:enable",
6983
- "pluginAlias": "@sanity/cli",
6984
- "pluginName": "@sanity/cli",
6985
- "pluginType": "core",
6986
- "strict": true,
6987
- "isESM": true,
6988
- "relativePath": [
6989
- "dist",
6990
- "commands",
6991
- "datasets",
6992
- "embeddings",
6993
- "enable.js"
6994
- ]
6995
- },
6996
- "datasets:embeddings:status": {
6997
- "aliases": [],
6998
- "args": {
6999
- "dataset": {
7000
- "description": "The name of the dataset to check embeddings status for",
7001
- "name": "dataset",
7002
- "required": false
7003
- }
7004
- },
7005
- "description": "Show embeddings settings and status for a dataset",
7006
- "examples": [
7007
- {
7008
- "command": "<%= config.bin %> <%= command.id %> production",
7009
- "description": "Show embeddings status for the production dataset"
7010
- }
7011
- ],
7012
- "flags": {
7013
- "project-id": {
7014
- "char": "p",
7015
- "description": "Project ID to check embeddings status for (overrides CLI configuration)",
7016
- "helpGroup": "OVERRIDE",
7017
- "name": "project-id",
7018
- "hasDynamicHelp": false,
7019
- "helpValue": "<id>",
7020
- "multiple": false,
7021
- "type": "option"
7022
- }
7023
- },
7024
- "hasDynamicHelp": false,
7025
- "hiddenAliases": [
7026
- "dataset:embeddings:status"
7027
- ],
7028
- "id": "datasets:embeddings:status",
7029
- "pluginAlias": "@sanity/cli",
7030
- "pluginName": "@sanity/cli",
7031
- "pluginType": "core",
7032
- "strict": true,
7033
- "isESM": true,
7034
- "relativePath": [
7035
- "dist",
7036
- "commands",
7037
- "datasets",
7038
- "embeddings",
7039
- "status.js"
7040
- ]
7041
- },
7042
7071
  "datasets:visibility:get": {
7043
7072
  "aliases": [],
7044
7073
  "args": {
@@ -7145,5 +7174,5 @@
7145
7174
  ]
7146
7175
  }
7147
7176
  },
7148
- "version": "8.21.0"
7177
+ "version": "8.22.0"
7149
7178
  }