@sanity/cli 7.7.0 → 7.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +17 -2
  2. package/dist/actions/auth/ensureAuthenticated.js +1 -1
  3. package/dist/actions/auth/ensureAuthenticated.js.map +1 -1
  4. package/dist/actions/auth/login/validateToken.js +1 -1
  5. package/dist/actions/auth/login/validateToken.js.map +1 -1
  6. package/dist/actions/build/buildApp.js +2 -3
  7. package/dist/actions/build/buildApp.js.map +1 -1
  8. package/dist/actions/build/buildStudio.js +1 -2
  9. package/dist/actions/build/buildStudio.js.map +1 -1
  10. package/dist/actions/deploy/createUserApplication.js +8 -8
  11. package/dist/actions/deploy/createUserApplication.js.map +1 -1
  12. package/dist/actions/deploy/deployApp.js +121 -24
  13. package/dist/actions/deploy/deployApp.js.map +1 -1
  14. package/dist/actions/deploy/deployChecks.js +99 -68
  15. package/dist/actions/deploy/deployChecks.js.map +1 -1
  16. package/dist/actions/deploy/deployRunner.js +43 -24
  17. package/dist/actions/deploy/deployRunner.js.map +1 -1
  18. package/dist/actions/deploy/deployStudio.js +126 -23
  19. package/dist/actions/deploy/deployStudio.js.map +1 -1
  20. package/dist/actions/deploy/deploymentPlan.js +29 -30
  21. package/dist/actions/deploy/deploymentPlan.js.map +1 -1
  22. package/dist/actions/deploy/findUserApplication.js +39 -14
  23. package/dist/actions/deploy/findUserApplication.js.map +1 -1
  24. package/dist/actions/deploy/resolveDeployTarget.js +43 -0
  25. package/dist/actions/deploy/resolveDeployTarget.js.map +1 -1
  26. package/dist/actions/dev/servers/getDevServerConfig.js +1 -1
  27. package/dist/actions/dev/servers/getDevServerConfig.js.map +1 -1
  28. package/dist/actions/dev/servers/startStudioDevServer.js +1 -2
  29. package/dist/actions/dev/servers/startStudioDevServer.js.map +1 -1
  30. package/dist/actions/graphql/SchemaError.js.map +1 -1
  31. package/dist/actions/graphql/extractGraphQLAPIs.js +3 -1
  32. package/dist/actions/graphql/extractGraphQLAPIs.js.map +1 -1
  33. package/dist/actions/manifest/extractCoreAppManifest.js +1 -1
  34. package/dist/actions/manifest/extractCoreAppManifest.js.map +1 -1
  35. package/dist/actions/organizations/getOrganization.js +1 -1
  36. package/dist/actions/organizations/getOrganization.js.map +1 -1
  37. package/dist/actions/schema/validateAction.js +1 -1
  38. package/dist/actions/schema/validateAction.js.map +1 -1
  39. package/dist/actions/skills/setupSkills.js +1 -1
  40. package/dist/actions/skills/setupSkills.js.map +1 -1
  41. package/dist/actions/undeploy/adapters.js +101 -0
  42. package/dist/actions/undeploy/adapters.js.map +1 -0
  43. package/dist/actions/undeploy/runUndeploy.js +165 -0
  44. package/dist/actions/undeploy/runUndeploy.js.map +1 -0
  45. package/dist/actions/undeploy/undeployPlan.js +108 -0
  46. package/dist/actions/undeploy/undeployPlan.js.map +1 -0
  47. package/dist/commands/datasets/copy.js +2 -1
  48. package/dist/commands/datasets/copy.js.map +1 -1
  49. package/dist/commands/mcp/configure.js +1 -1
  50. package/dist/commands/mcp/configure.js.map +1 -1
  51. package/dist/commands/projects/create.js +18 -13
  52. package/dist/commands/projects/create.js.map +1 -1
  53. package/dist/commands/projects/list.js +2 -1
  54. package/dist/commands/projects/list.js.map +1 -1
  55. package/dist/commands/schemas/validate.js +3 -2
  56. package/dist/commands/schemas/validate.js.map +1 -1
  57. package/dist/commands/skills/install.js +1 -1
  58. package/dist/commands/skills/install.js.map +1 -1
  59. package/dist/commands/tokens/list.js +1 -1
  60. package/dist/commands/tokens/list.js.map +1 -1
  61. package/dist/commands/undeploy.js +36 -74
  62. package/dist/commands/undeploy.js.map +1 -1
  63. package/dist/util/checks.js +83 -0
  64. package/dist/util/checks.js.map +1 -0
  65. package/dist/util/toStderrOutput.js +13 -0
  66. package/dist/util/toStderrOutput.js.map +1 -0
  67. package/oclif.manifest.json +1298 -1271
  68. package/package.json +6 -7
  69. package/dist/actions/undeploy/getStudioOrAppUserApplication.js +0 -36
  70. package/dist/actions/undeploy/getStudioOrAppUserApplication.js.map +0 -1
  71. package/dist/util/compareDependencyVersions.js +0 -110
  72. package/dist/util/compareDependencyVersions.js.map +0 -1
  73. package/dist/util/getErrorMessage.js +0 -28
  74. package/dist/util/getErrorMessage.js.map +0 -1
@@ -1011,7 +1011,34 @@
1011
1011
  "aliases": [],
1012
1012
  "args": {},
1013
1013
  "description": "Removes the deployed Sanity Studio/App from Sanity hosting",
1014
+ "examples": [
1015
+ {
1016
+ "command": "<%= config.bin %> <%= command.id %>",
1017
+ "description": "Undeploy the studio or application after confirming"
1018
+ },
1019
+ {
1020
+ "command": "<%= config.bin %> <%= command.id %> --dry-run",
1021
+ "description": "Report what would be undeployed without deleting anything"
1022
+ },
1023
+ {
1024
+ "command": "<%= config.bin %> <%= command.id %> --json --yes",
1025
+ "description": "Undeploy without prompting and report the result as JSON"
1026
+ }
1027
+ ],
1014
1028
  "flags": {
1029
+ "dry-run": {
1030
+ "description": "Report what would be undeployed without deleting anything",
1031
+ "name": "dry-run",
1032
+ "allowNo": false,
1033
+ "type": "boolean"
1034
+ },
1035
+ "json": {
1036
+ "char": "j",
1037
+ "description": "Output the result as JSON",
1038
+ "name": "json",
1039
+ "allowNo": false,
1040
+ "type": "boolean"
1041
+ },
1015
1042
  "yes": {
1016
1043
  "char": "y",
1017
1044
  "description": "Unattended mode, answers \"yes\" to any \"yes/no\" prompt and otherwise uses defaults",
@@ -1473,156 +1500,118 @@
1473
1500
  "list.js"
1474
1501
  ]
1475
1502
  },
