@sanity/cli 7.8.0 → 7.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +132 -0
  2. package/dist/actions/auth/login/getProvider.js +7 -2
  3. package/dist/actions/auth/login/getProvider.js.map +1 -1
  4. package/dist/actions/dataset/create.js +2 -2
  5. package/dist/actions/dataset/create.js.map +1 -1
  6. package/dist/actions/deploy/createUserApplication.js +8 -5
  7. package/dist/actions/deploy/createUserApplication.js.map +1 -1
  8. package/dist/actions/deploy/deployApp.js +43 -20
  9. package/dist/actions/deploy/deployApp.js.map +1 -1
  10. package/dist/actions/deploy/deployChecks.js +9 -8
  11. package/dist/actions/deploy/deployChecks.js.map +1 -1
  12. package/dist/actions/deploy/deployStudio.js +12 -9
  13. package/dist/actions/deploy/deployStudio.js.map +1 -1
  14. package/dist/actions/deploy/resolveDeployTarget.js +3 -2
  15. package/dist/actions/deploy/resolveDeployTarget.js.map +1 -1
  16. package/dist/actions/deploy/urlUtils.js +0 -4
  17. package/dist/actions/deploy/urlUtils.js.map +1 -1
  18. package/dist/actions/documents/types.js.map +1 -1
  19. package/dist/actions/documents/validate.js +2 -1
  20. package/dist/actions/documents/validate.js.map +1 -1
  21. package/dist/actions/manifest/extractCoreAppManifest.js +6 -1
  22. package/dist/actions/manifest/extractCoreAppManifest.js.map +1 -1
  23. package/dist/actions/organizations/getOrganization.js +7 -3
  24. package/dist/actions/organizations/getOrganization.js.map +1 -1
  25. package/dist/actions/organizations/validateOrganizationSlug.js +20 -0
  26. package/dist/actions/organizations/validateOrganizationSlug.js.map +1 -0
  27. package/dist/actions/undeploy/adapters.js +3 -3
  28. package/dist/actions/undeploy/adapters.js.map +1 -1
  29. package/dist/actions/undeploy/runUndeploy.js +20 -6
  30. package/dist/actions/undeploy/runUndeploy.js.map +1 -1
  31. package/dist/actions/undeploy/undeployPlan.js +18 -3
  32. package/dist/actions/undeploy/undeployPlan.js.map +1 -1
  33. package/dist/commands/documents/validate.js +18 -17
  34. package/dist/commands/documents/validate.js.map +1 -1
  35. package/dist/commands/hooks/create.js +4 -0
  36. package/dist/commands/hooks/create.js.map +1 -1
  37. package/dist/commands/hooks/delete.js +5 -0
  38. package/dist/commands/hooks/delete.js.map +1 -1
  39. package/dist/commands/hooks/logs.js +5 -0
  40. package/dist/commands/hooks/logs.js.map +1 -1
  41. package/dist/commands/install.js +1 -1
  42. package/dist/commands/install.js.map +1 -1
  43. package/dist/commands/organizations/create.js +79 -0
  44. package/dist/commands/organizations/create.js.map +1 -0
  45. package/dist/commands/organizations/delete.js +100 -0
  46. package/dist/commands/organizations/delete.js.map +1 -0
  47. package/dist/commands/organizations/get.js +48 -0
  48. package/dist/commands/organizations/get.js.map +1 -0
  49. package/dist/commands/organizations/list.js +60 -0
  50. package/dist/commands/organizations/list.js.map +1 -0
  51. package/dist/commands/organizations/update.js +115 -0
  52. package/dist/commands/organizations/update.js.map +1 -0
  53. package/dist/commands/projects/create.js +2 -1
  54. package/dist/commands/projects/create.js.map +1 -1
  55. package/dist/commands/undeploy.js +13 -1
  56. package/dist/commands/undeploy.js.map +1 -1
  57. package/dist/prompts/promptForOrganizationName.js +2 -1
  58. package/dist/prompts/promptForOrganizationName.js.map +1 -1
  59. package/dist/server/devServer.js.map +1 -1
  60. package/dist/services/organizations.js +45 -2
  61. package/dist/services/organizations.js.map +1 -1
  62. package/dist/services/userApplications.js.map +1 -1
  63. package/dist/topicAliases.js +7 -0
  64. package/dist/topicAliases.js.map +1 -1
  65. package/dist/util/organizationAliases.js +12 -0
  66. package/dist/util/organizationAliases.js.map +1 -0
  67. package/oclif.config.js +1 -0
  68. package/oclif.manifest.json +1342 -1094
  69. package/package.json +27 -27
@@ -1500,166 +1500,63 @@
1500
1500
  "list.js"
1501
1501
  ]
1502
1502
  },