1476
- "datasets:copy": {
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": {
1477
1525
  "aliases": [],
1478
1526
  "args": {
1479
- "source": {
1480
- "description": "Name of the dataset to copy from",
1481
- "name": "source",
1482
- "required": false
1483
- },
1484
- "target": {
1485
- "description": "Name of the dataset to copy to",
1486
- "name": "target",
1487
- "required": false
1527
+ "path": {
1528
+ "description": "Path or URL to article, found in search results and docs content as links",
1529
+ "name": "path",
1530
+ "required": true
1488
1531
  }
1489
1532
  },
1490
- "description": "Copy a dataset or manage copy jobs",
1533
+ "description": "Read an article in terminal",
1491
1534
  "examples": [
1492
1535
  {
1493
- "command": "<%= config.bin %> <%= command.id %>",
1494
- "description": "Interactively copy a dataset"
1495
- },
1496
- {
1497
- "command": "<%= config.bin %> <%= command.id %> source-dataset",
1498
- "description": "Copy from source-dataset (prompts for target)"
1499
- },
1500
- {
1501
- "command": "<%= config.bin %> <%= command.id %> source-dataset target-dataset",
1502
- "description": "Copy from source-dataset to target-dataset"
1536
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
1537
+ "description": "Read as markdown in terminal"
1503
1538
  },
1504
1539
  {
1505
- "command": "<%= config.bin %> <%= command.id %> --skip-history source target",
1506
- "description": "Copy without preserving document history (faster for large datasets)"
1540
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
1541
+ "description": "Read using full URL"
1507
1542
  },
1508
1543
  {
1509
- "command": "<%= config.bin %> <%= command.id %> --skip-content-releases source target",
1510
- "description": "Copy without content release documents"
1544
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
1545
+ "description": "Open in web browser"
1511
1546
  },
1512
1547
  {
1513
- "command": "<%= config.bin %> <%= command.id %> --detach source target",
1514
- "description": "Start copy job without waiting for completion"
1515
- },
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": [
1516
1589
  {
1517
- "command": "<%= config.bin %> <%= command.id %> --attach <job-id>",
1518
- "description": "Attach to a running copy job to follow progress"
1590
+ "command": "<%= config.bin %> <%= command.id %> schema",
1591
+ "description": "Search for documentation about schemas"
1519
1592
  },
1520
1593
  {
1521
- "command": "<%= config.bin %> <%= command.id %> --list",
1522
- "description": "List all dataset copy jobs"
1594
+ "command": "<%= config.bin %> <%= command.id %> \"groq functions\"",
1595
+ "description": "Search with phrase"
1523
1596
  },
1524
1597
  {
1525
- "command": "<%= config.bin %> <%= command.id %> --list --offset 2 --limit 10",
1526
- "description": "List copy jobs with pagination"
1598
+ "command": "<%= config.bin %> <%= command.id %> \"deployment\" --limit=5",
1599
+ "description": "Limit search results"
1527
1600
  }
1528
1601
  ],
1529
1602
  "flags": {
1530
- "project-id": {
1531
- "char": "p",
1532
- "description": "Project ID to copy dataset in (overrides CLI configuration)",
1533
- "helpGroup": "OVERRIDE",
1534
- "name": "project-id",
1535
- "hasDynamicHelp": false,
1536
- "helpValue": "<id>",
1537
- "multiple": false,
1538
- "type": "option"
1539
- },
1540
- "attach": {
1541
- "description": "Attach to the running copy process to show progress",
1542
- "exclusive": [
1543
- "list",
1544
- "detach",
1545
- "skip-history"
1546
- ],
1547
- "name": "attach",
1548
- "required": false,
1549
- "hasDynamicHelp": false,
1550
- "multiple": false,
1551
- "type": "option"
1552
- },
1553
- "detach": {
1554
- "description": "Start the copy without waiting for it to finish",
1555
- "exclusive": [
1556
- "list",
1557
- "attach"
1558
- ],
1559
- "name": "detach",
1560
- "required": false,
1561
- "allowNo": false,
1562
- "type": "boolean"
1563
- },
1564
1603
  "limit": {
1565
- "dependsOn": [
1566
- "list"
1567
- ],
1568
- "description": "Maximum number of jobs returned (default 10, max 1000)",
1604
+ "description": "Maximum number of results to return",
1569
1605
  "name": "limit",
1570
- "required": false,
1571
- "hasDynamicHelp": false,
1572
- "multiple": false,
1573
- "type": "option"
1574
- },
1575
- "list": {
1576
- "description": "Lists all dataset copy jobs",
1577
- "exclusive": [
1578
- "attach",
1579
- "detach",
1580
- "skip-history"
1581
- ],
1582
- "name": "list",
1583
- "required": false,
1584
- "allowNo": false,
1585
- "type": "boolean"
1586
- },
1587
- "offset": {
1588
- "dependsOn": [
1589
- "list"
1590
- ],
1591
- "description": "Start position in the list of jobs (default 0)",
1592
- "name": "offset",
1593
- "required": false,
1606
+ "default": 10,
1594
1607
  "hasDynamicHelp": false,
1595
1608
  "multiple": false,
1596
1609
  "type": "option"
1597
- },
1598
- "skip-content-releases": {
1599
- "description": "Don't copy content release documents to the target dataset",
1600
- "exclusive": [
1601
- "list",
1602
- "attach"
1603
- ],
1604
- "name": "skip-content-releases",
1605
- "required": false,
1606
- "allowNo": false,
1607
- "type": "boolean"
1608
- },
1609
- "skip-history": {
1610
- "description": "Don't preserve document history on copy",
1611
- "exclusive": [
1612
- "list",
1613
- "attach"
1614
- ],
1615
- "name": "skip-history",
1616
- "required": false,
1617
- "allowNo": false,
1618
- "type": "boolean"
1619
1610
  }
1620
1611
  },
1621
1612
  "hasDynamicHelp": false,
1622
- "hiddenAliases": [
1623
- "dataset:copy"
1624
- ],
1625
- "id": "datasets:copy",
1613
+ "hiddenAliases": [],
1614
+ "id": "docs:search",
1626
1615
  "pluginAlias": "@sanity/cli",
1627
1616
  "pluginName": "@sanity/cli",
1628
1617
  "pluginType": "core",
@@ -1631,38 +1620,46 @@
1631
1620
  "relativePath": [
1632
1621
  "dist",
1633
1622
  "commands",
1634
- "datasets",
1635
- "copy.js"
1623
+ "docs",
1624
+ "search.js"
1636
1625
  ]
1637
1626
  },
1638
- "datasets:create": {
1627
+ "documents:create": {
1639
1628
  "aliases": [],
1640
1629
  "args": {
1641
- "name": {
1642
- "description": "Name of the dataset to create",
1643
- "name": "name",
1630
+ "file": {
1631
+ "description": "JSON file to create document(s) from",
1632
+ "name": "file",
1644
1633
  "required": false
1645
1634
  }
1646
1635
  },
1647
- "description": "Create a new dataset for the project",
1636
+ "description": "Create one or more documents",
1648
1637
  "examples": [
1638
+ {
1639
+ "command": "<%= config.bin %> <%= command.id %> myDocument.json",
1640
+ "description": "Create the document specified in \"myDocument.json\""
1641
+ },
1649
1642
  {
1650
1643
  "command": "<%= config.bin %> <%= command.id %>",
1651
- "description": "Interactively create a dataset"
1644
+ "description": "Open configured $EDITOR and create the specified document(s)"
1652
1645
  },
1653
1646
  {
1654
- "command": "<%= config.bin %> <%= command.id %> my-dataset",
1655
- "description": "Create a dataset named \"my-dataset\""
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"
1656
1649
  },
1657
1650
  {
1658
- "command": "<%= config.bin %> <%= command.id %> my-dataset --visibility private",
1659
- "description": "Create a private dataset named \"my-dataset\""
1660
- }
1661
- ],
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."
1653
+ },
1654
+ {
1655
+ "command": "<%= config.bin %> <%= command.id %> myDocument.json --project-id abc123",
1656
+ "description": "Create documents in a specific project"
1657
+ }
1658
+ ],
1662
1659
  "flags": {
1663
1660
  "project-id": {
1664
1661
  "char": "p",
1665
- "description": "Project ID to create dataset in (overrides CLI configuration)",
1662
+ "description": "Project ID to create document(s) in (overrides CLI configuration)",
1666
1663
  "helpGroup": "OVERRIDE",
1667
1664
  "name": "project-id",
1668
1665
  "hasDynamicHelp": false,
@@ -1670,41 +1667,53 @@
1670
1667
  "multiple": false,
1671
1668
  "type": "option"
1672
1669
  },
1673
- "embeddings": {
1674
- "description": "Enable embeddings for this dataset",
1675
- "name": "embeddings",
1676
- "allowNo": false,
1677
- "type": "boolean"
1678
- },
1679
- "embeddings-projection": {
1680
- "dependsOn": [
1681
- "embeddings"
1682
- ],
1683
- "description": "GROQ projection for embeddings indexing (e.g. \"{ title, body }\")",
1684
- "name": "embeddings-projection",
1670
+ "dataset": {
1671
+ "char": "d",
1672
+ "description": "Dataset to create document(s) in (overrides CLI configuration)",
1673
+ "helpGroup": "OVERRIDE",
1674
+ "name": "dataset",
1685
1675
  "hasDynamicHelp": false,
1676
+ "helpValue": "<name>",
1686
1677
  "multiple": false,
1687
1678
  "type": "option"
1688
1679
  },
1689
- "visibility": {
1690
- "description": "Set visibility for this dataset (custom/private/public)",
1691
- "name": "visibility",
1692
- "required": false,
1680
+ "id": {
1681
+ "description": "Specify a document ID to use. Will fetch remote document ID and populate editor.",
1682
+ "name": "id",
1693
1683
  "hasDynamicHelp": false,
1694
1684
  "multiple": false,
1695
- "options": [
1696
- "custom",
1697
- "private",
1698
- "public"
1699
- ],
1700
1685
  "type": "option"
1686
+ },
1687
+ "json5": {
1688
+ "description": "Use JSON5 file type to allow a \"simplified\" version of JSON",
1689
+ "name": "json5",
1690
+ "allowNo": false,
1691
+ "type": "boolean"
1692
+ },
1693
+ "missing": {
1694
+ "description": "On duplicate document IDs, don't modify the target document(s)",
1695
+ "name": "missing",
1696
+ "allowNo": false,
1697
+ "type": "boolean"
1698
+ },
1699
+ "replace": {
1700
+ "description": "On duplicate document IDs, replace existing document with specified document(s)",
1701
+ "name": "replace",
1702
+ "allowNo": false,
1703
+ "type": "boolean"
1704
+ },
1705
+ "watch": {
1706
+ "description": "Write the documents whenever the target file or buffer changes",
1707
+ "name": "watch",
1708
+ "allowNo": false,
1709
+ "type": "boolean"
1701
1710
  }
1702
1711
  },
1703
1712
  "hasDynamicHelp": false,
1704
1713
  "hiddenAliases": [
1705
- "dataset:create"
1714
+ "document:create"
1706
1715
  ],
1707
- "id": "datasets:create",
1716
+ "id": "documents:create",
1708
1717
  "pluginAlias": "@sanity/cli",
1709
1718
  "pluginName": "@sanity/cli",
1710
1719
  "pluginType": "core",
@@ -1713,34 +1722,51 @@
1713
1722
  "relativePath": [
1714
1723
  "dist",
1715
1724
  "commands",
1716
- "datasets",
1725
+ "documents",
1717
1726
  "create.js"
1718
1727
  ]
1719
1728
  },
1720
- "datasets:delete": {
1729
+ "documents:delete": {
1721
1730
  "aliases": [],
1722
1731
  "args": {
1723
- "datasetName": {
1724
- "description": "Dataset name to delete",
1725
- "name": "datasetName",
1732
+ "id": {
1733
+ "description": "Document ID to delete",
1734
+ "name": "id",
1726
1735
  "required": true
1736
+ },
1737
+ "ids": {
1738
+ "description": "Additional document IDs to delete",
1739
+ "name": "ids",
1740
+ "required": false
1727
1741
  }
1728
1742
  },
1729
- "description": "Delete a dataset from the project",
1743
+ "description": "Delete one or more documents from the project's configured dataset",
1730
1744
  "examples": [
1731
1745
  {
1732
- "command": "<%= config.bin %> <%= command.id %> my-dataset",
1733
- "description": "Delete a specific dataset"
1746
+ "command": "<%= config.bin %> <%= command.id %> myDocId",
1747
+ "description": "Delete the document with the ID \"myDocId\""
1734
1748
  },
1735
1749
  {
1736
- "command": "<%= config.bin %> <%= command.id %> my-dataset --force",
1737
- "description": "Delete a specific dataset without confirmation"
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\""
1756
+ },
1757
+ {
1758
+ "command": "<%= config.bin %> <%= command.id %> doc1 doc2",
1759
+ "description": "Delete the document with ID \"doc1\" and \"doc2\""
1760
+ },
1761
+ {
1762
+ "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
1763
+ "description": "Delete a document from a specific project"
1738
1764
  }
1739
1765
  ],
1740
1766
  "flags": {
1741
1767
  "project-id": {
1742
1768
  "char": "p",
1743
- "description": "Project ID to delete dataset from (overrides CLI configuration)",
1769
+ "description": "Project ID to delete from (overrides CLI configuration)",
1744
1770
  "helpGroup": "OVERRIDE",
1745
1771
  "name": "project-id",
1746
1772
  "hasDynamicHelp": false,
@@ -1748,70 +1774,66 @@
1748
1774
  "multiple": false,
1749
1775
  "type": "option"
1750
1776
  },
1751
- "force": {
1752
- "description": "Do not prompt for delete confirmation - forcefully delete",
1753
- "name": "force",
1754
- "required": false,
1755
- "allowNo": false,
1756
- "type": "boolean"
1777
+ "dataset": {
1778
+ "char": "d",
1779
+ "description": "Dataset to delete from (overrides CLI configuration)",
1780
+ "helpGroup": "OVERRIDE",
1781
+ "name": "dataset",
1782
+ "hasDynamicHelp": false,
1783
+ "helpValue": "<name>",
1784
+ "multiple": false,
1785
+ "type": "option"
1757
1786
  }
1758
1787
  },
1759
1788
  "hasDynamicHelp": false,
1760
1789
  "hiddenAliases": [
1761
- "dataset:delete"
1790
+ "document:delete"
1762
1791
  ],
1763
- "id": "datasets:delete",
1792
+ "id": "documents:delete",
1764
1793
  "pluginAlias": "@sanity/cli",
1765
1794
  "pluginName": "@sanity/cli",
1766
1795
  "pluginType": "core",
1767
- "strict": true,
1796
+ "strict": false,
1768
1797
  "isESM": true,
1769
1798
  "relativePath": [
1770
1799
  "dist",
1771
1800
  "commands",
1772
- "datasets",
1801
+ "documents",
1773
1802
  "delete.js"
1774
1803
  ]
1775
1804
  },
1776
- "datasets:export": {
1805
+ "documents:get": {
1777
1806
  "aliases": [],
1778
1807
  "args": {
1779
- "name": {
1780
- "description": "Name of the dataset to export",
1781
- "name": "name"
1782
- },
1783
- "destination": {
1784
- "description": "Output destination file path",
1785
- "name": "destination"
1808
+ "documentId": {
1809
+ "description": "Document ID to retrieve",
1810
+ "name": "documentId",
1811
+ "required": true
1786
1812
  }
1787
1813
  },
1788
- "description": "Export a dataset to a local gzipped tarball. Assets returning 401, 403, or 404 are excluded from the export.",
1814
+ "description": "Get and print a document by ID",
1789
1815
  "examples": [
1790
1816
  {
1791
- "command": "<%= config.bin %> <%= command.id %> moviedb localPath.tar.gz",
1792
- "description": "Export dataset \"moviedb\" to localPath.tar.gz"
1793
- },
1794
- {
1795
- "command": "<%= config.bin %> <%= command.id %> moviedb assetless.tar.gz --no-assets",
1796
- "description": "Export dataset without assets"
1817
+ "command": "<%= config.bin %> <%= command.id %> myDocId",
1818
+ "description": "Get the document with ID \"myDocId\""
1797
1819
  },
1798
1820
  {
1799
- "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --raw",
1800
- "description": "Export raw documents without asset reference rewriting"
1821
+ "command": "<%= config.bin %> <%= command.id %> myDocId --pretty",
1822
+ "description": "Get document with colorized JSON output"
1801
1823
  },
1802
1824
  {
1803
- "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --types products,shops",
1804
- "description": "Export specific document types"
1825
+ "command": "<%= config.bin %> <%= command.id %> myDocId --dataset production",
1826
+ "description": "Get document from a specific dataset"
1805
1827
  },
1806
1828
  {
1807
- "command": "<%= config.bin %> <%= command.id %> moviedb moviedb.tar.gz --no-strict-asset-verification",
1808
- "description": "Export dataset without aborting on asset verification failures"
1829
+ "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
1830
+ "description": "Get a document from a specific project"
1809
1831
  }
1810
1832
  ],
1811
1833
  "flags": {
1812
1834
  "project-id": {
1813
1835
  "char": "p",
1814
- "description": "Project ID to export dataset from (overrides CLI configuration)",
1836
+ "description": "Project ID to get document from (overrides CLI configuration)",
1815
1837
  "helpGroup": "OVERRIDE",
1816
1838
  "name": "project-id",
1817
1839
  "hasDynamicHelp": false,
@@ -1819,75 +1841,28 @@
1819
1841
  "multiple": false,
1820
1842
  "type": "option"
1821
1843
  },
1822
- "asset-concurrency": {
1823
- "description": "Concurrent number of asset downloads",
1824
- "name": "asset-concurrency",
1825
- "default": 8,
1826
- "hasDynamicHelp": false,
1827
- "multiple": false,
1828
- "type": "option"
1829
- },
1830
- "mode": {
1831
- "description": "Export mode ('cursor' is faster for large datasets but may miss concurrent changes)",
1832
- "name": "mode",
1833
- "default": "stream",
1844
+ "dataset": {
1845
+ "char": "d",
1846
+ "description": "Dataset to get document from (overrides CLI configuration)",
1847
+ "helpGroup": "OVERRIDE",
1848
+ "name": "dataset",
1834
1849
  "hasDynamicHelp": false,
1850
+ "helpValue": "<name>",
1835
1851
  "multiple": false,
1836
- "options": [
1837
- "stream",
1838
- "cursor"
1839
- ],
1840
1852
  "type": "option"
1841
1853
  },
1842
- "no-assets": {
1843
- "description": "Export only non-asset documents and remove references to image assets",
1844
- "name": "no-assets",
1845
- "allowNo": false,
1846
- "type": "boolean"
1847
- },
1848
- "no-compress": {
1849
- "description": "Skips compressing tarball entries (still generates a gzip file)",
1850
- "name": "no-compress",
1851
- "allowNo": false,
1852
- "type": "boolean"
1853
- },
1854
- "no-drafts": {
1855
- "description": "Export only published versions of documents",
1856
- "name": "no-drafts",
1857
- "allowNo": false,
1858
- "type": "boolean"
1859
- },
1860
- "no-strict-asset-verification": {
1861
- "description": "Do not abort the export when an asset fails hash or content-length verification",
1862
- "name": "no-strict-asset-verification",
1863
- "allowNo": false,
1864
- "type": "boolean"
1865
- },
1866
- "overwrite": {
1867
- "description": "Overwrite any file with the same name",
1868
- "name": "overwrite",
1869
- "allowNo": false,
1870
- "type": "boolean"
1871
- },
1872
- "raw": {
1873
- "description": "Extract only documents, without rewriting asset references",
1874
- "name": "raw",
1854
+ "pretty": {
1855
+ "description": "Colorize JSON output",
1856
+ "name": "pretty",
1875
1857
  "allowNo": false,
1876
1858
  "type": "boolean"
1877
- },
1878
- "types": {
1879
- "description": "Defines which document types to export (comma-separated)",
1880
- "name": "types",
1881
- "hasDynamicHelp": false,
1882
- "multiple": false,
1883
- "type": "option"
1884
1859
  }
1885
1860
  },
1886
1861
  "hasDynamicHelp": false,
1887
1862
  "hiddenAliases": [
1888
- "dataset:export"
1863
+ "document:get"
1889
1864
  ],
1890
- "id": "datasets:export",
1865
+ "id": "documents:get",
1891
1866
  "pluginAlias": "@sanity/cli",
1892
1867
  "pluginName": "@sanity/cli",
1893
1868
  "pluginType": "core",
@@ -1896,151 +1871,96 @@
1896
1871
  "relativePath": [
1897
1872
  "dist",
1898
1873
  "commands",
1899
- "datasets",
1900
- "export.js"
1874
+ "documents",
1875
+ "get.js"
1901
1876
  ]
1902
1877
  },
1903
- "datasets:import": {
1878
+ "documents:query": {
1904
1879
  "aliases": [],
1905
1880
  "args": {
1906
- "source": {
1907
- "description": "Source file (use \"-\" for stdin)",
1908
- "name": "source",
1881
+ "query": {
1882
+ "description": "GROQ query to run against the dataset",
1883
+ "name": "query",
1909
1884
  "required": true
1910
- },
1911
- "targetDataset": {
1912
- "description": "Target dataset (prefer --dataset flag instead)",
1913
- "name": "targetDataset",
1914
- "required": false
1915
1885
  }
1916
1886
  },
1917
- "description": "Import documents to a Sanity dataset",
1887
+ "description": "Query for documents",
1918
1888
  "examples": [
1919
1889
  {
1920
- "command": "<%= config.bin %> <%= command.id %> -d staging my-dataset.ndjson",
1921
- "description": "Import \"./my-dataset.ndjson\" into dataset \"staging\""
1890
+ "command": "<%= config.bin %> <%= command.id %> '*[_type == \"movie\"][0..4]'",
1891
+ "description": "Fetch 5 documents of type \"movie\""
1922
1892
  },
1923
1893
  {
1924
- "command": "cat my-dataset.ndjson | <%= config.bin %> <%= command.id %> -d test -",
1925
- "description": "Import into dataset \"test\" from stdin"
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\""
1926
1896
  },
1927
1897
  {
1928
- "command": "<%= config.bin %> <%= command.id %> -p projectId -d staging my-dataset.ndjson",
1929
- "description": "Import with explicit project ID (overrides CLI configuration)"
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"
1930
1900
  },
1931
1901
  {
1932
- "command": "<%= config.bin %> <%= command.id %> -d staging -t someSecretToken my-dataset.ndjson",
1933
- "description": "Import with an explicit token (e.g. for CI/CD)"
1902
+ "command": "<%= config.bin %> <%= command.id %> '*[_type == \"post\"]' --project-id abc123 --dataset production",
1903
+ "description": "Query documents in a specific project and dataset"
1934
1904
  }
1935
1905
  ],
1936
1906
  "flags": {
1937
- "allow-assets-in-different-dataset": {
1938
- "description": "Allow asset documents to reference different project/dataset",
1939
- "name": "allow-assets-in-different-dataset",
1940
- "allowNo": false,
1941
- "type": "boolean"
1942
- },
1943
- "allow-failing-assets": {
1944
- "description": "Skip assets that cannot be fetched/uploaded",
1945
- "name": "allow-failing-assets",
1946
- "allowNo": false,
1947
- "type": "boolean"
1948
- },
1949
- "allow-replacement-characters": {
1950
- "description": "Allow unicode replacement characters in imported documents",
1951
- "name": "allow-replacement-characters",
1952
- "allowNo": false,
1953
- "type": "boolean"
1954
- },
1955
- "allow-system-documents": {
1956
- "description": "Imports system documents",
1957
- "name": "allow-system-documents",
1958
- "allowNo": false,
1959
- "type": "boolean"
1960
- },
1961
- "asset-concurrency": {
1962
- "description": "Number of parallel asset imports",
1963
- "name": "asset-concurrency",
1907
+ "project-id": {
1908
+ "char": "p",
1909
+ "description": "Project ID to query (overrides CLI configuration)",
1910
+ "helpGroup": "OVERRIDE",
1911
+ "name": "project-id",
1964
1912
  "hasDynamicHelp": false,
1913
+ "helpValue": "<id>",
1965
1914
  "multiple": false,
1966
1915
  "type": "option"
1967
1916
  },
1968
1917
  "dataset": {
1969
1918
  "char": "d",
1970
- "description": "Dataset to import to",
1919
+ "description": "Dataset to query (overrides CLI configuration)",
1920
+ "helpGroup": "OVERRIDE",
1971
1921
  "name": "dataset",
1972
1922
  "hasDynamicHelp": false,
1973
1923
  "helpValue": "<name>",
1974
1924
  "multiple": false,
1975
1925
  "type": "option"
1976
1926
  },
1977
- "missing": {
1978
- "description": "Skip documents that already exist",
1979
- "exclusive": [
1980
- "replace"
1981
- ],
1982
- "name": "missing",
1927
+ "anonymous": {
1928
+ "description": "Send the query without any authorization token",
1929
+ "name": "anonymous",
1983
1930
  "allowNo": false,
1984
1931
  "type": "boolean"
1985
1932
  },
1986
- "project-id": {
1987
- "char": "p",
1988
- "description": "Project ID to import to (overrides CLI configuration)",
1989
- "helpGroup": "OVERRIDE",
1990
- "name": "project-id",
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",
1991
1937
  "hasDynamicHelp": false,
1992
- "helpValue": "<id>",
1993
1938
  "multiple": false,
1994
1939
  "type": "option"
1995
1940
  },
1941
+ "pretty": {
1942
+ "description": "Colorize JSON output",
1943
+ "name": "pretty",
1944
+ "allowNo": false,
1945
+ "type": "boolean"
1946
+ },
1996
1947
  "project": {
1997
1948
  "deprecated": {
1998
1949
  "to": "project-id"
1999
1950
  },
2000
- "description": "Project ID to import to",
1951
+ "description": "Project ID to query",
2001
1952
  "hidden": true,
2002
1953
  "name": "project",
2003
1954
  "hasDynamicHelp": false,
2004
1955
  "multiple": false,
2005
1956
  "type": "option"
2006
- },
2007
- "replace": {
2008
- "description": "Replace documents with the same IDs",
2009
- "exclusive": [
2010
- "missing"
2011
- ],
2012
- "name": "replace",
2013
- "allowNo": false,
2014
- "type": "boolean"
2015
- },
2016
- "replace-assets": {
2017
- "description": "Skip reuse of existing assets",
2018
- "name": "replace-assets",
2019
- "allowNo": false,
2020
- "type": "boolean"
2021
- },
2022
- "skip-cross-dataset-references": {
2023
- "description": "Skips references to other datasets",
2024
- "name": "skip-cross-dataset-references",
2025
- "allowNo": false,
2026
- "type": "boolean"
2027
- },
2028
- "token": {
2029
- "char": "t",
2030
- "description": "Token to authenticate with",
2031
- "env": "SANITY_IMPORT_TOKEN",
2032
- "name": "token",
2033
- "required": false,
2034
- "hasDynamicHelp": false,
2035
- "multiple": false,
2036
- "type": "option"
2037
1957
  }
2038
1958
  },
2039
1959
  "hasDynamicHelp": false,
2040
1960
  "hiddenAliases": [
2041
- "dataset:import"
1961
+ "document:query"
2042
1962
  ],
2043
- "id": "datasets:import",
1963
+ "id": "documents:query",
2044
1964
  "pluginAlias": "@sanity/cli",
2045
1965
  "pluginName": "@sanity/cli",
2046
1966
  "pluginType": "core",
@@ -2049,41 +1969,118 @@
2049
1969
  "relativePath": [
2050
1970
  "dist",
2051
1971
  "commands",
2052
- "datasets",
2053
- "import.js"
1972
+ "documents",
1973
+ "query.js"
2054
1974
  ]
2055
1975
  },
2056
- "datasets:list": {
1976
+ "documents:validate": {
2057
1977
  "aliases": [],
2058
1978
  "args": {},
2059
- "description": "List datasets for the project",
1979
+ "description": "Validate documents in a dataset against the studio schema",
2060
1980
  "examples": [
2061
1981
  {
2062
- "command": "<%= config.bin %> <%= command.id %>",
2063
- "description": "List datasets for the project"
1982
+ "command": "<%= config.bin %> <%= command.id %> --workspace default",
1983
+ "description": "Validates all documents in a Sanity project with more than one workspace"
2064
1984
  },
2065
1985
  {
2066
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2067
- "description": "List datasets for a specific project"
1986
+ "command": "<%= config.bin %> <%= command.id %> --workspace default --dataset staging",
1987
+ "description": "Override the dataset specified in the workspace"
1988
+ },
1989
+ {
1990
+ "command": "<%= config.bin %> <%= command.id %> --yes > report.txt",
1991
+ "description": "Save the results of the report into a file"
1992
+ },
1993
+ {
1994
+ "command": "<%= config.bin %> <%= command.id %> --level info",
1995
+ "description": "Report out info level validation markers too"
1996
+ },
1997
+ {
1998
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
1999
+ "description": "Validate documents in a specific project and dataset"
2068
2000
  }
2069
2001
  ],
2070
2002
  "flags": {
2071
2003
  "project-id": {
2072
2004
  "char": "p",
2073
- "description": "Project ID to list datasets for (overrides CLI configuration)",
2074
- "helpGroup": "OVERRIDE",
2005
+ "description": "Override the project ID used. By default, this is derived from the given workspace",
2075
2006
  "name": "project-id",
2076
2007
  "hasDynamicHelp": false,
2077
2008
  "helpValue": "<id>",
2078
2009
  "multiple": false,
2079
2010
  "type": "option"
2011
+ },
2012
+ "dataset": {
2013
+ "char": "d",
2014
+ "description": "Override the dataset used. By default, this is derived from the given workspace",
2015
+ "name": "dataset",
2016
+ "hasDynamicHelp": false,
2017
+ "helpValue": "<name>",
2018
+ "multiple": false,
2019
+ "type": "option"
2020
+ },
2021
+ "file": {
2022
+ "description": "Provide a path to either an .ndjson file or a tarball containing an .ndjson file",
2023
+ "name": "file",
2024
+ "hasDynamicHelp": false,
2025
+ "multiple": false,
2026
+ "type": "option"
2027
+ },
2028
+ "format": {
2029
+ "description": "The output format used to print the found validation markers and report progress",
2030
+ "name": "format",
2031
+ "hasDynamicHelp": false,
2032
+ "multiple": false,
2033
+ "type": "option"
2034
+ },
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"
2045
+ ],
2046
+ "type": "option"
2047
+ },
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"
2055
+ },
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"
2063
+ },
2064
+ "workspace": {
2065
+ "description": "The name of the workspace to use when downloading and validating all documents",
2066
+ "name": "workspace",
2067
+ "hasDynamicHelp": false,
2068
+ "multiple": false,
2069
+ "type": "option"
2070
+ },
2071
+ "yes": {
2072
+ "char": "y",
2073
+ "description": "Skips the first confirmation prompt",
2074
+ "name": "yes",
2075
+ "allowNo": false,
2076
+ "type": "boolean"
2080
2077
  }
2081
2078
  },
2082
2079
  "hasDynamicHelp": false,
2083
2080
  "hiddenAliases": [
2084
- "dataset:list"
2081
+ "document:validate"
2085
2082
  ],
2086
- "id": "datasets:list",
2083
+ "id": "documents:validate",
2087
2084
  "pluginAlias": "@sanity/cli",
2088
2085
  "pluginName": "@sanity/cli",
2089
2086
  "pluginType": "core",
@@ -2092,73 +2089,102 @@
2092
2089
  "relativePath": [
2093
2090
  "dist",
2094
2091
  "commands",
2095
- "datasets",
2096
- "list.js"
2092
+ "documents",
2093
+ "validate.js"
2097
2094
  ]
2098
2095
  },
2099
- "docs:browse": {
2096
+ "graphql:deploy": {
2100
2097
  "aliases": [],
2101
2098
  "args": {},
2102
- "description": "Open Sanity docs in your browser",
2103
- "flags": {},
2104
- "hasDynamicHelp": false,
2105
- "hiddenAliases": [],
2106
- "id": "docs:browse",
2107
- "pluginAlias": "@sanity/cli",
2108
- "pluginName": "@sanity/cli",
2109
- "pluginType": "core",
2110
- "strict": true,
2111
- "enableJsonFlag": false,
2112
- "isESM": true,
2113
- "relativePath": [
2114
- "dist",
2115
- "commands",
2116
- "docs",
2117
- "browse.js"
2118
- ]
2119
- },
2120
- "docs:read": {
2121
- "aliases": [],
2122
- "args": {
2123
- "path": {
2124
- "description": "Path or URL to article, found in search results and docs content as links",
2125
- "name": "path",
2126
- "required": true
2127
- }
2128
- },
2129
- "description": "Read an article in terminal",
2099
+ "description": "Deploy a GraphQL API from the current Sanity schema",
2130
2100
  "examples": [
2131
2101
  {
2132
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
2133
- "description": "Read as markdown in terminal"
2102
+ "command": "<%= config.bin %> <%= command.id %>",
2103
+ "description": "Deploy all defined GraphQL APIs"
2134
2104
  },
2135
2105
  {
2136
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
2137
- "description": "Read using full URL"
2138
- },
2106
+ "command": "<%= config.bin %> <%= command.id %> --dry-run",
2107
+ "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy"
2108
+ },
2139
2109
  {
2140
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
2141
- "description": "Open in web browser"
2110
+ "command": "<%= config.bin %> <%= command.id %> --api staging --api ios",
2111
+ "description": "Deploy only the GraphQL APIs with the IDs \"staging\" and \"ios\""
2142
2112
  },
2143
2113
  {
2144
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
2145
- "description": "Open using full URL in web browser"
2114
+ "command": "<%= config.bin %> <%= command.id %> --playground",
2115
+ "description": "Deploy all defined GraphQL APIs, overriding any playground setting"
2146
2116
  }
2147
2117
  ],
2148
2118
  "flags": {
2149
- "web": {
2150
- "aliases": [
2151
- "w"
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"
2152
2156
  ],
2153
- "description": "Open in a web browser",
2154
- "name": "web",
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",
2174
+ "hasDynamicHelp": false,
2175
+ "multiple": false,
2176
+ "type": "option"
2177
+ },
2178
+ "with-union-cache": {
2179
+ "description": "Cache union types (faster for schemas with many self-references)",
2180
+ "name": "with-union-cache",
2155
2181
  "allowNo": false,
2156
2182
  "type": "boolean"
2157
2183
  }
2158
2184
  },
2159
2185
  "hasDynamicHelp": false,
2160
2186
  "hiddenAliases": [],
2161
- "id": "docs:read",
2187
+ "id": "graphql:deploy",
2162
2188
  "pluginAlias": "@sanity/cli",
2163
2189
  "pluginName": "@sanity/cli",
2164
2190
  "pluginType": "core",
@@ -2167,47 +2193,39 @@
2167
2193
  "relativePath": [
2168
2194
  "dist",
2169
2195
  "commands",
2170
- "docs",
2171
- "read.js"
2196
+ "graphql",
2197
+ "deploy.js"
2172
2198
  ]
2173
2199
  },
2174
- "docs:search": {
2200
+ "graphql:list": {
2175
2201
  "aliases": [],
2176
- "args": {
2177
- "query": {
2178
- "description": "Search query for documentation",
2179
- "name": "query",
2180
- "required": true
2181
- }
2182
- },
2183
- "description": "Search Sanity docs",
2202
+ "args": {},
2203
+ "description": "List deployed GraphQL endpoints for the project",
2184
2204
  "examples": [
2185
2205
  {
2186
- "command": "<%= config.bin %> <%= command.id %> schema",
2187
- "description": "Search for documentation about schemas"
2188
- },
2189
- {
2190
- "command": "<%= config.bin %> <%= command.id %> \"groq functions\"",
2191
- "description": "Search with phrase"
2206
+ "command": "<%= config.bin %> <%= command.id %>",
2207
+ "description": "List GraphQL endpoints for the project"
2192
2208
  },
2193
2209
  {
2194
- "command": "<%= config.bin %> <%= command.id %> \"deployment\" --limit=5",
2195
- "description": "Limit search results"
2210
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2211
+ "description": "List GraphQL endpoints for a specific project"
2196
2212
  }
2197
2213
  ],
2198
2214
  "flags": {
2199
- "limit": {
2200
- "description": "Maximum number of results to return",
2201
- "name": "limit",
2202
- "default": 10,
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",
2203
2220
  "hasDynamicHelp": false,
2221
+ "helpValue": "<id>",
2204
2222
  "multiple": false,
2205
2223
  "type": "option"
2206
2224
  }
2207
2225
  },
2208
2226
  "hasDynamicHelp": false,
2209
2227
  "hiddenAliases": [],
2210
- "id": "docs:search",
2228
+ "id": "graphql:list",
2211
2229
  "pluginAlias": "@sanity/cli",
2212
2230
  "pluginName": "@sanity/cli",
2213
2231
  "pluginType": "core",
@@ -2216,46 +2234,44 @@
2216
2234
  "relativePath": [
2217
2235
  "dist",
2218
2236
  "commands",
2219
- "docs",
2220
- "search.js"
2237
+ "graphql",
2238
+ "list.js"
2221
2239
  ]
2222
2240
  },
2223
- "documents:create": {
2241
+ "graphql:undeploy": {
2224
2242
  "aliases": [],
2225
- "args": {
2226
- "file": {
2227
- "description": "JSON file to create document(s) from",
2228
- "name": "file",
2229
- "required": false
2230
- }
2231
- },
2232
- "description": "Create one or more documents",
2243
+ "args": {},
2244
+ "description": "Remove a deployed GraphQL API",
2233
2245
  "examples": [
2234
2246
  {
2235
- "command": "<%= config.bin %> <%= command.id %> myDocument.json",
2236
- "description": "Create the document specified in \"myDocument.json\""
2247
+ "command": "<%= config.bin %> <%= command.id %>",
2248
+ "description": "Undeploy GraphQL API for current project and dataset"
2237
2249
  },
2238
2250
  {
2239
- "command": "<%= config.bin %> <%= command.id %>",
2240
- "description": "Open configured $EDITOR and create the specified document(s)"
2251
+ "command": "<%= config.bin %> <%= command.id %> --api ios",
2252
+ "description": "Undeploy API with ID \"ios\""
2241
2253
  },
2242
2254
  {
2243
- "command": "<%= config.bin %> <%= command.id %> --id myDocId --replace",
2244
- "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"
2255
+ "command": "<%= config.bin %> <%= command.id %> --dataset staging",
2256
+ "description": "Undeploy GraphQL API for staging dataset"
2245
2257
  },
2246
2258
  {
2247
- "command": "<%= config.bin %> <%= command.id %> --id myDocId --watch --replace --json5",
2248
- "description": "Open configured $EDITOR and replace the document with the given content on each save. Use JSON5 file extension and parser for simplified syntax."
2259
+ "command": "<%= config.bin %> <%= command.id %> --dataset staging --tag next",
2260
+ "description": "Undeploy GraphQL API for staging dataset with \"next\" tag"
2249
2261
  },
2250
2262
  {
2251
- "command": "<%= config.bin %> <%= command.id %> myDocument.json --project-id abc123",
2252
- "description": "Create documents in a specific project"
2263
+ "command": "<%= config.bin %> <%= command.id %> --force",
2264
+ "description": "Undeploy GraphQL API without confirmation prompt"
2265
+ },
2266
+ {
2267
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
2268
+ "description": "Undeploy GraphQL API for a specific project and dataset"
2253
2269
  }
2254
2270
  ],
2255
2271
  "flags": {
2256
2272
  "project-id": {
2257
2273
  "char": "p",
2258
- "description": "Project ID to create document(s) in (overrides CLI configuration)",
2274
+ "description": "Project ID to undeploy GraphQL API from (overrides CLI configuration)",
2259
2275
  "helpGroup": "OVERRIDE",
2260
2276
  "name": "project-id",
2261
2277
  "hasDynamicHelp": false,
@@ -2263,9 +2279,21 @@
2263
2279
  "multiple": false,
2264
2280
  "type": "option"
2265
2281
  },
2282
+ "api": {
2283
+ "description": "Undeploy API with this ID",
2284
+ "exclusive": [
2285
+ "project-id",
2286
+ "project"
2287
+ ],
2288
+ "name": "api",
2289
+ "required": false,
2290
+ "hasDynamicHelp": false,
2291
+ "multiple": false,
2292
+ "type": "option"
2293
+ },
2266
2294
  "dataset": {
2267
2295
  "char": "d",
2268
- "description": "Dataset to create document(s) in (overrides CLI configuration)",
2296
+ "description": "Dataset to undeploy GraphQL API from (overrides CLI configuration)",
2269
2297
  "helpGroup": "OVERRIDE",
2270
2298
  "name": "dataset",
2271
2299
  "hasDynamicHelp": false,
@@ -2273,43 +2301,38 @@
2273
2301
  "multiple": false,
2274
2302
  "type": "option"
2275
2303
  },
2276
- "id": {
2277
- "description": "Specify a document ID to use. Will fetch remote document ID and populate editor.",
2278
- "name": "id",
2279
- "hasDynamicHelp": false,
2280
- "multiple": false,
2281
- "type": "option"
2282
- },
2283
- "json5": {
2284
- "description": "Use JSON5 file type to allow a \"simplified\" version of JSON",
2285
- "name": "json5",
2286
- "allowNo": false,
2287
- "type": "boolean"
2288
- },
2289
- "missing": {
2290
- "description": "On duplicate document IDs, don't modify the target document(s)",
2291
- "name": "missing",
2304
+ "force": {
2305
+ "description": "Skip confirmation prompt",
2306
+ "name": "force",
2307
+ "required": false,
2292
2308
  "allowNo": false,
2293
2309
  "type": "boolean"
2294
2310
  },
2295
- "replace": {
2296
- "description": "On duplicate document IDs, replace existing document with specified document(s)",
2297
- "name": "replace",
2298
- "allowNo": false,
2299
- "type": "boolean"
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"
2300
2322
  },
2301
- "watch": {
2302
- "description": "Write the documents whenever the target file or buffer changes",
2303
- "name": "watch",
2304
- "allowNo": false,
2305
- "type": "boolean"
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"
2306
2331
  }
2307
2332
  },
2308
2333
  "hasDynamicHelp": false,
2309
- "hiddenAliases": [
2310
- "document:create"
2311
- ],
2312
- "id": "documents:create",
2334
+ "hiddenAliases": [],
2335
+ "id": "graphql:undeploy",
2313
2336
  "pluginAlias": "@sanity/cli",
2314
2337
  "pluginName": "@sanity/cli",
2315
2338
  "pluginType": "core",
@@ -2318,147 +2341,186 @@
2318
2341
  "relativePath": [
2319
2342
  "dist",
2320
2343
  "commands",
2321
- "documents",
2322
- "create.js"
2344
+ "graphql",
2345
+ "undeploy.js"
2323
2346
  ]
2324
2347
  },
2325
- "documents:delete": {
2348
+ "hooks:attempt": {
2326
2349
  "aliases": [],
2327
2350
  "args": {
2328
- "id": {
2329
- "description": "Document ID to delete",
2330
- "name": "id",
2351
+ "attemptId": {
2352
+ "description": "The delivery attempt ID to get details for",
2353
+ "name": "attemptId",
2331
2354
  "required": true
2332
- },
2333
- "ids": {
2334
- "description": "Additional document IDs to delete",
2335
- "name": "ids",
2336
- "required": false
2337
2355
  }
2338
2356
  },
2339
- "description": "Delete one or more documents from the project's configured dataset",
2357
+ "description": "Print details of a given webhook delivery attempt",
2340
2358
  "examples": [
2341
2359
  {
2342
- "command": "<%= config.bin %> <%= command.id %> myDocId",
2343
- "description": "Delete the document with the ID \"myDocId\""
2360
+ "command": "<%= config.bin %> <%= command.id %> abc123",
2361
+ "description": "Print details of webhook delivery attempt with ID abc123"
2344
2362
  },
2345
2363
  {
2346
- "command": "<%= config.bin %> <%= command.id %> 'myDocId'",
2347
- "description": "ID wrapped in double or single quote works equally well"
2348
- },
2349
- {
2350
- "command": "<%= config.bin %> <%= command.id %> --dataset=blog someDocId",
2351
- "description": "Delete document with ID \"someDocId\" from dataset \"blog\""
2352
- },
2353
- {
2354
- "command": "<%= config.bin %> <%= command.id %> doc1 doc2",
2355
- "description": "Delete the document with ID \"doc1\" and \"doc2\""
2356
- },
2357
- {
2358
- "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
2359
- "description": "Delete a document from a specific project"
2364
+ "command": "<%= config.bin %> <%= command.id %> abc123 --project-id projectId",
2365
+ "description": "Get attempt details for a specific project"
2360
2366
  }
2361
2367
  ],
2362
2368
  "flags": {
2363
2369
  "project-id": {
2364
2370
  "char": "p",
2365
- "description": "Project ID to delete from (overrides CLI configuration)",
2371
+ "description": "Project ID to view webhook attempt for (overrides CLI configuration)",
2366
2372
  "helpGroup": "OVERRIDE",
2367
2373
  "name": "project-id",
2368
2374
  "hasDynamicHelp": false,
2369
2375
  "helpValue": "<id>",
2370
2376
  "multiple": false,
2371
2377
  "type": "option"
2378
+ }
2379
+ },
2380
+ "hasDynamicHelp": false,
2381
+ "hiddenAliases": [
2382
+ "hook:attempt"
2383
+ ],
2384
+ "id": "hooks:attempt",
2385
+ "pluginAlias": "@sanity/cli",
2386
+ "pluginName": "@sanity/cli",
2387
+ "pluginType": "core",
2388
+ "strict": true,
2389
+ "isESM": true,
2390
+ "relativePath": [
2391
+ "dist",
2392
+ "commands",
2393
+ "hooks",
2394
+ "attempt.js"
2395
+ ]
2396
+ },
2397
+ "hooks:create": {
2398
+ "aliases": [],
2399
+ "args": {},
2400
+ "description": "Create a new webhook for the project",
2401
+ "examples": [
2402
+ {
2403
+ "command": "<%= config.bin %> <%= command.id %>",
2404
+ "description": "Create a new webhook for the project"
2372
2405
  },
2373
- "dataset": {
2374
- "char": "d",
2375
- "description": "Dataset to delete from (overrides CLI configuration)",
2406
+ {
2407
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2408
+ "description": "Create a webhook for a specific project"
2409
+ }
2410
+ ],
2411
+ "flags": {
2412
+ "project-id": {
2413
+ "char": "p",
2414
+ "description": "Project ID to create webhook for (overrides CLI configuration)",
2376
2415
  "helpGroup": "OVERRIDE",
2377
- "name": "dataset",
2416
+ "name": "project-id",
2378
2417
  "hasDynamicHelp": false,
2379
- "helpValue": "<name>",
2418
+ "helpValue": "<id>",
2380
2419
  "multiple": false,
2381
2420
  "type": "option"
2382
2421
  }
2383
2422
  },
2384
2423
  "hasDynamicHelp": false,
2385
2424
  "hiddenAliases": [
2386
- "document:delete"
2425
+ "hook:create"
2387
2426
  ],
2388
- "id": "documents:delete",
2427
+ "id": "hooks:create",
2389
2428
  "pluginAlias": "@sanity/cli",
2390
2429
  "pluginName": "@sanity/cli",
2391
2430
  "pluginType": "core",
2392
- "strict": false,
2431
+ "strict": true,
2393
2432
  "isESM": true,
2394
2433
  "relativePath": [
2395
2434
  "dist",
2396
2435
  "commands",
2397
- "documents",
2398
- "delete.js"
2436
+ "hooks",
2437
+ "create.js"
2399
2438
  ]
2400
2439
  },
2401
- "documents:get": {
2440
+ "hooks:delete": {
2402
2441
  "aliases": [],
2403
2442
  "args": {
2404
- "documentId": {
2405
- "description": "Document ID to retrieve",
2406
- "name": "documentId",
2407
- "required": true
2443
+ "name": {
2444
+ "description": "Name of webhook to delete (will prompt if not provided)",
2445
+ "name": "name",
2446
+ "required": false
2408
2447
  }
2409
2448
  },
2410
- "description": "Get and print a document by ID",
2449
+ "description": "Delete a webhook from the project",
2411
2450
  "examples": [
2412
2451
  {
2413
- "command": "<%= config.bin %> <%= command.id %> myDocId",
2414
- "description": "Get the document with ID \"myDocId\""
2415
- },
2416
- {
2417
- "command": "<%= config.bin %> <%= command.id %> myDocId --pretty",
2418
- "description": "Get document with colorized JSON output"
2452
+ "command": "<%= config.bin %> <%= command.id %>",
2453
+ "description": "Interactively select and delete a webhook"
2419
2454
  },
2420
2455
  {
2421
- "command": "<%= config.bin %> <%= command.id %> myDocId --dataset production",
2422
- "description": "Get document from a specific dataset"
2456
+ "command": "<%= config.bin %> <%= command.id %> my-hook",
2457
+ "description": "Delete a specific webhook by name"
2423
2458
  },
2424
2459
  {
2425
- "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
2426
- "description": "Get a document from a specific project"
2460
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2461
+ "description": "Delete a webhook from a specific project"
2427
2462
  }
2428
2463
  ],
2429
2464
  "flags": {
2430
2465
  "project-id": {
2431
2466
  "char": "p",
2432
- "description": "Project ID to get document from (overrides CLI configuration)",
2467
+ "description": "Project ID to delete webhook from (overrides CLI configuration)",
2433
2468
  "helpGroup": "OVERRIDE",
2434
2469
  "name": "project-id",
2435
2470
  "hasDynamicHelp": false,
2436
2471
  "helpValue": "<id>",
2437
2472
  "multiple": false,
2438
2473
  "type": "option"
2474
+ }
2475
+ },
2476
+ "hasDynamicHelp": false,
2477
+ "hiddenAliases": [
2478
+ "hook:delete"
2479
+ ],
2480
+ "id": "hooks:delete",
2481
+ "pluginAlias": "@sanity/cli",
2482
+ "pluginName": "@sanity/cli",
2483
+ "pluginType": "core",
2484
+ "strict": true,
2485
+ "isESM": true,
2486
+ "relativePath": [
2487
+ "dist",
2488
+ "commands",
2489
+ "hooks",
2490
+ "delete.js"
2491
+ ]
2492
+ },
2493
+ "hooks:list": {
2494
+ "aliases": [],
2495
+ "args": {},
2496
+ "description": "List webhooks for the project",
2497
+ "examples": [
2498
+ {
2499
+ "command": "<%= config.bin %> <%= command.id %>",
2500
+ "description": "List webhooks for the project"
2439
2501
  },
2440
- "dataset": {
2441
- "char": "d",
2442
- "description": "Dataset to get document from (overrides CLI configuration)",
2502
+ {
2503
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2504
+ "description": "List webhooks for a specific project"
2505
+ }
2506
+ ],
2507
+ "flags": {
2508
+ "project-id": {
2509
+ "char": "p",
2510
+ "description": "Project ID to list webhooks for (overrides CLI configuration)",
2443
2511
  "helpGroup": "OVERRIDE",
2444
- "name": "dataset",
2512
+ "name": "project-id",
2445
2513
  "hasDynamicHelp": false,
2446
- "helpValue": "<name>",
2514
+ "helpValue": "<id>",
2447
2515
  "multiple": false,
2448
2516
  "type": "option"
2449
- },
2450
- "pretty": {
2451
- "description": "Colorize JSON output",
2452
- "name": "pretty",
2453
- "allowNo": false,
2454
- "type": "boolean"
2455
2517
  }
2456
2518
  },
2457
2519
  "hasDynamicHelp": false,
2458
2520
  "hiddenAliases": [
2459
- "document:get"
2521
+ "hook:list"
2460
2522
  ],
2461
- "id": "documents:get",
2523
+ "id": "hooks:list",
2462
2524
  "pluginAlias": "@sanity/cli",
2463
2525
  "pluginName": "@sanity/cli",
2464
2526
  "pluginType": "core",
@@ -2467,42 +2529,38 @@
2467
2529
  "relativePath": [
2468
2530
  "dist",
2469
2531
  "commands",
2470
- "documents",
2471
- "get.js"
2532
+ "hooks",
2533
+ "list.js"
2472
2534
  ]
2473
2535
  },
2474
- "documents:query": {
2536
+ "hooks:logs": {
2475
2537
  "aliases": [],
2476
2538
  "args": {
2477
- "query": {
2478
- "description": "GROQ query to run against the dataset",
2479
- "name": "query",
2480
- "required": true
2539
+ "name": {
2540
+ "description": "Name of the webhook to show logs for",
2541
+ "name": "name",
2542
+ "required": false
2481
2543
  }
2482
2544
  },
2483
- "description": "Query for documents",
2545
+ "description": "Show log entries for project webhooks",
2484
2546
  "examples": [
2485
2547
  {
2486
- "command": "<%= config.bin %> <%= command.id %> '*[_type == \"movie\"][0..4]'",
2487
- "description": "Fetch 5 documents of type \"movie\""
2488
- },
2489
- {
2490
- "command": "<%= config.bin %> <%= command.id %> '*[_type == \"movie\"]|order(releaseDate asc)[0]{title}' --dataset staging",
2491
- "description": "Fetch title of the oldest movie in the dataset named \"staging\""
2548
+ "command": "<%= config.bin %> <%= command.id %>",
2549
+ "description": "Show log entries for project webhooks"
2492
2550
  },
2493
2551
  {
2494
- "command": "<%= config.bin %> <%= command.id %> '*[_id == \"header\"] { \"headerText\": pt::text(body) }' --api-version v2021-06-07",
2495
- "description": "Use API version v2021-06-07 and do a query"
2552
+ "command": "<%= config.bin %> <%= command.id %> [NAME]",
2553
+ "description": "Show log entries for a specific webhook by name"
2496
2554
  },
2497
2555
  {
2498
- "command": "<%= config.bin %> <%= command.id %> '*[_type == \"post\"]' --project-id abc123 --dataset production",
2499
- "description": "Query documents in a specific project and dataset"
2556
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2557
+ "description": "Show log entries for a specific project"
2500
2558
  }
2501
2559
  ],
2502
2560
  "flags": {
2503
2561
  "project-id": {
2504
2562
  "char": "p",
2505
- "description": "Project ID to query (overrides CLI configuration)",
2563
+ "description": "Project ID to view webhook logs for (overrides CLI configuration)",
2506
2564
  "helpGroup": "OVERRIDE",
2507
2565
  "name": "project-id",
2508
2566
  "hasDynamicHelp": false,
@@ -2510,53 +2568,19 @@
2510
2568
  "multiple": false,
2511
2569
  "type": "option"
2512
2570
  },
2513
- "dataset": {
2514
- "char": "d",
2515
- "description": "Dataset to query (overrides CLI configuration)",
2516
- "helpGroup": "OVERRIDE",
2517
- "name": "dataset",
2518
- "hasDynamicHelp": false,
2519
- "helpValue": "<name>",
2520
- "multiple": false,
2521
- "type": "option"
2522
- },
2523
- "anonymous": {
2524
- "description": "Send the query without any authorization token",
2525
- "name": "anonymous",
2526
- "allowNo": false,
2527
- "type": "boolean"
2528
- },
2529
- "api-version": {
2530
- "description": "API version to use (defaults to 2025-08-15)",
2531
- "env": "SANITY_CLI_QUERY_API_VERSION",
2532
- "name": "api-version",
2533
- "hasDynamicHelp": false,
2534
- "multiple": false,
2535
- "type": "option"
2536
- },
2537
- "pretty": {
2538
- "description": "Colorize JSON output",
2539
- "name": "pretty",
2571
+ "detailed": {
2572
+ "description": "Include detailed payload and attempts",
2573
+ "name": "detailed",
2574
+ "required": false,
2540
2575
  "allowNo": false,
2541
2576
  "type": "boolean"
2542
- },
2543
- "project": {
2544
- "deprecated": {
2545
- "to": "project-id"
2546
- },
2547
- "description": "Project ID to query",
2548
- "hidden": true,
2549
- "name": "project",
2550
- "hasDynamicHelp": false,
2551
- "multiple": false,
2552
- "type": "option"
2553
2577
  }
2554
2578
  },
2555
2579
  "hasDynamicHelp": false,
2556
2580
  "hiddenAliases": [
2557
- "document:query"
2581
+ "hook:logs"
2558
2582
  ],
2559
- "id": "documents:query",
2583
+ "id": "hooks:logs",
2560
2584
  "pluginAlias": "@sanity/cli",
2561
2585
  "pluginName": "@sanity/cli",
2562
2586
  "pluginType": "core",
@@ -2565,118 +2589,37 @@
2565
2589
  "relativePath": [
2566
2590
  "dist",
2567
2591
  "commands",
2568
- "documents",
2569
- "query.js"
2592
+ "hooks",
2593
+ "logs.js"
2570
2594
  ]
2571
2595
  },
2572
- "documents:validate": {
2596
+ "manifest:extract": {
2573
2597
  "aliases": [],
2574
2598
  "args": {},
2575
- "description": "Validate documents in a dataset against the studio schema",
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.",
2576
2600
  "examples": [
2577
2601
  {
2578
- "command": "<%= config.bin %> <%= command.id %> --workspace default",
2579
- "description": "Validates all documents in a Sanity project with more than one workspace"
2580
- },
2581
- {
2582
- "command": "<%= config.bin %> <%= command.id %> --workspace default --dataset staging",
2583
- "description": "Override the dataset specified in the workspace"
2584
- },
2585
- {
2586
- "command": "<%= config.bin %> <%= command.id %> --yes > report.txt",
2587
- "description": "Save the results of the report into a file"
2588
- },
2589
- {
2590
- "command": "<%= config.bin %> <%= command.id %> --level info",
2591
- "description": "Report out info level validation markers too"
2602
+ "command": "<%= config.bin %> <%= command.id %>",
2603
+ "description": "Extracts manifests"
2592
2604
  },
2593
2605
  {
2594
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
2595
- "description": "Validate documents in a specific project and dataset"
2606
+ "command": "<%= config.bin %> <%= command.id %> --path /public/static",
2607
+ "description": "Extracts manifests into /public/static"
2596
2608
  }
2597
2609
  ],
2598
2610
  "flags": {
2599
- "project-id": {
2600
- "char": "p",
2601
- "description": "Override the project ID used. By default, this is derived from the given workspace",
2602
- "name": "project-id",
2603
- "hasDynamicHelp": false,
2604
- "helpValue": "<id>",
2605
- "multiple": false,
2606
- "type": "option"
2607
- },
2608
- "dataset": {
2609
- "char": "d",
2610
- "description": "Override the dataset used. By default, this is derived from the given workspace",
2611
- "name": "dataset",
2612
- "hasDynamicHelp": false,
2613
- "helpValue": "<name>",
2614
- "multiple": false,
2615
- "type": "option"
2616
- },
2617
- "file": {
2618
- "description": "Provide a path to either an .ndjson file or a tarball containing an .ndjson file",
2619
- "name": "file",
2620
- "hasDynamicHelp": false,
2621
- "multiple": false,
2622
- "type": "option"
2623
- },
2624
- "format": {
2625
- "description": "The output format used to print the found validation markers and report progress",
2626
- "name": "format",
2627
- "hasDynamicHelp": false,
2628
- "multiple": false,
2629
- "type": "option"
2630
- },
2631
- "level": {
2632
- "description": "The minimum level reported. Defaults to warning",
2633
- "name": "level",
2634
- "default": "warning",
2635
- "hasDynamicHelp": false,
2636
- "multiple": false,
2637
- "options": [
2638
- "error",
2639
- "warning",
2640
- "info"
2641
- ],
2642
- "type": "option"
2643
- },
2644
- "max-custom-validation-concurrency": {
2645
- "description": "Specify how many custom validators can run concurrently",
2646
- "name": "max-custom-validation-concurrency",
2647
- "default": 5,
2648
- "hasDynamicHelp": false,
2649
- "multiple": false,
2650
- "type": "option"
2651
- },
2652
- "max-fetch-concurrency": {
2653
- "description": "Specify how many `client.fetch` requests are allowed to run concurrently",
2654
- "name": "max-fetch-concurrency",
2655
- "default": 25,
2656
- "hasDynamicHelp": false,
2657
- "multiple": false,
2658
- "type": "option"
2659
- },
2660
- "workspace": {
2661
- "description": "The name of the workspace to use when downloading and validating all documents",
2662
- "name": "workspace",
2611
+ "path": {
2612
+ "description": "Optional path to specify destination directory of the manifest files",
2613
+ "name": "path",
2614
+ "default": "dist/static",
2663
2615
  "hasDynamicHelp": false,
2664
2616
  "multiple": false,
2665
2617
  "type": "option"
2666
- },
2667
- "yes": {
2668
- "char": "y",
2669
- "description": "Skips the first confirmation prompt",
2670
- "name": "yes",
2671
- "allowNo": false,
2672
- "type": "boolean"
2673
2618
  }
2674
2619
  },
2675
2620
  "hasDynamicHelp": false,
2676
- "hiddenAliases": [
2677
- "document:validate"
2678
- ],
2679
- "id": "documents:validate",
2621
+ "hiddenAliases": [],
2622
+ "id": "manifest:extract",
2680
2623
  "pluginAlias": "@sanity/cli",
2681
2624
  "pluginName": "@sanity/cli",
2682
2625
  "pluginType": "core",
@@ -2685,189 +2628,67 @@
2685
2628
  "relativePath": [
2686
2629
  "dist",
2687
2630
  "commands",
2688
- "documents",
2689
- "validate.js"
2631
+ "manifest",
2632
+ "extract.js"
2690
2633
  ]
2691
2634
  },
2692
- "graphql:deploy": {
2635
+ "datasets:copy": {
2693
2636
  "aliases": [],
2694
- "args": {},
2695
- "description": "Deploy a GraphQL API from the current Sanity schema",
2696
- "examples": [
2697
- {
2698
- "command": "<%= config.bin %> <%= command.id %>",
2699
- "description": "Deploy all defined GraphQL APIs"
2700
- },
2701
- {
2702
- "command": "<%= config.bin %> <%= command.id %> --dry-run",
2703
- "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy"
2704
- },
2705
- {
2706
- "command": "<%= config.bin %> <%= command.id %> --api staging --api ios",
2707
- "description": "Deploy only the GraphQL APIs with the IDs \"staging\" and \"ios\""
2708
- },
2709
- {
2710
- "command": "<%= config.bin %> <%= command.id %> --playground",
2711
- "description": "Deploy all defined GraphQL APIs, overriding any playground setting"
2712
- }
2713
- ],
2714
- "flags": {
2715
- "api": {
2716
- "description": "Only deploy API with this ID (can be specified multiple times)",
2717
- "name": "api",
2718
- "hasDynamicHelp": false,
2719
- "multiple": true,
2720
- "type": "option"
2721
- },
2722
- "dataset": {
2723
- "char": "d",
2724
- "description": "Deploy API for the given dataset",
2725
- "name": "dataset",
2726
- "hasDynamicHelp": false,
2727
- "helpValue": "<name>",
2728
- "multiple": false,
2729
- "type": "option"
2730
- },
2731
- "dry-run": {
2732
- "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy",
2733
- "name": "dry-run",
2734
- "allowNo": false,
2735
- "type": "boolean"
2736
- },
2737
- "force": {
2738
- "description": "Deploy API without confirming breaking changes",
2739
- "name": "force",
2740
- "allowNo": false,
2741
- "type": "boolean"
2742
- },
2743
- "generation": {
2744
- "description": "API generation to deploy (defaults to \"gen3\")",
2745
- "name": "generation",
2746
- "hasDynamicHelp": false,
2747
- "multiple": false,
2748
- "options": [
2749
- "gen1",
2750
- "gen2",
2751
- "gen3"
2752
- ],
2753
- "type": "option"
2754
- },
2755
- "non-null-document-fields": {
2756
- "description": "Use non-null document fields (_id, _type etc)",
2757
- "name": "non-null-document-fields",
2758
- "allowNo": false,
2759
- "type": "boolean"
2760
- },
2761
- "playground": {
2762
- "description": "Enable GraphQL playground for easier debugging",
2763
- "name": "playground",
2764
- "allowNo": true,
2765
- "type": "boolean"
2766
- },
2767
- "tag": {
2768
- "description": "Deploy API(s) to given tag (defaults to \"default\")",
2769
- "name": "tag",
2770
- "hasDynamicHelp": false,
2771
- "multiple": false,
2772
- "type": "option"
2637
+ "args": {
2638
+ "source": {
2639
+ "description": "Name of the dataset to copy from",
2640
+ "name": "source",
2641
+ "required": false
2773
2642
  },
2774
- "with-union-cache": {
2775
- "description": "Cache union types (faster for schemas with many self-references)",
2776
- "name": "with-union-cache",
2777
- "allowNo": false,
2778
- "type": "boolean"
2643
+ "target": {
2644
+ "description": "Name of the dataset to copy to",
2645
+ "name": "target",
2646
+ "required": false
2779
2647
  }
2780
2648
  },
2781
- "hasDynamicHelp": false,
2782
- "hiddenAliases": [],
2783
- "id": "graphql:deploy",
2784
- "pluginAlias": "@sanity/cli",
2785
- "pluginName": "@sanity/cli",
2786
- "pluginType": "core",
2787
- "strict": true,
2788
- "isESM": true,
2789
- "relativePath": [
2790
- "dist",
2791
- "commands",
2792
- "graphql",
2793
- "deploy.js"
2794
- ]
2795
- },
2796
- "graphql:list": {
2797
- "aliases": [],
2798
- "args": {},
2799
- "description": "List deployed GraphQL endpoints for the project",
2649
+ "description": "Copy a dataset or manage copy jobs",
2800
2650
  "examples": [
2801
2651
  {
2802
2652
  "command": "<%= config.bin %> <%= command.id %>",
2803
- "description": "List GraphQL endpoints for the project"
2653
+ "description": "Interactively copy a dataset"
2804
2654
  },
2805
2655
  {
2806
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2807
- "description": "List GraphQL endpoints for a specific project"
2808
- }
2809
- ],
2810
- "flags": {
2811
- "project-id": {
2812
- "char": "p",
2813
- "description": "Project ID to list GraphQL endpoints for (overrides CLI configuration)",
2814
- "helpGroup": "OVERRIDE",
2815
- "name": "project-id",
2816
- "hasDynamicHelp": false,
2817
- "helpValue": "<id>",
2818
- "multiple": false,
2819
- "type": "option"
2820
- }
2821
- },
2822
- "hasDynamicHelp": false,
2823
- "hiddenAliases": [],
2824
- "id": "graphql:list",
2825
- "pluginAlias": "@sanity/cli",
2826
- "pluginName": "@sanity/cli",
2827
- "pluginType": "core",
2828
- "strict": true,
2829
- "isESM": true,
2830
- "relativePath": [
2831
- "dist",
2832
- "commands",
2833
- "graphql",
2834
- "list.js"
2835
- ]
2836
- },
2837
- "graphql:undeploy": {
2838
- "aliases": [],
2839
- "args": {},
2840
- "description": "Remove a deployed GraphQL API",
2841
- "examples": [
2656
+ "command": "<%= config.bin %> <%= command.id %> source-dataset",
2657
+ "description": "Copy from source-dataset (prompts for target)"
2658
+ },
2842
2659
  {
2843
- "command": "<%= config.bin %> <%= command.id %>",
2844
- "description": "Undeploy GraphQL API for current project and dataset"
2660
+ "command": "<%= config.bin %> <%= command.id %> source-dataset target-dataset",
2661
+ "description": "Copy from source-dataset to target-dataset"
2845
2662
  },
2846
2663
  {
2847
- "command": "<%= config.bin %> <%= command.id %> --api ios",
2848
- "description": "Undeploy API with ID \"ios\""
2664
+ "command": "<%= config.bin %> <%= command.id %> --skip-history source target",
2665
+ "description": "Copy without preserving document history (faster for large datasets)"
2849
2666
  },
2850
2667
  {
2851
- "command": "<%= config.bin %> <%= command.id %> --dataset staging",
2852
- "description": "Undeploy GraphQL API for staging dataset"
2668
+ "command": "<%= config.bin %> <%= command.id %> --skip-content-releases source target",
2669
+ "description": "Copy without content release documents"
2670
+ },
2671
+ {
2672
+ "command": "<%= config.bin %> <%= command.id %> --detach source target",
2673
+ "description": "Start copy job without waiting for completion"
2853
2674
  },
2854
2675
  {
2855
- "command": "<%= config.bin %> <%= command.id %> --dataset staging --tag next",
2856
- "description": "Undeploy GraphQL API for staging dataset with \"next\" tag"
2676
+ "command": "<%= config.bin %> <%= command.id %> --attach <job-id>",
2677
+ "description": "Attach to a running copy job to follow progress"
2857
2678
  },
2858
2679
  {
2859
- "command": "<%= config.bin %> <%= command.id %> --force",
2860
- "description": "Undeploy GraphQL API without confirmation prompt"
2680
+ "command": "<%= config.bin %> <%= command.id %> --list",
2681
+ "description": "List all dataset copy jobs"
2861
2682
  },
2862
2683
  {
2863
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
2864
- "description": "Undeploy GraphQL API for a specific project and dataset"
2684
+ "command": "<%= config.bin %> <%= command.id %> --list --offset 2 --limit 10",
2685
+ "description": "List copy jobs with pagination"
2865
2686
  }
2866
2687
  ],
2867
2688
  "flags": {
2868
2689
  "project-id": {
2869
2690
  "char": "p",
2870
- "description": "Project ID to undeploy GraphQL API from (overrides CLI configuration)",
2691
+ "description": "Project ID to copy dataset in (overrides CLI configuration)",
2871
2692
  "helpGroup": "OVERRIDE",
2872
2693
  "name": "project-id",
2873
2694
  "hasDynamicHelp": false,
@@ -2875,60 +2696,92 @@
2875
2696
  "multiple": false,
2876
2697
  "type": "option"
2877
2698
  },
2878
- "api": {
2879
- "description": "Undeploy API with this ID",
2699
+ "attach": {
2700
+ "description": "Attach to the running copy process to show progress",
2880
2701
  "exclusive": [
2881
- "project-id",
2882
- "project"
2702
+ "list",
2703
+ "detach",
2704
+ "skip-history"
2883
2705
  ],
2884
- "name": "api",
2706
+ "name": "attach",
2885
2707
  "required": false,
2886
2708
  "hasDynamicHelp": false,
2887
2709
  "multiple": false,
2888
2710
  "type": "option"
2889
2711
  },
2890
- "dataset": {
2891
- "char": "d",
2892
- "description": "Dataset to undeploy GraphQL API from (overrides CLI configuration)",
2893
- "helpGroup": "OVERRIDE",
2894
- "name": "dataset",
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,
2720
+ "allowNo": false,
2721
+ "type": "boolean"
2722
+ },
2723
+ "limit": {
2724
+ "dependsOn": [
2725
+ "list"
2726
+ ],
2727
+ "description": "Maximum number of jobs returned (default 10, max 1000)",
2728
+ "name": "limit",
2729
+ "required": false,
2895
2730
  "hasDynamicHelp": false,
2896
- "helpValue": "<name>",
2897
2731
  "multiple": false,
2898
2732
  "type": "option"
2899
2733
  },
2900
- "force": {
2901
- "description": "Skip confirmation prompt",
2902
- "name": "force",
2734
+ "list": {
2735
+ "description": "Lists all dataset copy jobs",
2736
+ "exclusive": [
2737
+ "attach",
2738
+ "detach",
2739
+ "skip-history"
2740
+ ],
2741
+ "name": "list",
2903
2742
  "required": false,
2904
2743
  "allowNo": false,
2905
2744
  "type": "boolean"
2906
2745
  },
2907
- "project": {
2908
- "deprecated": {
2909
- "to": "project-id"
2910
- },
2911
- "description": "Project ID to delete GraphQL API for",
2912
- "hidden": true,
2913
- "name": "project",
2746
+ "offset": {
2747
+ "dependsOn": [
2748
+ "list"
2749
+ ],
2750
+ "description": "Start position in the list of jobs (default 0)",
2751
+ "name": "offset",
2914
2752
  "required": false,
2915
2753
  "hasDynamicHelp": false,
2916
2754
  "multiple": false,
2917
2755
  "type": "option"
2918
2756
  },
2919
- "tag": {
2920
- "description": "Tag to undeploy GraphQL API from",
2921
- "name": "tag",
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",
2922
2764
  "required": false,
2923
- "default": "default",
2924
- "hasDynamicHelp": false,
2925
- "multiple": false,
2926
- "type": "option"
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,
2776
+ "allowNo": false,
2777
+ "type": "boolean"
2927
2778
  }
2928
2779
  },
2929
2780
  "hasDynamicHelp": false,
2930
- "hiddenAliases": [],
2931
- "id": "graphql:undeploy",
2781
+ "hiddenAliases": [
2782
+ "dataset:copy"
2783
+ ],
2784
+ "id": "datasets:copy",
2932
2785
  "pluginAlias": "@sanity/cli",
2933
2786
  "pluginName": "@sanity/cli",
2934
2787
  "pluginType": "core",
@@ -2937,90 +2790,80 @@
2937
2790
  "relativePath": [
2938
2791
  "dist",
2939
2792
  "commands",
2940
- "graphql",
2941
- "undeploy.js"
2793
+ "datasets",
2794
+ "copy.js"
2942
2795
  ]
2943
2796
  },
2944
- "hooks:attempt": {
2797
+ "datasets:create": {
2945
2798
  "aliases": [],
2946
2799
  "args": {
2947
- "attemptId": {
2948
- "description": "The delivery attempt ID to get details for",
2949
- "name": "attemptId",
2950
- "required": true
2800
+ "name": {
2801
+ "description": "Name of the dataset to create",
2802
+ "name": "name",
2803
+ "required": false
2951
2804
  }
2952
2805
  },
2953
- "description": "Print details of a given webhook delivery attempt",
2806
+ "description": "Create a new dataset for the project",
2954
2807
  "examples": [
2955
2808
  {
2956
- "command": "<%= config.bin %> <%= command.id %> abc123",
2957
- "description": "Print details of webhook delivery attempt with ID abc123"
2809
+ "command": "<%= config.bin %> <%= command.id %>",
2810
+ "description": "Interactively create a dataset"
2958
2811
  },
2959
2812
  {
2960
- "command": "<%= config.bin %> <%= command.id %> abc123 --project-id projectId",
2961
- "description": "Get attempt details for a specific project"
2813
+ "command": "<%= config.bin %> <%= command.id %> my-dataset",
2814
+ "description": "Create a dataset named \"my-dataset\""
2815
+ },
2816
+ {
2817
+ "command": "<%= config.bin %> <%= command.id %> my-dataset --visibility private",
2818
+ "description": "Create a private dataset named \"my-dataset\""
2962
2819
  }
2963
2820
  ],
2964
2821
  "flags": {
2965
2822
  "project-id": {
2966
2823
  "char": "p",
2967
- "description": "Project ID to view webhook attempt for (overrides CLI configuration)",
2824
+ "description": "Project ID to create dataset in (overrides CLI configuration)",
2968
2825
  "helpGroup": "OVERRIDE",
2969
2826
  "name": "project-id",
2970
2827
  "hasDynamicHelp": false,
2971
2828
  "helpValue": "<id>",
2972
2829
  "multiple": false,
2973
2830
  "type": "option"
2974
- }
2975
- },
2976
- "hasDynamicHelp": false,
2977
- "hiddenAliases": [
2978
- "hook:attempt"
2979
- ],
2980
- "id": "hooks:attempt",
2981
- "pluginAlias": "@sanity/cli",
2982
- "pluginName": "@sanity/cli",
2983
- "pluginType": "core",
2984
- "strict": true,
2985
- "isESM": true,
2986
- "relativePath": [
2987
- "dist",
2988
- "commands",
2989
- "hooks",
2990
- "attempt.js"
2991
- ]
2992
- },
2993
- "hooks:create": {
2994
- "aliases": [],
2995
- "args": {},
2996
- "description": "Create a new webhook for the project",
2997
- "examples": [
2998
- {
2999
- "command": "<%= config.bin %> <%= command.id %>",
3000
- "description": "Create a new webhook for the project"
3001
2831
  },
3002
- {
3003
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3004
- "description": "Create a webhook for a specific project"
3005
- }
3006
- ],
3007
- "flags": {
3008
- "project-id": {
3009
- "char": "p",
3010
- "description": "Project ID to create webhook for (overrides CLI configuration)",
3011
- "helpGroup": "OVERRIDE",
3012
- "name": "project-id",
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,
3013
2852
  "hasDynamicHelp": false,
3014
- "helpValue": "<id>",
3015
2853
  "multiple": false,
2854
+ "options": [
2855
+ "custom",
2856
+ "private",
2857
+ "public"
2858
+ ],
3016
2859
  "type": "option"
3017
2860
  }
3018
2861
  },
3019
2862
  "hasDynamicHelp": false,
3020
2863
  "hiddenAliases": [
3021
- "hook:create"
2864
+ "dataset:create"
3022
2865
  ],
3023
- "id": "hooks:create",
2866
+ "id": "datasets:create",
3024
2867
  "pluginAlias": "@sanity/cli",
3025
2868
  "pluginName": "@sanity/cli",
3026
2869
  "pluginType": "core",
@@ -3029,51 +2872,54 @@
3029
2872
  "relativePath": [
3030
2873
  "dist",
3031
2874
  "commands",
3032
- "hooks",
2875
+ "datasets",
3033
2876
  "create.js"
3034
2877
  ]
3035
2878
  },
3036
- "hooks:delete": {
2879
+ "datasets:delete": {
3037
2880
  "aliases": [],
3038
2881
  "args": {
3039
- "name": {
3040
- "description": "Name of webhook to delete (will prompt if not provided)",
3041
- "name": "name",
3042
- "required": false
2882
+ "datasetName": {
2883
+ "description": "Dataset name to delete",
2884
+ "name": "datasetName",
2885
+ "required": true
3043
2886
  }
3044
2887
  },
3045
- "description": "Delete a webhook from the project",
2888
+ "description": "Delete a dataset from the project",
3046
2889
  "examples": [
3047
2890
  {
3048
- "command": "<%= config.bin %> <%= command.id %>",
3049
- "description": "Interactively select and delete a webhook"
3050
- },
3051
- {
3052
- "command": "<%= config.bin %> <%= command.id %> my-hook",
3053
- "description": "Delete a specific webhook by name"
2891
+ "command": "<%= config.bin %> <%= command.id %> my-dataset",
2892
+ "description": "Delete a specific dataset"
3054
2893
  },
3055
2894
  {
3056
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3057
- "description": "Delete a webhook from a specific project"
2895
+ "command": "<%= config.bin %> <%= command.id %> my-dataset --force",
2896
+ "description": "Delete a specific dataset without confirmation"
3058
2897
  }
3059
2898
  ],
3060
2899
  "flags": {
3061
2900
  "project-id": {
3062
2901
  "char": "p",
3063
- "description": "Project ID to delete webhook from (overrides CLI configuration)",
2902
+ "description": "Project ID to delete dataset from (overrides CLI configuration)",
3064
2903
  "helpGroup": "OVERRIDE",
3065
2904
  "name": "project-id",
3066
2905
  "hasDynamicHelp": false,
3067
2906
  "helpValue": "<id>",
3068
2907
  "multiple": false,
3069
2908
  "type": "option"
2909
+ },
2910
+ "force": {
2911
+ "description": "Do not prompt for delete confirmation - forcefully delete",
2912
+ "name": "force",
2913
+ "required": false,
2914
+ "allowNo": false,
2915
+ "type": "boolean"
3070
2916
  }
3071
2917
  },
3072
2918
  "hasDynamicHelp": false,
3073
2919
  "hiddenAliases": [
3074
- "hook:delete"
2920
+ "dataset:delete"
3075
2921
  ],
3076
- "id": "hooks:delete",
2922
+ "id": "datasets:delete",
3077
2923
  "pluginAlias": "@sanity/cli",
3078
2924
  "pluginName": "@sanity/cli",
3079
2925
  "pluginType": "core",
@@ -3082,41 +2928,125 @@
3082
2928
  "relativePath": [
3083
2929
  "dist",
3084
2930
  "commands",
3085
- "hooks",
2931
+ "datasets",
3086
2932
  "delete.js"
3087
2933
  ]
3088
2934
  },
3089
- "hooks:list": {
2935
+ "datasets:export": {
3090
2936
  "aliases": [],
3091
- "args": {},
3092
- "description": "List webhooks for the project",
2937
+ "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"
2945
+ }
2946
+ },
2947
+ "description": "Export a dataset to a local gzipped tarball. Assets returning 401, 403, or 404 are excluded from the export.",
3093
2948
  "examples": [
3094
2949
  {
3095
- "command": "<%= config.bin %> <%= command.id %>",
3096
- "description": "List webhooks for the project"
2950
+ "command": "<%= config.bin %> <%= command.id %> moviedb localPath.tar.gz",
2951
+ "description": "Export dataset \"moviedb\" to localPath.tar.gz"
3097
2952
  },
3098
2953
  {
3099
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3100
- "description": "List webhooks for a specific project"
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"
2964
+ },
2965
+ {
2966
+ "command": "<%= config.bin %> <%= command.id %> moviedb moviedb.tar.gz --no-strict-asset-verification",
2967
+ "description": "Export dataset without aborting on asset verification failures"
3101
2968
  }
3102
2969
  ],
3103
2970
  "flags": {
3104
2971
  "project-id": {
3105
2972
  "char": "p",
3106
- "description": "Project ID to list webhooks for (overrides CLI configuration)",
2973
+ "description": "Project ID to export dataset from (overrides CLI configuration)",
3107
2974
  "helpGroup": "OVERRIDE",
3108
2975
  "name": "project-id",
3109
2976
  "hasDynamicHelp": false,
3110
2977
  "helpValue": "<id>",
3111
2978
  "multiple": false,
3112
2979
  "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"
3113
3043
  }
3114
3044
  },
3115
3045
  "hasDynamicHelp": false,
3116
3046
  "hiddenAliases": [
3117
- "hook:list"
3047
+ "dataset:export"
3118
3048
  ],
3119
- "id": "hooks:list",
3049
+ "id": "datasets:export",
3120
3050
  "pluginAlias": "@sanity/cli",
3121
3051
  "pluginName": "@sanity/cli",
3122
3052
  "pluginType": "core",
@@ -3125,38 +3055,96 @@
3125
3055
  "relativePath": [
3126
3056
  "dist",
3127
3057
  "commands",
3128
- "hooks",
3129
- "list.js"
3058
+ "datasets",
3059
+ "export.js"
3130
3060
  ]
3131
3061
  },
3132
- "hooks:logs": {
3062
+ "datasets:import": {
3133
3063
  "aliases": [],
3134
3064
  "args": {
3135
- "name": {
3136
- "description": "Name of the webhook to show logs for",
3137
- "name": "name",
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",
3138
3073
  "required": false
3139
3074
  }
3140
3075
  },
3141
- "description": "Show log entries for project webhooks",
3076
+ "description": "Import documents to a Sanity dataset",
3142
3077
  "examples": [
3143
3078
  {
3144
- "command": "<%= config.bin %> <%= command.id %>",
3145
- "description": "Show log entries for project webhooks"
3079
+ "command": "<%= config.bin %> <%= command.id %> -d staging my-dataset.ndjson",
3080
+ "description": "Import \"./my-dataset.ndjson\" into dataset \"staging\""
3146
3081
  },
3147
3082
  {
3148
- "command": "<%= config.bin %> <%= command.id %> [NAME]",
3149
- "description": "Show log entries for a specific webhook by name"
3083
+ "command": "cat my-dataset.ndjson | <%= config.bin %> <%= command.id %> -d test -",
3084
+ "description": "Import into dataset \"test\" from stdin"
3150
3085
  },
3151
3086
  {
3152
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3153
- "description": "Show log entries for a specific project"
3087
+ "command": "<%= config.bin %> <%= command.id %> -p projectId -d staging my-dataset.ndjson",
3088
+ "description": "Import with explicit project ID (overrides CLI configuration)"
3089
+ },
3090
+ {
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)"
3154
3093
  }
3155
3094
  ],
3156
3095
  "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",
3123
+ "hasDynamicHelp": false,
3124
+ "multiple": false,
3125
+ "type": "option"
3126
+ },
3127
+ "dataset": {
3128
+ "char": "d",
3129
+ "description": "Dataset to import to",
3130
+ "name": "dataset",
3131
+ "hasDynamicHelp": false,
3132
+ "helpValue": "<name>",
3133
+ "multiple": false,
3134
+ "type": "option"
3135
+ },
3136
+ "missing": {
3137
+ "description": "Skip documents that already exist",
3138
+ "exclusive": [
3139
+ "replace"
3140
+ ],
3141
+ "name": "missing",
3142
+ "allowNo": false,
3143
+ "type": "boolean"
3144
+ },
3157
3145
  "project-id": {
3158
3146
  "char": "p",
3159
- "description": "Project ID to view webhook logs for (overrides CLI configuration)",
3147
+ "description": "Project ID to import to (overrides CLI configuration)",
3160
3148
  "helpGroup": "OVERRIDE",
3161
3149
  "name": "project-id",
3162
3150
  "hasDynamicHelp": false,
@@ -3164,19 +3152,54 @@
3164
3152
  "multiple": false,
3165
3153
  "type": "option"
3166
3154
  },
3167
- "detailed": {
3168
- "description": "Include detailed payload and attempts",
3169
- "name": "detailed",
3170
- "required": false,
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",
3171
3178
  "allowNo": false,
3172
3179
  "type": "boolean"
3180
+ },
3181
+ "skip-cross-dataset-references": {
3182
+ "description": "Skips references to other datasets",
3183
+ "name": "skip-cross-dataset-references",
3184
+ "allowNo": false,
3185
+ "type": "boolean"
3186
+ },
3187
+ "token": {
3188
+ "char": "t",
3189
+ "description": "Token to authenticate with",
3190
+ "env": "SANITY_IMPORT_TOKEN",
3191
+ "name": "token",
3192
+ "required": false,
3193
+ "hasDynamicHelp": false,
3194
+ "multiple": false,
3195
+ "type": "option"
3173
3196
  }
3174
3197
  },
3175
3198
  "hasDynamicHelp": false,
3176
3199
  "hiddenAliases": [
3177
- "hook:logs"
3200
+ "dataset:import"
3178
3201
  ],
3179
- "id": "hooks:logs",
3202
+ "id": "datasets:import",
3180
3203
  "pluginAlias": "@sanity/cli",
3181
3204
  "pluginName": "@sanity/cli",
3182
3205
  "pluginType": "core",
@@ -3185,37 +3208,41 @@
3185
3208
  "relativePath": [
3186
3209
  "dist",
3187
3210
  "commands",
3188
- "hooks",
3189
- "logs.js"
3211
+ "datasets",
3212
+ "import.js"
3190
3213
  ]
3191
3214
  },
3192
- "manifest:extract": {
3215
+ "datasets:list": {
3193
3216
  "aliases": [],
3194
3217
  "args": {},
3195
- "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.",
3218
+ "description": "List datasets for the project",
3196
3219
  "examples": [
3197
3220
  {
3198
3221
  "command": "<%= config.bin %> <%= command.id %>",
3199
- "description": "Extracts manifests"
3222
+ "description": "List datasets for the project"
3200
3223
  },
3201
3224
  {
3202
- "command": "<%= config.bin %> <%= command.id %> --path /public/static",
3203
- "description": "Extracts manifests into /public/static"
3225
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3226
+ "description": "List datasets for a specific project"
3204
3227
  }
3205
3228
  ],
3206
3229
  "flags": {
3207
- "path": {
3208
- "description": "Optional path to specify destination directory of the manifest files",
3209
- "name": "path",
3210
- "default": "dist/static",
3230
+ "project-id": {
3231
+ "char": "p",
3232
+ "description": "Project ID to list datasets for (overrides CLI configuration)",
3233
+ "helpGroup": "OVERRIDE",
3234
+ "name": "project-id",
3211
3235
  "hasDynamicHelp": false,
3236
+ "helpValue": "<id>",
3212
3237
  "multiple": false,
3213
3238
  "type": "option"
3214
3239
  }
3215
3240
  },
3216
3241
  "hasDynamicHelp": false,
3217
- "hiddenAliases": [],
3218
- "id": "manifest:extract",
3242
+ "hiddenAliases": [
3243
+ "dataset:list"
3244
+ ],
3245
+ "id": "datasets:list",
3219
3246
  "pluginAlias": "@sanity/cli",
3220
3247
  "pluginName": "@sanity/cli",
3221
3248
  "pluginType": "core",
@@ -3224,8 +3251,8 @@
3224
3251
  "relativePath": [
3225
3252
  "dist",
3226
3253
  "commands",
3227
- "manifest",
3228
- "extract.js"
3254
+ "datasets",
3255
+ "list.js"
3229
3256
  ]
3230
3257
  },
3231
3258
  "mcp:configure": {
@@ -4648,8 +4675,259 @@
4648
4675
  "relativePath": [
4649
4676
  "dist",
4650
4677
  "commands",
4651
- "users",
4652
- "list.js"
4678
+ "users",
4679
+ "list.js"
4680
+ ]
4681
+ },
4682
+ "datasets:alias:create": {
4683
+ "aliases": [],
4684
+ "args": {
4685
+ "aliasName": {
4686
+ "description": "Dataset alias name to create",
4687
+ "name": "aliasName",
4688
+ "required": false
4689
+ },
4690
+ "targetDataset": {
4691
+ "description": "Target dataset name to link the alias to",
4692
+ "name": "targetDataset",
4693
+ "required": false
4694
+ }
4695
+ },
4696
+ "description": "Create a dataset alias for the project",
4697
+ "examples": [
4698
+ {
4699
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123 conference conf-2025",
4700
+ "description": "Create alias in a specific project"
4701
+ },
4702
+ {
4703
+ "command": "<%= config.bin %> <%= command.id %>",
4704
+ "description": "Create an alias with interactive prompts"
4705
+ },
4706
+ {
4707
+ "command": "<%= config.bin %> <%= command.id %> conference",
4708
+ "description": "Create alias named \"conference\" with interactive dataset selection"
4709
+ },
4710
+ {
4711
+ "command": "<%= config.bin %> <%= command.id %> conference conf-2025",
4712
+ "description": "Create alias \"conference\" linked to \"conf-2025\" dataset"
4713
+ }
4714
+ ],
4715
+ "flags": {
4716
+ "project-id": {
4717
+ "char": "p",
4718
+ "description": "Project ID to create dataset alias in (overrides CLI configuration)",
4719
+ "helpGroup": "OVERRIDE",
4720
+ "name": "project-id",
4721
+ "hasDynamicHelp": false,
4722
+ "helpValue": "<id>",
4723
+ "multiple": false,
4724
+ "type": "option"
4725
+ }
4726
+ },
4727
+ "hasDynamicHelp": false,
4728
+ "hiddenAliases": [
4729
+ "dataset:alias:create"
4730
+ ],
4731
+ "id": "datasets:alias:create",
4732
+ "pluginAlias": "@sanity/cli",
4733
+ "pluginName": "@sanity/cli",
4734
+ "pluginType": "core",
4735
+ "strict": true,
4736
+ "isESM": true,
4737
+ "relativePath": [
4738
+ "dist",
4739
+ "commands",
4740
+ "datasets",
4741
+ "alias",
4742
+ "create.js"
4743
+ ]
4744
+ },
4745
+ "datasets:alias:delete": {
4746
+ "aliases": [],
4747
+ "args": {
4748
+ "aliasName": {
4749
+ "description": "Dataset alias name to delete",
4750
+ "name": "aliasName",
4751
+ "required": true
4752
+ }
4753
+ },
4754
+ "description": "Delete a dataset alias from the project",
4755
+ "examples": [
4756
+ {
4757
+ "command": "<%= config.bin %> <%= command.id %> conference",
4758
+ "description": "Delete alias named \"conference\" with confirmation prompt"
4759
+ },
4760
+ {
4761
+ "command": "<%= config.bin %> <%= command.id %> conference --force",
4762
+ "description": "Delete alias named \"conference\" without confirmation prompt"
4763
+ }
4764
+ ],
4765
+ "flags": {
4766
+ "project-id": {
4767
+ "char": "p",
4768
+ "description": "Project ID to delete dataset alias from (overrides CLI configuration)",
4769
+ "helpGroup": "OVERRIDE",
4770
+ "name": "project-id",
4771
+ "hasDynamicHelp": false,
4772
+ "helpValue": "<id>",
4773
+ "multiple": false,
4774
+ "type": "option"
4775
+ },
4776
+ "force": {
4777
+ "description": "Skip confirmation prompt and delete immediately",
4778
+ "name": "force",
4779
+ "required": false,
4780
+ "allowNo": false,
4781
+ "type": "boolean"
4782
+ }
4783
+ },
4784
+ "hasDynamicHelp": false,
4785
+ "hiddenAliases": [
4786
+ "dataset:alias:delete"
4787
+ ],
4788
+ "id": "datasets:alias:delete",
4789
+ "pluginAlias": "@sanity/cli",
4790
+ "pluginName": "@sanity/cli",
4791
+ "pluginType": "core",
4792
+ "strict": true,
4793
+ "isESM": true,
4794
+ "relativePath": [
4795
+ "dist",
4796
+ "commands",
4797
+ "datasets",
4798
+ "alias",
4799
+ "delete.js"
4800
+ ]
4801
+ },
4802
+ "datasets:alias:link": {
4803
+ "aliases": [],
4804
+ "args": {
4805
+ "aliasName": {
4806
+ "description": "Dataset alias name to link",
4807
+ "name": "aliasName",
4808
+ "required": false
4809
+ },
4810
+ "targetDataset": {
4811
+ "description": "Target dataset name to link the alias to",
4812
+ "name": "targetDataset",
4813
+ "required": false
4814
+ }
4815
+ },
4816
+ "description": "Link a dataset alias to a dataset in the project",
4817
+ "examples": [
4818
+ {
4819
+ "command": "<%= config.bin %> <%= command.id %>",
4820
+ "description": "Link an alias with interactive prompts"
4821
+ },
4822
+ {
4823
+ "command": "<%= config.bin %> <%= command.id %> conference",
4824
+ "description": "Link alias named \"conference\" with interactive dataset selection"
4825
+ },
4826
+ {
4827
+ "command": "<%= config.bin %> <%= command.id %> conference conf-2025",
4828
+ "description": "Link alias \"conference\" to \"conf-2025\" dataset"
4829
+ },
4830
+ {
4831
+ "command": "<%= config.bin %> <%= command.id %> conference conf-2025 --force",
4832
+ "description": "Force link without confirmation (skip relink prompt)"
4833
+ }
4834
+ ],
4835
+ "flags": {
4836
+ "project-id": {
4837
+ "char": "p",
4838
+ "description": "Project ID to link dataset alias in (overrides CLI configuration)",
4839
+ "helpGroup": "OVERRIDE",
4840
+ "name": "project-id",
4841
+ "hasDynamicHelp": false,
4842
+ "helpValue": "<id>",
4843
+ "multiple": false,
4844
+ "type": "option"
4845
+ },
4846
+ "force": {
4847
+ "description": "Skip confirmation prompt when relinking existing alias",
4848
+ "name": "force",
4849
+ "required": false,
4850
+ "allowNo": false,
4851
+ "type": "boolean"
4852
+ }
4853
+ },
4854
+ "hasDynamicHelp": false,
4855
+ "hiddenAliases": [
4856
+ "dataset:alias:link"
4857
+ ],
4858
+ "id": "datasets:alias:link",
4859
+ "pluginAlias": "@sanity/cli",
4860
+ "pluginName": "@sanity/cli",
4861
+ "pluginType": "core",
4862
+ "strict": true,
4863
+ "isESM": true,
4864
+ "relativePath": [
4865
+ "dist",
4866
+ "commands",
4867
+ "datasets",
4868
+ "alias",
4869
+ "link.js"
4870
+ ]
4871
+ },
4872
+ "datasets:alias:unlink": {
4873
+ "aliases": [],
4874
+ "args": {
4875
+ "aliasName": {
4876
+ "description": "Dataset alias name to unlink",
4877
+ "name": "aliasName",
4878
+ "required": false
4879
+ }
4880
+ },
4881
+ "description": "Unlink a dataset alias from its dataset in the project",
4882
+ "examples": [
4883
+ {
4884
+ "command": "<%= config.bin %> <%= command.id %>",
4885
+ "description": "Unlink an alias with interactive selection"
4886
+ },
4887
+ {
4888
+ "command": "<%= config.bin %> <%= command.id %> conference",
4889
+ "description": "Unlink alias \"conference\" with confirmation prompt"
4890
+ },
4891
+ {
4892
+ "command": "<%= config.bin %> <%= command.id %> conference --force",
4893
+ "description": "Unlink alias \"conference\" without confirmation prompt"
4894
+ }
4895
+ ],
4896
+ "flags": {
4897
+ "project-id": {
4898
+ "char": "p",
4899
+ "description": "Project ID to unlink dataset alias in (overrides CLI configuration)",
4900
+ "helpGroup": "OVERRIDE",
4901
+ "name": "project-id",
4902
+ "hasDynamicHelp": false,
4903
+ "helpValue": "<id>",
4904
+ "multiple": false,
4905
+ "type": "option"
4906
+ },
4907
+ "force": {
4908
+ "description": "Skip confirmation prompt and unlink immediately",
4909
+ "name": "force",
4910
+ "required": false,
4911
+ "allowNo": false,
4912
+ "type": "boolean"
4913
+ }
4914
+ },
4915
+ "hasDynamicHelp": false,
4916
+ "hiddenAliases": [
4917
+ "dataset:alias:unlink"
4918
+ ],
4919
+ "id": "datasets:alias:unlink",
4920
+ "pluginAlias": "@sanity/cli",
4921
+ "pluginName": "@sanity/cli",
4922
+ "pluginType": "core",
4923
+ "strict": true,
4924
+ "isESM": true,
4925
+ "relativePath": [
4926
+ "dist",
4927
+ "commands",
4928
+ "datasets",
4929
+ "alias",
4930
+ "unlink.js"
4653
4931
  ]
4654
4932
  },
4655
4933
  "datasets:embeddings:disable": {
@@ -4916,258 +5194,7 @@
4916
5194
  "visibility",
4917
5195
  "set.js"
4918
5196
  ]
4919
- },
4920
- "datasets:alias:create": {
4921
- "aliases": [],
4922
- "args": {
4923
- "aliasName": {
4924
- "description": "Dataset alias name to create",
4925
- "name": "aliasName",
4926
- "required": false
4927
- },
4928
- "targetDataset": {
4929
- "description": "Target dataset name to link the alias to",
4930
- "name": "targetDataset",
4931
- "required": false
4932
- }
4933
- },
4934
- "description": "Create a dataset alias for the project",
4935
- "examples": [
4936
- {
4937
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123 conference conf-2025",
4938
- "description": "Create alias in a specific project"
4939
- },
4940
- {
4941
- "command": "<%= config.bin %> <%= command.id %>",
4942
- "description": "Create an alias with interactive prompts"
4943
- },
4944
- {
4945
- "command": "<%= config.bin %> <%= command.id %> conference",
4946
- "description": "Create alias named \"conference\" with interactive dataset selection"
4947
- },
4948
- {
4949
- "command": "<%= config.bin %> <%= command.id %> conference conf-2025",
4950
- "description": "Create alias \"conference\" linked to \"conf-2025\" dataset"
4951
- }
4952
- ],
4953
- "flags": {
4954
- "project-id": {
4955
- "char": "p",
4956
- "description": "Project ID to create dataset alias in (overrides CLI configuration)",
4957
- "helpGroup": "OVERRIDE",
4958
- "name": "project-id",
4959
- "hasDynamicHelp": false,
4960
- "helpValue": "<id>",
4961
- "multiple": false,
4962
- "type": "option"
4963
- }
4964
- },
4965
- "hasDynamicHelp": false,
4966
- "hiddenAliases": [
4967
- "dataset:alias:create"
4968
- ],
4969
- "id": "datasets:alias:create",
4970
- "pluginAlias": "@sanity/cli",
4971
- "pluginName": "@sanity/cli",
4972
- "pluginType": "core",
4973
- "strict": true,
4974
- "isESM": true,
4975
- "relativePath": [
4976
- "dist",
4977
- "commands",
4978
- "datasets",
4979
- "alias",
4980
- "create.js"
4981
- ]
4982
- },
4983
- "datasets:alias:delete": {
4984
- "aliases": [],
4985
- "args": {
4986
- "aliasName": {
4987
- "description": "Dataset alias name to delete",
4988
- "name": "aliasName",
4989
- "required": true
4990
- }
4991
- },
4992
- "description": "Delete a dataset alias from the project",
4993
- "examples": [
4994
- {
4995
- "command": "<%= config.bin %> <%= command.id %> conference",
4996
- "description": "Delete alias named \"conference\" with confirmation prompt"
4997
- },
4998
- {
4999
- "command": "<%= config.bin %> <%= command.id %> conference --force",
5000
- "description": "Delete alias named \"conference\" without confirmation prompt"
5001
- }
5002
- ],
5003
- "flags": {
5004
- "project-id": {
5005
- "char": "p",
5006
- "description": "Project ID to delete dataset alias from (overrides CLI configuration)",
5007
- "helpGroup": "OVERRIDE",
5008
- "name": "project-id",
5009
- "hasDynamicHelp": false,
5010
- "helpValue": "<id>",
5011
- "multiple": false,
5012
- "type": "option"
5013
- },
5014
- "force": {
5015
- "description": "Skip confirmation prompt and delete immediately",
5016
- "name": "force",
5017
- "required": false,
5018
- "allowNo": false,
5019
- "type": "boolean"
5020
- }
5021
- },
5022
- "hasDynamicHelp": false,
5023
- "hiddenAliases": [
5024
- "dataset:alias:delete"
5025
- ],
5026
- "id": "datasets:alias:delete",
5027
- "pluginAlias": "@sanity/cli",
5028
- "pluginName": "@sanity/cli",
5029
- "pluginType": "core",
5030
- "strict": true,
5031
- "isESM": true,
5032
- "relativePath": [
5033
- "dist",
5034
- "commands",
5035
- "datasets",
5036
- "alias",
5037
- "delete.js"
5038
- ]
5039
- },
5040
- "datasets:alias:link": {
5041
- "aliases": [],
5042
- "args": {
5043
- "aliasName": {
5044
- "description": "Dataset alias name to link",
5045
- "name": "aliasName",
5046
- "required": false
5047
- },
5048
- "targetDataset": {
5049
- "description": "Target dataset name to link the alias to",
5050
- "name": "targetDataset",
5051
- "required": false
5052
- }
5053
- },
5054
- "description": "Link a dataset alias to a dataset in the project",
5055
- "examples": [
5056
- {
5057
- "command": "<%= config.bin %> <%= command.id %>",
5058
- "description": "Link an alias with interactive prompts"
5059
- },
5060
- {
5061
- "command": "<%= config.bin %> <%= command.id %> conference",
5062
- "description": "Link alias named \"conference\" with interactive dataset selection"
5063
- },
5064
- {
5065
- "command": "<%= config.bin %> <%= command.id %> conference conf-2025",
5066
- "description": "Link alias \"conference\" to \"conf-2025\" dataset"
5067
- },
5068
- {
5069
- "command": "<%= config.bin %> <%= command.id %> conference conf-2025 --force",
5070
- "description": "Force link without confirmation (skip relink prompt)"
5071
- }
5072
- ],
5073
- "flags": {
5074
- "project-id": {
5075
- "char": "p",
5076
- "description": "Project ID to link dataset alias in (overrides CLI configuration)",
5077
- "helpGroup": "OVERRIDE",
5078
- "name": "project-id",
5079
- "hasDynamicHelp": false,
5080
- "helpValue": "<id>",
5081
- "multiple": false,
5082
- "type": "option"
5083
- },
5084
- "force": {
5085
- "description": "Skip confirmation prompt when relinking existing alias",
5086
- "name": "force",
5087
- "required": false,
5088
- "allowNo": false,
5089
- "type": "boolean"
5090
- }
5091
- },
5092
- "hasDynamicHelp": false,
5093
- "hiddenAliases": [
5094
- "dataset:alias:link"
5095
- ],
5096
- "id": "datasets:alias:link",
5097
- "pluginAlias": "@sanity/cli",
5098
- "pluginName": "@sanity/cli",
5099
- "pluginType": "core",
5100
- "strict": true,
5101
- "isESM": true,
5102
- "relativePath": [
5103
- "dist",
5104
- "commands",
5105
- "datasets",
5106
- "alias",
5107
- "link.js"
5108
- ]
5109
- },
5110
- "datasets:alias:unlink": {
5111
- "aliases": [],
5112
- "args": {
5113
- "aliasName": {
5114
- "description": "Dataset alias name to unlink",
5115
- "name": "aliasName",
5116
- "required": false
5117
- }
5118
- },
5119
- "description": "Unlink a dataset alias from its dataset in the project",
5120
- "examples": [
5121
- {
5122
- "command": "<%= config.bin %> <%= command.id %>",
5123
- "description": "Unlink an alias with interactive selection"
5124
- },
5125
- {
5126
- "command": "<%= config.bin %> <%= command.id %> conference",
5127
- "description": "Unlink alias \"conference\" with confirmation prompt"
5128
- },
5129
- {
5130
- "command": "<%= config.bin %> <%= command.id %> conference --force",
5131
- "description": "Unlink alias \"conference\" without confirmation prompt"
5132
- }
5133
- ],
5134
- "flags": {
5135
- "project-id": {
5136
- "char": "p",
5137
- "description": "Project ID to unlink dataset alias in (overrides CLI configuration)",
5138
- "helpGroup": "OVERRIDE",
5139
- "name": "project-id",
5140
- "hasDynamicHelp": false,
5141
- "helpValue": "<id>",
5142
- "multiple": false,
5143
- "type": "option"
5144
- },
5145
- "force": {
5146
- "description": "Skip confirmation prompt and unlink immediately",
5147
- "name": "force",
5148
- "required": false,
5149
- "allowNo": false,
5150
- "type": "boolean"
5151
- }
5152
- },
5153
- "hasDynamicHelp": false,
5154
- "hiddenAliases": [
5155
- "dataset:alias:unlink"
5156
- ],
5157
- "id": "datasets:alias:unlink",
5158
- "pluginAlias": "@sanity/cli",
5159
- "pluginName": "@sanity/cli",
5160
- "pluginType": "core",
5161
- "strict": true,
5162
- "isESM": true,
5163
- "relativePath": [
5164
- "dist",
5165
- "commands",
5166
- "datasets",
5167
- "alias",
5168
- "unlink.js"
5169
- ]
5170
5197
  }
5171
5198
  },
5172
- "version": "7.7.0"
5199
+ "version": "7.8.0"
5173
5200
  }