1503
- "docs:browse": {
1504
- "aliases": [],
1505
- "args": {},
1506
- "description": "Open Sanity docs in your browser",
1507
- "flags": {},
1508
- "hasDynamicHelp": false,
1509
- "hiddenAliases": [],
1510
- "id": "docs:browse",
1511
- "pluginAlias": "@sanity/cli",
1512
- "pluginName": "@sanity/cli",
1513
- "pluginType": "core",
1514
- "strict": true,
1515
- "enableJsonFlag": false,
1516
- "isESM": true,
1517
- "relativePath": [
1518
- "dist",
1519
- "commands",
1520
- "docs",
1521
- "browse.js"
1522
- ]
1523
- },
1524
- "docs:read": {
1503
+ "datasets:copy": {
1525
1504
  "aliases": [],
1526
1505
  "args": {
1527
- "path": {
1528
- "description": "Path or URL to article, found in search results and docs content as links",
1529
- "name": "path",
1530
- "required": true
1506
+ "source": {
1507
+ "description": "Name of the dataset to copy from",
1508
+ "name": "source",
1509
+ "required": false
1510
+ },
1511
+ "target": {
1512
+ "description": "Name of the dataset to copy to",
1513
+ "name": "target",
1514
+ "required": false
1531
1515
  }
1532
1516
  },
1533
- "description": "Read an article in terminal",
1517
+ "description": "Copy a dataset or manage copy jobs",
1534
1518
  "examples": [
1535
1519
  {
1536
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
1537
- "description": "Read as markdown in terminal"
1538
- },
1539
- {
1540
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
1541
- "description": "Read using full URL"
1520
+ "command": "<%= config.bin %> <%= command.id %>",
1521
+ "description": "Interactively copy a dataset"
1542
1522
  },
1543
1523
  {
1544
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
1545
- "description": "Open in web browser"
1524
+ "command": "<%= config.bin %> <%= command.id %> source-dataset",
1525
+ "description": "Copy from source-dataset (prompts for target)"
1546
1526
  },
1547
1527
  {
1548
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
1549
- "description": "Open using full URL in web browser"
1550
- }
1551
- ],
1552
- "flags": {
1553
- "web": {
1554
- "aliases": [
1555
- "w"
1556
- ],
1557
- "description": "Open in a web browser",
1558
- "name": "web",
1559
- "allowNo": false,
1560
- "type": "boolean"
1561
- }
1562
- },
1563
- "hasDynamicHelp": false,
1564
- "hiddenAliases": [],
1565
- "id": "docs:read",
1566
- "pluginAlias": "@sanity/cli",
1567
- "pluginName": "@sanity/cli",
1568
- "pluginType": "core",
1569
- "strict": true,
1570
- "isESM": true,
1571
- "relativePath": [
1572
- "dist",
1573
- "commands",
1574
- "docs",
1575
- "read.js"
1576
- ]
1577
- },
1578
- "docs:search": {
1579
- "aliases": [],
1580
- "args": {
1581
- "query": {
1582
- "description": "Search query for documentation",
1583
- "name": "query",
1584
- "required": true
1585
- }
1586
- },
1587
- "description": "Search Sanity docs",
1588
- "examples": [
1589
- {
1590
- "command": "<%= config.bin %> <%= command.id %> schema",
1591
- "description": "Search for documentation about schemas"
1528
+ "command": "<%= config.bin %> <%= command.id %> source-dataset target-dataset",
1529
+ "description": "Copy from source-dataset to target-dataset"
1592
1530
  },
1593
1531
  {
1594
- "command": "<%= config.bin %> <%= command.id %> \"groq functions\"",
1595
- "description": "Search with phrase"
1532
+ "command": "<%= config.bin %> <%= command.id %> --skip-history source target",
1533
+ "description": "Copy without preserving document history (faster for large datasets)"
1596
1534
  },
1597
1535
  {
1598
- "command": "<%= config.bin %> <%= command.id %> \"deployment\" --limit=5",
1599
- "description": "Limit search results"
1600
- }
1601
- ],
1602
- "flags": {
1603
- "limit": {
1604
- "description": "Maximum number of results to return",
1605
- "name": "limit",
1606
- "default": 10,
1607
- "hasDynamicHelp": false,
1608
- "multiple": false,
1609
- "type": "option"
1610
- }
1611
- },
1612
- "hasDynamicHelp": false,
1613
- "hiddenAliases": [],
1614
- "id": "docs:search",
1615
- "pluginAlias": "@sanity/cli",
1616
- "pluginName": "@sanity/cli",
1617
- "pluginType": "core",
1618
- "strict": true,
1619
- "isESM": true,
1620
- "relativePath": [
1621
- "dist",
1622
- "commands",
1623
- "docs",
1624
- "search.js"
1625
- ]
1626
- },
1627
- "documents:create": {
1628
- "aliases": [],
1629
- "args": {
1630
- "file": {
1631
- "description": "JSON file to create document(s) from",
1632
- "name": "file",
1633
- "required": false
1634
- }
1635
- },
1636
- "description": "Create one or more documents",
1637
- "examples": [
1638
- {
1639
- "command": "<%= config.bin %> <%= command.id %> myDocument.json",
1640
- "description": "Create the document specified in \"myDocument.json\""
1536
+ "command": "<%= config.bin %> <%= command.id %> --skip-content-releases source target",
1537
+ "description": "Copy without content release documents"
1641
1538
  },
1642
1539
  {
1643
- "command": "<%= config.bin %> <%= command.id %>",
1644
- "description": "Open configured $EDITOR and create the specified document(s)"
1540
+ "command": "<%= config.bin %> <%= command.id %> --detach source target",
1541
+ "description": "Start copy job without waiting for completion"
1645
1542
  },
1646
1543
  {
1647
- "command": "<%= config.bin %> <%= command.id %> --id myDocId --replace",
1648
- "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"
1544
+ "command": "<%= config.bin %> <%= command.id %> --attach <job-id>",
1545
+ "description": "Attach to a running copy job to follow progress"
1649
1546
  },
1650
1547
  {
1651
- "command": "<%= config.bin %> <%= command.id %> --id myDocId --watch --replace --json5",
1652
- "description": "Open configured $EDITOR and replace the document with the given content on each save. Use JSON5 file extension and parser for simplified syntax."
1548
+ "command": "<%= config.bin %> <%= command.id %> --list",
1549
+ "description": "List all dataset copy jobs"
1653
1550
  },
1654
1551
  {
1655
- "command": "<%= config.bin %> <%= command.id %> myDocument.json --project-id abc123",
1656
- "description": "Create documents in a specific project"
1552
+ "command": "<%= config.bin %> <%= command.id %> --list --offset 2 --limit 10",
1553
+ "description": "List copy jobs with pagination"
1657
1554
  }
1658
1555
  ],
1659
1556
  "flags": {
1660
1557
  "project-id": {
1661
1558
  "char": "p",
1662
- "description": "Project ID to create document(s) in (overrides CLI configuration)",
1559
+ "description": "Project ID to copy dataset in (overrides CLI configuration)",
1663
1560
  "helpGroup": "OVERRIDE",
1664
1561
  "name": "project-id",
1665
1562
  "hasDynamicHelp": false,
@@ -1667,53 +1564,92 @@
1667
1564
  "multiple": false,
1668
1565
  "type": "option"
1669
1566
  },
1670
- "dataset": {
1671
- "char": "d",
1672
- "description": "Dataset to create document(s) in (overrides CLI configuration)",
1673
- "helpGroup": "OVERRIDE",
1674
- "name": "dataset",
1567
+ "attach": {
1568
+ "description": "Attach to the running copy process to show progress",
1569
+ "exclusive": [
1570
+ "list",
1571
+ "detach",
1572
+ "skip-history"
1573
+ ],
1574
+ "name": "attach",
1575
+ "required": false,
1675
1576
  "hasDynamicHelp": false,
1676
- "helpValue": "<name>",
1677
1577
  "multiple": false,
1678
1578
  "type": "option"
1679
1579
  },
1680
- "id": {
1681
- "description": "Specify a document ID to use. Will fetch remote document ID and populate editor.",
1682
- "name": "id",
1580
+ "detach": {
1581
+ "description": "Start the copy without waiting for it to finish",
1582
+ "exclusive": [
1583
+ "list",
1584
+ "attach"
1585
+ ],
1586
+ "name": "detach",
1587
+ "required": false,
1588
+ "allowNo": false,
1589
+ "type": "boolean"
1590
+ },
1591
+ "limit": {
1592
+ "dependsOn": [
1593
+ "list"
1594
+ ],
1595
+ "description": "Maximum number of jobs returned (default 10, max 1000)",
1596
+ "name": "limit",
1597
+ "required": false,
1683
1598
  "hasDynamicHelp": false,
1684
1599
  "multiple": false,
1685
1600
  "type": "option"
1686
1601
  },
1687
- "json5": {
1688
- "description": "Use JSON5 file type to allow a \"simplified\" version of JSON",
1689
- "name": "json5",
1602
+ "list": {
1603
+ "description": "Lists all dataset copy jobs",
1604
+ "exclusive": [
1605
+ "attach",
1606
+ "detach",
1607
+ "skip-history"
1608
+ ],
1609
+ "name": "list",
1610
+ "required": false,
1690
1611
  "allowNo": false,
1691
1612
  "type": "boolean"
1692
1613
  },
1693
- "missing": {
1694
- "description": "On duplicate document IDs, don't modify the target document(s)",
1695
- "name": "missing",
1696
- "allowNo": false,
1697
- "type": "boolean"
1614
+ "offset": {
1615
+ "dependsOn": [
1616
+ "list"
1617
+ ],
1618
+ "description": "Start position in the list of jobs (default 0)",
1619
+ "name": "offset",
1620
+ "required": false,
1621
+ "hasDynamicHelp": false,
1622
+ "multiple": false,
1623
+ "type": "option"
1698
1624
  },
1699
- "replace": {
1700
- "description": "On duplicate document IDs, replace existing document with specified document(s)",
1701
- "name": "replace",
1625
+ "skip-content-releases": {
1626
+ "description": "Don't copy content release documents to the target dataset",
1627
+ "exclusive": [
1628
+ "list",
1629
+ "attach"
1630
+ ],
1631
+ "name": "skip-content-releases",
1632
+ "required": false,
1702
1633
  "allowNo": false,
1703
1634
  "type": "boolean"
1704
1635
  },
1705
- "watch": {
1706
- "description": "Write the documents whenever the target file or buffer changes",
1707
- "name": "watch",
1636
+ "skip-history": {
1637
+ "description": "Don't preserve document history on copy",
1638
+ "exclusive": [
1639
+ "list",
1640
+ "attach"
1641
+ ],
1642
+ "name": "skip-history",
1643
+ "required": false,
1708
1644
  "allowNo": false,
1709
1645
  "type": "boolean"
1710
1646
  }
1711
1647
  },
1712
1648
  "hasDynamicHelp": false,
1713
1649
  "hiddenAliases": [
1714
- "document:create"
1650
+ "dataset:copy"
1715
1651
  ],
1716
- "id": "documents:create",
1652
+ "id": "datasets:copy",
1717
1653
  "pluginAlias": "@sanity/cli",
1718
1654
  "pluginName": "@sanity/cli",
1719
1655
  "pluginType": "core",
@@ -1722,51 +1658,38 @@
1722
1658
  "relativePath": [
1723
1659
  "dist",
1724
1660
  "commands",
1725
- "documents",
1726
- "create.js"
1661
+ "datasets",
1662
+ "copy.js"
1727
1663
  ]
1728
1664
  },
1729
- "documents:delete": {
1665
+ "datasets:create": {
1730
1666
  "aliases": [],
1731
1667
  "args": {
1732
- "id": {
1733
- "description": "Document ID to delete",
1734
- "name": "id",
1735
- "required": true
1736
- },
1737
- "ids": {
1738
- "description": "Additional document IDs to delete",
1739
- "name": "ids",
1668
+ "name": {
1669
+ "description": "Name of the dataset to create",
1670
+ "name": "name",
1740
1671
  "required": false
1741
1672
  }
1742
1673
  },
1743
- "description": "Delete one or more documents from the project's configured dataset",
1674
+ "description": "Create a new dataset for the project",
1744
1675
  "examples": [
1745
1676
  {
1746
- "command": "<%= config.bin %> <%= command.id %> myDocId",
1747
- "description": "Delete the document with the ID \"myDocId\""
1748
- },
1749
- {
1750
- "command": "<%= config.bin %> <%= command.id %> 'myDocId'",
1751
- "description": "ID wrapped in double or single quote works equally well"
1752
- },
1753
- {
1754
- "command": "<%= config.bin %> <%= command.id %> --dataset=blog someDocId",
1755
- "description": "Delete document with ID \"someDocId\" from dataset \"blog\""
1677
+ "command": "<%= config.bin %> <%= command.id %>",
1678
+ "description": "Interactively create a dataset"
1756
1679
  },
1757
1680
  {
1758
- "command": "<%= config.bin %> <%= command.id %> doc1 doc2",
1759
- "description": "Delete the document with ID \"doc1\" and \"doc2\""
1681
+ "command": "<%= config.bin %> <%= command.id %> my-dataset",
1682
+ "description": "Create a dataset named \"my-dataset\""
1760
1683
  },
1761
1684
  {
1762
- "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
1763
- "description": "Delete a document from a specific project"
1685
+ "command": "<%= config.bin %> <%= command.id %> my-dataset --visibility private",
1686
+ "description": "Create a private dataset named \"my-dataset\""
1764
1687
  }
1765
1688
  ],
1766
1689
  "flags": {
1767
1690
  "project-id": {
1768
1691
  "char": "p",
1769
- "description": "Project ID to delete from (overrides CLI configuration)",
1692
+ "description": "Project ID to create dataset in (overrides CLI configuration)",
1770
1693
  "helpGroup": "OVERRIDE",
1771
1694
  "name": "project-id",
1772
1695
  "hasDynamicHelp": false,
@@ -1774,66 +1697,77 @@
1774
1697
  "multiple": false,
1775
1698
  "type": "option"
1776
1699
  },
1777
- "dataset": {
1778
- "char": "d",
1779
- "description": "Dataset to delete from (overrides CLI configuration)",
1780
- "helpGroup": "OVERRIDE",
1781
- "name": "dataset",
1700
+ "embeddings": {
1701
+ "description": "Enable embeddings for this dataset",
1702
+ "name": "embeddings",
1703
+ "allowNo": false,
1704
+ "type": "boolean"
1705
+ },
1706
+ "embeddings-projection": {
1707
+ "dependsOn": [
1708
+ "embeddings"
1709
+ ],
1710
+ "description": "GROQ projection for embeddings indexing (e.g. \"{ title, body }\")",
1711
+ "name": "embeddings-projection",
1712
+ "hasDynamicHelp": false,
1713
+ "multiple": false,
1714
+ "type": "option"
1715
+ },
1716
+ "visibility": {
1717
+ "description": "Set visibility for this dataset (custom/private/public)",
1718
+ "name": "visibility",
1719
+ "required": false,
1782
1720
  "hasDynamicHelp": false,
1783
- "helpValue": "<name>",
1784
1721
  "multiple": false,
1722
+ "options": [
1723
+ "custom",
1724
+ "private",
1725
+ "public"
1726
+ ],
1785
1727
  "type": "option"
1786
1728
  }
1787
1729
  },
1788
1730
  "hasDynamicHelp": false,
1789
1731
  "hiddenAliases": [
1790
- "document:delete"
1732
+ "dataset:create"
1791
1733
  ],
1792
- "id": "documents:delete",
1734
+ "id": "datasets:create",
1793
1735
  "pluginAlias": "@sanity/cli",
1794
1736
  "pluginName": "@sanity/cli",
1795
1737
  "pluginType": "core",
1796
- "strict": false,
1738
+ "strict": true,
1797
1739
  "isESM": true,
1798
1740
  "relativePath": [
1799
1741
  "dist",
1800
1742
  "commands",
1801
- "documents",
1802
- "delete.js"
1743
+ "datasets",
1744
+ "create.js"
1803
1745
  ]
1804
1746
  },
1805
- "documents:get": {
1747
+ "datasets:delete": {
1806
1748
  "aliases": [],
1807
1749
  "args": {
1808
- "documentId": {
1809
- "description": "Document ID to retrieve",
1810
- "name": "documentId",
1750
+ "datasetName": {
1751
+ "description": "Dataset name to delete",
1752
+ "name": "datasetName",
1811
1753
  "required": true
1812
1754
  }
1813
1755
  },
1814
- "description": "Get and print a document by ID",
1756
+ "description": "Delete a dataset from the project",
1815
1757
  "examples": [
1816
1758
  {
1817
- "command": "<%= config.bin %> <%= command.id %> myDocId",
1818
- "description": "Get the document with ID \"myDocId\""
1819
- },
1820
- {
1821
- "command": "<%= config.bin %> <%= command.id %> myDocId --pretty",
1822
- "description": "Get document with colorized JSON output"
1823
- },
1824
- {
1825
- "command": "<%= config.bin %> <%= command.id %> myDocId --dataset production",
1826
- "description": "Get document from a specific dataset"
1759
+ "command": "<%= config.bin %> <%= command.id %> my-dataset",
1760
+ "description": "Delete a specific dataset"
1827
1761
  },
1828
1762
  {
1829
- "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
1830
- "description": "Get a document from a specific project"
1763
+ "command": "<%= config.bin %> <%= command.id %> my-dataset --force",
1764
+ "description": "Delete a specific dataset without confirmation"
1831
1765
  }
1832
1766
  ],
1833
1767
  "flags": {
1834
1768
  "project-id": {
1835
1769
  "char": "p",
1836
- "description": "Project ID to get document from (overrides CLI configuration)",
1770
+ "description": "Project ID to delete dataset from (overrides CLI configuration)",
1837
1771
  "helpGroup": "OVERRIDE",
1838
1772
  "name": "project-id",
1839
1773
  "hasDynamicHelp": false,
@@ -1841,28 +1775,19 @@
1841
1775
  "multiple": false,
1842
1776
  "type": "option"
1843
1777
  },
1844
- "dataset": {
1845
- "char": "d",
1846
- "description": "Dataset to get document from (overrides CLI configuration)",
1847
- "helpGroup": "OVERRIDE",
1848
- "name": "dataset",
1849
- "hasDynamicHelp": false,
1850
- "helpValue": "<name>",
1851
- "multiple": false,
1852
- "type": "option"
1853
- },
1854
- "pretty": {
1855
- "description": "Colorize JSON output",
1856
- "name": "pretty",
1778
+ "force": {
1779
+ "description": "Do not prompt for delete confirmation - forcefully delete",
1780
+ "name": "force",
1781
+ "required": false,
1857
1782
  "allowNo": false,
1858
1783
  "type": "boolean"
1859
1784
  }
1860
1785
  },
1861
1786
  "hasDynamicHelp": false,
1862
1787
  "hiddenAliases": [
1863
- "document:get"
1788
+ "dataset:delete"
1864
1789
  ],
1865
- "id": "documents:get",
1790
+ "id": "datasets:delete",
1866
1791
  "pluginAlias": "@sanity/cli",
1867
1792
  "pluginName": "@sanity/cli",
1868
1793
  "pluginType": "core",
@@ -1871,42 +1796,49 @@
1871
1796
  "relativePath": [
1872
1797
  "dist",
1873
1798
  "commands",
1874
- "documents",
1875
- "get.js"
1799
+ "datasets",
1800
+ "delete.js"
1876
1801
  ]
1877
1802
  },
1878
- "documents:query": {
1803
+ "datasets:export": {
1879
1804
  "aliases": [],
1880
1805
  "args": {
1881
- "query": {
1882
- "description": "GROQ query to run against the dataset",
1883
- "name": "query",
1884
- "required": true
1806
+ "name": {
1807
+ "description": "Name of the dataset to export",
1808
+ "name": "name"
1809
+ },
1810
+ "destination": {
1811
+ "description": "Output destination file path",
1812
+ "name": "destination"
1885
1813
  }
1886
1814
  },
1887
- "description": "Query for documents",
1815
+ "description": "Export a dataset to a local gzipped tarball. Assets returning 401, 403, or 404 are excluded from the export.",
1888
1816
  "examples": [
1889
1817
  {
1890
- "command": "<%= config.bin %> <%= command.id %> '*[_type == \"movie\"][0..4]'",
1891
- "description": "Fetch 5 documents of type \"movie\""
1818
+ "command": "<%= config.bin %> <%= command.id %> moviedb localPath.tar.gz",
1819
+ "description": "Export dataset \"moviedb\" to localPath.tar.gz"
1892
1820
  },
1893
1821
  {
1894
- "command": "<%= config.bin %> <%= command.id %> '*[_type == \"movie\"]|order(releaseDate asc)[0]{title}' --dataset staging",
1895
- "description": "Fetch title of the oldest movie in the dataset named \"staging\""
1822
+ "command": "<%= config.bin %> <%= command.id %> moviedb assetless.tar.gz --no-assets",
1823
+ "description": "Export dataset without assets"
1896
1824
  },
1897
1825
  {
1898
- "command": "<%= config.bin %> <%= command.id %> '*[_id == \"header\"] { \"headerText\": pt::text(body) }' --api-version v2021-06-07",
1899
- "description": "Use API version v2021-06-07 and do a query"
1826
+ "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --raw",
1827
+ "description": "Export raw documents without asset reference rewriting"
1900
1828
  },
1901
1829
  {
1902
- "command": "<%= config.bin %> <%= command.id %> '*[_type == \"post\"]' --project-id abc123 --dataset production",
1903
- "description": "Query documents in a specific project and dataset"
1830
+ "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --types products,shops",
1831
+ "description": "Export specific document types"
1832
+ },
1833
+ {
1834
+ "command": "<%= config.bin %> <%= command.id %> moviedb moviedb.tar.gz --no-strict-asset-verification",
1835
+ "description": "Export dataset without aborting on asset verification failures"
1904
1836
  }
1905
1837
  ],
1906
1838
  "flags": {
1907
1839
  "project-id": {
1908
1840
  "char": "p",
1909
- "description": "Project ID to query (overrides CLI configuration)",
1841
+ "description": "Project ID to export dataset from (overrides CLI configuration)",
1910
1842
  "helpGroup": "OVERRIDE",
1911
1843
  "name": "project-id",
1912
1844
  "hasDynamicHelp": false,
@@ -1914,43 +1846,65 @@
1914
1846
  "multiple": false,
1915
1847
  "type": "option"
1916
1848
  },
1917
- "dataset": {
1918
- "char": "d",
1919
- "description": "Dataset to query (overrides CLI configuration)",
1920
- "helpGroup": "OVERRIDE",
1921
- "name": "dataset",
1849
+ "asset-concurrency": {
1850
+ "description": "Concurrent number of asset downloads",
1851
+ "name": "asset-concurrency",
1852
+ "default": 8,
1922
1853
  "hasDynamicHelp": false,
1923
- "helpValue": "<name>",
1924
1854
  "multiple": false,
1925
1855
  "type": "option"
1926
1856
  },
1927
- "anonymous": {
1928
- "description": "Send the query without any authorization token",
1929
- "name": "anonymous",
1930
- "allowNo": false,
1931
- "type": "boolean"
1932
- },
1933
- "api-version": {
1934
- "description": "API version to use (defaults to 2025-08-15)",
1935
- "env": "SANITY_CLI_QUERY_API_VERSION",
1936
- "name": "api-version",
1857
+ "mode": {
1858
+ "description": "Export mode ('cursor' is faster for large datasets but may miss concurrent changes)",
1859
+ "name": "mode",
1860
+ "default": "stream",
1937
1861
  "hasDynamicHelp": false,
1938
1862
  "multiple": false,
1863
+ "options": [
1864
+ "stream",
1865
+ "cursor"
1866
+ ],
1939
1867
  "type": "option"
1940
1868
  },
1941
- "pretty": {
1942
- "description": "Colorize JSON output",
1943
- "name": "pretty",
1869
+ "no-assets": {
1870
+ "description": "Export only non-asset documents and remove references to image assets",
1871
+ "name": "no-assets",
1944
1872
  "allowNo": false,
1945
1873
  "type": "boolean"
1946
1874
  },
1947
- "project": {
1948
- "deprecated": {
1949
- "to": "project-id"
1950
- },
1951
- "description": "Project ID to query",
1952
- "hidden": true,
1953
- "name": "project",
1875
+ "no-compress": {
1876
+ "description": "Skips compressing tarball entries (still generates a gzip file)",
1877
+ "name": "no-compress",
1878
+ "allowNo": false,
1879
+ "type": "boolean"
1880
+ },
1881
+ "no-drafts": {
1882
+ "description": "Export only published versions of documents",
1883
+ "name": "no-drafts",
1884
+ "allowNo": false,
1885
+ "type": "boolean"
1886
+ },
1887
+ "no-strict-asset-verification": {
1888
+ "description": "Do not abort the export when an asset fails hash or content-length verification",
1889
+ "name": "no-strict-asset-verification",
1890
+ "allowNo": false,
1891
+ "type": "boolean"
1892
+ },
1893
+ "overwrite": {
1894
+ "description": "Overwrite any file with the same name",
1895
+ "name": "overwrite",
1896
+ "allowNo": false,
1897
+ "type": "boolean"
1898
+ },
1899
+ "raw": {
1900
+ "description": "Extract only documents, without rewriting asset references",
1901
+ "name": "raw",
1902
+ "allowNo": false,
1903
+ "type": "boolean"
1904
+ },
1905
+ "types": {
1906
+ "description": "Defines which document types to export (comma-separated)",
1907
+ "name": "types",
1954
1908
  "hasDynamicHelp": false,
1955
1909
  "multiple": false,
1956
1910
  "type": "option"
@@ -1958,9 +1912,9 @@
1958
1912
  },
1959
1913
  "hasDynamicHelp": false,
1960
1914
  "hiddenAliases": [
1961
- "document:query"
1915
+ "dataset:export"
1962
1916
  ],
1963
- "id": "documents:query",
1917
+ "id": "datasets:export",
1964
1918
  "pluginAlias": "@sanity/cli",
1965
1919
  "pluginName": "@sanity/cli",
1966
1920
  "pluginType": "core",
@@ -1969,118 +1923,151 @@
1969
1923
  "relativePath": [
1970
1924
  "dist",
1971
1925
  "commands",
1972
- "documents",
1973
- "query.js"
1926
+ "datasets",
1927
+ "export.js"
1974
1928
  ]
1975
1929
  },
1976
- "documents:validate": {
1930
+ "datasets:import": {
1977
1931
  "aliases": [],
1978
- "args": {},
1979
- "description": "Validate documents in a dataset against the studio schema",
1980
- "examples": [
1981
- {
1982
- "command": "<%= config.bin %> <%= command.id %> --workspace default",
1983
- "description": "Validates all documents in a Sanity project with more than one workspace"
1932
+ "args": {
1933
+ "source": {
1934
+ "description": "Source file (use \"-\" for stdin)",
1935
+ "name": "source",
1936
+ "required": true
1984
1937
  },
1938
+ "targetDataset": {
1939
+ "description": "Target dataset (prefer --dataset flag instead)",
1940
+ "name": "targetDataset",
1941
+ "required": false
1942
+ }
1943
+ },
1944
+ "description": "Import documents to a Sanity dataset",
1945
+ "examples": [
1985
1946
  {
1986
- "command": "<%= config.bin %> <%= command.id %> --workspace default --dataset staging",
1987
- "description": "Override the dataset specified in the workspace"
1947
+ "command": "<%= config.bin %> <%= command.id %> -d staging my-dataset.ndjson",
1948
+ "description": "Import \"./my-dataset.ndjson\" into dataset \"staging\""
1988
1949
  },
1989
1950
  {
1990
- "command": "<%= config.bin %> <%= command.id %> --yes > report.txt",
1991
- "description": "Save the results of the report into a file"
1951
+ "command": "cat my-dataset.ndjson | <%= config.bin %> <%= command.id %> -d test -",
1952
+ "description": "Import into dataset \"test\" from stdin"
1992
1953
  },
1993
1954
  {
1994
- "command": "<%= config.bin %> <%= command.id %> --level info",
1995
- "description": "Report out info level validation markers too"
1955
+ "command": "<%= config.bin %> <%= command.id %> -p projectId -d staging my-dataset.ndjson",
1956
+ "description": "Import with explicit project ID (overrides CLI configuration)"
1996
1957
  },
1997
1958
  {
1998
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
1999
- "description": "Validate documents in a specific project and dataset"
1959
+ "command": "<%= config.bin %> <%= command.id %> -d staging -t someSecretToken my-dataset.ndjson",
1960
+ "description": "Import with an explicit token (e.g. for CI/CD)"
2000
1961
  }
2001
1962
  ],
2002
1963
  "flags": {
2003
- "project-id": {
2004
- "char": "p",
2005
- "description": "Override the project ID used. By default, this is derived from the given workspace",
2006
- "name": "project-id",
1964
+ "allow-assets-in-different-dataset": {
1965
+ "description": "Allow asset documents to reference different project/dataset",
1966
+ "name": "allow-assets-in-different-dataset",
1967
+ "allowNo": false,
1968
+ "type": "boolean"
1969
+ },
1970
+ "allow-failing-assets": {
1971
+ "description": "Skip assets that cannot be fetched/uploaded",
1972
+ "name": "allow-failing-assets",
1973
+ "allowNo": false,
1974
+ "type": "boolean"
1975
+ },
1976
+ "allow-replacement-characters": {
1977
+ "description": "Allow unicode replacement characters in imported documents",
1978
+ "name": "allow-replacement-characters",
1979
+ "allowNo": false,
1980
+ "type": "boolean"
1981
+ },
1982
+ "allow-system-documents": {
1983
+ "description": "Imports system documents",
1984
+ "name": "allow-system-documents",
1985
+ "allowNo": false,
1986
+ "type": "boolean"
1987
+ },
1988
+ "asset-concurrency": {
1989
+ "description": "Number of parallel asset imports",
1990
+ "name": "asset-concurrency",
2007
1991
  "hasDynamicHelp": false,
2008
- "helpValue": "<id>",
2009
1992
  "multiple": false,
2010
1993
  "type": "option"
2011
1994
  },
2012
1995
  "dataset": {
2013
1996
  "char": "d",
2014
- "description": "Override the dataset used. By default, this is derived from the given workspace",
1997
+ "description": "Dataset to import to",
2015
1998
  "name": "dataset",
2016
1999
  "hasDynamicHelp": false,
2017
2000
  "helpValue": "<name>",
2018
2001
  "multiple": false,
2019
2002
  "type": "option"
2020
2003
  },
2021
- "file": {
2022
- "description": "Provide a path to either an .ndjson file or a tarball containing an .ndjson file",
2023
- "name": "file",
2004
+ "missing": {
2005
+ "description": "Skip documents that already exist",
2006
+ "exclusive": [
2007
+ "replace"
2008
+ ],
2009
+ "name": "missing",
2010
+ "allowNo": false,
2011
+ "type": "boolean"
2012
+ },
2013
+ "project-id": {
2014
+ "char": "p",
2015
+ "description": "Project ID to import to (overrides CLI configuration)",
2016
+ "helpGroup": "OVERRIDE",
2017
+ "name": "project-id",
2024
2018
  "hasDynamicHelp": false,
2019
+ "helpValue": "<id>",
2025
2020
  "multiple": false,
2026
2021
  "type": "option"
2027
2022
  },
2028
- "format": {
2029
- "description": "The output format used to print the found validation markers and report progress",
2030
- "name": "format",
2023
+ "project": {
2024
+ "deprecated": {
2025
+ "to": "project-id"
2026
+ },
2027
+ "description": "Project ID to import to",
2028
+ "hidden": true,
2029
+ "name": "project",
2031
2030
  "hasDynamicHelp": false,
2032
2031
  "multiple": false,
2033
2032
  "type": "option"
2034
2033
  },
2035
- "level": {
2036
- "description": "The minimum level reported. Defaults to warning",
2037
- "name": "level",
2038
- "default": "warning",
2039
- "hasDynamicHelp": false,
2040
- "multiple": false,
2041
- "options": [
2042
- "error",
2043
- "warning",
2044
- "info"
2034
+ "replace": {
2035
+ "description": "Replace documents with the same IDs",
2036
+ "exclusive": [
2037
+ "missing"
2045
2038
  ],
2046
- "type": "option"
2039
+ "name": "replace",
2040
+ "allowNo": false,
2041
+ "type": "boolean"
2047
2042
  },
2048
- "max-custom-validation-concurrency": {
2049
- "description": "Specify how many custom validators can run concurrently",
2050
- "name": "max-custom-validation-concurrency",
2051
- "default": 5,
2052
- "hasDynamicHelp": false,
2053
- "multiple": false,
2054
- "type": "option"
2043
+ "replace-assets": {
2044
+ "description": "Skip reuse of existing assets",
2045
+ "name": "replace-assets",
2046
+ "allowNo": false,
2047
+ "type": "boolean"
2055
2048
  },
2056
- "max-fetch-concurrency": {
2057
- "description": "Specify how many `client.fetch` requests are allowed to run concurrently",
2058
- "name": "max-fetch-concurrency",
2059
- "default": 25,
2060
- "hasDynamicHelp": false,
2061
- "multiple": false,
2062
- "type": "option"
2049
+ "skip-cross-dataset-references": {
2050
+ "description": "Skips references to other datasets",
2051
+ "name": "skip-cross-dataset-references",
2052
+ "allowNo": false,
2053
+ "type": "boolean"
2063
2054
  },
2064
- "workspace": {
2065
- "description": "The name of the workspace to use when downloading and validating all documents",
2066
- "name": "workspace",
2055
+ "token": {
2056
+ "char": "t",
2057
+ "description": "Token to authenticate with",
2058
+ "env": "SANITY_IMPORT_TOKEN",
2059
+ "name": "token",
2060
+ "required": false,
2067
2061
  "hasDynamicHelp": false,
2068
2062
  "multiple": false,
2069
2063
  "type": "option"
2070
- },
2071
- "yes": {
2072
- "char": "y",
2073
- "description": "Skips the first confirmation prompt",
2074
- "name": "yes",
2075
- "allowNo": false,
2076
- "type": "boolean"
2077
2064
  }
2078
2065
  },
2079
2066
  "hasDynamicHelp": false,
2080
2067
  "hiddenAliases": [
2081
- "document:validate"
2068
+ "dataset:import"
2082
2069
  ],
2083
- "id": "documents:validate",
2070
+ "id": "datasets:import",
2084
2071
  "pluginAlias": "@sanity/cli",
2085
2072
  "pluginName": "@sanity/cli",
2086
2073
  "pluginType": "core",
@@ -2089,102 +2076,41 @@
2089
2076
  "relativePath": [
2090
2077
  "dist",
2091
2078
  "commands",
2092
- "documents",
2093
- "validate.js"
2079
+ "datasets",
2080
+ "import.js"
2094
2081
  ]
2095
2082
  },
2096
- "graphql:deploy": {
2083
+ "datasets:list": {
2097
2084
  "aliases": [],
2098
2085
  "args": {},
2099
- "description": "Deploy a GraphQL API from the current Sanity schema",
2086
+ "description": "List datasets for the project",
2100
2087
  "examples": [
2101
2088
  {
2102
2089
  "command": "<%= config.bin %> <%= command.id %>",
2103
- "description": "Deploy all defined GraphQL APIs"
2104
- },
2105
- {
2106
- "command": "<%= config.bin %> <%= command.id %> --dry-run",
2107
- "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy"
2108
- },
2109
- {
2110
- "command": "<%= config.bin %> <%= command.id %> --api staging --api ios",
2111
- "description": "Deploy only the GraphQL APIs with the IDs \"staging\" and \"ios\""
2090
+ "description": "List datasets for the project"
2112
2091
  },
2113
2092
  {
2114
- "command": "<%= config.bin %> <%= command.id %> --playground",
2115
- "description": "Deploy all defined GraphQL APIs, overriding any playground setting"
2093
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2094
+ "description": "List datasets for a specific project"
2116
2095
  }
2117
2096
  ],
2118
2097
  "flags": {
2119
- "api": {
2120
- "description": "Only deploy API with this ID (can be specified multiple times)",
2121
- "name": "api",
2122
- "hasDynamicHelp": false,
2123
- "multiple": true,
2124
- "type": "option"
2125
- },
2126
- "dataset": {
2127
- "char": "d",
2128
- "description": "Deploy API for the given dataset",
2129
- "name": "dataset",
2130
- "hasDynamicHelp": false,
2131
- "helpValue": "<name>",
2132
- "multiple": false,
2133
- "type": "option"
2134
- },
2135
- "dry-run": {
2136
- "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy",
2137
- "name": "dry-run",
2138
- "allowNo": false,
2139
- "type": "boolean"
2140
- },
2141
- "force": {
2142
- "description": "Deploy API without confirming breaking changes",
2143
- "name": "force",
2144
- "allowNo": false,
2145
- "type": "boolean"
2146
- },
2147
- "generation": {
2148
- "description": "API generation to deploy (defaults to \"gen3\")",
2149
- "name": "generation",
2150
- "hasDynamicHelp": false,
2151
- "multiple": false,
2152
- "options": [
2153
- "gen1",
2154
- "gen2",
2155
- "gen3"
2156
- ],
2157
- "type": "option"
2158
- },
2159
- "non-null-document-fields": {
2160
- "description": "Use non-null document fields (_id, _type etc)",
2161
- "name": "non-null-document-fields",
2162
- "allowNo": false,
2163
- "type": "boolean"
2164
- },
2165
- "playground": {
2166
- "description": "Enable GraphQL playground for easier debugging",
2167
- "name": "playground",
2168
- "allowNo": true,
2169
- "type": "boolean"
2170
- },
2171
- "tag": {
2172
- "description": "Deploy API(s) to given tag (defaults to \"default\")",
2173
- "name": "tag",
2098
+ "project-id": {
2099
+ "char": "p",
2100
+ "description": "Project ID to list datasets for (overrides CLI configuration)",
2101
+ "helpGroup": "OVERRIDE",
2102
+ "name": "project-id",
2174
2103
  "hasDynamicHelp": false,
2104
+ "helpValue": "<id>",
2175
2105
  "multiple": false,
2176
2106
  "type": "option"
2177
- },
2178
- "with-union-cache": {
2179
- "description": "Cache union types (faster for schemas with many self-references)",
2180
- "name": "with-union-cache",
2181
- "allowNo": false,
2182
- "type": "boolean"
2183
2107
  }
2184
2108
  },
2185
2109
  "hasDynamicHelp": false,
2186
- "hiddenAliases": [],
2187
- "id": "graphql:deploy",
2110
+ "hiddenAliases": [
2111
+ "dataset:list"
2112
+ ],
2113
+ "id": "datasets:list",
2188
2114
  "pluginAlias": "@sanity/cli",
2189
2115
  "pluginName": "@sanity/cli",
2190
2116
  "pluginType": "core",
@@ -2193,146 +2119,73 @@
2193
2119
  "relativePath": [
2194
2120
  "dist",
2195
2121
  "commands",
2196
- "graphql",
2197
- "deploy.js"
2122
+ "datasets",
2123
+ "list.js"
2198
2124
  ]
2199
2125
  },
2200
- "graphql:list": {
2126
+ "docs:browse": {
2201
2127
  "aliases": [],
2202
2128
  "args": {},
2203
- "description": "List deployed GraphQL endpoints for the project",
2204
- "examples": [
2205
- {
2206
- "command": "<%= config.bin %> <%= command.id %>",
2207
- "description": "List GraphQL endpoints for the project"
2208
- },
2209
- {
2210
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2211
- "description": "List GraphQL endpoints for a specific project"
2212
- }
2213
- ],
2214
- "flags": {
2215
- "project-id": {
2216
- "char": "p",
2217
- "description": "Project ID to list GraphQL endpoints for (overrides CLI configuration)",
2218
- "helpGroup": "OVERRIDE",
2219
- "name": "project-id",
2220
- "hasDynamicHelp": false,
2221
- "helpValue": "<id>",
2222
- "multiple": false,
2223
- "type": "option"
2224
- }
2225
- },
2129
+ "description": "Open Sanity docs in your browser",
2130
+ "flags": {},
2226
2131
  "hasDynamicHelp": false,
2227
2132
  "hiddenAliases": [],
2228
- "id": "graphql:list",
2133
+ "id": "docs:browse",
2229
2134
  "pluginAlias": "@sanity/cli",
2230
2135
  "pluginName": "@sanity/cli",
2231
2136
  "pluginType": "core",
2232
2137
  "strict": true,
2138
+ "enableJsonFlag": false,
2233
2139
  "isESM": true,
2234
2140
  "relativePath": [
2235
2141
  "dist",
2236
2142
  "commands",
2237
- "graphql",
2238
- "list.js"
2143
+ "docs",
2144
+ "browse.js"
2239
2145
  ]
2240
2146
  },
2241
- "graphql:undeploy": {
2147
+ "docs:read": {
2242
2148
  "aliases": [],
2243
- "args": {},
2244
- "description": "Remove a deployed GraphQL API",
2149
+ "args": {
2150
+ "path": {
2151
+ "description": "Path or URL to article, found in search results and docs content as links",
2152
+ "name": "path",
2153
+ "required": true
2154
+ }
2155
+ },
2156
+ "description": "Read an article in terminal",
2245
2157
  "examples": [
2246
2158
  {
2247
- "command": "<%= config.bin %> <%= command.id %>",
2248
- "description": "Undeploy GraphQL API for current project and dataset"
2249
- },
2250
- {
2251
- "command": "<%= config.bin %> <%= command.id %> --api ios",
2252
- "description": "Undeploy API with ID \"ios\""
2253
- },
2254
- {
2255
- "command": "<%= config.bin %> <%= command.id %> --dataset staging",
2256
- "description": "Undeploy GraphQL API for staging dataset"
2159
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
2160
+ "description": "Read as markdown in terminal"
2257
2161
  },
2258
2162
  {
2259
- "command": "<%= config.bin %> <%= command.id %> --dataset staging --tag next",
2260
- "description": "Undeploy GraphQL API for staging dataset with \"next\" tag"
2163
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
2164
+ "description": "Read using full URL"
2261
2165
  },
2262
2166
  {
2263
- "command": "<%= config.bin %> <%= command.id %> --force",
2264
- "description": "Undeploy GraphQL API without confirmation prompt"
2167
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
2168
+ "description": "Open in web browser"
2265
2169
  },
2266
2170
  {
2267
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
2268
- "description": "Undeploy GraphQL API for a specific project and dataset"
2171
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
2172
+ "description": "Open using full URL in web browser"
2269
2173
  }
2270
2174
  ],
2271
2175
  "flags": {
2272
- "project-id": {
2273
- "char": "p",
2274
- "description": "Project ID to undeploy GraphQL API from (overrides CLI configuration)",
2275
- "helpGroup": "OVERRIDE",
2276
- "name": "project-id",
2277
- "hasDynamicHelp": false,
2278
- "helpValue": "<id>",
2279
- "multiple": false,
2280
- "type": "option"
2281
- },
2282
- "api": {
2283
- "description": "Undeploy API with this ID",
2284
- "exclusive": [
2285
- "project-id",
2286
- "project"
2176
+ "web": {
2177
+ "aliases": [
2178
+ "w"
2287
2179
  ],
2288
- "name": "api",
2289
- "required": false,
2290
- "hasDynamicHelp": false,
2291
- "multiple": false,
2292
- "type": "option"
2293
- },
2294
- "dataset": {
2295
- "char": "d",
2296
- "description": "Dataset to undeploy GraphQL API from (overrides CLI configuration)",
2297
- "helpGroup": "OVERRIDE",
2298
- "name": "dataset",
2299
- "hasDynamicHelp": false,
2300
- "helpValue": "<name>",
2301
- "multiple": false,
2302
- "type": "option"
2303
- },
2304
- "force": {
2305
- "description": "Skip confirmation prompt",
2306
- "name": "force",
2307
- "required": false,
2180
+ "description": "Open in a web browser",
2181
+ "name": "web",
2308
2182
  "allowNo": false,
2309
2183
  "type": "boolean"
2310
- },
2311
- "project": {
2312
- "deprecated": {
2313
- "to": "project-id"
2314
- },
2315
- "description": "Project ID to delete GraphQL API for",
2316
- "hidden": true,
2317
- "name": "project",
2318
- "required": false,
2319
- "hasDynamicHelp": false,
2320
- "multiple": false,
2321
- "type": "option"
2322
- },
2323
- "tag": {
2324
- "description": "Tag to undeploy GraphQL API from",
2325
- "name": "tag",
2326
- "required": false,
2327
- "default": "default",
2328
- "hasDynamicHelp": false,
2329
- "multiple": false,
2330
- "type": "option"
2331
2184
  }
2332
2185
  },
2333
2186
  "hasDynamicHelp": false,
2334
2187
  "hiddenAliases": [],
2335
- "id": "graphql:undeploy",
2188
+ "id": "docs:read",
2336
2189
  "pluginAlias": "@sanity/cli",
2337
2190
  "pluginName": "@sanity/cli",
2338
2191
  "pluginType": "core",
@@ -2341,47 +2194,47 @@
2341
2194
  "relativePath": [
2342
2195
  "dist",
2343
2196
  "commands",
2344
- "graphql",
2345
- "undeploy.js"
2197
+ "docs",
2198
+ "read.js"
2346
2199
  ]
2347
2200
  },
2348
- "hooks:attempt": {
2201
+ "docs:search": {
2349
2202
  "aliases": [],
2350
2203
  "args": {
2351
- "attemptId": {
2352
- "description": "The delivery attempt ID to get details for",
2353
- "name": "attemptId",
2204
+ "query": {
2205
+ "description": "Search query for documentation",
2206
+ "name": "query",
2354
2207
  "required": true
2355
2208
  }
2356
2209
  },
2357
- "description": "Print details of a given webhook delivery attempt",
2210
+ "description": "Search Sanity docs",
2358
2211
  "examples": [
2359
2212
  {
2360
- "command": "<%= config.bin %> <%= command.id %> abc123",
2361
- "description": "Print details of webhook delivery attempt with ID abc123"
2213
+ "command": "<%= config.bin %> <%= command.id %> schema",
2214
+ "description": "Search for documentation about schemas"
2362
2215
  },
2363
2216
  {
2364
- "command": "<%= config.bin %> <%= command.id %> abc123 --project-id projectId",
2365
- "description": "Get attempt details for a specific project"
2217
+ "command": "<%= config.bin %> <%= command.id %> \"groq functions\"",
2218
+ "description": "Search with phrase"
2219
+ },
2220
+ {
2221
+ "command": "<%= config.bin %> <%= command.id %> \"deployment\" --limit=5",
2222
+ "description": "Limit search results"
2366
2223
  }
2367
2224
  ],
2368
2225
  "flags": {
2369
- "project-id": {
2370
- "char": "p",
2371
- "description": "Project ID to view webhook attempt for (overrides CLI configuration)",
2372
- "helpGroup": "OVERRIDE",
2373
- "name": "project-id",
2226
+ "limit": {
2227
+ "description": "Maximum number of results to return",
2228
+ "name": "limit",
2229
+ "default": 10,
2374
2230
  "hasDynamicHelp": false,
2375
- "helpValue": "<id>",
2376
2231
  "multiple": false,
2377
2232
  "type": "option"
2378
2233
  }
2379
2234
  },
2380
2235
  "hasDynamicHelp": false,
2381
- "hiddenAliases": [
2382
- "hook:attempt"
2383
- ],
2384
- "id": "hooks:attempt",
2236
+ "hiddenAliases": [],
2237
+ "id": "docs:search",
2385
2238
  "pluginAlias": "@sanity/cli",
2386
2239
  "pluginName": "@sanity/cli",
2387
2240
  "pluginType": "core",
@@ -2390,41 +2243,100 @@
2390
2243
  "relativePath": [
2391
2244
  "dist",
2392
2245
  "commands",
2393
- "hooks",
2394
- "attempt.js"
2246
+ "docs",
2247
+ "search.js"
2395
2248
  ]
2396
2249
  },
2397
- "hooks:create": {
2250
+ "documents:create": {
2398
2251
  "aliases": [],
2399
- "args": {},
2400
- "description": "Create a new webhook for the project",
2252
+ "args": {
2253
+ "file": {
2254
+ "description": "JSON file to create document(s) from",
2255
+ "name": "file",
2256
+ "required": false
2257
+ }
2258
+ },
2259
+ "description": "Create one or more documents",
2401
2260
  "examples": [
2261
+ {
2262
+ "command": "<%= config.bin %> <%= command.id %> myDocument.json",
2263
+ "description": "Create the document specified in \"myDocument.json\""
2264
+ },
2402
2265
  {
2403
2266
  "command": "<%= config.bin %> <%= command.id %>",
2404
- "description": "Create a new webhook for the project"
2267
+ "description": "Open configured $EDITOR and create the specified document(s)"
2405
2268
  },
2406
2269
  {
2407
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2408
- "description": "Create a webhook for a specific project"
2270
+ "command": "<%= config.bin %> <%= command.id %> --id myDocId --replace",
2271
+ "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"
2272
+ },
2273
+ {
2274
+ "command": "<%= config.bin %> <%= command.id %> --id myDocId --watch --replace --json5",
2275
+ "description": "Open configured $EDITOR and replace the document with the given content on each save. Use JSON5 file extension and parser for simplified syntax."
2276
+ },
2277
+ {
2278
+ "command": "<%= config.bin %> <%= command.id %> myDocument.json --project-id abc123",
2279
+ "description": "Create documents in a specific project"
2409
2280
  }
2410
2281
  ],
2411
2282
  "flags": {
2412
2283
  "project-id": {
2413
2284
  "char": "p",
2414
- "description": "Project ID to create webhook for (overrides CLI configuration)",
2285
+ "description": "Project ID to create document(s) in (overrides CLI configuration)",
2415
2286
  "helpGroup": "OVERRIDE",
2416
2287
  "name": "project-id",
2417
2288
  "hasDynamicHelp": false,
2418
2289
  "helpValue": "<id>",
2419
2290
  "multiple": false,
2420
2291
  "type": "option"
2292
+ },
2293
+ "dataset": {
2294
+ "char": "d",
2295
+ "description": "Dataset to create document(s) in (overrides CLI configuration)",
2296
+ "helpGroup": "OVERRIDE",
2297
+ "name": "dataset",
2298
+ "hasDynamicHelp": false,
2299
+ "helpValue": "<name>",
2300
+ "multiple": false,
2301
+ "type": "option"
2302
+ },
2303
+ "id": {
2304
+ "description": "Specify a document ID to use. Will fetch remote document ID and populate editor.",
2305
+ "name": "id",
2306
+ "hasDynamicHelp": false,
2307
+ "multiple": false,
2308
+ "type": "option"
2309
+ },
2310
+ "json5": {
2311
+ "description": "Use JSON5 file type to allow a \"simplified\" version of JSON",
2312
+ "name": "json5",
2313
+ "allowNo": false,
2314
+ "type": "boolean"
2315
+ },
2316
+ "missing": {
2317
+ "description": "On duplicate document IDs, don't modify the target document(s)",
2318
+ "name": "missing",
2319
+ "allowNo": false,
2320
+ "type": "boolean"
2321
+ },
2322
+ "replace": {
2323
+ "description": "On duplicate document IDs, replace existing document with specified document(s)",
2324
+ "name": "replace",
2325
+ "allowNo": false,
2326
+ "type": "boolean"
2327
+ },
2328
+ "watch": {
2329
+ "description": "Write the documents whenever the target file or buffer changes",
2330
+ "name": "watch",
2331
+ "allowNo": false,
2332
+ "type": "boolean"
2421
2333
  }
2422
2334
  },
2423
2335
  "hasDynamicHelp": false,
2424
2336
  "hiddenAliases": [
2425
- "hook:create"
2337
+ "document:create"
2426
2338
  ],
2427
- "id": "hooks:create",
2339
+ "id": "documents:create",
2428
2340
  "pluginAlias": "@sanity/cli",
2429
2341
  "pluginName": "@sanity/cli",
2430
2342
  "pluginType": "core",
@@ -2433,94 +2345,147 @@
2433
2345
  "relativePath": [
2434
2346
  "dist",
2435
2347
  "commands",
2436
- "hooks",
2348
+ "documents",
2437
2349
  "create.js"
2438
2350
  ]
2439
2351
  },
2440
- "hooks:delete": {
2352
+ "documents:delete": {
2441
2353
  "aliases": [],
2442
2354
  "args": {
2443
- "name": {
2444
- "description": "Name of webhook to delete (will prompt if not provided)",
2445
- "name": "name",
2355
+ "id": {
2356
+ "description": "Document ID to delete",
2357
+ "name": "id",
2358
+ "required": true
2359
+ },
2360
+ "ids": {
2361
+ "description": "Additional document IDs to delete",
2362
+ "name": "ids",
2446
2363
  "required": false
2447
2364
  }
2448
2365
  },
2449
- "description": "Delete a webhook from the project",
2366
+ "description": "Delete one or more documents from the project's configured dataset",
2450
2367
  "examples": [
2451
2368
  {
2452
- "command": "<%= config.bin %> <%= command.id %>",
2453
- "description": "Interactively select and delete a webhook"
2369
+ "command": "<%= config.bin %> <%= command.id %> myDocId",
2370
+ "description": "Delete the document with the ID \"myDocId\""
2454
2371
  },
2455
2372
  {
2456
- "command": "<%= config.bin %> <%= command.id %> my-hook",
2457
- "description": "Delete a specific webhook by name"
2373
+ "command": "<%= config.bin %> <%= command.id %> 'myDocId'",
2374
+ "description": "ID wrapped in double or single quote works equally well"
2458
2375
  },
2459
2376
  {
2460
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2461
- "description": "Delete a webhook from a specific project"
2377
+ "command": "<%= config.bin %> <%= command.id %> --dataset=blog someDocId",
2378
+ "description": "Delete document with ID \"someDocId\" from dataset \"blog\""
2379
+ },
2380
+ {
2381
+ "command": "<%= config.bin %> <%= command.id %> doc1 doc2",
2382
+ "description": "Delete the document with ID \"doc1\" and \"doc2\""
2383
+ },
2384
+ {
2385
+ "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
2386
+ "description": "Delete a document from a specific project"
2462
2387
  }
2463
2388
  ],
2464
2389
  "flags": {
2465
2390
  "project-id": {
2466
2391
  "char": "p",
2467
- "description": "Project ID to delete webhook from (overrides CLI configuration)",
2392
+ "description": "Project ID to delete from (overrides CLI configuration)",
2468
2393
  "helpGroup": "OVERRIDE",
2469
2394
  "name": "project-id",
2470
2395
  "hasDynamicHelp": false,
2471
2396
  "helpValue": "<id>",
2472
2397
  "multiple": false,
2473
2398
  "type": "option"
2399
+ },
2400
+ "dataset": {
2401
+ "char": "d",
2402
+ "description": "Dataset to delete from (overrides CLI configuration)",
2403
+ "helpGroup": "OVERRIDE",
2404
+ "name": "dataset",
2405
+ "hasDynamicHelp": false,
2406
+ "helpValue": "<name>",
2407
+ "multiple": false,
2408
+ "type": "option"
2474
2409
  }
2475
2410
  },
2476
2411
  "hasDynamicHelp": false,
2477
2412
  "hiddenAliases": [
2478
- "hook:delete"
2413
+ "document:delete"
2479
2414
  ],
2480
- "id": "hooks:delete",
2415
+ "id": "documents:delete",
2481
2416
  "pluginAlias": "@sanity/cli",
2482
2417
  "pluginName": "@sanity/cli",
2483
2418
  "pluginType": "core",
2484
- "strict": true,
2419
+ "strict": false,
2485
2420
  "isESM": true,
2486
2421
  "relativePath": [
2487
2422
  "dist",
2488
2423
  "commands",
2489
- "hooks",
2424
+ "documents",
2490
2425
  "delete.js"
2491
2426
  ]
2492
2427
  },
2493
- "hooks:list": {
2428
+ "documents:get": {
2494
2429
  "aliases": [],
2495
- "args": {},
2496
- "description": "List webhooks for the project",
2430
+ "args": {
2431
+ "documentId": {
2432
+ "description": "Document ID to retrieve",
2433
+ "name": "documentId",
2434
+ "required": true
2435
+ }
2436
+ },
2437
+ "description": "Get and print a document by ID",
2497
2438
  "examples": [
2498
2439
  {
2499
- "command": "<%= config.bin %> <%= command.id %>",
2500
- "description": "List webhooks for the project"
2440
+ "command": "<%= config.bin %> <%= command.id %> myDocId",
2441
+ "description": "Get the document with ID \"myDocId\""
2501
2442
  },
2502
2443
  {
2503
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2504
- "description": "List webhooks for a specific project"
2444
+ "command": "<%= config.bin %> <%= command.id %> myDocId --pretty",
2445
+ "description": "Get document with colorized JSON output"
2446
+ },
2447
+ {
2448
+ "command": "<%= config.bin %> <%= command.id %> myDocId --dataset production",
2449
+ "description": "Get document from a specific dataset"
2450
+ },
2451
+ {
2452
+ "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
2453
+ "description": "Get a document from a specific project"
2505
2454
  }
2506
2455
  ],
2507
2456
  "flags": {
2508
2457
  "project-id": {
2509
2458
  "char": "p",
2510
- "description": "Project ID to list webhooks for (overrides CLI configuration)",
2459
+ "description": "Project ID to get document from (overrides CLI configuration)",
2511
2460
  "helpGroup": "OVERRIDE",
2512
2461
  "name": "project-id",
2513
2462
  "hasDynamicHelp": false,
2514
2463
  "helpValue": "<id>",
2515
2464
  "multiple": false,
2516
2465
  "type": "option"
2466
+ },
2467
+ "dataset": {
2468
+ "char": "d",
2469
+ "description": "Dataset to get document from (overrides CLI configuration)",
2470
+ "helpGroup": "OVERRIDE",
2471
+ "name": "dataset",
2472
+ "hasDynamicHelp": false,
2473
+ "helpValue": "<name>",
2474
+ "multiple": false,
2475
+ "type": "option"
2476
+ },
2477
+ "pretty": {
2478
+ "description": "Colorize JSON output",
2479
+ "name": "pretty",
2480
+ "allowNo": false,
2481
+ "type": "boolean"
2517
2482
  }
2518
2483
  },
2519
2484
  "hasDynamicHelp": false,
2520
2485
  "hiddenAliases": [
2521
- "hook:list"
2486
+ "document:get"
2522
2487
  ],
2523
- "id": "hooks:list",
2488
+ "id": "documents:get",
2524
2489
  "pluginAlias": "@sanity/cli",
2525
2490
  "pluginName": "@sanity/cli",
2526
2491
  "pluginType": "core",
@@ -2529,38 +2494,42 @@
2529
2494
  "relativePath": [
2530
2495
  "dist",
2531
2496
  "commands",
2532
- "hooks",
2533
- "list.js"
2497
+ "documents",
2498
+ "get.js"
2534
2499
  ]
2535
2500
  },
2536
- "hooks:logs": {
2501
+ "documents:query": {
2537
2502
  "aliases": [],
2538
2503
  "args": {
2539
- "name": {
2540
- "description": "Name of the webhook to show logs for",
2541
- "name": "name",
2542
- "required": false
2504
+ "query": {
2505
+ "description": "GROQ query to run against the dataset",
2506
+ "name": "query",
2507
+ "required": true
2543
2508
  }
2544
2509
  },
2545
- "description": "Show log entries for project webhooks",
2510
+ "description": "Query for documents",
2546
2511
  "examples": [
2547
2512
  {
2548
- "command": "<%= config.bin %> <%= command.id %>",
2549
- "description": "Show log entries for project webhooks"
2513
+ "command": "<%= config.bin %> <%= command.id %> '*[_type == \"movie\"][0..4]'",
2514
+ "description": "Fetch 5 documents of type \"movie\""
2550
2515
  },
2551
2516
  {
2552
- "command": "<%= config.bin %> <%= command.id %> [NAME]",
2553
- "description": "Show log entries for a specific webhook by name"
2517
+ "command": "<%= config.bin %> <%= command.id %> '*[_type == \"movie\"]|order(releaseDate asc)[0]{title}' --dataset staging",
2518
+ "description": "Fetch title of the oldest movie in the dataset named \"staging\""
2554
2519
  },
2555
2520
  {
2556
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2557
- "description": "Show log entries for a specific project"
2521
+ "command": "<%= config.bin %> <%= command.id %> '*[_id == \"header\"] { \"headerText\": pt::text(body) }' --api-version v2021-06-07",
2522
+ "description": "Use API version v2021-06-07 and do a query"
2523
+ },
2524
+ {
2525
+ "command": "<%= config.bin %> <%= command.id %> '*[_type == \"post\"]' --project-id abc123 --dataset production",
2526
+ "description": "Query documents in a specific project and dataset"
2558
2527
  }
2559
2528
  ],
2560
2529
  "flags": {
2561
2530
  "project-id": {
2562
2531
  "char": "p",
2563
- "description": "Project ID to view webhook logs for (overrides CLI configuration)",
2532
+ "description": "Project ID to query (overrides CLI configuration)",
2564
2533
  "helpGroup": "OVERRIDE",
2565
2534
  "name": "project-id",
2566
2535
  "hasDynamicHelp": false,
@@ -2568,19 +2537,53 @@
2568
2537
  "multiple": false,
2569
2538
  "type": "option"
2570
2539
  },
2571
- "detailed": {
2572
- "description": "Include detailed payload and attempts",
2573
- "name": "detailed",
2574
- "required": false,
2540
+ "dataset": {
2541
+ "char": "d",
2542
+ "description": "Dataset to query (overrides CLI configuration)",
2543
+ "helpGroup": "OVERRIDE",
2544
+ "name": "dataset",
2545
+ "hasDynamicHelp": false,
2546
+ "helpValue": "<name>",
2547
+ "multiple": false,
2548
+ "type": "option"
2549
+ },
2550
+ "anonymous": {
2551
+ "description": "Send the query without any authorization token",
2552
+ "name": "anonymous",
2553
+ "allowNo": false,
2554
+ "type": "boolean"
2555
+ },
2556
+ "api-version": {
2557
+ "description": "API version to use (defaults to 2025-08-15)",
2558
+ "env": "SANITY_CLI_QUERY_API_VERSION",
2559
+ "name": "api-version",
2560
+ "hasDynamicHelp": false,
2561
+ "multiple": false,
2562
+ "type": "option"
2563
+ },
2564
+ "pretty": {
2565
+ "description": "Colorize JSON output",
2566
+ "name": "pretty",
2575
2567
  "allowNo": false,
2576
2568
  "type": "boolean"
2569
+ },
2570
+ "project": {
2571
+ "deprecated": {
2572
+ "to": "project-id"
2573
+ },
2574
+ "description": "Project ID to query",
2575
+ "hidden": true,
2576
+ "name": "project",
2577
+ "hasDynamicHelp": false,
2578
+ "multiple": false,
2579
+ "type": "option"
2577
2580
  }
2578
2581
  },
2579
2582
  "hasDynamicHelp": false,
2580
2583
  "hiddenAliases": [
2581
- "hook:logs"
2584
+ "document:query"
2582
2585
  ],
2583
- "id": "hooks:logs",
2586
+ "id": "documents:query",
2584
2587
  "pluginAlias": "@sanity/cli",
2585
2588
  "pluginName": "@sanity/cli",
2586
2589
  "pluginType": "core",
@@ -2589,199 +2592,222 @@
2589
2592
  "relativePath": [
2590
2593
  "dist",
2591
2594
  "commands",
2592
- "hooks",
2593
- "logs.js"
2595
+ "documents",
2596
+ "query.js"
2594
2597
  ]
2595
2598
  },
2596
- "manifest:extract": {
2599
+ "documents:validate": {
2597
2600
  "aliases": [],
2598
2601
  "args": {},
2599
- "description": "Extract studio configuration as JSON manifest files.\n\nNote: This command is experimental and subject to change. It is currently intended for use with Create only.",
2602
+ "description": "Validate documents in a dataset against the studio schema",
2600
2603
  "examples": [
2601
2604
  {
2602
- "command": "<%= config.bin %> <%= command.id %>",
2603
- "description": "Extracts manifests"
2605
+ "command": "<%= config.bin %> <%= command.id %> --workspace default",
2606
+ "description": "Validates all documents in a Sanity project with more than one workspace"
2604
2607
  },
2605
2608
  {
2606
- "command": "<%= config.bin %> <%= command.id %> --path /public/static",
2607
- "description": "Extracts manifests into /public/static"
2609
+ "command": "<%= config.bin %> <%= command.id %> --workspace default --dataset staging",
2610
+ "description": "Override the dataset specified in the workspace"
2611
+ },
2612
+ {
2613
+ "command": "<%= config.bin %> <%= command.id %> --yes > report.txt",
2614
+ "description": "Save the results of the report into a file"
2615
+ },
2616
+ {
2617
+ "command": "<%= config.bin %> <%= command.id %> --level info",
2618
+ "description": "Report out info level validation markers too"
2619
+ },
2620
+ {
2621
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
2622
+ "description": "Validate documents in a specific project and dataset"
2608
2623
  }
2609
2624
  ],
2610
2625
  "flags": {
2611
- "path": {
2612
- "description": "Optional path to specify destination directory of the manifest files",
2613
- "name": "path",
2614
- "default": "dist/static",
2626
+ "project-id": {
2627
+ "char": "p",
2628
+ "description": "Override the project ID used. By default, this is derived from the given workspace",
2629
+ "name": "project-id",
2615
2630
  "hasDynamicHelp": false,
2631
+ "helpValue": "<id>",
2616
2632
  "multiple": false,
2617
2633
  "type": "option"
2618
- }
2619
- },
2620
- "hasDynamicHelp": false,
2621
- "hiddenAliases": [],
2622
- "id": "manifest:extract",
2623
- "pluginAlias": "@sanity/cli",
2624
- "pluginName": "@sanity/cli",
2625
- "pluginType": "core",
2626
- "strict": true,
2627
- "isESM": true,
2628
- "relativePath": [
2629
- "dist",
2630
- "commands",
2631
- "manifest",
2632
- "extract.js"
2633
- ]
2634
- },
2635
- "datasets:copy": {
2636
- "aliases": [],
2637
- "args": {
2638
- "source": {
2639
- "description": "Name of the dataset to copy from",
2640
- "name": "source",
2641
- "required": false
2642
2634
  },
2643
- "target": {
2644
- "description": "Name of the dataset to copy to",
2645
- "name": "target",
2646
- "required": false
2647
- }
2648
- },
2649
- "description": "Copy a dataset or manage copy jobs",
2650
- "examples": [
2651
- {
2652
- "command": "<%= config.bin %> <%= command.id %>",
2653
- "description": "Interactively copy a dataset"
2635
+ "dataset": {
2636
+ "char": "d",
2637
+ "description": "Override the dataset used. By default, this is derived from the given workspace",
2638
+ "name": "dataset",
2639
+ "hasDynamicHelp": false,
2640
+ "helpValue": "<name>",
2641
+ "multiple": false,
2642
+ "type": "option"
2654
2643
  },
2655
- {
2656
- "command": "<%= config.bin %> <%= command.id %> source-dataset",
2657
- "description": "Copy from source-dataset (prompts for target)"
2644
+ "file": {
2645
+ "description": "Provide a path to either an .ndjson file or a tarball containing an .ndjson file",
2646
+ "name": "file",
2647
+ "hasDynamicHelp": false,
2648
+ "multiple": false,
2649
+ "type": "option"
2658
2650
  },
2659
- {
2660
- "command": "<%= config.bin %> <%= command.id %> source-dataset target-dataset",
2661
- "description": "Copy from source-dataset to target-dataset"
2651
+ "format": {
2652
+ "description": "The output format used to print the found validation markers and report progress",
2653
+ "name": "format",
2654
+ "hasDynamicHelp": false,
2655
+ "multiple": false,
2656
+ "type": "option"
2662
2657
  },
2663
- {
2664
- "command": "<%= config.bin %> <%= command.id %> --skip-history source target",
2665
- "description": "Copy without preserving document history (faster for large datasets)"
2658
+ "level": {
2659
+ "description": "The minimum level reported. Defaults to warning",
2660
+ "name": "level",
2661
+ "default": "warning",
2662
+ "hasDynamicHelp": false,
2663
+ "multiple": false,
2664
+ "options": [
2665
+ "error",
2666
+ "warning",
2667
+ "info"
2668
+ ],
2669
+ "type": "option"
2666
2670
  },
2667
- {
2668
- "command": "<%= config.bin %> <%= command.id %> --skip-content-releases source target",
2669
- "description": "Copy without content release documents"
2671
+ "max-custom-validation-concurrency": {
2672
+ "description": "Specify how many custom validators can run concurrently",
2673
+ "name": "max-custom-validation-concurrency",
2674
+ "default": 5,
2675
+ "hasDynamicHelp": false,
2676
+ "multiple": false,
2677
+ "type": "option"
2678
+ },
2679
+ "max-fetch-concurrency": {
2680
+ "description": "Specify how many `client.fetch` requests are allowed to run concurrently",
2681
+ "name": "max-fetch-concurrency",
2682
+ "default": 25,
2683
+ "hasDynamicHelp": false,
2684
+ "multiple": false,
2685
+ "type": "option"
2686
+ },
2687
+ "workspace": {
2688
+ "description": "The name of the workspace to use when downloading and validating all documents",
2689
+ "name": "workspace",
2690
+ "hasDynamicHelp": false,
2691
+ "multiple": false,
2692
+ "type": "option"
2670
2693
  },
2694
+ "yes": {
2695
+ "char": "y",
2696
+ "description": "Skips the first confirmation prompt",
2697
+ "name": "yes",
2698
+ "allowNo": false,
2699
+ "type": "boolean"
2700
+ }
2701
+ },
2702
+ "hasDynamicHelp": false,
2703
+ "hiddenAliases": [
2704
+ "document:validate"
2705
+ ],
2706
+ "id": "documents:validate",
2707
+ "pluginAlias": "@sanity/cli",
2708
+ "pluginName": "@sanity/cli",
2709
+ "pluginType": "core",
2710
+ "strict": true,
2711
+ "isESM": true,
2712
+ "relativePath": [
2713
+ "dist",
2714
+ "commands",
2715
+ "documents",
2716
+ "validate.js"
2717
+ ]
2718
+ },
2719
+ "graphql:deploy": {
2720
+ "aliases": [],
2721
+ "args": {},
2722
+ "description": "Deploy a GraphQL API from the current Sanity schema",
2723
+ "examples": [
2671
2724
  {
2672
- "command": "<%= config.bin %> <%= command.id %> --detach source target",
2673
- "description": "Start copy job without waiting for completion"
2725
+ "command": "<%= config.bin %> <%= command.id %>",
2726
+ "description": "Deploy all defined GraphQL APIs"
2674
2727
  },
2675
2728
  {
2676
- "command": "<%= config.bin %> <%= command.id %> --attach <job-id>",
2677
- "description": "Attach to a running copy job to follow progress"
2729
+ "command": "<%= config.bin %> <%= command.id %> --dry-run",
2730
+ "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy"
2678
2731
  },
2679
2732
  {
2680
- "command": "<%= config.bin %> <%= command.id %> --list",
2681
- "description": "List all dataset copy jobs"
2733
+ "command": "<%= config.bin %> <%= command.id %> --api staging --api ios",
2734
+ "description": "Deploy only the GraphQL APIs with the IDs \"staging\" and \"ios\""
2682
2735
  },
2683
2736
  {
2684
- "command": "<%= config.bin %> <%= command.id %> --list --offset 2 --limit 10",
2685
- "description": "List copy jobs with pagination"
2737
+ "command": "<%= config.bin %> <%= command.id %> --playground",
2738
+ "description": "Deploy all defined GraphQL APIs, overriding any playground setting"
2686
2739
  }
2687
2740
  ],
2688
2741
  "flags": {
2689
- "project-id": {
2690
- "char": "p",
2691
- "description": "Project ID to copy dataset in (overrides CLI configuration)",
2692
- "helpGroup": "OVERRIDE",
2693
- "name": "project-id",
2742
+ "api": {
2743
+ "description": "Only deploy API with this ID (can be specified multiple times)",
2744
+ "name": "api",
2694
2745
  "hasDynamicHelp": false,
2695
- "helpValue": "<id>",
2696
- "multiple": false,
2746
+ "multiple": true,
2697
2747
  "type": "option"
2698
2748
  },
2699
- "attach": {
2700
- "description": "Attach to the running copy process to show progress",
2701
- "exclusive": [
2702
- "list",
2703
- "detach",
2704
- "skip-history"
2705
- ],
2706
- "name": "attach",
2707
- "required": false,
2749
+ "dataset": {
2750
+ "char": "d",
2751
+ "description": "Deploy API for the given dataset",
2752
+ "name": "dataset",
2708
2753
  "hasDynamicHelp": false,
2754
+ "helpValue": "<name>",
2709
2755
  "multiple": false,
2710
2756
  "type": "option"
2711
2757
  },
2712
- "detach": {
2713
- "description": "Start the copy without waiting for it to finish",
2714
- "exclusive": [
2715
- "list",
2716
- "attach"
2717
- ],
2718
- "name": "detach",
2719
- "required": false,
2758
+ "dry-run": {
2759
+ "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy",
2760
+ "name": "dry-run",
2720
2761
  "allowNo": false,
2721
2762
  "type": "boolean"
2722
2763
  },
2723
- "limit": {
2724
- "dependsOn": [
2725
- "list"
2726
- ],
2727
- "description": "Maximum number of jobs returned (default 10, max 1000)",
2728
- "name": "limit",
2729
- "required": false,
2764
+ "force": {
2765
+ "description": "Deploy API without confirming breaking changes",
2766
+ "name": "force",
2767
+ "allowNo": false,
2768
+ "type": "boolean"
2769
+ },
2770
+ "generation": {
2771
+ "description": "API generation to deploy (defaults to \"gen3\")",
2772
+ "name": "generation",
2730
2773
  "hasDynamicHelp": false,
2731
2774
  "multiple": false,
2775
+ "options": [
2776
+ "gen1",
2777
+ "gen2",
2778
+ "gen3"
2779
+ ],
2732
2780
  "type": "option"
2733
2781
  },
2734
- "list": {
2735
- "description": "Lists all dataset copy jobs",
2736
- "exclusive": [
2737
- "attach",
2738
- "detach",
2739
- "skip-history"
2740
- ],
2741
- "name": "list",
2742
- "required": false,
2782
+ "non-null-document-fields": {
2783
+ "description": "Use non-null document fields (_id, _type etc)",
2784
+ "name": "non-null-document-fields",
2743
2785
  "allowNo": false,
2744
2786
  "type": "boolean"
2745
2787
  },
2746
- "offset": {
2747
- "dependsOn": [
2748
- "list"
2749
- ],
2750
- "description": "Start position in the list of jobs (default 0)",
2751
- "name": "offset",
2752
- "required": false,
2788
+ "playground": {
2789
+ "description": "Enable GraphQL playground for easier debugging",
2790
+ "name": "playground",
2791
+ "allowNo": true,
2792
+ "type": "boolean"
2793
+ },
2794
+ "tag": {
2795
+ "description": "Deploy API(s) to given tag (defaults to \"default\")",
2796
+ "name": "tag",
2753
2797
  "hasDynamicHelp": false,
2754
2798
  "multiple": false,
2755
2799
  "type": "option"
2756
2800
  },
2757
- "skip-content-releases": {
2758
- "description": "Don't copy content release documents to the target dataset",
2759
- "exclusive": [
2760
- "list",
2761
- "attach"
2762
- ],
2763
- "name": "skip-content-releases",
2764
- "required": false,
2765
- "allowNo": false,
2766
- "type": "boolean"
2767
- },
2768
- "skip-history": {
2769
- "description": "Don't preserve document history on copy",
2770
- "exclusive": [
2771
- "list",
2772
- "attach"
2773
- ],
2774
- "name": "skip-history",
2775
- "required": false,
2801
+ "with-union-cache": {
2802
+ "description": "Cache union types (faster for schemas with many self-references)",
2803
+ "name": "with-union-cache",
2776
2804
  "allowNo": false,
2777
2805
  "type": "boolean"
2778
2806
  }
2779
2807
  },
2780
2808
  "hasDynamicHelp": false,
2781
- "hiddenAliases": [
2782
- "dataset:copy"
2783
- ],
2784
- "id": "datasets:copy",
2809
+ "hiddenAliases": [],
2810
+ "id": "graphql:deploy",
2785
2811
  "pluginAlias": "@sanity/cli",
2786
2812
  "pluginName": "@sanity/cli",
2787
2813
  "pluginType": "core",
@@ -2790,80 +2816,39 @@
2790
2816
  "relativePath": [
2791
2817
  "dist",
2792
2818
  "commands",
2793
- "datasets",
2794
- "copy.js"
2819
+ "graphql",
2820
+ "deploy.js"
2795
2821
  ]
2796
2822
  },
2797
- "datasets:create": {
2823
+ "graphql:list": {
2798
2824
  "aliases": [],
2799
- "args": {
2800
- "name": {
2801
- "description": "Name of the dataset to create",
2802
- "name": "name",
2803
- "required": false
2804
- }
2805
- },
2806
- "description": "Create a new dataset for the project",
2825
+ "args": {},
2826
+ "description": "List deployed GraphQL endpoints for the project",
2807
2827
  "examples": [
2808
2828
  {
2809
2829
  "command": "<%= config.bin %> <%= command.id %>",
2810
- "description": "Interactively create a dataset"
2811
- },
2812
- {
2813
- "command": "<%= config.bin %> <%= command.id %> my-dataset",
2814
- "description": "Create a dataset named \"my-dataset\""
2830
+ "description": "List GraphQL endpoints for the project"
2815
2831
  },
2816
2832
  {
2817
- "command": "<%= config.bin %> <%= command.id %> my-dataset --visibility private",
2818
- "description": "Create a private dataset named \"my-dataset\""
2833
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2834
+ "description": "List GraphQL endpoints for a specific project"
2819
2835
  }
2820
2836
  ],
2821
2837
  "flags": {
2822
2838
  "project-id": {
2823
2839
  "char": "p",
2824
- "description": "Project ID to create dataset in (overrides CLI configuration)",
2840
+ "description": "Project ID to list GraphQL endpoints for (overrides CLI configuration)",
2825
2841
  "helpGroup": "OVERRIDE",
2826
2842
  "name": "project-id",
2827
2843
  "hasDynamicHelp": false,
2828
2844
  "helpValue": "<id>",
2829
2845
  "multiple": false,
2830
2846
  "type": "option"
2831
- },
2832
- "embeddings": {
2833
- "description": "Enable embeddings for this dataset",
2834
- "name": "embeddings",
2835
- "allowNo": false,
2836
- "type": "boolean"
2837
- },
2838
- "embeddings-projection": {
2839
- "dependsOn": [
2840
- "embeddings"
2841
- ],
2842
- "description": "GROQ projection for embeddings indexing (e.g. \"{ title, body }\")",
2843
- "name": "embeddings-projection",
2844
- "hasDynamicHelp": false,
2845
- "multiple": false,
2846
- "type": "option"
2847
- },
2848
- "visibility": {
2849
- "description": "Set visibility for this dataset (custom/private/public)",
2850
- "name": "visibility",
2851
- "required": false,
2852
- "hasDynamicHelp": false,
2853
- "multiple": false,
2854
- "options": [
2855
- "custom",
2856
- "private",
2857
- "public"
2858
- ],
2859
- "type": "option"
2860
2847
  }
2861
2848
  },
2862
2849
  "hasDynamicHelp": false,
2863
- "hiddenAliases": [
2864
- "dataset:create"
2865
- ],
2866
- "id": "datasets:create",
2850
+ "hiddenAliases": [],
2851
+ "id": "graphql:list",
2867
2852
  "pluginAlias": "@sanity/cli",
2868
2853
  "pluginName": "@sanity/cli",
2869
2854
  "pluginType": "core",
@@ -2872,34 +2857,44 @@
2872
2857
  "relativePath": [
2873
2858
  "dist",
2874
2859
  "commands",
2875
- "datasets",
2876
- "create.js"
2860
+ "graphql",
2861
+ "list.js"
2877
2862
  ]
2878
2863
  },
2879
- "datasets:delete": {
2864
+ "graphql:undeploy": {
2880
2865
  "aliases": [],
2881
- "args": {
2882
- "datasetName": {
2883
- "description": "Dataset name to delete",
2884
- "name": "datasetName",
2885
- "required": true
2886
- }
2887
- },
2888
- "description": "Delete a dataset from the project",
2866
+ "args": {},
2867
+ "description": "Remove a deployed GraphQL API",
2889
2868
  "examples": [
2890
2869
  {
2891
- "command": "<%= config.bin %> <%= command.id %> my-dataset",
2892
- "description": "Delete a specific dataset"
2870
+ "command": "<%= config.bin %> <%= command.id %>",
2871
+ "description": "Undeploy GraphQL API for current project and dataset"
2893
2872
  },
2894
2873
  {
2895
- "command": "<%= config.bin %> <%= command.id %> my-dataset --force",
2896
- "description": "Delete a specific dataset without confirmation"
2874
+ "command": "<%= config.bin %> <%= command.id %> --api ios",
2875
+ "description": "Undeploy API with ID \"ios\""
2876
+ },
2877
+ {
2878
+ "command": "<%= config.bin %> <%= command.id %> --dataset staging",
2879
+ "description": "Undeploy GraphQL API for staging dataset"
2880
+ },
2881
+ {
2882
+ "command": "<%= config.bin %> <%= command.id %> --dataset staging --tag next",
2883
+ "description": "Undeploy GraphQL API for staging dataset with \"next\" tag"
2884
+ },
2885
+ {
2886
+ "command": "<%= config.bin %> <%= command.id %> --force",
2887
+ "description": "Undeploy GraphQL API without confirmation prompt"
2888
+ },
2889
+ {
2890
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
2891
+ "description": "Undeploy GraphQL API for a specific project and dataset"
2897
2892
  }
2898
2893
  ],
2899
2894
  "flags": {
2900
2895
  "project-id": {
2901
2896
  "char": "p",
2902
- "description": "Project ID to delete dataset from (overrides CLI configuration)",
2897
+ "description": "Project ID to undeploy GraphQL API from (overrides CLI configuration)",
2903
2898
  "helpGroup": "OVERRIDE",
2904
2899
  "name": "project-id",
2905
2900
  "hasDynamicHelp": false,
@@ -2907,19 +2902,60 @@
2907
2902
  "multiple": false,
2908
2903
  "type": "option"
2909
2904
  },
2905
+ "api": {
2906
+ "description": "Undeploy API with this ID",
2907
+ "exclusive": [
2908
+ "project-id",
2909
+ "project"
2910
+ ],
2911
+ "name": "api",
2912
+ "required": false,
2913
+ "hasDynamicHelp": false,
2914
+ "multiple": false,
2915
+ "type": "option"
2916
+ },
2917
+ "dataset": {
2918
+ "char": "d",
2919
+ "description": "Dataset to undeploy GraphQL API from (overrides CLI configuration)",
2920
+ "helpGroup": "OVERRIDE",
2921
+ "name": "dataset",
2922
+ "hasDynamicHelp": false,
2923
+ "helpValue": "<name>",
2924
+ "multiple": false,
2925
+ "type": "option"
2926
+ },
2910
2927
  "force": {
2911
- "description": "Do not prompt for delete confirmation - forcefully delete",
2928
+ "description": "Skip confirmation prompt",
2912
2929
  "name": "force",
2913
2930
  "required": false,
2914
2931
  "allowNo": false,
2915
2932
  "type": "boolean"
2933
+ },
2934
+ "project": {
2935
+ "deprecated": {
2936
+ "to": "project-id"
2937
+ },
2938
+ "description": "Project ID to delete GraphQL API for",
2939
+ "hidden": true,
2940
+ "name": "project",
2941
+ "required": false,
2942
+ "hasDynamicHelp": false,
2943
+ "multiple": false,
2944
+ "type": "option"
2945
+ },
2946
+ "tag": {
2947
+ "description": "Tag to undeploy GraphQL API from",
2948
+ "name": "tag",
2949
+ "required": false,
2950
+ "default": "default",
2951
+ "hasDynamicHelp": false,
2952
+ "multiple": false,
2953
+ "type": "option"
2916
2954
  }
2917
2955
  },
2918
2956
  "hasDynamicHelp": false,
2919
- "hiddenAliases": [
2920
- "dataset:delete"
2921
- ],
2922
- "id": "datasets:delete",
2957
+ "hiddenAliases": [],
2958
+ "id": "graphql:undeploy",
2923
2959
  "pluginAlias": "@sanity/cli",
2924
2960
  "pluginName": "@sanity/cli",
2925
2961
  "pluginType": "core",
@@ -2928,125 +2964,47 @@
2928
2964
  "relativePath": [
2929
2965
  "dist",
2930
2966
  "commands",
2931
- "datasets",
2932
- "delete.js"
2967
+ "graphql",
2968
+ "undeploy.js"
2933
2969
  ]
2934
2970
  },
2935
- "datasets:export": {
2971
+ "hooks:attempt": {
2936
2972
  "aliases": [],
2937
2973
  "args": {
2938
- "name": {
2939
- "description": "Name of the dataset to export",
2940
- "name": "name"
2941
- },
2942
- "destination": {
2943
- "description": "Output destination file path",
2944
- "name": "destination"
2974
+ "attemptId": {
2975
+ "description": "The delivery attempt ID to get details for",
2976
+ "name": "attemptId",
2977
+ "required": true
2945
2978
  }
2946
2979
  },
2947
- "description": "Export a dataset to a local gzipped tarball. Assets returning 401, 403, or 404 are excluded from the export.",
2980
+ "description": "Print details of a given webhook delivery attempt",
2948
2981
  "examples": [
2949
2982
  {
2950
- "command": "<%= config.bin %> <%= command.id %> moviedb localPath.tar.gz",
2951
- "description": "Export dataset \"moviedb\" to localPath.tar.gz"
2952
- },
2953
- {
2954
- "command": "<%= config.bin %> <%= command.id %> moviedb assetless.tar.gz --no-assets",
2955
- "description": "Export dataset without assets"
2956
- },
2957
- {
2958
- "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --raw",
2959
- "description": "Export raw documents without asset reference rewriting"
2960
- },
2961
- {
2962
- "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --types products,shops",
2963
- "description": "Export specific document types"
2983
+ "command": "<%= config.bin %> <%= command.id %> abc123",
2984
+ "description": "Print details of webhook delivery attempt with ID abc123"
2964
2985
  },
2965
2986
  {
2966
- "command": "<%= config.bin %> <%= command.id %> moviedb moviedb.tar.gz --no-strict-asset-verification",
2967
- "description": "Export dataset without aborting on asset verification failures"
2987
+ "command": "<%= config.bin %> <%= command.id %> abc123 --project-id projectId",
2988
+ "description": "Get attempt details for a specific project"
2968
2989
  }
2969
2990
  ],
2970
2991
  "flags": {
2971
2992
  "project-id": {
2972
2993
  "char": "p",
2973
- "description": "Project ID to export dataset from (overrides CLI configuration)",
2994
+ "description": "Project ID to view webhook attempt for (overrides CLI configuration)",
2974
2995
  "helpGroup": "OVERRIDE",
2975
2996
  "name": "project-id",
2976
2997
  "hasDynamicHelp": false,
2977
2998
  "helpValue": "<id>",
2978
2999
  "multiple": false,
2979
3000
  "type": "option"
2980
- },
2981
- "asset-concurrency": {
2982
- "description": "Concurrent number of asset downloads",
2983
- "name": "asset-concurrency",
2984
- "default": 8,
2985
- "hasDynamicHelp": false,
2986
- "multiple": false,
2987
- "type": "option"
2988
- },
2989
- "mode": {
2990
- "description": "Export mode ('cursor' is faster for large datasets but may miss concurrent changes)",
2991
- "name": "mode",
2992
- "default": "stream",
2993
- "hasDynamicHelp": false,
2994
- "multiple": false,
2995
- "options": [
2996
- "stream",
2997
- "cursor"
2998
- ],
2999
- "type": "option"
3000
- },
3001
- "no-assets": {
3002
- "description": "Export only non-asset documents and remove references to image assets",
3003
- "name": "no-assets",
3004
- "allowNo": false,
3005
- "type": "boolean"
3006
- },
3007
- "no-compress": {
3008
- "description": "Skips compressing tarball entries (still generates a gzip file)",
3009
- "name": "no-compress",
3010
- "allowNo": false,
3011
- "type": "boolean"
3012
- },
3013
- "no-drafts": {
3014
- "description": "Export only published versions of documents",
3015
- "name": "no-drafts",
3016
- "allowNo": false,
3017
- "type": "boolean"
3018
- },
3019
- "no-strict-asset-verification": {
3020
- "description": "Do not abort the export when an asset fails hash or content-length verification",
3021
- "name": "no-strict-asset-verification",
3022
- "allowNo": false,
3023
- "type": "boolean"
3024
- },
3025
- "overwrite": {
3026
- "description": "Overwrite any file with the same name",
3027
- "name": "overwrite",
3028
- "allowNo": false,
3029
- "type": "boolean"
3030
- },
3031
- "raw": {
3032
- "description": "Extract only documents, without rewriting asset references",
3033
- "name": "raw",
3034
- "allowNo": false,
3035
- "type": "boolean"
3036
- },
3037
- "types": {
3038
- "description": "Defines which document types to export (comma-separated)",
3039
- "name": "types",
3040
- "hasDynamicHelp": false,
3041
- "multiple": false,
3042
- "type": "option"
3043
3001
  }
3044
3002
  },
3045
3003
  "hasDynamicHelp": false,
3046
3004
  "hiddenAliases": [
3047
- "dataset:export"
3005
+ "hook:attempt"
3048
3006
  ],
3049
- "id": "datasets:export",
3007
+ "id": "hooks:attempt",
3050
3008
  "pluginAlias": "@sanity/cli",
3051
3009
  "pluginName": "@sanity/cli",
3052
3010
  "pluginType": "core",
@@ -3055,96 +3013,177 @@
3055
3013
  "relativePath": [
3056
3014
  "dist",
3057
3015
  "commands",
3058
- "datasets",
3059
- "export.js"
3016
+ "hooks",
3017
+ "attempt.js"
3060
3018
  ]
3061
3019
  },
3062
- "datasets:import": {
3020
+ "hooks:create": {
3063
3021
  "aliases": [],
3064
- "args": {
3065
- "source": {
3066
- "description": "Source file (use \"-\" for stdin)",
3067
- "name": "source",
3068
- "required": true
3069
- },
3070
- "targetDataset": {
3071
- "description": "Target dataset (prefer --dataset flag instead)",
3072
- "name": "targetDataset",
3073
- "required": false
3074
- }
3075
- },
3076
- "description": "Import documents to a Sanity dataset",
3022
+ "args": {},
3023
+ "description": "Create a new webhook for the project",
3077
3024
  "examples": [
3078
3025
  {
3079
- "command": "<%= config.bin %> <%= command.id %> -d staging my-dataset.ndjson",
3080
- "description": "Import \"./my-dataset.ndjson\" into dataset \"staging\""
3026
+ "command": "<%= config.bin %> <%= command.id %>",
3027
+ "description": "Create a new webhook for the project"
3081
3028
  },
3082
3029
  {
3083
- "command": "cat my-dataset.ndjson | <%= config.bin %> <%= command.id %> -d test -",
3084
- "description": "Import into dataset \"test\" from stdin"
3030
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3031
+ "description": "Create a webhook for a specific project"
3032
+ }
3033
+ ],
3034
+ "flags": {
3035
+ "project-id": {
3036
+ "char": "p",
3037
+ "description": "Project ID to create webhook for (overrides CLI configuration)",
3038
+ "helpGroup": "OVERRIDE",
3039
+ "name": "project-id",
3040
+ "hasDynamicHelp": false,
3041
+ "helpValue": "<id>",
3042
+ "multiple": false,
3043
+ "type": "option"
3044
+ }
3045
+ },
3046
+ "hasDynamicHelp": false,
3047
+ "hiddenAliases": [
3048
+ "hook:create"
3049
+ ],
3050
+ "id": "hooks:create",
3051
+ "pluginAlias": "@sanity/cli",
3052
+ "pluginName": "@sanity/cli",
3053
+ "pluginType": "core",
3054
+ "strict": true,
3055
+ "isESM": true,
3056
+ "relativePath": [
3057
+ "dist",
3058
+ "commands",
3059
+ "hooks",
3060
+ "create.js"
3061
+ ]
3062
+ },
3063
+ "hooks:delete": {
3064
+ "aliases": [],
3065
+ "args": {
3066
+ "name": {
3067
+ "description": "Name of webhook to delete (will prompt if not provided)",
3068
+ "name": "name",
3069
+ "required": false
3070
+ }
3071
+ },
3072
+ "description": "Delete a webhook from the project",
3073
+ "examples": [
3074
+ {
3075
+ "command": "<%= config.bin %> <%= command.id %>",
3076
+ "description": "Interactively select and delete a webhook"
3085
3077
  },
3086
3078
  {
3087
- "command": "<%= config.bin %> <%= command.id %> -p projectId -d staging my-dataset.ndjson",
3088
- "description": "Import with explicit project ID (overrides CLI configuration)"
3079
+ "command": "<%= config.bin %> <%= command.id %> my-hook",
3080
+ "description": "Delete a specific webhook by name"
3089
3081
  },
3090
3082
  {
3091
- "command": "<%= config.bin %> <%= command.id %> -d staging -t someSecretToken my-dataset.ndjson",
3092
- "description": "Import with an explicit token (e.g. for CI/CD)"
3083
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3084
+ "description": "Delete a webhook from a specific project"
3093
3085
  }
3094
3086
  ],
3095
3087
  "flags": {
3096
- "allow-assets-in-different-dataset": {
3097
- "description": "Allow asset documents to reference different project/dataset",
3098
- "name": "allow-assets-in-different-dataset",
3099
- "allowNo": false,
3100
- "type": "boolean"
3101
- },
3102
- "allow-failing-assets": {
3103
- "description": "Skip assets that cannot be fetched/uploaded",
3104
- "name": "allow-failing-assets",
3105
- "allowNo": false,
3106
- "type": "boolean"
3107
- },
3108
- "allow-replacement-characters": {
3109
- "description": "Allow unicode replacement characters in imported documents",
3110
- "name": "allow-replacement-characters",
3111
- "allowNo": false,
3112
- "type": "boolean"
3113
- },
3114
- "allow-system-documents": {
3115
- "description": "Imports system documents",
3116
- "name": "allow-system-documents",
3117
- "allowNo": false,
3118
- "type": "boolean"
3119
- },
3120
- "asset-concurrency": {
3121
- "description": "Number of parallel asset imports",
3122
- "name": "asset-concurrency",
3088
+ "project-id": {
3089
+ "char": "p",
3090
+ "description": "Project ID to delete webhook from (overrides CLI configuration)",
3091
+ "helpGroup": "OVERRIDE",
3092
+ "name": "project-id",
3123
3093
  "hasDynamicHelp": false,
3094
+ "helpValue": "<id>",
3124
3095
  "multiple": false,
3125
3096
  "type": "option"
3097
+ }
3098
+ },
3099
+ "hasDynamicHelp": false,
3100
+ "hiddenAliases": [
3101
+ "hook:delete"
3102
+ ],
3103
+ "id": "hooks:delete",
3104
+ "pluginAlias": "@sanity/cli",
3105
+ "pluginName": "@sanity/cli",
3106
+ "pluginType": "core",
3107
+ "strict": true,
3108
+ "isESM": true,
3109
+ "relativePath": [
3110
+ "dist",
3111
+ "commands",
3112
+ "hooks",
3113
+ "delete.js"
3114
+ ]
3115
+ },
3116
+ "hooks:list": {
3117
+ "aliases": [],
3118
+ "args": {},
3119
+ "description": "List webhooks for the project",
3120
+ "examples": [
3121
+ {
3122
+ "command": "<%= config.bin %> <%= command.id %>",
3123
+ "description": "List webhooks for the project"
3126
3124
  },
3127
- "dataset": {
3128
- "char": "d",
3129
- "description": "Dataset to import to",
3130
- "name": "dataset",
3125
+ {
3126
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3127
+ "description": "List webhooks for a specific project"
3128
+ }
3129
+ ],
3130
+ "flags": {
3131
+ "project-id": {
3132
+ "char": "p",
3133
+ "description": "Project ID to list webhooks for (overrides CLI configuration)",
3134
+ "helpGroup": "OVERRIDE",
3135
+ "name": "project-id",
3131
3136
  "hasDynamicHelp": false,
3132
- "helpValue": "<name>",
3137
+ "helpValue": "<id>",
3133
3138
  "multiple": false,
3134
3139
  "type": "option"
3140
+ }
3141
+ },
3142
+ "hasDynamicHelp": false,
3143
+ "hiddenAliases": [
3144
+ "hook:list"
3145
+ ],
3146
+ "id": "hooks:list",
3147
+ "pluginAlias": "@sanity/cli",
3148
+ "pluginName": "@sanity/cli",
3149
+ "pluginType": "core",
3150
+ "strict": true,
3151
+ "isESM": true,
3152
+ "relativePath": [
3153
+ "dist",
3154
+ "commands",
3155
+ "hooks",
3156
+ "list.js"
3157
+ ]
3158
+ },
3159
+ "hooks:logs": {
3160
+ "aliases": [],
3161
+ "args": {
3162
+ "name": {
3163
+ "description": "Name of the webhook to show logs for",
3164
+ "name": "name",
3165
+ "required": false
3166
+ }
3167
+ },
3168
+ "description": "Show log entries for project webhooks",
3169
+ "examples": [
3170
+ {
3171
+ "command": "<%= config.bin %> <%= command.id %>",
3172
+ "description": "Show log entries for project webhooks"
3135
3173
  },
3136
- "missing": {
3137
- "description": "Skip documents that already exist",
3138
- "exclusive": [
3139
- "replace"
3140
- ],
3141
- "name": "missing",
3142
- "allowNo": false,
3143
- "type": "boolean"
3174
+ {
3175
+ "command": "<%= config.bin %> <%= command.id %> [NAME]",
3176
+ "description": "Show log entries for a specific webhook by name"
3144
3177
  },
3178
+ {
3179
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3180
+ "description": "Show log entries for a specific project"
3181
+ }
3182
+ ],
3183
+ "flags": {
3145
3184
  "project-id": {
3146
3185
  "char": "p",
3147
- "description": "Project ID to import to (overrides CLI configuration)",
3186
+ "description": "Project ID to view webhook logs for (overrides CLI configuration)",
3148
3187
  "helpGroup": "OVERRIDE",
3149
3188
  "name": "project-id",
3150
3189
  "hasDynamicHelp": false,
@@ -3152,54 +3191,58 @@
3152
3191
  "multiple": false,
3153
3192
  "type": "option"
3154
3193
  },
3155
- "project": {
3156
- "deprecated": {
3157
- "to": "project-id"
3158
- },
3159
- "description": "Project ID to import to",
3160
- "hidden": true,
3161
- "name": "project",
3162
- "hasDynamicHelp": false,
3163
- "multiple": false,
3164
- "type": "option"
3165
- },
3166
- "replace": {
3167
- "description": "Replace documents with the same IDs",
3168
- "exclusive": [
3169
- "missing"
3170
- ],
3171
- "name": "replace",
3172
- "allowNo": false,
3173
- "type": "boolean"
3174
- },
3175
- "replace-assets": {
3176
- "description": "Skip reuse of existing assets",
3177
- "name": "replace-assets",
3178
- "allowNo": false,
3179
- "type": "boolean"
3180
- },
3181
- "skip-cross-dataset-references": {
3182
- "description": "Skips references to other datasets",
3183
- "name": "skip-cross-dataset-references",
3194
+ "detailed": {
3195
+ "description": "Include detailed payload and attempts",
3196
+ "name": "detailed",
3197
+ "required": false,
3184
3198
  "allowNo": false,
3185
3199
  "type": "boolean"
3200
+ }
3201
+ },
3202
+ "hasDynamicHelp": false,
3203
+ "hiddenAliases": [
3204
+ "hook:logs"
3205
+ ],
3206
+ "id": "hooks:logs",
3207
+ "pluginAlias": "@sanity/cli",
3208
+ "pluginName": "@sanity/cli",
3209
+ "pluginType": "core",
3210
+ "strict": true,
3211
+ "isESM": true,
3212
+ "relativePath": [
3213
+ "dist",
3214
+ "commands",
3215
+ "hooks",
3216
+ "logs.js"
3217
+ ]
3218
+ },
3219
+ "manifest:extract": {
3220
+ "aliases": [],
3221
+ "args": {},
3222
+ "description": "Extract studio configuration as JSON manifest files.\n\nNote: This command is experimental and subject to change. It is currently intended for use with Create only.",
3223
+ "examples": [
3224
+ {
3225
+ "command": "<%= config.bin %> <%= command.id %>",
3226
+ "description": "Extracts manifests"
3186
3227
  },
3187
- "token": {
3188
- "char": "t",
3189
- "description": "Token to authenticate with",
3190
- "env": "SANITY_IMPORT_TOKEN",
3191
- "name": "token",
3192
- "required": false,
3228
+ {
3229
+ "command": "<%= config.bin %> <%= command.id %> --path /public/static",
3230
+ "description": "Extracts manifests into /public/static"
3231
+ }
3232
+ ],
3233
+ "flags": {
3234
+ "path": {
3235
+ "description": "Optional path to specify destination directory of the manifest files",
3236
+ "name": "path",
3237
+ "default": "dist/static",
3193
3238
  "hasDynamicHelp": false,
3194
3239
  "multiple": false,
3195
3240
  "type": "option"
3196
3241
  }
3197
3242
  },
3198
3243
  "hasDynamicHelp": false,
3199
- "hiddenAliases": [
3200
- "dataset:import"
3201
- ],
3202
- "id": "datasets:import",
3244
+ "hiddenAliases": [],
3245
+ "id": "manifest:extract",
3203
3246
  "pluginAlias": "@sanity/cli",
3204
3247
  "pluginName": "@sanity/cli",
3205
3248
  "pluginType": "core",
@@ -3208,41 +3251,88 @@
3208
3251
  "relativePath": [
3209
3252
  "dist",
3210
3253
  "commands",
3211
- "datasets",
3212
- "import.js"
3254
+ "manifest",
3255
+ "extract.js"
3213
3256
  ]
3214
3257
  },
3215
- "datasets:list": {
3258
+ "mcp:configure": {
3216
3259
  "aliases": [],
3217
3260
  "args": {},
3218
- "description": "List datasets for the project",
3261
+ "description": "Configure Sanity MCP server for AI editors (Antigravity, Claude Code, Cline, Cline CLI, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, MCPorter, OpenCode, VS Code, VS Code Insiders, Zed)",
3262
+ "examples": [
3263
+ {
3264
+ "command": "<%= config.bin %> <%= command.id %>",
3265
+ "description": "Configure Sanity MCP server for detected AI editors"
3266
+ }
3267
+ ],
3268
+ "flags": {},
3269
+ "hasDynamicHelp": false,
3270
+ "hiddenAliases": [],
3271
+ "id": "mcp:configure",
3272
+ "pluginAlias": "@sanity/cli",
3273
+ "pluginName": "@sanity/cli",
3274
+ "pluginType": "core",
3275
+ "strict": true,
3276
+ "isESM": true,
3277
+ "relativePath": [
3278
+ "dist",
3279
+ "commands",
3280
+ "mcp",
3281
+ "configure.js"
3282
+ ]
3283
+ },
3284
+ "openapi:get": {
3285
+ "aliases": [],
3286
+ "args": {
3287
+ "slug": {
3288
+ "description": "Slug of the OpenAPI specification to retrieve",
3289
+ "name": "slug",
3290
+ "required": true
3291
+ }
3292
+ },
3293
+ "description": "Get an OpenAPI specification by slug",
3219
3294
  "examples": [
3220
3295
  {
3221
- "command": "<%= config.bin %> <%= command.id %>",
3222
- "description": "List datasets for the project"
3296
+ "command": "<%= config.bin %> <%= command.id %> query",
3297
+ "description": "Get a specification (YAML format, default)"
3223
3298
  },
3224
3299
  {
3225
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3226
- "description": "List datasets for a specific project"
3300
+ "command": "<%= config.bin %> <%= command.id %> query --format=json",
3301
+ "description": "Get specification in JSON format"
3302
+ },
3303
+ {
3304
+ "command": "<%= config.bin %> <%= command.id %> query --web",
3305
+ "description": "Open specification in browser"
3306
+ },
3307
+ {
3308
+ "command": "<%= config.bin %> <%= command.id %> query > query-api.yaml",
3309
+ "description": "Pipe to file"
3227
3310
  }
3228
3311
  ],
3229
3312
  "flags": {
3230
- "project-id": {
3231
- "char": "p",
3232
- "description": "Project ID to list datasets for (overrides CLI configuration)",
3233
- "helpGroup": "OVERRIDE",
3234
- "name": "project-id",
3313
+ "format": {
3314
+ "description": "Output format: yaml (default), json",
3315
+ "name": "format",
3316
+ "default": "yaml",
3235
3317
  "hasDynamicHelp": false,
3236
- "helpValue": "<id>",
3237
3318
  "multiple": false,
3319
+ "options": [
3320
+ "yaml",
3321
+ "json"
3322
+ ],
3238
3323
  "type": "option"
3324
+ },
3325
+ "web": {
3326
+ "char": "w",
3327
+ "description": "Open in web browser",
3328
+ "name": "web",
3329
+ "allowNo": false,
3330
+ "type": "boolean"
3239
3331
  }
3240
3332
  },
3241
3333
  "hasDynamicHelp": false,
3242
- "hiddenAliases": [
3243
- "dataset:list"
3244
- ],
3245
- "id": "datasets:list",
3334
+ "hiddenAliases": [],
3335
+ "id": "openapi:get",
3246
3336
  "pluginAlias": "@sanity/cli",
3247
3337
  "pluginName": "@sanity/cli",
3248
3338
  "pluginType": "core",
@@ -3251,24 +3341,46 @@
3251
3341
  "relativePath": [
3252
3342
  "dist",
3253
3343
  "commands",
3254
- "datasets",
3255
- "list.js"
3344
+ "openapi",
3345
+ "get.js"
3256
3346
  ]
3257
3347
  },
3258
- "mcp:configure": {
3348
+ "openapi:list": {
3259
3349
  "aliases": [],
3260
3350
  "args": {},
3261
- "description": "Configure Sanity MCP server for AI editors (Antigravity, Claude Code, Cline, Cline CLI, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, MCPorter, OpenCode, VS Code, VS Code Insiders, Zed)",
3351
+ "description": "List all available OpenAPI specifications",
3262
3352
  "examples": [
3263
3353
  {
3264
3354
  "command": "<%= config.bin %> <%= command.id %>",
3265
- "description": "Configure Sanity MCP server for detected AI editors"
3355
+ "description": "List all available OpenAPI specs"
3356
+ },
3357
+ {
3358
+ "command": "<%= config.bin %> <%= command.id %> --json",
3359
+ "description": "List with JSON output"
3360
+ },
3361
+ {
3362
+ "command": "<%= config.bin %> <%= command.id %> --web",
3363
+ "description": "Open HTTP Reference in browser"
3266
3364
  }
3267
3365
  ],
3268
- "flags": {},
3366
+ "flags": {
3367
+ "json": {
3368
+ "description": "Output JSON",
3369
+ "name": "json",
3370
+ "allowNo": false,
3371
+ "type": "boolean"
3372
+ },
3373
+ "web": {
3374
+ "char": "w",
3375
+ "description": "Open HTTP Reference in web browser",
3376
+ "name": "web",
3377
+ "allowNo": false,
3378
+ "type": "boolean"
3379
+ }
3380
+ },
3269
3381
  "hasDynamicHelp": false,
3270
3382
  "hiddenAliases": [],
3271
- "id": "mcp:configure",
3383
+ "id": "openapi:list",
3272
3384
  "pluginAlias": "@sanity/cli",
3273
3385
  "pluginName": "@sanity/cli",
3274
3386
  "pluginType": "core",
@@ -3277,8 +3389,8 @@
3277
3389
  "relativePath": [
3278
3390
  "dist",
3279
3391
  "commands",
3280
- "mcp",
3281
- "configure.js"
3392
+ "openapi",
3393
+ "list.js"
3282
3394
  ]
3283
3395
  },
3284
3396
  "media:create-aspect": {
@@ -3571,58 +3683,101 @@
3571
3683
  "import.js"
3572
3684
  ]
3573
3685
  },
3574
- "openapi:get": {
3686
+ "organizations:create": {
3575
3687
  "aliases": [],
3576
- "args": {
3577
- "slug": {
3578
- "description": "Slug of the OpenAPI specification to retrieve",
3579
- "name": "slug",
3580
- "required": true
3581
- }
3582
- },
3583
- "description": "Get an OpenAPI specification by slug",
3688
+ "args": {},
3689
+ "description": "Create a new organization",
3584
3690
  "examples": [
3585
3691
  {
3586
- "command": "<%= config.bin %> <%= command.id %> query",
3587
- "description": "Get a specification (YAML format, default)"
3588
- },
3589
- {
3590
- "command": "<%= config.bin %> <%= command.id %> query --format=json",
3591
- "description": "Get specification in JSON format"
3692
+ "command": "<%= config.bin %> <%= command.id %>",
3693
+ "description": "Interactively create an organization"
3592
3694
  },
3593
3695
  {
3594
- "command": "<%= config.bin %> <%= command.id %> query --web",
3595
- "description": "Open specification in browser"
3696
+ "command": "<%= config.bin %> <%= command.id %> --name \"Acme Corp\"",
3697
+ "description": "Create an organization named \"Acme Corp\""
3596
3698
  },
3597
3699
  {
3598
- "command": "<%= config.bin %> <%= command.id %> query > query-api.yaml",
3599
- "description": "Pipe to file"
3700
+ "command": "<%= config.bin %> <%= command.id %> --name \"Acme Corp\" --default-role member",
3701
+ "description": "Create an organization with a default member role"
3600
3702
  }
3601
3703
  ],
3602
3704
  "flags": {
3603
- "format": {
3604
- "description": "Output format: yaml (default), json",
3605
- "name": "format",
3606
- "default": "yaml",
3705
+ "default-role": {
3706
+ "description": "Default role assigned to new members",
3707
+ "name": "default-role",
3708
+ "required": false,
3607
3709
  "hasDynamicHelp": false,
3608
3710
  "multiple": false,
3609
- "options": [
3610
- "yaml",
3611
- "json"
3612
- ],
3613
3711
  "type": "option"
3614
3712
  },
3615
- "web": {
3616
- "char": "w",
3617
- "description": "Open in web browser",
3618
- "name": "web",
3713
+ "name": {
3714
+ "description": "Organization name",
3715
+ "name": "name",
3716
+ "required": false,
3717
+ "hasDynamicHelp": false,
3718
+ "multiple": false,
3719
+ "type": "option"
3720
+ }
3721
+ },
3722
+ "hasDynamicHelp": false,
3723
+ "hiddenAliases": [
3724
+ "organization:create",
3725
+ "organisations:create",
3726
+ "organisation:create",
3727
+ "org:create",
3728
+ "orgs:create"
3729
+ ],
3730
+ "id": "organizations:create",
3731
+ "pluginAlias": "@sanity/cli",
3732
+ "pluginName": "@sanity/cli",
3733
+ "pluginType": "core",
3734
+ "strict": true,
3735
+ "isESM": true,
3736
+ "relativePath": [
3737
+ "dist",
3738
+ "commands",
3739
+ "organizations",
3740
+ "create.js"
3741
+ ]
3742
+ },
3743
+ "organizations:delete": {
3744
+ "aliases": [],
3745
+ "args": {
3746
+ "organizationId": {
3747
+ "description": "Organization ID to delete",
3748
+ "name": "organizationId",
3749
+ "required": true
3750
+ }
3751
+ },
3752
+ "description": "Delete an organization",
3753
+ "examples": [
3754
+ {
3755
+ "command": "<%= config.bin %> <%= command.id %> org-abc123",
3756
+ "description": "Delete an organization (prompts for confirmation)"
3757
+ },
3758
+ {
3759
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --force",
3760
+ "description": "Delete an organization without confirmation"
3761
+ }
3762
+ ],
3763
+ "flags": {
3764
+ "force": {
3765
+ "description": "Do not prompt for delete confirmation - forcefully delete",
3766
+ "name": "force",
3767
+ "required": false,
3619
3768
  "allowNo": false,
3620
3769
  "type": "boolean"
3621
3770
  }
3622
3771
  },
3623
3772
  "hasDynamicHelp": false,
3624
- "hiddenAliases": [],
3625
- "id": "openapi:get",
3773
+ "hiddenAliases": [
3774
+ "organization:delete",
3775
+ "organisations:delete",
3776
+ "organisation:delete",
3777
+ "org:delete",
3778
+ "orgs:delete"
3779
+ ],
3780
+ "id": "organizations:delete",
3626
3781
  "pluginAlias": "@sanity/cli",
3627
3782
  "pluginName": "@sanity/cli",
3628
3783
  "pluginType": "core",
@@ -3631,46 +3786,139 @@
3631
3786
  "relativePath": [
3632
3787
  "dist",
3633
3788
  "commands",
3634
- "openapi",
3789
+ "organizations",
3790
+ "delete.js"
3791
+ ]
3792
+ },
3793
+ "organizations:get": {
3794
+ "aliases": [],
3795
+ "args": {
3796
+ "organizationId": {
3797
+ "description": "Organization ID",
3798
+ "name": "organizationId",
3799
+ "required": true
3800
+ }
3801
+ },
3802
+ "description": "Get details of an organization",
3803
+ "examples": [
3804
+ {
3805
+ "command": "<%= config.bin %> <%= command.id %> org-abc123",
3806
+ "description": "Get details of a specific organization"
3807
+ }
3808
+ ],
3809
+ "flags": {},
3810
+ "hasDynamicHelp": false,
3811
+ "hiddenAliases": [
3812
+ "organization:get",
3813
+ "organisations:get",
3814
+ "organisation:get",
3815
+ "org:get",
3816
+ "orgs:get"
3817
+ ],
3818
+ "id": "organizations:get",
3819
+ "pluginAlias": "@sanity/cli",
3820
+ "pluginName": "@sanity/cli",
3821
+ "pluginType": "core",
3822
+ "strict": true,
3823
+ "isESM": true,
3824
+ "relativePath": [
3825
+ "dist",
3826
+ "commands",
3827
+ "organizations",
3635
3828
  "get.js"
3636
3829
  ]
3637
3830
  },
3638
- "openapi:list": {
3831
+ "organizations:list": {
3639
3832
  "aliases": [],
3640
3833
  "args": {},
3641
- "description": "List all available OpenAPI specifications",
3834
+ "description": "List organizations you are a member of",
3642
3835
  "examples": [
3643
3836
  {
3644
3837
  "command": "<%= config.bin %> <%= command.id %>",
3645
- "description": "List all available OpenAPI specs"
3838
+ "description": "List all your organizations"
3839
+ }
3840
+ ],
3841
+ "flags": {},
3842
+ "hasDynamicHelp": false,
3843
+ "hiddenAliases": [
3844
+ "organization:list",
3845
+ "organisations:list",
3846
+ "organisation:list",
3847
+ "org:list",
3848
+ "orgs:list"
3849
+ ],
3850
+ "id": "organizations:list",
3851
+ "pluginAlias": "@sanity/cli",
3852
+ "pluginName": "@sanity/cli",
3853
+ "pluginType": "core",
3854
+ "strict": true,
3855
+ "isESM": true,
3856
+ "relativePath": [
3857
+ "dist",
3858
+ "commands",
3859
+ "organizations",
3860
+ "list.js"
3861
+ ]
3862
+ },
3863
+ "organizations:update": {
3864
+ "aliases": [],
3865
+ "args": {
3866
+ "organizationId": {
3867
+ "description": "Organization ID",
3868
+ "name": "organizationId",
3869
+ "required": true
3870
+ }
3871
+ },
3872
+ "description": "Update an organization",
3873
+ "examples": [
3874
+ {
3875
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --name \"New Name\"",
3876
+ "description": "Rename an organization"
3646
3877
  },
3647
3878
  {
3648
- "command": "<%= config.bin %> <%= command.id %> --json",
3649
- "description": "List with JSON output"
3879
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --slug new-slug",
3880
+ "description": "Set the organization slug (requires authSAML feature)"
3650
3881
  },
3651
3882
  {
3652
- "command": "<%= config.bin %> <%= command.id %> --web",
3653
- "description": "Open HTTP Reference in browser"
3883
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --default-role viewer",
3884
+ "description": "Change the default member role"
3654
3885
  }
3655
3886
  ],
3656
3887
  "flags": {
3657
- "json": {
3658
- "description": "Output JSON",
3659
- "name": "json",
3660
- "allowNo": false,
3661
- "type": "boolean"
3888
+ "default-role": {
3889
+ "description": "New default role for new members",
3890
+ "name": "default-role",
3891
+ "required": false,
3892
+ "hasDynamicHelp": false,
3893
+ "multiple": false,
3894
+ "type": "option"
3662
3895
  },
3663
- "web": {
3664
- "char": "w",
3665
- "description": "Open HTTP Reference in web browser",
3666
- "name": "web",
3667
- "allowNo": false,
3668
- "type": "boolean"
3896
+ "name": {
3897
+ "description": "New organization name",
3898
+ "name": "name",
3899
+ "required": false,
3900
+ "hasDynamicHelp": false,
3901
+ "multiple": false,
3902
+ "type": "option"
3903
+ },
3904
+ "slug": {
3905
+ "description": "New URL slug (requires authSAML feature on the organization)",
3906
+ "name": "slug",
3907
+ "required": false,
3908
+ "hasDynamicHelp": false,
3909
+ "multiple": false,
3910
+ "type": "option"
3669
3911
  }
3670
3912
  },
3671
3913
  "hasDynamicHelp": false,
3672
- "hiddenAliases": [],
3673
- "id": "openapi:list",
3914
+ "hiddenAliases": [
3915
+ "organization:update",
3916
+ "organisations:update",
3917
+ "organisation:update",
3918
+ "org:update",
3919
+ "orgs:update"
3920
+ ],
3921
+ "id": "organizations:update",
3674
3922
  "pluginAlias": "@sanity/cli",
3675
3923
  "pluginName": "@sanity/cli",
3676
3924
  "pluginType": "core",
@@ -3679,8 +3927,8 @@
3679
3927
  "relativePath": [
3680
3928
  "dist",
3681
3929
  "commands",
3682
- "openapi",
3683
- "list.js"
3930
+ "organizations",
3931
+ "update.js"
3684
3932
  ]
3685
3933
  },
3686
3934
  "projects:create": {
@@ -5196,5 +5444,5 @@
5196
5444
  ]
5197
5445
  }
5198
5446
  },
5199
- "version": "7.8.0"
5447
+ "version": "7.10.0"
5200
5448
  }