@sanity/cli 8.13.1 → 8.14.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 (29) hide show
  1. package/README.md +6 -5
  2. package/dist/actions/init/bootstrapLocalTemplate.js +5 -0
  3. package/dist/actions/init/bootstrapLocalTemplate.js.map +1 -1
  4. package/dist/actions/init/initAction.js +11 -3
  5. package/dist/actions/init/initAction.js.map +1 -1
  6. package/dist/actions/init/sdkAppDependencies.js +4 -4
  7. package/dist/actions/init/sdkAppDependencies.js.map +1 -1
  8. package/dist/actions/init/studioDependencies.js +2 -1
  9. package/dist/actions/init/studioDependencies.js.map +1 -1
  10. package/dist/actions/init/templates/appSanityUi.js +1 -1
  11. package/dist/actions/init/templates/appSanityUi.js.map +1 -1
  12. package/dist/actions/init/types.js +1 -1
  13. package/dist/actions/init/types.js.map +1 -1
  14. package/dist/commands/dev.js +1 -1
  15. package/dist/commands/dev.js.map +1 -1
  16. package/dist/commands/init.js +7 -7
  17. package/dist/commands/init.js.map +1 -1
  18. package/oclif.manifest.json +1243 -1240
  19. package/package.json +5 -5
  20. package/templates/app-sanity-ui/src/App.tsx +8 -8
  21. package/templates/app-sanity-ui/src/ExampleComponent.tsx +1 -1
  22. package/templates/app-sanity-ui/src/SanityUI.tsx +3 -1
  23. package/templates/shared/dashboard/app-quickstart/.claude/skills/sanity-app-sdk/SKILL.md +66 -0
  24. package/templates/shared/dashboard/app-quickstart/AGENTS.md +61 -0
  25. package/templates/shared/dashboard/app-quickstart/README.md +30 -0
  26. package/templates/shared/dashboard/app-sanity-ui/.claude/skills/sanity-app-sdk/SKILL.md +70 -0
  27. package/templates/shared/dashboard/app-sanity-ui/AGENTS.md +65 -0
  28. package/templates/shared/dashboard/app-sanity-ui/README.md +31 -0
  29. package/templates/shared/tsconfig.json +1 -0
@@ -706,6 +706,16 @@
706
706
  "multiple": false,
707
707
  "type": "option"
708
708
  },
709
+ "dashboard": {
710
+ "description": "Set up the project to run in the Sanity Dashboard (beta)",
711
+ "exclusive": [
712
+ "bare",
713
+ "env"
714
+ ],
715
+ "name": "dashboard",
716
+ "allowNo": false,
717
+ "type": "boolean"
718
+ },
709
719
  "dataset": {
710
720
  "description": "Dataset name for the studio",
711
721
  "exclusive": [
@@ -942,13 +952,6 @@
942
952
  "allowNo": true,
943
953
  "type": "boolean"
944
954
  },
945
- "unstable--workbench": {
946
- "description": "Opt into workbench: scaffolds the CLI config with defineApplication",
947
- "hidden": true,
948
- "name": "unstable--workbench",
949
- "allowNo": true,
950
- "type": "boolean"
951
- },
952
955
  "visibility": {
953
956
  "description": "Visibility mode for dataset",
954
957
  "name": "visibility",
@@ -1770,55 +1773,156 @@
1770
1773
  "list.js"
1771
1774
  ]
1772
1775
  },
1773
- "cors:add": {
1776
+ "context:build": {
1774
1777
  "aliases": [],
1775
1778
  "args": {
1776
- "origin": {
1777
- "description": "Origin to allow (e.g., https://example.com)",
1778
- "name": "origin",
1779
+ "knowledgeBaseId": {
1780
+ "description": "Knowledge base ID",
1781
+ "name": "knowledgeBaseId",
1779
1782
  "required": true
1780
1783
  }
1781
1784
  },
1782
- "description": "Add a CORS origin to the project",
1785
+ "description": "Build a knowledge base from its imported content",
1783
1786
  "examples": [
1784
1787
  {
1785
- "command": "<%= config.bin %> <%= command.id %>",
1786
- "description": "Interactively add a CORS origin"
1788
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
1789
+ "description": "Start a build and return the job ID"
1787
1790
  },
1788
1791
  {
1789
- "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
1790
- "description": "Add a localhost origin without credentials"
1792
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --watch",
1793
+ "description": "Start a build and wait for it to finish (non-zero exit on failure)"
1791
1794
  },
1792
1795
  {
1793
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
1794
- "description": "Add a production origin with credentials allowed"
1796
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --cancel",
1797
+ "description": "Cancel the running build, if any"
1798
+ }
1799
+ ],
1800
+ "flags": {
1801
+ "cancel": {
1802
+ "description": "Cancel the running build instead of starting one",
1803
+ "exclusive": [
1804
+ "watch"
1805
+ ],
1806
+ "name": "cancel",
1807
+ "allowNo": false,
1808
+ "type": "boolean"
1809
+ },
1810
+ "watch": {
1811
+ "description": "Wait for the build to finish, exiting non-zero if it fails",
1812
+ "name": "watch",
1813
+ "allowNo": false,
1814
+ "type": "boolean"
1815
+ }
1816
+ },
1817
+ "hasDynamicHelp": false,
1818
+ "hiddenAliases": [],
1819
+ "id": "context:build",
1820
+ "pluginAlias": "@sanity/cli",
1821
+ "pluginName": "@sanity/cli",
1822
+ "pluginType": "core",
1823
+ "strict": true,
1824
+ "isESM": true,
1825
+ "relativePath": [
1826
+ "dist",
1827
+ "commands",
1828
+ "context",
1829
+ "build.js"
1830
+ ]
1831
+ },
1832
+ "context:create": {
1833
+ "aliases": [],
1834
+ "args": {},
1835
+ "description": "Create a knowledge base",
1836
+ "examples": [
1837
+ {
1838
+ "command": "<%= config.bin %> <%= command.id %>",
1839
+ "description": "Interactively create a knowledge base"
1795
1840
  },
1796
1841
  {
1797
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project-id abc123",
1798
- "description": "Add a CORS origin for a specific project"
1842
+ "command": "<%= config.bin %> <%= command.id %> --organization org-abc123 --title \"Support docs\" --description \"Product docs and troubleshooting guides\"",
1843
+ "description": "Create a knowledge base in a specific organization"
1799
1844
  }
1800
1845
  ],
1801
1846
  "flags": {
1802
- "project-id": {
1803
- "char": "p",
1804
- "description": "Project ID to add CORS origin to (overrides CLI configuration)",
1847
+ "organization": {
1848
+ "description": "Organization to create the knowledge base in (overrides CLI configuration)",
1805
1849
  "helpGroup": "OVERRIDE",
1806
- "name": "project-id",
1850
+ "name": "organization",
1807
1851
  "hasDynamicHelp": false,
1808
1852
  "helpValue": "<id>",
1809
1853
  "multiple": false,
1810
1854
  "type": "option"
1811
1855
  },
1812
- "credentials": {
1813
- "description": "Allow credentials (token/cookie) to be sent from this origin",
1814
- "name": "credentials",
1815
- "required": false,
1816
- "allowNo": true,
1817
- "type": "boolean"
1856
+ "description": {
1857
+ "description": "Knowledge base description",
1858
+ "name": "description",
1859
+ "hasDynamicHelp": false,
1860
+ "multiple": false,
1861
+ "type": "option"
1862
+ },
1863
+ "title": {
1864
+ "description": "Knowledge base title",
1865
+ "name": "title",
1866
+ "hasDynamicHelp": false,
1867
+ "multiple": false,
1868
+ "type": "option"
1869
+ }
1870
+ },
1871
+ "hasDynamicHelp": false,
1872
+ "hiddenAliases": [],
1873
+ "id": "context:create",
1874
+ "pluginAlias": "@sanity/cli",
1875
+ "pluginName": "@sanity/cli",
1876
+ "pluginType": "core",
1877
+ "strict": true,
1878
+ "telemetry": {
1879
+ "redactedFlags": [
1880
+ {
1881
+ "canonical": "--title",
1882
+ "flags": [
1883
+ "--title"
1884
+ ]
1885
+ },
1886
+ {
1887
+ "canonical": "--description",
1888
+ "flags": [
1889
+ "--description"
1890
+ ]
1891
+ }
1892
+ ]
1893
+ },
1894
+ "isESM": true,
1895
+ "relativePath": [
1896
+ "dist",
1897
+ "commands",
1898
+ "context",
1899
+ "create.js"
1900
+ ]
1901
+ },
1902
+ "context:delete": {
1903
+ "aliases": [],
1904
+ "args": {
1905
+ "knowledgeBaseId": {
1906
+ "description": "Knowledge base ID",
1907
+ "name": "knowledgeBaseId",
1908
+ "required": true
1909
+ }
1910
+ },
1911
+ "description": "Delete a knowledge base and its generated content",
1912
+ "examples": [
1913
+ {
1914
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
1915
+ "description": "Delete a knowledge base after confirmation"
1818
1916
  },
1917
+ {
1918
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --yes",
1919
+ "description": "Delete a knowledge base without confirmation prompt"
1920
+ }
1921
+ ],
1922
+ "flags": {
1819
1923
  "yes": {
1820
1924
  "char": "y",
1821
- "description": "Confirm risky wildcard origins without prompting",
1925
+ "description": "Skip confirmation prompt (unattended mode)",
1822
1926
  "name": "yes",
1823
1927
  "allowNo": false,
1824
1928
  "type": "boolean"
@@ -1826,7 +1930,7 @@
1826
1930
  },
1827
1931
  "hasDynamicHelp": false,
1828
1932
  "hiddenAliases": [],
1829
- "id": "cors:add",
1933
+ "id": "context:delete",
1830
1934
  "pluginAlias": "@sanity/cli",
1831
1935
  "pluginName": "@sanity/cli",
1832
1936
  "pluginType": "core",
@@ -1835,49 +1939,41 @@
1835
1939
  "relativePath": [
1836
1940
  "dist",
1837
1941
  "commands",
1838
- "cors",
1839
- "add.js"
1942
+ "context",
1943
+ "delete.js"
1840
1944
  ]
1841
1945
  },
1842
- "cors:delete": {
1946
+ "context:get": {
1843
1947
  "aliases": [],
1844
1948
  "args": {
1845
- "origin": {
1846
- "description": "Origin to delete (will prompt if not provided)",
1847
- "name": "origin",
1848
- "required": false
1949
+ "knowledgeBaseId": {
1950
+ "description": "Knowledge base ID",
1951
+ "name": "knowledgeBaseId",
1952
+ "required": true
1849
1953
  }
1850
1954
  },
1851
- "description": "Delete a CORS origin from the project",
1955
+ "description": "Get details of a knowledge base",
1852
1956
  "examples": [
1853
1957
  {
1854
- "command": "<%= config.bin %> <%= command.id %>",
1855
- "description": "Interactively select and delete a CORS origin"
1856
- },
1857
- {
1858
- "command": "<%= config.bin %> <%= command.id %> https://example.com",
1859
- "description": "Delete a specific CORS origin"
1958
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
1959
+ "description": "Get details of a specific knowledge base"
1860
1960
  },
1861
1961
  {
1862
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
1863
- "description": "Delete a CORS origin from a specific project"
1962
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
1963
+ "description": "Output the knowledge base as JSON"
1864
1964
  }
1865
1965
  ],
1866
1966
  "flags": {
1867
- "project-id": {
1868
- "char": "p",
1869
- "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
1870
- "helpGroup": "OVERRIDE",
1871
- "name": "project-id",
1872
- "hasDynamicHelp": false,
1873
- "helpValue": "<id>",
1874
- "multiple": false,
1875
- "type": "option"
1967
+ "json": {
1968
+ "description": "Output the knowledge base in JSON format",
1969
+ "name": "json",
1970
+ "allowNo": false,
1971
+ "type": "boolean"
1876
1972
  }
1877
1973
  },
1878
1974
  "hasDynamicHelp": false,
1879
1975
  "hiddenAliases": [],
1880
- "id": "cors:delete",
1976
+ "id": "context:get",
1881
1977
  "pluginAlias": "@sanity/cli",
1882
1978
  "pluginName": "@sanity/cli",
1883
1979
  "pluginType": "core",
@@ -1886,39 +1982,48 @@
1886
1982
  "relativePath": [
1887
1983
  "dist",
1888
1984
  "commands",
1889
- "cors",
1890
- "delete.js"
1985
+ "context",
1986
+ "get.js"
1891
1987
  ]
1892
1988
  },
1893
- "cors:list": {
1989
+ "context:list": {
1894
1990
  "aliases": [],
1895
1991
  "args": {},
1896
- "description": "List CORS origins for the project",
1992
+ "description": "List knowledge bases in an organization",
1897
1993
  "examples": [
1898
1994
  {
1899
1995
  "command": "<%= config.bin %> <%= command.id %>",
1900
- "description": "List CORS origins for the project"
1996
+ "description": "List knowledge bases, selecting the organization interactively"
1901
1997
  },
1902
1998
  {
1903
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
1904
- "description": "List CORS origins for a specific project"
1999
+ "command": "<%= config.bin %> <%= command.id %> --organization org-abc123",
2000
+ "description": "List knowledge bases in a specific organization"
2001
+ },
2002
+ {
2003
+ "command": "<%= config.bin %> <%= command.id %> --organization org-abc123 --json",
2004
+ "description": "Output knowledge bases as JSON"
1905
2005
  }
1906
2006
  ],
1907
2007
  "flags": {
1908
- "project-id": {
1909
- "char": "p",
1910
- "description": "Project ID to list CORS origins for (overrides CLI configuration)",
2008
+ "organization": {
2009
+ "description": "Organization to list knowledge bases for (overrides CLI configuration)",
1911
2010
  "helpGroup": "OVERRIDE",
1912
- "name": "project-id",
2011
+ "name": "organization",
1913
2012
  "hasDynamicHelp": false,
1914
2013
  "helpValue": "<id>",
1915
2014
  "multiple": false,
1916
2015
  "type": "option"
2016
+ },
2017
+ "json": {
2018
+ "description": "Output knowledge bases in JSON format",
2019
+ "name": "json",
2020
+ "allowNo": false,
2021
+ "type": "boolean"
1917
2022
  }
1918
2023
  },
1919
2024
  "hasDynamicHelp": false,
1920
2025
  "hiddenAliases": [],
1921
- "id": "cors:list",
2026
+ "id": "context:list",
1922
2027
  "pluginAlias": "@sanity/cli",
1923
2028
  "pluginName": "@sanity/cli",
1924
2029
  "pluginType": "core",
@@ -1927,200 +2032,166 @@
1927
2032
  "relativePath": [
1928
2033
  "dist",
1929
2034
  "commands",
1930
- "cors",
2035
+ "context",
1931
2036
  "list.js"
1932
2037
  ]
1933
2038
  },
1934
- "datasets:copy": {
2039
+ "context:refresh": {
1935
2040
  "aliases": [],
1936
2041
  "args": {
1937
- "source": {
1938
- "description": "Name of the dataset to copy from",
1939
- "name": "source",
1940
- "required": false
1941
- },
1942
- "target": {
1943
- "description": "Name of the dataset to copy to",
1944
- "name": "target",
1945
- "required": false
2042
+ "knowledgeBaseId": {
2043
+ "description": "Knowledge base ID",
2044
+ "name": "knowledgeBaseId",
2045
+ "required": true
1946
2046
  }
1947
2047
  },
1948
- "description": "Copy a dataset or manage copy jobs",
2048
+ "description": "Refresh a knowledge base: re-check sources and apply what changed",
1949
2049
  "examples": [
1950
2050
  {
1951
- "command": "<%= config.bin %> <%= command.id %>",
1952
- "description": "Interactively copy a dataset"
1953
- },
1954
- {
1955
- "command": "<%= config.bin %> <%= command.id %> source-dataset",
1956
- "description": "Copy from source-dataset (prompts for target)"
1957
- },
1958
- {
1959
- "command": "<%= config.bin %> <%= command.id %> source-dataset target-dataset",
1960
- "description": "Copy from source-dataset to target-dataset"
1961
- },
1962
- {
1963
- "command": "<%= config.bin %> <%= command.id %> --skip-history source target",
1964
- "description": "Copy without preserving document history (faster for large datasets)"
1965
- },
1966
- {
1967
- "command": "<%= config.bin %> <%= command.id %> --skip-content-releases source target",
1968
- "description": "Copy without content release documents"
1969
- },
1970
- {
1971
- "command": "<%= config.bin %> <%= command.id %> --detach source target",
1972
- "description": "Start copy job without waiting for completion"
1973
- },
2051
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2052
+ "description": "Start an incremental refresh"
2053
+ }
2054
+ ],
2055
+ "flags": {},
2056
+ "hasDynamicHelp": false,
2057
+ "hiddenAliases": [],
2058
+ "id": "context:refresh",
2059
+ "pluginAlias": "@sanity/cli",
2060
+ "pluginName": "@sanity/cli",
2061
+ "pluginType": "core",
2062
+ "strict": true,
2063
+ "isESM": true,
2064
+ "relativePath": [
2065
+ "dist",
2066
+ "commands",
2067
+ "context",
2068
+ "refresh.js"
2069
+ ]
2070
+ },
2071
+ "context:update": {
2072
+ "aliases": [],
2073
+ "args": {
2074
+ "knowledgeBaseId": {
2075
+ "description": "Knowledge base ID",
2076
+ "name": "knowledgeBaseId",
2077
+ "required": true
2078
+ }
2079
+ },
2080
+ "description": "Update a knowledge base",
2081
+ "examples": [
1974
2082
  {
1975
- "command": "<%= config.bin %> <%= command.id %> --attach <job-id>",
1976
- "description": "Attach to a running copy job to follow progress"
2083
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --title \"New title\"",
2084
+ "description": "Rename a knowledge base"
1977
2085
  },
1978
2086
  {
1979
- "command": "<%= config.bin %> <%= command.id %> --list",
1980
- "description": "List all dataset copy jobs"
2087
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --refresh-enabled --refresh-frequency weekly",
2088
+ "description": "Enable weekly scheduled refresh"
1981
2089
  },
1982
2090
  {
1983
- "command": "<%= config.bin %> <%= command.id %> --list --offset 2 --limit 10",
1984
- "description": "List copy jobs with pagination"
2091
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --no-refresh-enabled",
2092
+ "description": "Disable scheduled refresh"
1985
2093
  }
1986
2094
  ],
1987
2095
  "flags": {
1988
- "project-id": {
1989
- "char": "p",
1990
- "description": "Project ID to copy dataset in (overrides CLI configuration)",
1991
- "helpGroup": "OVERRIDE",
1992
- "name": "project-id",
1993
- "hasDynamicHelp": false,
1994
- "helpValue": "<id>",
1995
- "multiple": false,
1996
- "type": "option"
1997
- },
1998
- "attach": {
1999
- "description": "Attach to the running copy process to show progress",
2000
- "exclusive": [
2001
- "list",
2002
- "detach",
2003
- "skip-history"
2004
- ],
2005
- "name": "attach",
2096
+ "description": {
2097
+ "description": "New knowledge base description",
2098
+ "name": "description",
2006
2099
  "required": false,
2007
2100
  "hasDynamicHelp": false,
2008
2101
  "multiple": false,
2009
2102
  "type": "option"
2010
2103
  },
2011
- "detach": {
2012
- "description": "Start the copy without waiting for it to finish",
2013
- "exclusive": [
2014
- "list",
2015
- "attach"
2016
- ],
2017
- "name": "detach",
2104
+ "refresh-enabled": {
2105
+ "description": "Enable scheduled refresh (--no-refresh-enabled to disable)",
2106
+ "name": "refresh-enabled",
2018
2107
  "required": false,
2019
- "allowNo": false,
2108
+ "allowNo": true,
2020
2109
  "type": "boolean"
2021
2110
  },
2022
- "limit": {
2023
- "dependsOn": [
2024
- "list"
2025
- ],
2026
- "description": "Maximum number of jobs returned (default 10, max 1000)",
2027
- "name": "limit",
2111
+ "refresh-frequency": {
2112
+ "description": "How often scheduled refresh runs",
2113
+ "name": "refresh-frequency",
2028
2114
  "required": false,
2029
2115
  "hasDynamicHelp": false,
2030
2116
  "multiple": false,
2031
- "type": "option"
2032
- },
2033
- "list": {
2034
- "description": "Lists all dataset copy jobs",
2035
- "exclusive": [
2036
- "attach",
2037
- "detach",
2038
- "skip-history"
2117
+ "options": [
2118
+ "weekly",
2119
+ "monthly"
2039
2120
  ],
2040
- "name": "list",
2041
- "required": false,
2042
- "allowNo": false,
2043
- "type": "boolean"
2121
+ "type": "option"
2044
2122
  },
2045
- "offset": {
2046
- "dependsOn": [
2047
- "list"
2048
- ],
2049
- "description": "Start position in the list of jobs (default 0)",
2050
- "name": "offset",
2123
+ "title": {
2124
+ "description": "New knowledge base title",
2125
+ "name": "title",
2051
2126
  "required": false,
2052
2127
  "hasDynamicHelp": false,
2053
2128
  "multiple": false,
2054
2129
  "type": "option"
2055
- },
2056
- "skip-content-releases": {
2057
- "description": "Don't copy content release documents to the target dataset",
2058
- "exclusive": [
2059
- "list",
2060
- "attach"
2061
- ],
2062
- "name": "skip-content-releases",
2063
- "required": false,
2064
- "allowNo": false,
2065
- "type": "boolean"
2066
- },
2067
- "skip-history": {
2068
- "description": "Don't preserve document history on copy",
2069
- "exclusive": [
2070
- "list",
2071
- "attach"
2072
- ],
2073
- "name": "skip-history",
2074
- "required": false,
2075
- "allowNo": false,
2076
- "type": "boolean"
2077
2130
  }
2078
2131
  },
2079
2132
  "hasDynamicHelp": false,
2080
- "hiddenAliases": [
2081
- "dataset:copy"
2082
- ],
2083
- "id": "datasets:copy",
2133
+ "hiddenAliases": [],
2134
+ "id": "context:update",
2084
2135
  "pluginAlias": "@sanity/cli",
2085
2136
  "pluginName": "@sanity/cli",
2086
2137
  "pluginType": "core",
2087
2138
  "strict": true,
2139
+ "telemetry": {
2140
+ "redactedFlags": [
2141
+ {
2142
+ "canonical": "--title",
2143
+ "flags": [
2144
+ "--title"
2145
+ ]
2146
+ },
2147
+ {
2148
+ "canonical": "--description",
2149
+ "flags": [
2150
+ "--description"
2151
+ ]
2152
+ }
2153
+ ]
2154
+ },
2088
2155
  "isESM": true,
2089
2156
  "relativePath": [
2090
2157
  "dist",
2091
2158
  "commands",
2092
- "datasets",
2093
- "copy.js"
2159
+ "context",
2160
+ "update.js"
2094
2161
  ]
2095
2162
  },
2096
- "datasets:create": {
2163
+ "cors:add": {
2097
2164
  "aliases": [],
2098
2165
  "args": {
2099
- "name": {
2100
- "description": "Name of the dataset to create",
2101
- "name": "name",
2102
- "required": false
2166
+ "origin": {
2167
+ "description": "Origin to allow (e.g., https://example.com)",
2168
+ "name": "origin",
2169
+ "required": true
2103
2170
  }
2104
2171
  },
2105
- "description": "Create a new dataset for the project",
2172
+ "description": "Add a CORS origin to the project",
2106
2173
  "examples": [
2107
2174
  {
2108
2175
  "command": "<%= config.bin %> <%= command.id %>",
2109
- "description": "Interactively create a dataset"
2176
+ "description": "Interactively add a CORS origin"
2110
2177
  },
2111
2178
  {
2112
- "command": "<%= config.bin %> <%= command.id %> my-dataset",
2113
- "description": "Create a dataset named \"my-dataset\""
2179
+ "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
2180
+ "description": "Add a localhost origin without credentials"
2114
2181
  },
2115
2182
  {
2116
- "command": "<%= config.bin %> <%= command.id %> my-dataset --visibility private",
2117
- "description": "Create a private dataset named \"my-dataset\""
2183
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
2184
+ "description": "Add a production origin with credentials allowed"
2185
+ },
2186
+ {
2187
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project-id abc123",
2188
+ "description": "Add a CORS origin for a specific project"
2118
2189
  }
2119
2190
  ],
2120
2191
  "flags": {
2121
2192
  "project-id": {
2122
2193
  "char": "p",
2123
- "description": "Project ID to create dataset in (overrides CLI configuration)",
2194
+ "description": "Project ID to add CORS origin to (overrides CLI configuration)",
2124
2195
  "helpGroup": "OVERRIDE",
2125
2196
  "name": "project-id",
2126
2197
  "hasDynamicHelp": false,
@@ -2128,41 +2199,24 @@
2128
2199
  "multiple": false,
2129
2200
  "type": "option"
2130
2201
  },
2131
- "embeddings": {
2132
- "description": "Enable embeddings for this dataset",
2133
- "name": "embeddings",
2134
- "allowNo": false,
2202
+ "credentials": {
2203
+ "description": "Allow credentials (token/cookie) to be sent from this origin",
2204
+ "name": "credentials",
2205
+ "required": false,
2206
+ "allowNo": true,
2135
2207
  "type": "boolean"
2136
2208
  },
2137
- "embeddings-projection": {
2138
- "dependsOn": [
2139
- "embeddings"
2140
- ],
2141
- "description": "GROQ projection for embeddings indexing (e.g. \"{ title, body }\")",
2142
- "name": "embeddings-projection",
2143
- "hasDynamicHelp": false,
2144
- "multiple": false,
2145
- "type": "option"
2146
- },
2147
- "visibility": {
2148
- "description": "Set visibility for this dataset (custom/private/public)",
2149
- "name": "visibility",
2150
- "required": false,
2151
- "hasDynamicHelp": false,
2152
- "multiple": false,
2153
- "options": [
2154
- "custom",
2155
- "private",
2156
- "public"
2157
- ],
2158
- "type": "option"
2209
+ "yes": {
2210
+ "char": "y",
2211
+ "description": "Confirm risky wildcard origins without prompting",
2212
+ "name": "yes",
2213
+ "allowNo": false,
2214
+ "type": "boolean"
2159
2215
  }
2160
2216
  },
2161
2217
  "hasDynamicHelp": false,
2162
- "hiddenAliases": [
2163
- "dataset:create"
2164
- ],
2165
- "id": "datasets:create",
2218
+ "hiddenAliases": [],
2219
+ "id": "cors:add",
2166
2220
  "pluginAlias": "@sanity/cli",
2167
2221
  "pluginName": "@sanity/cli",
2168
2222
  "pluginType": "core",
@@ -2171,53 +2225,49 @@
2171
2225
  "relativePath": [
2172
2226
  "dist",
2173
2227
  "commands",
2174
- "datasets",
2175
- "create.js"
2228
+ "cors",
2229
+ "add.js"
2176
2230
  ]
2177
2231
  },
2178
- "datasets:delete": {
2232
+ "cors:delete": {
2179
2233
  "aliases": [],
2180
2234
  "args": {
2181
- "datasetName": {
2182
- "description": "Dataset name to delete",
2183
- "name": "datasetName",
2184
- "required": true
2235
+ "origin": {
2236
+ "description": "Origin to delete (will prompt if not provided)",
2237
+ "name": "origin",
2238
+ "required": false
2185
2239
  }
2186
2240
  },
2187
- "description": "Delete a dataset from the project",
2241
+ "description": "Delete a CORS origin from the project",
2188
2242
  "examples": [
2189
2243
  {
2190
- "command": "<%= config.bin %> <%= command.id %> my-dataset",
2191
- "description": "Delete a specific dataset"
2244
+ "command": "<%= config.bin %> <%= command.id %>",
2245
+ "description": "Interactively select and delete a CORS origin"
2192
2246
  },
2193
2247
  {
2194
- "command": "<%= config.bin %> <%= command.id %> my-dataset --force",
2195
- "description": "Delete a specific dataset without confirmation"
2248
+ "command": "<%= config.bin %> <%= command.id %> https://example.com",
2249
+ "description": "Delete a specific CORS origin"
2250
+ },
2251
+ {
2252
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2253
+ "description": "Delete a CORS origin from a specific project"
2196
2254
  }
2197
2255
  ],
2198
2256
  "flags": {
2199
2257
  "project-id": {
2200
2258
  "char": "p",
2201
- "description": "Project ID to delete dataset from (overrides CLI configuration)",
2259
+ "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
2202
2260
  "helpGroup": "OVERRIDE",
2203
2261
  "name": "project-id",
2204
2262
  "hasDynamicHelp": false,
2205
2263
  "helpValue": "<id>",
2206
2264
  "multiple": false,
2207
2265
  "type": "option"
2208
- },
2209
- "force": {
2210
- "description": "Do not prompt for delete confirmation - forcefully delete",
2211
- "name": "force",
2212
- "allowNo": false,
2213
- "type": "boolean"
2214
2266
  }
2215
2267
  },
2216
2268
  "hasDynamicHelp": false,
2217
- "hiddenAliases": [
2218
- "dataset:delete"
2219
- ],
2220
- "id": "datasets:delete",
2269
+ "hiddenAliases": [],
2270
+ "id": "cors:delete",
2221
2271
  "pluginAlias": "@sanity/cli",
2222
2272
  "pluginName": "@sanity/cli",
2223
2273
  "pluginType": "core",
@@ -2226,49 +2276,108 @@
2226
2276
  "relativePath": [
2227
2277
  "dist",
2228
2278
  "commands",
2229
- "datasets",
2279
+ "cors",
2230
2280
  "delete.js"
2231
2281
  ]
2232
2282
  },
2233
- "datasets:export": {
2283
+ "cors:list": {
2284
+ "aliases": [],
2285
+ "args": {},
2286
+ "description": "List CORS origins for the project",
2287
+ "examples": [
2288
+ {
2289
+ "command": "<%= config.bin %> <%= command.id %>",
2290
+ "description": "List CORS origins for the project"
2291
+ },
2292
+ {
2293
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2294
+ "description": "List CORS origins for a specific project"
2295
+ }
2296
+ ],
2297
+ "flags": {
2298
+ "project-id": {
2299
+ "char": "p",
2300
+ "description": "Project ID to list CORS origins for (overrides CLI configuration)",
2301
+ "helpGroup": "OVERRIDE",
2302
+ "name": "project-id",
2303
+ "hasDynamicHelp": false,
2304
+ "helpValue": "<id>",
2305
+ "multiple": false,
2306
+ "type": "option"
2307
+ }
2308
+ },
2309
+ "hasDynamicHelp": false,
2310
+ "hiddenAliases": [],
2311
+ "id": "cors:list",
2312
+ "pluginAlias": "@sanity/cli",
2313
+ "pluginName": "@sanity/cli",
2314
+ "pluginType": "core",
2315
+ "strict": true,
2316
+ "isESM": true,
2317
+ "relativePath": [
2318
+ "dist",
2319
+ "commands",
2320
+ "cors",
2321
+ "list.js"
2322
+ ]
2323
+ },
2324
+ "datasets:copy": {
2234
2325
  "aliases": [],
2235
2326
  "args": {
2236
- "name": {
2237
- "description": "Name of the dataset to export",
2238
- "name": "name"
2327
+ "source": {
2328
+ "description": "Name of the dataset to copy from",
2329
+ "name": "source",
2330
+ "required": false
2239
2331
  },
2240
- "destination": {
2241
- "description": "Output destination file path",
2242
- "name": "destination"
2332
+ "target": {
2333
+ "description": "Name of the dataset to copy to",
2334
+ "name": "target",
2335
+ "required": false
2243
2336
  }
2244
2337
  },
2245
- "description": "Export a dataset to a local gzipped tarball. Assets returning 401, 403, or 404 are excluded from the export.",
2338
+ "description": "Copy a dataset or manage copy jobs",
2246
2339
  "examples": [
2247
2340
  {
2248
- "command": "<%= config.bin %> <%= command.id %> moviedb localPath.tar.gz",
2249
- "description": "Export dataset \"moviedb\" to localPath.tar.gz"
2341
+ "command": "<%= config.bin %> <%= command.id %>",
2342
+ "description": "Interactively copy a dataset"
2250
2343
  },
2251
2344
  {
2252
- "command": "<%= config.bin %> <%= command.id %> moviedb assetless.tar.gz --no-assets",
2253
- "description": "Export dataset without assets"
2345
+ "command": "<%= config.bin %> <%= command.id %> source-dataset",
2346
+ "description": "Copy from source-dataset (prompts for target)"
2254
2347
  },
2255
2348
  {
2256
- "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --raw",
2257
- "description": "Export raw documents without asset reference rewriting"
2349
+ "command": "<%= config.bin %> <%= command.id %> source-dataset target-dataset",
2350
+ "description": "Copy from source-dataset to target-dataset"
2258
2351
  },
2259
2352
  {
2260
- "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --types products,shops",
2261
- "description": "Export specific document types"
2353
+ "command": "<%= config.bin %> <%= command.id %> --skip-history source target",
2354
+ "description": "Copy without preserving document history (faster for large datasets)"
2262
2355
  },
2263
2356
  {
2264
- "command": "<%= config.bin %> <%= command.id %> moviedb moviedb.tar.gz --no-strict-asset-verification",
2265
- "description": "Export dataset without aborting on asset verification failures"
2357
+ "command": "<%= config.bin %> <%= command.id %> --skip-content-releases source target",
2358
+ "description": "Copy without content release documents"
2359
+ },
2360
+ {
2361
+ "command": "<%= config.bin %> <%= command.id %> --detach source target",
2362
+ "description": "Start copy job without waiting for completion"
2363
+ },
2364
+ {
2365
+ "command": "<%= config.bin %> <%= command.id %> --attach <job-id>",
2366
+ "description": "Attach to a running copy job to follow progress"
2367
+ },
2368
+ {
2369
+ "command": "<%= config.bin %> <%= command.id %> --list",
2370
+ "description": "List all dataset copy jobs"
2371
+ },
2372
+ {
2373
+ "command": "<%= config.bin %> <%= command.id %> --list --offset 2 --limit 10",
2374
+ "description": "List copy jobs with pagination"
2266
2375
  }
2267
2376
  ],
2268
2377
  "flags": {
2269
2378
  "project-id": {
2270
2379
  "char": "p",
2271
- "description": "Project ID to export dataset from (overrides CLI configuration)",
2380
+ "description": "Project ID to copy dataset in (overrides CLI configuration)",
2272
2381
  "helpGroup": "OVERRIDE",
2273
2382
  "name": "project-id",
2274
2383
  "hasDynamicHelp": false,
@@ -2276,75 +2385,92 @@
2276
2385
  "multiple": false,
2277
2386
  "type": "option"
2278
2387
  },
2279
- "asset-concurrency": {
2280
- "description": "Concurrent number of asset downloads",
2281
- "name": "asset-concurrency",
2282
- "default": 8,
2388
+ "attach": {
2389
+ "description": "Attach to the running copy process to show progress",
2390
+ "exclusive": [
2391
+ "list",
2392
+ "detach",
2393
+ "skip-history"
2394
+ ],
2395
+ "name": "attach",
2396
+ "required": false,
2283
2397
  "hasDynamicHelp": false,
2284
2398
  "multiple": false,
2285
2399
  "type": "option"
2286
2400
  },
2287
- "mode": {
2288
- "description": "Export mode ('cursor' is faster for large datasets but may miss concurrent changes)",
2289
- "name": "mode",
2290
- "default": "stream",
2291
- "hasDynamicHelp": false,
2292
- "multiple": false,
2293
- "options": [
2294
- "stream",
2295
- "cursor"
2401
+ "detach": {
2402
+ "description": "Start the copy without waiting for it to finish",
2403
+ "exclusive": [
2404
+ "list",
2405
+ "attach"
2296
2406
  ],
2297
- "type": "option"
2298
- },
2299
- "no-assets": {
2300
- "description": "Export only non-asset documents and remove references to image assets",
2301
- "name": "no-assets",
2407
+ "name": "detach",
2408
+ "required": false,
2302
2409
  "allowNo": false,
2303
2410
  "type": "boolean"
2304
2411
  },
2305
- "no-compress": {
2306
- "description": "Skips compressing tarball entries (still generates a gzip file)",
2307
- "name": "no-compress",
2308
- "allowNo": false,
2309
- "type": "boolean"
2412
+ "limit": {
2413
+ "dependsOn": [
2414
+ "list"
2415
+ ],
2416
+ "description": "Maximum number of jobs returned (default 10, max 1000)",
2417
+ "name": "limit",
2418
+ "required": false,
2419
+ "hasDynamicHelp": false,
2420
+ "multiple": false,
2421
+ "type": "option"
2310
2422
  },
2311
- "no-drafts": {
2312
- "description": "Export only published versions of documents",
2313
- "name": "no-drafts",
2423
+ "list": {
2424
+ "description": "Lists all dataset copy jobs",
2425
+ "exclusive": [
2426
+ "attach",
2427
+ "detach",
2428
+ "skip-history"
2429
+ ],
2430
+ "name": "list",
2431
+ "required": false,
2314
2432
  "allowNo": false,
2315
2433
  "type": "boolean"
2316
2434
  },
2317
- "no-strict-asset-verification": {
2318
- "description": "Do not abort the export when an asset fails hash or content-length verification",
2319
- "name": "no-strict-asset-verification",
2320
- "allowNo": false,
2321
- "type": "boolean"
2435
+ "offset": {
2436
+ "dependsOn": [
2437
+ "list"
2438
+ ],
2439
+ "description": "Start position in the list of jobs (default 0)",
2440
+ "name": "offset",
2441
+ "required": false,
2442
+ "hasDynamicHelp": false,
2443
+ "multiple": false,
2444
+ "type": "option"
2322
2445
  },
2323
- "overwrite": {
2324
- "description": "Overwrite any file with the same name",
2325
- "name": "overwrite",
2446
+ "skip-content-releases": {
2447
+ "description": "Don't copy content release documents to the target dataset",
2448
+ "exclusive": [
2449
+ "list",
2450
+ "attach"
2451
+ ],
2452
+ "name": "skip-content-releases",
2453
+ "required": false,
2326
2454
  "allowNo": false,
2327
2455
  "type": "boolean"
2328
2456
  },
2329
- "raw": {
2330
- "description": "Extract only documents, without rewriting asset references",
2331
- "name": "raw",
2457
+ "skip-history": {
2458
+ "description": "Don't preserve document history on copy",
2459
+ "exclusive": [
2460
+ "list",
2461
+ "attach"
2462
+ ],
2463
+ "name": "skip-history",
2464
+ "required": false,
2332
2465
  "allowNo": false,
2333
2466
  "type": "boolean"
2334
- },
2335
- "types": {
2336
- "description": "Defines which document types to export (comma-separated)",
2337
- "name": "types",
2338
- "hasDynamicHelp": false,
2339
- "multiple": false,
2340
- "type": "option"
2341
2467
  }
2342
2468
  },
2343
2469
  "hasDynamicHelp": false,
2344
2470
  "hiddenAliases": [
2345
- "dataset:export"
2471
+ "dataset:copy"
2346
2472
  ],
2347
- "id": "datasets:export",
2473
+ "id": "datasets:copy",
2348
2474
  "pluginAlias": "@sanity/cli",
2349
2475
  "pluginName": "@sanity/cli",
2350
2476
  "pluginType": "core",
@@ -2354,95 +2480,37 @@
2354
2480
  "dist",
2355
2481
  "commands",
2356
2482
  "datasets",
2357
- "export.js"
2483
+ "copy.js"
2358
2484
  ]
2359
2485
  },
2360
- "datasets:import": {
2486
+ "datasets:create": {
2361
2487
  "aliases": [],
2362
2488
  "args": {
2363
- "source": {
2364
- "description": "Source file (use \"-\" for stdin)",
2365
- "name": "source",
2366
- "required": true
2367
- },
2368
- "targetDataset": {
2369
- "description": "Target dataset (prefer --dataset flag instead)",
2370
- "name": "targetDataset",
2489
+ "name": {
2490
+ "description": "Name of the dataset to create",
2491
+ "name": "name",
2371
2492
  "required": false
2372
2493
  }
2373
2494
  },
2374
- "description": "Import documents to a Sanity dataset",
2495
+ "description": "Create a new dataset for the project",
2375
2496
  "examples": [
2376
2497
  {
2377
- "command": "<%= config.bin %> <%= command.id %> -d staging my-dataset.ndjson",
2378
- "description": "Import \"./my-dataset.ndjson\" into dataset \"staging\""
2379
- },
2380
- {
2381
- "command": "cat my-dataset.ndjson | <%= config.bin %> <%= command.id %> -d test -",
2382
- "description": "Import into dataset \"test\" from stdin"
2498
+ "command": "<%= config.bin %> <%= command.id %>",
2499
+ "description": "Interactively create a dataset"
2383
2500
  },
2384
2501
  {
2385
- "command": "<%= config.bin %> <%= command.id %> -p projectId -d staging my-dataset.ndjson",
2386
- "description": "Import with explicit project ID (overrides CLI configuration)"
2502
+ "command": "<%= config.bin %> <%= command.id %> my-dataset",
2503
+ "description": "Create a dataset named \"my-dataset\""
2387
2504
  },
2388
2505
  {
2389
- "command": "<%= config.bin %> <%= command.id %> -d staging -t someSecretToken my-dataset.ndjson",
2390
- "description": "Import with an explicit token (e.g. for CI/CD)"
2506
+ "command": "<%= config.bin %> <%= command.id %> my-dataset --visibility private",
2507
+ "description": "Create a private dataset named \"my-dataset\""
2391
2508
  }
2392
2509
  ],
2393
2510
  "flags": {
2394
- "allow-assets-in-different-dataset": {
2395
- "description": "Allow asset documents to reference different project/dataset",
2396
- "name": "allow-assets-in-different-dataset",
2397
- "allowNo": false,
2398
- "type": "boolean"
2399
- },
2400
- "allow-failing-assets": {
2401
- "description": "Skip assets that cannot be fetched/uploaded",
2402
- "name": "allow-failing-assets",
2403
- "allowNo": false,
2404
- "type": "boolean"
2405
- },
2406
- "allow-replacement-characters": {
2407
- "description": "Allow unicode replacement characters in imported documents",
2408
- "name": "allow-replacement-characters",
2409
- "allowNo": false,
2410
- "type": "boolean"
2411
- },
2412
- "allow-system-documents": {
2413
- "description": "Imports system documents",
2414
- "name": "allow-system-documents",
2415
- "allowNo": false,
2416
- "type": "boolean"
2417
- },
2418
- "asset-concurrency": {
2419
- "description": "Number of parallel asset imports",
2420
- "name": "asset-concurrency",
2421
- "hasDynamicHelp": false,
2422
- "multiple": false,
2423
- "type": "option"
2424
- },
2425
- "dataset": {
2426
- "char": "d",
2427
- "description": "Dataset to import to",
2428
- "name": "dataset",
2429
- "hasDynamicHelp": false,
2430
- "helpValue": "<name>",
2431
- "multiple": false,
2432
- "type": "option"
2433
- },
2434
- "missing": {
2435
- "description": "Skip documents that already exist",
2436
- "exclusive": [
2437
- "replace"
2438
- ],
2439
- "name": "missing",
2440
- "allowNo": false,
2441
- "type": "boolean"
2442
- },
2443
2511
  "project-id": {
2444
2512
  "char": "p",
2445
- "description": "Project ID to import to (overrides CLI configuration)",
2513
+ "description": "Project ID to create dataset in (overrides CLI configuration)",
2446
2514
  "helpGroup": "OVERRIDE",
2447
2515
  "name": "project-id",
2448
2516
  "hasDynamicHelp": false,
@@ -2450,54 +2518,41 @@
2450
2518
  "multiple": false,
2451
2519
  "type": "option"
2452
2520
  },
2453
- "project": {
2454
- "deprecated": {
2455
- "to": "project-id"
2456
- },
2457
- "description": "Project ID to import to",
2458
- "hidden": true,
2459
- "name": "project",
2460
- "hasDynamicHelp": false,
2461
- "multiple": false,
2462
- "type": "option"
2463
- },
2464
- "replace": {
2465
- "description": "Replace documents with the same IDs",
2466
- "exclusive": [
2467
- "missing"
2468
- ],
2469
- "name": "replace",
2470
- "allowNo": false,
2471
- "type": "boolean"
2472
- },
2473
- "replace-assets": {
2474
- "description": "Skip reuse of existing assets",
2475
- "name": "replace-assets",
2521
+ "embeddings": {
2522
+ "description": "Enable embeddings for this dataset",
2523
+ "name": "embeddings",
2476
2524
  "allowNo": false,
2477
2525
  "type": "boolean"
2478
2526
  },
2479
- "skip-cross-dataset-references": {
2480
- "description": "Skips references to other datasets",
2481
- "name": "skip-cross-dataset-references",
2482
- "allowNo": false,
2483
- "type": "boolean"
2527
+ "embeddings-projection": {
2528
+ "dependsOn": [
2529
+ "embeddings"
2530
+ ],
2531
+ "description": "GROQ projection for embeddings indexing (e.g. \"{ title, body }\")",
2532
+ "name": "embeddings-projection",
2533
+ "hasDynamicHelp": false,
2534
+ "multiple": false,
2535
+ "type": "option"
2484
2536
  },
2485
- "token": {
2486
- "char": "t",
2487
- "description": "Token to authenticate with",
2488
- "env": "SANITY_IMPORT_TOKEN",
2489
- "name": "token",
2537
+ "visibility": {
2538
+ "description": "Set visibility for this dataset (custom/private/public)",
2539
+ "name": "visibility",
2490
2540
  "required": false,
2491
2541
  "hasDynamicHelp": false,
2492
2542
  "multiple": false,
2543
+ "options": [
2544
+ "custom",
2545
+ "private",
2546
+ "public"
2547
+ ],
2493
2548
  "type": "option"
2494
2549
  }
2495
2550
  },
2496
2551
  "hasDynamicHelp": false,
2497
2552
  "hiddenAliases": [
2498
- "dataset:import"
2553
+ "dataset:create"
2499
2554
  ],
2500
- "id": "datasets:import",
2555
+ "id": "datasets:create",
2501
2556
  "pluginAlias": "@sanity/cli",
2502
2557
  "pluginName": "@sanity/cli",
2503
2558
  "pluginType": "core",
@@ -2507,40 +2562,52 @@
2507
2562
  "dist",
2508
2563
  "commands",
2509
2564
  "datasets",
2510
- "import.js"
2565
+ "create.js"
2511
2566
  ]
2512
2567
  },
2513
- "datasets:list": {
2568
+ "datasets:delete": {
2514
2569
  "aliases": [],
2515
- "args": {},
2516
- "description": "List datasets for the project",
2570
+ "args": {
2571
+ "datasetName": {
2572
+ "description": "Dataset name to delete",
2573
+ "name": "datasetName",
2574
+ "required": true
2575
+ }
2576
+ },
2577
+ "description": "Delete a dataset from the project",
2517
2578
  "examples": [
2518
2579
  {
2519
- "command": "<%= config.bin %> <%= command.id %>",
2520
- "description": "List datasets for the project"
2580
+ "command": "<%= config.bin %> <%= command.id %> my-dataset",
2581
+ "description": "Delete a specific dataset"
2521
2582
  },
2522
2583
  {
2523
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2524
- "description": "List datasets for a specific project"
2584
+ "command": "<%= config.bin %> <%= command.id %> my-dataset --force",
2585
+ "description": "Delete a specific dataset without confirmation"
2525
2586
  }
2526
2587
  ],
2527
2588
  "flags": {
2528
2589
  "project-id": {
2529
2590
  "char": "p",
2530
- "description": "Project ID to list datasets for (overrides CLI configuration)",
2591
+ "description": "Project ID to delete dataset from (overrides CLI configuration)",
2531
2592
  "helpGroup": "OVERRIDE",
2532
2593
  "name": "project-id",
2533
2594
  "hasDynamicHelp": false,
2534
2595
  "helpValue": "<id>",
2535
2596
  "multiple": false,
2536
2597
  "type": "option"
2598
+ },
2599
+ "force": {
2600
+ "description": "Do not prompt for delete confirmation - forcefully delete",
2601
+ "name": "force",
2602
+ "allowNo": false,
2603
+ "type": "boolean"
2537
2604
  }
2538
2605
  },
2539
2606
  "hasDynamicHelp": false,
2540
2607
  "hiddenAliases": [
2541
- "dataset:list"
2608
+ "dataset:delete"
2542
2609
  ],
2543
- "id": "datasets:list",
2610
+ "id": "datasets:delete",
2544
2611
  "pluginAlias": "@sanity/cli",
2545
2612
  "pluginName": "@sanity/cli",
2546
2613
  "pluginType": "core",
@@ -2550,167 +2617,124 @@
2550
2617
  "dist",
2551
2618
  "commands",
2552
2619
  "datasets",
2553
- "list.js"
2620
+ "delete.js"
2554
2621
  ]
2555
2622
  },
2556
- "context:build": {
2623
+ "datasets:export": {
2557
2624
  "aliases": [],
2558
2625
  "args": {
2559
- "knowledgeBaseId": {
2560
- "description": "Knowledge base ID",
2561
- "name": "knowledgeBaseId",
2562
- "required": true
2626
+ "name": {
2627
+ "description": "Name of the dataset to export",
2628
+ "name": "name"
2629
+ },
2630
+ "destination": {
2631
+ "description": "Output destination file path",
2632
+ "name": "destination"
2563
2633
  }
2564
2634
  },
2565
- "description": "Build a knowledge base from its imported content",
2635
+ "description": "Export a dataset to a local gzipped tarball. Assets returning 401, 403, or 404 are excluded from the export.",
2566
2636
  "examples": [
2567
2637
  {
2568
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2569
- "description": "Start a build and return the job ID"
2638
+ "command": "<%= config.bin %> <%= command.id %> moviedb localPath.tar.gz",
2639
+ "description": "Export dataset \"moviedb\" to localPath.tar.gz"
2570
2640
  },
2571
2641
  {
2572
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --watch",
2573
- "description": "Start a build and wait for it to finish (non-zero exit on failure)"
2642
+ "command": "<%= config.bin %> <%= command.id %> moviedb assetless.tar.gz --no-assets",
2643
+ "description": "Export dataset without assets"
2574
2644
  },
2575
2645
  {
2576
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --cancel",
2577
- "description": "Cancel the running build, if any"
2578
- }
2579
- ],
2580
- "flags": {
2581
- "cancel": {
2582
- "description": "Cancel the running build instead of starting one",
2583
- "exclusive": [
2584
- "watch"
2585
- ],
2586
- "name": "cancel",
2587
- "allowNo": false,
2588
- "type": "boolean"
2646
+ "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --raw",
2647
+ "description": "Export raw documents without asset reference rewriting"
2589
2648
  },
2590
- "watch": {
2591
- "description": "Wait for the build to finish, exiting non-zero if it fails",
2592
- "name": "watch",
2593
- "allowNo": false,
2594
- "type": "boolean"
2595
- }
2596
- },
2597
- "hasDynamicHelp": false,
2598
- "hiddenAliases": [],
2599
- "id": "context:build",
2600
- "pluginAlias": "@sanity/cli",
2601
- "pluginName": "@sanity/cli",
2602
- "pluginType": "core",
2603
- "strict": true,
2604
- "isESM": true,
2605
- "relativePath": [
2606
- "dist",
2607
- "commands",
2608
- "context",
2609
- "build.js"
2610
- ]
2611
- },
2612
- "context:create": {
2613
- "aliases": [],
2614
- "args": {},
2615
- "description": "Create a knowledge base",
2616
- "examples": [
2617
2649
  {
2618
- "command": "<%= config.bin %> <%= command.id %>",
2619
- "description": "Interactively create a knowledge base"
2650
+ "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --types products,shops",
2651
+ "description": "Export specific document types"
2620
2652
  },
2621
2653
  {
2622
- "command": "<%= config.bin %> <%= command.id %> --organization org-abc123 --title \"Support docs\" --description \"Product docs and troubleshooting guides\"",
2623
- "description": "Create a knowledge base in a specific organization"
2654
+ "command": "<%= config.bin %> <%= command.id %> moviedb moviedb.tar.gz --no-strict-asset-verification",
2655
+ "description": "Export dataset without aborting on asset verification failures"
2624
2656
  }
2625
2657
  ],
2626
2658
  "flags": {
2627
- "organization": {
2628
- "description": "Organization to create the knowledge base in (overrides CLI configuration)",
2659
+ "project-id": {
2660
+ "char": "p",
2661
+ "description": "Project ID to export dataset from (overrides CLI configuration)",
2629
2662
  "helpGroup": "OVERRIDE",
2630
- "name": "organization",
2663
+ "name": "project-id",
2631
2664
  "hasDynamicHelp": false,
2632
2665
  "helpValue": "<id>",
2633
2666
  "multiple": false,
2634
2667
  "type": "option"
2635
2668
  },
2636
- "description": {
2637
- "description": "Knowledge base description",
2638
- "name": "description",
2669
+ "asset-concurrency": {
2670
+ "description": "Concurrent number of asset downloads",
2671
+ "name": "asset-concurrency",
2672
+ "default": 8,
2639
2673
  "hasDynamicHelp": false,
2640
2674
  "multiple": false,
2641
2675
  "type": "option"
2642
2676
  },
2643
- "title": {
2644
- "description": "Knowledge base title",
2645
- "name": "title",
2677
+ "mode": {
2678
+ "description": "Export mode ('cursor' is faster for large datasets but may miss concurrent changes)",
2679
+ "name": "mode",
2680
+ "default": "stream",
2646
2681
  "hasDynamicHelp": false,
2647
2682
  "multiple": false,
2683
+ "options": [
2684
+ "stream",
2685
+ "cursor"
2686
+ ],
2648
2687
  "type": "option"
2649
- }
2650
- },
2651
- "hasDynamicHelp": false,
2652
- "hiddenAliases": [],
2653
- "id": "context:create",
2654
- "pluginAlias": "@sanity/cli",
2655
- "pluginName": "@sanity/cli",
2656
- "pluginType": "core",
2657
- "strict": true,
2658
- "telemetry": {
2659
- "redactedFlags": [
2660
- {
2661
- "canonical": "--title",
2662
- "flags": [
2663
- "--title"
2664
- ]
2665
- },
2666
- {
2667
- "canonical": "--description",
2668
- "flags": [
2669
- "--description"
2670
- ]
2671
- }
2672
- ]
2673
- },
2674
- "isESM": true,
2675
- "relativePath": [
2676
- "dist",
2677
- "commands",
2678
- "context",
2679
- "create.js"
2680
- ]
2681
- },
2682
- "context:delete": {
2683
- "aliases": [],
2684
- "args": {
2685
- "knowledgeBaseId": {
2686
- "description": "Knowledge base ID",
2687
- "name": "knowledgeBaseId",
2688
- "required": true
2689
- }
2690
- },
2691
- "description": "Delete a knowledge base and its generated content",
2692
- "examples": [
2693
- {
2694
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2695
- "description": "Delete a knowledge base after confirmation"
2696
2688
  },
2697
- {
2698
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --yes",
2699
- "description": "Delete a knowledge base without confirmation prompt"
2700
- }
2701
- ],
2702
- "flags": {
2703
- "yes": {
2704
- "char": "y",
2705
- "description": "Skip confirmation prompt (unattended mode)",
2706
- "name": "yes",
2689
+ "no-assets": {
2690
+ "description": "Export only non-asset documents and remove references to image assets",
2691
+ "name": "no-assets",
2692
+ "allowNo": false,
2693
+ "type": "boolean"
2694
+ },
2695
+ "no-compress": {
2696
+ "description": "Skips compressing tarball entries (still generates a gzip file)",
2697
+ "name": "no-compress",
2698
+ "allowNo": false,
2699
+ "type": "boolean"
2700
+ },
2701
+ "no-drafts": {
2702
+ "description": "Export only published versions of documents",
2703
+ "name": "no-drafts",
2707
2704
  "allowNo": false,
2708
2705
  "type": "boolean"
2706
+ },
2707
+ "no-strict-asset-verification": {
2708
+ "description": "Do not abort the export when an asset fails hash or content-length verification",
2709
+ "name": "no-strict-asset-verification",
2710
+ "allowNo": false,
2711
+ "type": "boolean"
2712
+ },
2713
+ "overwrite": {
2714
+ "description": "Overwrite any file with the same name",
2715
+ "name": "overwrite",
2716
+ "allowNo": false,
2717
+ "type": "boolean"
2718
+ },
2719
+ "raw": {
2720
+ "description": "Extract only documents, without rewriting asset references",
2721
+ "name": "raw",
2722
+ "allowNo": false,
2723
+ "type": "boolean"
2724
+ },
2725
+ "types": {
2726
+ "description": "Defines which document types to export (comma-separated)",
2727
+ "name": "types",
2728
+ "hasDynamicHelp": false,
2729
+ "multiple": false,
2730
+ "type": "option"
2709
2731
  }
2710
2732
  },
2711
2733
  "hasDynamicHelp": false,
2712
- "hiddenAliases": [],
2713
- "id": "context:delete",
2734
+ "hiddenAliases": [
2735
+ "dataset:export"
2736
+ ],
2737
+ "id": "datasets:export",
2714
2738
  "pluginAlias": "@sanity/cli",
2715
2739
  "pluginName": "@sanity/cli",
2716
2740
  "pluginType": "core",
@@ -2719,123 +2743,151 @@
2719
2743
  "relativePath": [
2720
2744
  "dist",
2721
2745
  "commands",
2722
- "context",
2723
- "delete.js"
2746
+ "datasets",
2747
+ "export.js"
2724
2748
  ]
2725
2749
  },
2726
- "context:get": {
2750
+ "datasets:import": {
2727
2751
  "aliases": [],
2728
2752
  "args": {
2729
- "knowledgeBaseId": {
2730
- "description": "Knowledge base ID",
2731
- "name": "knowledgeBaseId",
2753
+ "source": {
2754
+ "description": "Source file (use \"-\" for stdin)",
2755
+ "name": "source",
2732
2756
  "required": true
2757
+ },
2758
+ "targetDataset": {
2759
+ "description": "Target dataset (prefer --dataset flag instead)",
2760
+ "name": "targetDataset",
2761
+ "required": false
2733
2762
  }
2734
2763
  },
2735
- "description": "Get details of a knowledge base",
2764
+ "description": "Import documents to a Sanity dataset",
2736
2765
  "examples": [
2737
2766
  {
2738
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2739
- "description": "Get details of a specific knowledge base"
2767
+ "command": "<%= config.bin %> <%= command.id %> -d staging my-dataset.ndjson",
2768
+ "description": "Import \"./my-dataset.ndjson\" into dataset \"staging\""
2740
2769
  },
2741
2770
  {
2742
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
2743
- "description": "Output the knowledge base as JSON"
2744
- }
2745
- ],
2746
- "flags": {
2747
- "json": {
2748
- "description": "Output the knowledge base in JSON format",
2749
- "name": "json",
2750
- "allowNo": false,
2751
- "type": "boolean"
2752
- }
2753
- },
2754
- "hasDynamicHelp": false,
2755
- "hiddenAliases": [],
2756
- "id": "context:get",
2757
- "pluginAlias": "@sanity/cli",
2758
- "pluginName": "@sanity/cli",
2759
- "pluginType": "core",
2760
- "strict": true,
2761
- "isESM": true,
2762
- "relativePath": [
2763
- "dist",
2764
- "commands",
2765
- "context",
2766
- "get.js"
2767
- ]
2768
- },
2769
- "context:list": {
2770
- "aliases": [],
2771
- "args": {},
2772
- "description": "List knowledge bases in an organization",
2773
- "examples": [
2774
- {
2775
- "command": "<%= config.bin %> <%= command.id %>",
2776
- "description": "List knowledge bases, selecting the organization interactively"
2771
+ "command": "cat my-dataset.ndjson | <%= config.bin %> <%= command.id %> -d test -",
2772
+ "description": "Import into dataset \"test\" from stdin"
2777
2773
  },
2778
2774
  {
2779
- "command": "<%= config.bin %> <%= command.id %> --organization org-abc123",
2780
- "description": "List knowledge bases in a specific organization"
2775
+ "command": "<%= config.bin %> <%= command.id %> -p projectId -d staging my-dataset.ndjson",
2776
+ "description": "Import with explicit project ID (overrides CLI configuration)"
2781
2777
  },
2782
2778
  {
2783
- "command": "<%= config.bin %> <%= command.id %> --organization org-abc123 --json",
2784
- "description": "Output knowledge bases as JSON"
2779
+ "command": "<%= config.bin %> <%= command.id %> -d staging -t someSecretToken my-dataset.ndjson",
2780
+ "description": "Import with an explicit token (e.g. for CI/CD)"
2785
2781
  }
2786
2782
  ],
2787
2783
  "flags": {
2788
- "organization": {
2789
- "description": "Organization to list knowledge bases for (overrides CLI configuration)",
2784
+ "allow-assets-in-different-dataset": {
2785
+ "description": "Allow asset documents to reference different project/dataset",
2786
+ "name": "allow-assets-in-different-dataset",
2787
+ "allowNo": false,
2788
+ "type": "boolean"
2789
+ },
2790
+ "allow-failing-assets": {
2791
+ "description": "Skip assets that cannot be fetched/uploaded",
2792
+ "name": "allow-failing-assets",
2793
+ "allowNo": false,
2794
+ "type": "boolean"
2795
+ },
2796
+ "allow-replacement-characters": {
2797
+ "description": "Allow unicode replacement characters in imported documents",
2798
+ "name": "allow-replacement-characters",
2799
+ "allowNo": false,
2800
+ "type": "boolean"
2801
+ },
2802
+ "allow-system-documents": {
2803
+ "description": "Imports system documents",
2804
+ "name": "allow-system-documents",
2805
+ "allowNo": false,
2806
+ "type": "boolean"
2807
+ },
2808
+ "asset-concurrency": {
2809
+ "description": "Number of parallel asset imports",
2810
+ "name": "asset-concurrency",
2811
+ "hasDynamicHelp": false,
2812
+ "multiple": false,
2813
+ "type": "option"
2814
+ },
2815
+ "dataset": {
2816
+ "char": "d",
2817
+ "description": "Dataset to import to",
2818
+ "name": "dataset",
2819
+ "hasDynamicHelp": false,
2820
+ "helpValue": "<name>",
2821
+ "multiple": false,
2822
+ "type": "option"
2823
+ },
2824
+ "missing": {
2825
+ "description": "Skip documents that already exist",
2826
+ "exclusive": [
2827
+ "replace"
2828
+ ],
2829
+ "name": "missing",
2830
+ "allowNo": false,
2831
+ "type": "boolean"
2832
+ },
2833
+ "project-id": {
2834
+ "char": "p",
2835
+ "description": "Project ID to import to (overrides CLI configuration)",
2790
2836
  "helpGroup": "OVERRIDE",
2791
- "name": "organization",
2837
+ "name": "project-id",
2792
2838
  "hasDynamicHelp": false,
2793
2839
  "helpValue": "<id>",
2794
2840
  "multiple": false,
2795
2841
  "type": "option"
2796
2842
  },
2797
- "json": {
2798
- "description": "Output knowledge bases in JSON format",
2799
- "name": "json",
2843
+ "project": {
2844
+ "deprecated": {
2845
+ "to": "project-id"
2846
+ },
2847
+ "description": "Project ID to import to",
2848
+ "hidden": true,
2849
+ "name": "project",
2850
+ "hasDynamicHelp": false,
2851
+ "multiple": false,
2852
+ "type": "option"
2853
+ },
2854
+ "replace": {
2855
+ "description": "Replace documents with the same IDs",
2856
+ "exclusive": [
2857
+ "missing"
2858
+ ],
2859
+ "name": "replace",
2860
+ "allowNo": false,
2861
+ "type": "boolean"
2862
+ },
2863
+ "replace-assets": {
2864
+ "description": "Skip reuse of existing assets",
2865
+ "name": "replace-assets",
2866
+ "allowNo": false,
2867
+ "type": "boolean"
2868
+ },
2869
+ "skip-cross-dataset-references": {
2870
+ "description": "Skips references to other datasets",
2871
+ "name": "skip-cross-dataset-references",
2800
2872
  "allowNo": false,
2801
2873
  "type": "boolean"
2874
+ },
2875
+ "token": {
2876
+ "char": "t",
2877
+ "description": "Token to authenticate with",
2878
+ "env": "SANITY_IMPORT_TOKEN",
2879
+ "name": "token",
2880
+ "required": false,
2881
+ "hasDynamicHelp": false,
2882
+ "multiple": false,
2883
+ "type": "option"
2802
2884
  }
2803
2885
  },
2804
2886
  "hasDynamicHelp": false,
2805
- "hiddenAliases": [],
2806
- "id": "context:list",
2807
- "pluginAlias": "@sanity/cli",
2808
- "pluginName": "@sanity/cli",
2809
- "pluginType": "core",
2810
- "strict": true,
2811
- "isESM": true,
2812
- "relativePath": [
2813
- "dist",
2814
- "commands",
2815
- "context",
2816
- "list.js"
2817
- ]
2818
- },
2819
- "context:refresh": {
2820
- "aliases": [],
2821
- "args": {
2822
- "knowledgeBaseId": {
2823
- "description": "Knowledge base ID",
2824
- "name": "knowledgeBaseId",
2825
- "required": true
2826
- }
2827
- },
2828
- "description": "Refresh a knowledge base: re-check sources and apply what changed",
2829
- "examples": [
2830
- {
2831
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2832
- "description": "Start an incremental refresh"
2833
- }
2887
+ "hiddenAliases": [
2888
+ "dataset:import"
2834
2889
  ],
2835
- "flags": {},
2836
- "hasDynamicHelp": false,
2837
- "hiddenAliases": [],
2838
- "id": "context:refresh",
2890
+ "id": "datasets:import",
2839
2891
  "pluginAlias": "@sanity/cli",
2840
2892
  "pluginName": "@sanity/cli",
2841
2893
  "pluginType": "core",
@@ -2844,100 +2896,51 @@
2844
2896
  "relativePath": [
2845
2897
  "dist",
2846
2898
  "commands",
2847
- "context",
2848
- "refresh.js"
2899
+ "datasets",
2900
+ "import.js"
2849
2901
  ]
2850
2902
  },
2851
- "context:update": {
2903
+ "datasets:list": {
2852
2904
  "aliases": [],
2853
- "args": {
2854
- "knowledgeBaseId": {
2855
- "description": "Knowledge base ID",
2856
- "name": "knowledgeBaseId",
2857
- "required": true
2858
- }
2859
- },
2860
- "description": "Update a knowledge base",
2905
+ "args": {},
2906
+ "description": "List datasets for the project",
2861
2907
  "examples": [
2862
2908
  {
2863
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --title \"New title\"",
2864
- "description": "Rename a knowledge base"
2865
- },
2866
- {
2867
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --refresh-enabled --refresh-frequency weekly",
2868
- "description": "Enable weekly scheduled refresh"
2909
+ "command": "<%= config.bin %> <%= command.id %>",
2910
+ "description": "List datasets for the project"
2869
2911
  },
2870
2912
  {
2871
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --no-refresh-enabled",
2872
- "description": "Disable scheduled refresh"
2913
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2914
+ "description": "List datasets for a specific project"
2873
2915
  }
2874
2916
  ],
2875
2917
  "flags": {
2876
- "description": {
2877
- "description": "New knowledge base description",
2878
- "name": "description",
2879
- "required": false,
2880
- "hasDynamicHelp": false,
2881
- "multiple": false,
2882
- "type": "option"
2883
- },
2884
- "refresh-enabled": {
2885
- "description": "Enable scheduled refresh (--no-refresh-enabled to disable)",
2886
- "name": "refresh-enabled",
2887
- "required": false,
2888
- "allowNo": true,
2889
- "type": "boolean"
2890
- },
2891
- "refresh-frequency": {
2892
- "description": "How often scheduled refresh runs",
2893
- "name": "refresh-frequency",
2894
- "required": false,
2895
- "hasDynamicHelp": false,
2896
- "multiple": false,
2897
- "options": [
2898
- "weekly",
2899
- "monthly"
2900
- ],
2901
- "type": "option"
2902
- },
2903
- "title": {
2904
- "description": "New knowledge base title",
2905
- "name": "title",
2906
- "required": false,
2918
+ "project-id": {
2919
+ "char": "p",
2920
+ "description": "Project ID to list datasets for (overrides CLI configuration)",
2921
+ "helpGroup": "OVERRIDE",
2922
+ "name": "project-id",
2907
2923
  "hasDynamicHelp": false,
2924
+ "helpValue": "<id>",
2908
2925
  "multiple": false,
2909
2926
  "type": "option"
2910
2927
  }
2911
2928
  },
2912
2929
  "hasDynamicHelp": false,
2913
- "hiddenAliases": [],
2914
- "id": "context:update",
2930
+ "hiddenAliases": [
2931
+ "dataset:list"
2932
+ ],
2933
+ "id": "datasets:list",
2915
2934
  "pluginAlias": "@sanity/cli",
2916
2935
  "pluginName": "@sanity/cli",
2917
2936
  "pluginType": "core",
2918
2937
  "strict": true,
2919
- "telemetry": {
2920
- "redactedFlags": [
2921
- {
2922
- "canonical": "--title",
2923
- "flags": [
2924
- "--title"
2925
- ]
2926
- },
2927
- {
2928
- "canonical": "--description",
2929
- "flags": [
2930
- "--description"
2931
- ]
2932
- }
2933
- ]
2934
- },
2935
2938
  "isESM": true,
2936
2939
  "relativePath": [
2937
2940
  "dist",
2938
2941
  "commands",
2939
- "context",
2940
- "update.js"
2942
+ "datasets",
2943
+ "list.js"
2941
2944
  ]
2942
2945
  },
2943
2946
  "docs:browse": {
@@ -6116,112 +6119,221 @@
6116
6119
  "list.js"
6117
6120
  ]
6118
6121
  },
6119
- "datasets:alias:create": {
6122
+ "context:imports:create": {
6120
6123
  "aliases": [],
6121
6124
  "args": {
6122
- "aliasName": {
6123
- "description": "Dataset alias name to create",
6124
- "name": "aliasName",
6125
- "required": false
6126
- },
6127
- "targetDataset": {
6128
- "description": "Target dataset name to link the alias to",
6129
- "name": "targetDataset",
6130
- "required": false
6125
+ "knowledgeBaseId": {
6126
+ "description": "Knowledge base ID",
6127
+ "name": "knowledgeBaseId",
6128
+ "required": true
6131
6129
  }
6132
6130
  },
6133
- "description": "Create a dataset alias for the project",
6131
+ "description": "Import content into a knowledge base",
6134
6132
  "examples": [
6135
6133
  {
6136
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123 conference conf-2025",
6137
- "description": "Create alias in a specific project"
6134
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --text \"Refunds are processed within 5 days\" --title \"Refund policy\"",
6135
+ "description": "Import inline text"
6138
6136
  },
6139
6137
  {
6140
- "command": "<%= config.bin %> <%= command.id %>",
6141
- "description": "Create an alias with interactive prompts"
6138
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --file ./handbook.pdf",
6139
+ "description": "Upload and import a local file"
6142
6140
  },
6143
6141
  {
6144
- "command": "<%= config.bin %> <%= command.id %> conference",
6145
- "description": "Create alias named \"conference\" with interactive dataset selection"
6142
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --url https://example.com/docs",
6143
+ "description": "Crawl a website"
6146
6144
  },
6147
6145
  {
6148
- "command": "<%= config.bin %> <%= command.id %> conference conf-2025",
6149
- "description": "Create alias \"conference\" linked to \"conf-2025\" dataset"
6146
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --query '*[_type == \"article\"]' --sanity-project abc123 --sanity-dataset production",
6147
+ "description": "Bind a Sanity dataset as a source"
6150
6148
  }
6151
6149
  ],
6152
6150
  "flags": {
6153
- "project-id": {
6154
- "char": "p",
6155
- "description": "Project ID to create dataset alias in (overrides CLI configuration)",
6156
- "helpGroup": "OVERRIDE",
6157
- "name": "project-id",
6151
+ "content-type": {
6152
+ "description": "Content type of the import (--text: text/markdown or text/plain; --file: any MIME type, inferred from the file extension when omitted)",
6153
+ "name": "content-type",
6154
+ "required": false,
6155
+ "hasDynamicHelp": false,
6156
+ "helpValue": "<mime>",
6157
+ "multiple": false,
6158
+ "type": "option"
6159
+ },
6160
+ "file": {
6161
+ "description": "Path to a local file to import",
6162
+ "exclusive": [
6163
+ "text",
6164
+ "url",
6165
+ "query"
6166
+ ],
6167
+ "name": "file",
6168
+ "required": false,
6169
+ "hasDynamicHelp": false,
6170
+ "helpValue": "<path>",
6171
+ "multiple": false,
6172
+ "type": "option"
6173
+ },
6174
+ "query": {
6175
+ "description": "GROQ query binding a Sanity dataset as a source",
6176
+ "exclusive": [
6177
+ "text",
6178
+ "url",
6179
+ "file"
6180
+ ],
6181
+ "name": "query",
6182
+ "required": false,
6183
+ "hasDynamicHelp": false,
6184
+ "multiple": false,
6185
+ "type": "option"
6186
+ },
6187
+ "sanity-dataset": {
6188
+ "dependsOn": [
6189
+ "query"
6190
+ ],
6191
+ "description": "Sanity dataset for a dataset import",
6192
+ "name": "sanity-dataset",
6193
+ "required": false,
6194
+ "hasDynamicHelp": false,
6195
+ "helpValue": "<name>",
6196
+ "multiple": false,
6197
+ "type": "option"
6198
+ },
6199
+ "sanity-project": {
6200
+ "dependsOn": [
6201
+ "query"
6202
+ ],
6203
+ "description": "Sanity project ID for a dataset import",
6204
+ "name": "sanity-project",
6205
+ "required": false,
6158
6206
  "hasDynamicHelp": false,
6159
6207
  "helpValue": "<id>",
6160
6208
  "multiple": false,
6161
6209
  "type": "option"
6210
+ },
6211
+ "text": {
6212
+ "description": "Inline text content to import (requires --title)",
6213
+ "exclusive": [
6214
+ "file",
6215
+ "url",
6216
+ "query"
6217
+ ],
6218
+ "name": "text",
6219
+ "required": false,
6220
+ "hasDynamicHelp": false,
6221
+ "multiple": false,
6222
+ "type": "option"
6223
+ },
6224
+ "title": {
6225
+ "dependsOn": [
6226
+ "text"
6227
+ ],
6228
+ "description": "Title for an inline text import",
6229
+ "name": "title",
6230
+ "required": false,
6231
+ "hasDynamicHelp": false,
6232
+ "multiple": false,
6233
+ "type": "option"
6234
+ },
6235
+ "url": {
6236
+ "description": "Website URL to crawl",
6237
+ "exclusive": [
6238
+ "text",
6239
+ "file",
6240
+ "query"
6241
+ ],
6242
+ "name": "url",
6243
+ "required": false,
6244
+ "hasDynamicHelp": false,
6245
+ "helpValue": "<url>",
6246
+ "multiple": false,
6247
+ "type": "option"
6162
6248
  }
6163
6249
  },
6164
6250
  "hasDynamicHelp": false,
6165
- "hiddenAliases": [
6166
- "dataset:alias:create"
6167
- ],
6168
- "id": "datasets:alias:create",
6251
+ "hiddenAliases": [],
6252
+ "id": "context:imports:create",
6169
6253
  "pluginAlias": "@sanity/cli",
6170
6254
  "pluginName": "@sanity/cli",
6171
6255
  "pluginType": "core",
6172
6256
  "strict": true,
6257
+ "telemetry": {
6258
+ "redactedFlags": [
6259
+ {
6260
+ "canonical": "--text",
6261
+ "flags": [
6262
+ "--text"
6263
+ ]
6264
+ },
6265
+ {
6266
+ "canonical": "--file",
6267
+ "flags": [
6268
+ "--file"
6269
+ ]
6270
+ },
6271
+ {
6272
+ "canonical": "--url",
6273
+ "flags": [
6274
+ "--url"
6275
+ ]
6276
+ },
6277
+ {
6278
+ "canonical": "--title",
6279
+ "flags": [
6280
+ "--title"
6281
+ ]
6282
+ },
6283
+ {
6284
+ "canonical": "--query",
6285
+ "flags": [
6286
+ "--query"
6287
+ ]
6288
+ }
6289
+ ]
6290
+ },
6173
6291
  "isESM": true,
6174
6292
  "relativePath": [
6175
6293
  "dist",
6176
6294
  "commands",
6177
- "datasets",
6178
- "alias",
6295
+ "context",
6296
+ "imports",
6179
6297
  "create.js"
6180
6298
  ]
6181
6299
  },
6182
- "datasets:alias:delete": {
6300
+ "context:imports:delete": {
6183
6301
  "aliases": [],
6184
6302
  "args": {
6185
- "aliasName": {
6186
- "description": "Dataset alias name to delete",
6187
- "name": "aliasName",
6303
+ "knowledgeBaseId": {
6304
+ "description": "Knowledge base ID",
6305
+ "name": "knowledgeBaseId",
6306
+ "required": true
6307
+ },
6308
+ "importId": {
6309
+ "description": "Import ID",
6310
+ "name": "importId",
6188
6311
  "required": true
6189
6312
  }
6190
6313
  },
6191
- "description": "Delete a dataset alias from the project",
6314
+ "description": "Delete an import from a knowledge base",
6192
6315
  "examples": [
6193
6316
  {
6194
- "command": "<%= config.bin %> <%= command.id %> conference",
6195
- "description": "Delete alias named \"conference\" with confirmation prompt"
6317
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6318
+ "description": "Delete an import after confirmation"
6196
6319
  },
6197
6320
  {
6198
- "command": "<%= config.bin %> <%= command.id %> conference --force",
6199
- "description": "Delete alias named \"conference\" without confirmation prompt"
6321
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456 --yes",
6322
+ "description": "Delete an import without confirmation prompt"
6200
6323
  }
6201
6324
  ],
6202
6325
  "flags": {
6203
- "project-id": {
6204
- "char": "p",
6205
- "description": "Project ID to delete dataset alias from (overrides CLI configuration)",
6206
- "helpGroup": "OVERRIDE",
6207
- "name": "project-id",
6208
- "hasDynamicHelp": false,
6209
- "helpValue": "<id>",
6210
- "multiple": false,
6211
- "type": "option"
6212
- },
6213
- "force": {
6214
- "description": "Skip confirmation prompt and delete immediately",
6215
- "name": "force",
6326
+ "yes": {
6327
+ "char": "y",
6328
+ "description": "Skip confirmation prompt (unattended mode)",
6329
+ "name": "yes",
6216
6330
  "allowNo": false,
6217
6331
  "type": "boolean"
6218
6332
  }
6219
6333
  },
6220
6334
  "hasDynamicHelp": false,
6221
- "hiddenAliases": [
6222
- "dataset:alias:delete"
6223
- ],
6224
- "id": "datasets:alias:delete",
6335
+ "hiddenAliases": [],
6336
+ "id": "context:imports:delete",
6225
6337
  "pluginAlias": "@sanity/cli",
6226
6338
  "pluginName": "@sanity/cli",
6227
6339
  "pluginType": "core",
@@ -6230,68 +6342,43 @@
6230
6342
  "relativePath": [
6231
6343
  "dist",
6232
6344
  "commands",
6233
- "datasets",
6234
- "alias",
6345
+ "context",
6346
+ "imports",
6235
6347
  "delete.js"
6236
6348
  ]
6237
6349
  },
6238
- "datasets:alias:link": {
6350
+ "context:imports:download": {
6239
6351
  "aliases": [],
6240
6352
  "args": {
6241
- "aliasName": {
6242
- "description": "Dataset alias name to link",
6243
- "name": "aliasName",
6244
- "required": false
6353
+ "knowledgeBaseId": {
6354
+ "description": "Knowledge base ID",
6355
+ "name": "knowledgeBaseId",
6356
+ "required": true
6245
6357
  },
6246
- "targetDataset": {
6247
- "description": "Target dataset name to link the alias to",
6248
- "name": "targetDataset",
6249
- "required": false
6358
+ "importId": {
6359
+ "description": "Import ID",
6360
+ "name": "importId",
6361
+ "required": true
6250
6362
  }
6251
6363
  },
6252
- "description": "Link a dataset alias to a dataset in the project",
6364
+ "description": "Get a short-lived signed URL for the original uploaded bytes of a file import",
6253
6365
  "examples": [
6254
6366
  {
6255
- "command": "<%= config.bin %> <%= command.id %>",
6256
- "description": "Link an alias with interactive prompts"
6257
- },
6258
- {
6259
- "command": "<%= config.bin %> <%= command.id %> conference",
6260
- "description": "Link alias named \"conference\" with interactive dataset selection"
6261
- },
6262
- {
6263
- "command": "<%= config.bin %> <%= command.id %> conference conf-2025",
6264
- "description": "Link alias \"conference\" to \"conf-2025\" dataset"
6265
- },
6266
- {
6267
- "command": "<%= config.bin %> <%= command.id %> conference conf-2025 --force",
6268
- "description": "Force link without confirmation (skip relink prompt)"
6367
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6368
+ "description": "Get a download URL for an uploaded file"
6269
6369
  }
6270
6370
  ],
6271
- "flags": {
6272
- "project-id": {
6273
- "char": "p",
6274
- "description": "Project ID to link dataset alias in (overrides CLI configuration)",
6275
- "helpGroup": "OVERRIDE",
6276
- "name": "project-id",
6277
- "hasDynamicHelp": false,
6278
- "helpValue": "<id>",
6279
- "multiple": false,
6280
- "type": "option"
6281
- },
6282
- "force": {
6283
- "description": "Skip confirmation prompt when relinking existing alias",
6284
- "name": "force",
6285
- "required": false,
6371
+ "flags": {
6372
+ "json": {
6373
+ "description": "Output the download URL in JSON format",
6374
+ "name": "json",
6286
6375
  "allowNo": false,
6287
6376
  "type": "boolean"
6288
6377
  }
6289
6378
  },
6290
6379
  "hasDynamicHelp": false,
6291
- "hiddenAliases": [
6292
- "dataset:alias:link"
6293
- ],
6294
- "id": "datasets:alias:link",
6380
+ "hiddenAliases": [],
6381
+ "id": "context:imports:download",
6295
6382
  "pluginAlias": "@sanity/cli",
6296
6383
  "pluginName": "@sanity/cli",
6297
6384
  "pluginType": "core",
@@ -6300,58 +6387,47 @@
6300
6387
  "relativePath": [
6301
6388
  "dist",
6302
6389
  "commands",
6303
- "datasets",
6304
- "alias",
6305
- "link.js"
6390
+ "context",
6391
+ "imports",
6392
+ "download.js"
6306
6393
  ]
6307
6394
  },
6308
- "datasets:alias:unlink": {
6395
+ "context:imports:get": {
6309
6396
  "aliases": [],
6310
6397
  "args": {
6311
- "aliasName": {
6312
- "description": "Dataset alias name to unlink",
6313
- "name": "aliasName",
6314
- "required": false
6398
+ "knowledgeBaseId": {
6399
+ "description": "Knowledge base ID",
6400
+ "name": "knowledgeBaseId",
6401
+ "required": true
6402
+ },
6403
+ "importId": {
6404
+ "description": "Import ID",
6405
+ "name": "importId",
6406
+ "required": true
6315
6407
  }
6316
6408
  },
6317
- "description": "Unlink a dataset alias from its dataset in the project",
6409
+ "description": "Get details of an import",
6318
6410
  "examples": [
6319
6411
  {
6320
- "command": "<%= config.bin %> <%= command.id %>",
6321
- "description": "Unlink an alias with interactive selection"
6322
- },
6323
- {
6324
- "command": "<%= config.bin %> <%= command.id %> conference",
6325
- "description": "Unlink alias \"conference\" with confirmation prompt"
6412
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6413
+ "description": "Get details of a specific import"
6326
6414
  },
6327
6415
  {
6328
- "command": "<%= config.bin %> <%= command.id %> conference --force",
6329
- "description": "Unlink alias \"conference\" without confirmation prompt"
6416
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456 --json",
6417
+ "description": "Output the import as JSON"
6330
6418
  }
6331
6419
  ],
6332
6420
  "flags": {
6333
- "project-id": {
6334
- "char": "p",
6335
- "description": "Project ID to unlink dataset alias in (overrides CLI configuration)",
6336
- "helpGroup": "OVERRIDE",
6337
- "name": "project-id",
6338
- "hasDynamicHelp": false,
6339
- "helpValue": "<id>",
6340
- "multiple": false,
6341
- "type": "option"
6342
- },
6343
- "force": {
6344
- "description": "Skip confirmation prompt and unlink immediately",
6345
- "name": "force",
6421
+ "json": {
6422
+ "description": "Output the import in JSON format",
6423
+ "name": "json",
6346
6424
  "allowNo": false,
6347
6425
  "type": "boolean"
6348
6426
  }
6349
6427
  },
6350
6428
  "hasDynamicHelp": false,
6351
- "hiddenAliases": [
6352
- "dataset:alias:unlink"
6353
- ],
6354
- "id": "datasets:alias:unlink",
6429
+ "hiddenAliases": [],
6430
+ "id": "context:imports:get",
6355
6431
  "pluginAlias": "@sanity/cli",
6356
6432
  "pluginName": "@sanity/cli",
6357
6433
  "pluginType": "core",
@@ -6360,44 +6436,42 @@
6360
6436
  "relativePath": [
6361
6437
  "dist",
6362
6438
  "commands",
6363
- "datasets",
6364
- "alias",
6365
- "unlink.js"
6439
+ "context",
6440
+ "imports",
6441
+ "get.js"
6366
6442
  ]
6367
6443
  },
6368
- "datasets:embeddings:disable": {
6444
+ "context:imports:list": {
6369
6445
  "aliases": [],
6370
6446
  "args": {
6371
- "dataset": {
6372
- "description": "Dataset name to disable embeddings for",
6373
- "name": "dataset",
6374
- "required": false
6447
+ "knowledgeBaseId": {
6448
+ "description": "Knowledge base ID",
6449
+ "name": "knowledgeBaseId",
6450
+ "required": true
6375
6451
  }
6376
6452
  },
6377
- "description": "Disable embeddings for a dataset",
6453
+ "description": "List imports for a knowledge base",
6378
6454
  "examples": [
6379
6455
  {
6380
- "command": "<%= config.bin %> <%= command.id %> production",
6381
- "description": "Disable embeddings for the production dataset"
6456
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
6457
+ "description": "List all imports for a knowledge base"
6458
+ },
6459
+ {
6460
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
6461
+ "description": "Output imports as JSON"
6382
6462
  }
6383
6463
  ],
6384
6464
  "flags": {
6385
- "project-id": {
6386
- "char": "p",
6387
- "description": "Project ID to disable embeddings for (overrides CLI configuration)",
6388
- "helpGroup": "OVERRIDE",
6389
- "name": "project-id",
6390
- "hasDynamicHelp": false,
6391
- "helpValue": "<id>",
6392
- "multiple": false,
6393
- "type": "option"
6465
+ "json": {
6466
+ "description": "Output imports in JSON format",
6467
+ "name": "json",
6468
+ "allowNo": false,
6469
+ "type": "boolean"
6394
6470
  }
6395
6471
  },
6396
6472
  "hasDynamicHelp": false,
6397
- "hiddenAliases": [
6398
- "dataset:embeddings:disable"
6399
- ],
6400
- "id": "datasets:embeddings:disable",
6473
+ "hiddenAliases": [],
6474
+ "id": "context:imports:list",
6401
6475
  "pluginAlias": "@sanity/cli",
6402
6476
  "pluginName": "@sanity/cli",
6403
6477
  "pluginType": "core",
@@ -6406,66 +6480,53 @@
6406
6480
  "relativePath": [
6407
6481
  "dist",
6408
6482
  "commands",
6409
- "datasets",
6410
- "embeddings",
6411
- "disable.js"
6483
+ "context",
6484
+ "imports",
6485
+ "list.js"
6412
6486
  ]
6413
6487
  },
6414
- "datasets:embeddings:enable": {
6488
+ "context:jobs:get": {
6415
6489
  "aliases": [],
6416
6490
  "args": {
6417
- "dataset": {
6418
- "description": "Dataset name to enable embeddings for",
6419
- "name": "dataset",
6420
- "required": false
6491
+ "knowledgeBaseId": {
6492
+ "description": "Knowledge base ID",
6493
+ "name": "knowledgeBaseId",
6494
+ "required": true
6495
+ },
6496
+ "jobId": {
6497
+ "description": "Job ID",
6498
+ "name": "jobId",
6499
+ "required": true
6421
6500
  }
6422
6501
  },
6423
- "description": "Enable embeddings for a dataset",
6502
+ "description": "Get the status of a knowledge base job",
6424
6503
  "examples": [
6425
6504
  {
6426
- "command": "<%= config.bin %> <%= command.id %> production",
6427
- "description": "Enable embeddings for the production dataset"
6428
- },
6429
- {
6430
- "command": "<%= config.bin %> <%= command.id %> production --projection \"{ title, body }\"",
6431
- "description": "Enable embeddings with a specific projection"
6505
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456",
6506
+ "description": "Get the current status of a job"
6432
6507
  },
6433
6508
  {
6434
- "command": "<%= config.bin %> <%= command.id %> production --wait",
6435
- "description": "Enable embeddings and wait for processing to complete"
6509
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456 --watch",
6510
+ "description": "Wait for the job to finish (non-zero exit if it does not succeed)"
6436
6511
  }
6437
6512
  ],
6438
6513
  "flags": {
6439
- "project-id": {
6440
- "char": "p",
6441
- "description": "Project ID to enable embeddings for (overrides CLI configuration)",
6442
- "helpGroup": "OVERRIDE",
6443
- "name": "project-id",
6444
- "hasDynamicHelp": false,
6445
- "helpValue": "<id>",
6446
- "multiple": false,
6447
- "type": "option"
6448
- },
6449
- "projection": {
6450
- "description": "GROQ projection defining which fields to embed (e.g. \"{ title, body }\")",
6451
- "name": "projection",
6452
- "required": false,
6453
- "hasDynamicHelp": false,
6454
- "multiple": false,
6455
- "type": "option"
6514
+ "json": {
6515
+ "description": "Output the job in JSON format",
6516
+ "name": "json",
6517
+ "allowNo": false,
6518
+ "type": "boolean"
6456
6519
  },
6457
- "wait": {
6458
- "description": "Wait for embeddings processing to complete before returning",
6459
- "name": "wait",
6520
+ "watch": {
6521
+ "description": "Poll until the job reaches a terminal state",
6522
+ "name": "watch",
6460
6523
  "allowNo": false,
6461
6524
  "type": "boolean"
6462
6525
  }
6463
6526
  },
6464
6527
  "hasDynamicHelp": false,
6465
- "hiddenAliases": [
6466
- "dataset:embeddings:enable"
6467
- ],
6468
- "id": "datasets:embeddings:enable",
6528
+ "hiddenAliases": [],
6529
+ "id": "context:jobs:get",
6469
6530
  "pluginAlias": "@sanity/cli",
6470
6531
  "pluginName": "@sanity/cli",
6471
6532
  "pluginType": "core",
@@ -6474,31 +6535,48 @@
6474
6535
  "relativePath": [
6475
6536
  "dist",
6476
6537
  "commands",
6477
- "datasets",
6478
- "embeddings",
6479
- "enable.js"
6538
+ "context",
6539
+ "jobs",
6540
+ "get.js"
6480
6541
  ]
6481
6542
  },
6482
- "datasets:embeddings:status": {
6543
+ "datasets:alias:create": {
6483
6544
  "aliases": [],
6484
6545
  "args": {
6485
- "dataset": {
6486
- "description": "The name of the dataset to check embeddings status for",
6487
- "name": "dataset",
6546
+ "aliasName": {
6547
+ "description": "Dataset alias name to create",
6548
+ "name": "aliasName",
6549
+ "required": false
6550
+ },
6551
+ "targetDataset": {
6552
+ "description": "Target dataset name to link the alias to",
6553
+ "name": "targetDataset",
6488
6554
  "required": false
6489
6555
  }
6490
6556
  },
6491
- "description": "Show embeddings settings and status for a dataset",
6557
+ "description": "Create a dataset alias for the project",
6492
6558
  "examples": [
6493
6559
  {
6494
- "command": "<%= config.bin %> <%= command.id %> production",
6495
- "description": "Show embeddings status for the production dataset"
6560
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123 conference conf-2025",
6561
+ "description": "Create alias in a specific project"
6562
+ },
6563
+ {
6564
+ "command": "<%= config.bin %> <%= command.id %>",
6565
+ "description": "Create an alias with interactive prompts"
6566
+ },
6567
+ {
6568
+ "command": "<%= config.bin %> <%= command.id %> conference",
6569
+ "description": "Create alias named \"conference\" with interactive dataset selection"
6570
+ },
6571
+ {
6572
+ "command": "<%= config.bin %> <%= command.id %> conference conf-2025",
6573
+ "description": "Create alias \"conference\" linked to \"conf-2025\" dataset"
6496
6574
  }
6497
6575
  ],
6498
6576
  "flags": {
6499
6577
  "project-id": {
6500
6578
  "char": "p",
6501
- "description": "Project ID to check embeddings status for (overrides CLI configuration)",
6579
+ "description": "Project ID to create dataset alias in (overrides CLI configuration)",
6502
6580
  "helpGroup": "OVERRIDE",
6503
6581
  "name": "project-id",
6504
6582
  "hasDynamicHelp": false,
@@ -6509,9 +6587,9 @@
6509
6587
  },
6510
6588
  "hasDynamicHelp": false,
6511
6589
  "hiddenAliases": [
6512
- "dataset:embeddings:status"
6590
+ "dataset:alias:create"
6513
6591
  ],
6514
- "id": "datasets:embeddings:status",
6592
+ "id": "datasets:alias:create",
6515
6593
  "pluginAlias": "@sanity/cli",
6516
6594
  "pluginName": "@sanity/cli",
6517
6595
  "pluginType": "core",
@@ -6521,43 +6599,53 @@
6521
6599
  "dist",
6522
6600
  "commands",
6523
6601
  "datasets",
6524
- "embeddings",
6525
- "status.js"
6602
+ "alias",
6603
+ "create.js"
6526
6604
  ]
6527
6605
  },
6528
- "datasets:visibility:get": {
6606
+ "datasets:alias:delete": {
6529
6607
  "aliases": [],
6530
6608
  "args": {
6531
- "dataset": {
6532
- "description": "The name of the dataset to get visibility for",
6533
- "name": "dataset",
6609
+ "aliasName": {
6610
+ "description": "Dataset alias name to delete",
6611
+ "name": "aliasName",
6534
6612
  "required": true
6535
6613
  }
6536
6614
  },
6537
- "description": "Get the visibility of a dataset",
6615
+ "description": "Delete a dataset alias from the project",
6538
6616
  "examples": [
6539
6617
  {
6540
- "command": "<%= config.bin %> <%= command.id %> my-dataset",
6541
- "description": "Check the visibility of a dataset"
6618
+ "command": "<%= config.bin %> <%= command.id %> conference",
6619
+ "description": "Delete alias named \"conference\" with confirmation prompt"
6620
+ },
6621
+ {
6622
+ "command": "<%= config.bin %> <%= command.id %> conference --force",
6623
+ "description": "Delete alias named \"conference\" without confirmation prompt"
6542
6624
  }
6543
6625
  ],
6544
6626
  "flags": {
6545
6627
  "project-id": {
6546
6628
  "char": "p",
6547
- "description": "Project ID to get dataset visibility for (overrides CLI configuration)",
6629
+ "description": "Project ID to delete dataset alias from (overrides CLI configuration)",
6548
6630
  "helpGroup": "OVERRIDE",
6549
6631
  "name": "project-id",
6550
6632
  "hasDynamicHelp": false,
6551
6633
  "helpValue": "<id>",
6552
6634
  "multiple": false,
6553
6635
  "type": "option"
6636
+ },
6637
+ "force": {
6638
+ "description": "Skip confirmation prompt and delete immediately",
6639
+ "name": "force",
6640
+ "allowNo": false,
6641
+ "type": "boolean"
6554
6642
  }
6555
6643
  },
6556
6644
  "hasDynamicHelp": false,
6557
6645
  "hiddenAliases": [
6558
- "dataset:visibility:get"
6646
+ "dataset:alias:delete"
6559
6647
  ],
6560
- "id": "datasets:visibility:get",
6648
+ "id": "datasets:alias:delete",
6561
6649
  "pluginAlias": "@sanity/cli",
6562
6650
  "pluginName": "@sanity/cli",
6563
6651
  "pluginType": "core",
@@ -6567,56 +6655,67 @@
6567
6655
  "dist",
6568
6656
  "commands",
6569
6657
  "datasets",
6570
- "visibility",
6571
- "get.js"
6658
+ "alias",
6659
+ "delete.js"
6572
6660
  ]
6573
6661
  },
6574
- "datasets:visibility:set": {
6662
+ "datasets:alias:link": {
6575
6663
  "aliases": [],
6576
6664
  "args": {
6577
- "dataset": {
6578
- "description": "The name of the dataset to set visibility for",
6579
- "name": "dataset",
6580
- "required": true
6665
+ "aliasName": {
6666
+ "description": "Dataset alias name to link",
6667
+ "name": "aliasName",
6668
+ "required": false
6581
6669
  },
6582
- "mode": {
6583
- "description": "The visibility mode to set",
6584
- "name": "mode",
6585
- "options": [
6586
- "public",
6587
- "private"
6588
- ],
6589
- "required": true
6670
+ "targetDataset": {
6671
+ "description": "Target dataset name to link the alias to",
6672
+ "name": "targetDataset",
6673
+ "required": false
6590
6674
  }
6591
6675
  },
6592
- "description": "Set the visibility of a dataset",
6676
+ "description": "Link a dataset alias to a dataset in the project",
6593
6677
  "examples": [
6594
6678
  {
6595
- "command": "<%= config.bin %> <%= command.id %> my-dataset private",
6596
- "description": "Make a dataset private"
6679
+ "command": "<%= config.bin %> <%= command.id %>",
6680
+ "description": "Link an alias with interactive prompts"
6597
6681
  },
6598
6682
  {
6599
- "command": "<%= config.bin %> <%= command.id %> my-dataset public",
6600
- "description": "Make a dataset public"
6683
+ "command": "<%= config.bin %> <%= command.id %> conference",
6684
+ "description": "Link alias named \"conference\" with interactive dataset selection"
6685
+ },
6686
+ {
6687
+ "command": "<%= config.bin %> <%= command.id %> conference conf-2025",
6688
+ "description": "Link alias \"conference\" to \"conf-2025\" dataset"
6689
+ },
6690
+ {
6691
+ "command": "<%= config.bin %> <%= command.id %> conference conf-2025 --force",
6692
+ "description": "Force link without confirmation (skip relink prompt)"
6601
6693
  }
6602
6694
  ],
6603
6695
  "flags": {
6604
6696
  "project-id": {
6605
6697
  "char": "p",
6606
- "description": "Project ID to set dataset visibility for (overrides CLI configuration)",
6698
+ "description": "Project ID to link dataset alias in (overrides CLI configuration)",
6607
6699
  "helpGroup": "OVERRIDE",
6608
6700
  "name": "project-id",
6609
6701
  "hasDynamicHelp": false,
6610
6702
  "helpValue": "<id>",
6611
6703
  "multiple": false,
6612
6704
  "type": "option"
6705
+ },
6706
+ "force": {
6707
+ "description": "Skip confirmation prompt when relinking existing alias",
6708
+ "name": "force",
6709
+ "required": false,
6710
+ "allowNo": false,
6711
+ "type": "boolean"
6613
6712
  }
6614
6713
  },
6615
6714
  "hasDynamicHelp": false,
6616
6715
  "hiddenAliases": [
6617
- "dataset:visibility:set"
6716
+ "dataset:alias:link"
6618
6717
  ],
6619
- "id": "datasets:visibility:set",
6718
+ "id": "datasets:alias:link",
6620
6719
  "pluginAlias": "@sanity/cli",
6621
6720
  "pluginName": "@sanity/cli",
6622
6721
  "pluginType": "core",
@@ -6626,225 +6725,103 @@
6626
6725
  "dist",
6627
6726
  "commands",
6628
6727
  "datasets",
6629
- "visibility",
6630
- "set.js"
6728
+ "alias",
6729
+ "link.js"
6631
6730
  ]
6632
6731
  },
6633
- "context:imports:create": {
6732
+ "datasets:alias:unlink": {
6634
6733
  "aliases": [],
6635
6734
  "args": {
6636
- "knowledgeBaseId": {
6637
- "description": "Knowledge base ID",
6638
- "name": "knowledgeBaseId",
6639
- "required": true
6735
+ "aliasName": {
6736
+ "description": "Dataset alias name to unlink",
6737
+ "name": "aliasName",
6738
+ "required": false
6640
6739
  }
6641
6740
  },
6642
- "description": "Import content into a knowledge base",
6741
+ "description": "Unlink a dataset alias from its dataset in the project",
6643
6742
  "examples": [
6644
6743
  {
6645
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --text \"Refunds are processed within 5 days\" --title \"Refund policy\"",
6646
- "description": "Import inline text"
6647
- },
6648
- {
6649
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --file ./handbook.pdf",
6650
- "description": "Upload and import a local file"
6744
+ "command": "<%= config.bin %> <%= command.id %>",
6745
+ "description": "Unlink an alias with interactive selection"
6651
6746
  },
6652
6747
  {
6653
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --url https://example.com/docs",
6654
- "description": "Crawl a website"
6748
+ "command": "<%= config.bin %> <%= command.id %> conference",
6749
+ "description": "Unlink alias \"conference\" with confirmation prompt"
6655
6750
  },
6656
6751
  {
6657
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --query '*[_type == \"article\"]' --sanity-project abc123 --sanity-dataset production",
6658
- "description": "Bind a Sanity dataset as a source"
6752
+ "command": "<%= config.bin %> <%= command.id %> conference --force",
6753
+ "description": "Unlink alias \"conference\" without confirmation prompt"
6659
6754
  }
6660
6755
  ],
6661
6756
  "flags": {
6662
- "content-type": {
6663
- "description": "Content type of the import (--text: text/markdown or text/plain; --file: any MIME type, inferred from the file extension when omitted)",
6664
- "name": "content-type",
6665
- "required": false,
6666
- "hasDynamicHelp": false,
6667
- "helpValue": "<mime>",
6668
- "multiple": false,
6669
- "type": "option"
6670
- },
6671
- "file": {
6672
- "description": "Path to a local file to import",
6673
- "exclusive": [
6674
- "text",
6675
- "url",
6676
- "query"
6677
- ],
6678
- "name": "file",
6679
- "required": false,
6680
- "hasDynamicHelp": false,
6681
- "helpValue": "<path>",
6682
- "multiple": false,
6683
- "type": "option"
6684
- },
6685
- "query": {
6686
- "description": "GROQ query binding a Sanity dataset as a source",
6687
- "exclusive": [
6688
- "text",
6689
- "url",
6690
- "file"
6691
- ],
6692
- "name": "query",
6693
- "required": false,
6694
- "hasDynamicHelp": false,
6695
- "multiple": false,
6696
- "type": "option"
6697
- },
6698
- "sanity-dataset": {
6699
- "dependsOn": [
6700
- "query"
6701
- ],
6702
- "description": "Sanity dataset for a dataset import",
6703
- "name": "sanity-dataset",
6704
- "required": false,
6705
- "hasDynamicHelp": false,
6706
- "helpValue": "<name>",
6707
- "multiple": false,
6708
- "type": "option"
6709
- },
6710
- "sanity-project": {
6711
- "dependsOn": [
6712
- "query"
6713
- ],
6714
- "description": "Sanity project ID for a dataset import",
6715
- "name": "sanity-project",
6716
- "required": false,
6757
+ "project-id": {
6758
+ "char": "p",
6759
+ "description": "Project ID to unlink dataset alias in (overrides CLI configuration)",
6760
+ "helpGroup": "OVERRIDE",
6761
+ "name": "project-id",
6717
6762
  "hasDynamicHelp": false,
6718
6763
  "helpValue": "<id>",
6719
6764
  "multiple": false,
6720
6765
  "type": "option"
6721
6766
  },
6722
- "text": {
6723
- "description": "Inline text content to import (requires --title)",
6724
- "exclusive": [
6725
- "file",
6726
- "url",
6727
- "query"
6728
- ],
6729
- "name": "text",
6730
- "required": false,
6731
- "hasDynamicHelp": false,
6732
- "multiple": false,
6733
- "type": "option"
6734
- },
6735
- "title": {
6736
- "dependsOn": [
6737
- "text"
6738
- ],
6739
- "description": "Title for an inline text import",
6740
- "name": "title",
6741
- "required": false,
6742
- "hasDynamicHelp": false,
6743
- "multiple": false,
6744
- "type": "option"
6745
- },
6746
- "url": {
6747
- "description": "Website URL to crawl",
6748
- "exclusive": [
6749
- "text",
6750
- "file",
6751
- "query"
6752
- ],
6753
- "name": "url",
6754
- "required": false,
6755
- "hasDynamicHelp": false,
6756
- "helpValue": "<url>",
6757
- "multiple": false,
6758
- "type": "option"
6767
+ "force": {
6768
+ "description": "Skip confirmation prompt and unlink immediately",
6769
+ "name": "force",
6770
+ "allowNo": false,
6771
+ "type": "boolean"
6759
6772
  }
6760
6773
  },
6761
6774
  "hasDynamicHelp": false,
6762
- "hiddenAliases": [],
6763
- "id": "context:imports:create",
6775
+ "hiddenAliases": [
6776
+ "dataset:alias:unlink"
6777
+ ],
6778
+ "id": "datasets:alias:unlink",
6764
6779
  "pluginAlias": "@sanity/cli",
6765
6780
  "pluginName": "@sanity/cli",
6766
6781
  "pluginType": "core",
6767
6782
  "strict": true,
6768
- "telemetry": {
6769
- "redactedFlags": [
6770
- {
6771
- "canonical": "--text",
6772
- "flags": [
6773
- "--text"
6774
- ]
6775
- },
6776
- {
6777
- "canonical": "--file",
6778
- "flags": [
6779
- "--file"
6780
- ]
6781
- },
6782
- {
6783
- "canonical": "--url",
6784
- "flags": [
6785
- "--url"
6786
- ]
6787
- },
6788
- {
6789
- "canonical": "--title",
6790
- "flags": [
6791
- "--title"
6792
- ]
6793
- },
6794
- {
6795
- "canonical": "--query",
6796
- "flags": [
6797
- "--query"
6798
- ]
6799
- }
6800
- ]
6801
- },
6802
6783
  "isESM": true,
6803
6784
  "relativePath": [
6804
6785
  "dist",
6805
6786
  "commands",
6806
- "context",
6807
- "imports",
6808
- "create.js"
6787
+ "datasets",
6788
+ "alias",
6789
+ "unlink.js"
6809
6790
  ]
6810
6791
  },
6811
- "context:imports:delete": {
6792
+ "datasets:embeddings:disable": {
6812
6793
  "aliases": [],
6813
6794
  "args": {
6814
- "knowledgeBaseId": {
6815
- "description": "Knowledge base ID",
6816
- "name": "knowledgeBaseId",
6817
- "required": true
6818
- },
6819
- "importId": {
6820
- "description": "Import ID",
6821
- "name": "importId",
6822
- "required": true
6795
+ "dataset": {
6796
+ "description": "Dataset name to disable embeddings for",
6797
+ "name": "dataset",
6798
+ "required": false
6823
6799
  }
6824
6800
  },
6825
- "description": "Delete an import from a knowledge base",
6801
+ "description": "Disable embeddings for a dataset",
6826
6802
  "examples": [
6827
6803
  {
6828
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6829
- "description": "Delete an import after confirmation"
6830
- },
6831
- {
6832
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456 --yes",
6833
- "description": "Delete an import without confirmation prompt"
6804
+ "command": "<%= config.bin %> <%= command.id %> production",
6805
+ "description": "Disable embeddings for the production dataset"
6834
6806
  }
6835
6807
  ],
6836
6808
  "flags": {
6837
- "yes": {
6838
- "char": "y",
6839
- "description": "Skip confirmation prompt (unattended mode)",
6840
- "name": "yes",
6841
- "allowNo": false,
6842
- "type": "boolean"
6809
+ "project-id": {
6810
+ "char": "p",
6811
+ "description": "Project ID to disable embeddings for (overrides CLI configuration)",
6812
+ "helpGroup": "OVERRIDE",
6813
+ "name": "project-id",
6814
+ "hasDynamicHelp": false,
6815
+ "helpValue": "<id>",
6816
+ "multiple": false,
6817
+ "type": "option"
6843
6818
  }
6844
6819
  },
6845
6820
  "hasDynamicHelp": false,
6846
- "hiddenAliases": [],
6847
- "id": "context:imports:delete",
6821
+ "hiddenAliases": [
6822
+ "dataset:embeddings:disable"
6823
+ ],
6824
+ "id": "datasets:embeddings:disable",
6848
6825
  "pluginAlias": "@sanity/cli",
6849
6826
  "pluginName": "@sanity/cli",
6850
6827
  "pluginType": "core",
@@ -6853,43 +6830,66 @@
6853
6830
  "relativePath": [
6854
6831
  "dist",
6855
6832
  "commands",
6856
- "context",
6857
- "imports",
6858
- "delete.js"
6833
+ "datasets",
6834
+ "embeddings",
6835
+ "disable.js"
6859
6836
  ]
6860
6837
  },
6861
- "context:imports:download": {
6838
+ "datasets:embeddings:enable": {
6862
6839
  "aliases": [],
6863
6840
  "args": {
6864
- "knowledgeBaseId": {
6865
- "description": "Knowledge base ID",
6866
- "name": "knowledgeBaseId",
6867
- "required": true
6868
- },
6869
- "importId": {
6870
- "description": "Import ID",
6871
- "name": "importId",
6872
- "required": true
6841
+ "dataset": {
6842
+ "description": "Dataset name to enable embeddings for",
6843
+ "name": "dataset",
6844
+ "required": false
6873
6845
  }
6874
6846
  },
6875
- "description": "Get a short-lived signed URL for the original uploaded bytes of a file import",
6847
+ "description": "Enable embeddings for a dataset",
6876
6848
  "examples": [
6877
6849
  {
6878
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6879
- "description": "Get a download URL for an uploaded file"
6850
+ "command": "<%= config.bin %> <%= command.id %> production",
6851
+ "description": "Enable embeddings for the production dataset"
6852
+ },
6853
+ {
6854
+ "command": "<%= config.bin %> <%= command.id %> production --projection \"{ title, body }\"",
6855
+ "description": "Enable embeddings with a specific projection"
6856
+ },
6857
+ {
6858
+ "command": "<%= config.bin %> <%= command.id %> production --wait",
6859
+ "description": "Enable embeddings and wait for processing to complete"
6880
6860
  }
6881
6861
  ],
6882
6862
  "flags": {
6883
- "json": {
6884
- "description": "Output the download URL in JSON format",
6885
- "name": "json",
6863
+ "project-id": {
6864
+ "char": "p",
6865
+ "description": "Project ID to enable embeddings for (overrides CLI configuration)",
6866
+ "helpGroup": "OVERRIDE",
6867
+ "name": "project-id",
6868
+ "hasDynamicHelp": false,
6869
+ "helpValue": "<id>",
6870
+ "multiple": false,
6871
+ "type": "option"
6872
+ },
6873
+ "projection": {
6874
+ "description": "GROQ projection defining which fields to embed (e.g. \"{ title, body }\")",
6875
+ "name": "projection",
6876
+ "required": false,
6877
+ "hasDynamicHelp": false,
6878
+ "multiple": false,
6879
+ "type": "option"
6880
+ },
6881
+ "wait": {
6882
+ "description": "Wait for embeddings processing to complete before returning",
6883
+ "name": "wait",
6886
6884
  "allowNo": false,
6887
6885
  "type": "boolean"
6888
6886
  }
6889
6887
  },
6890
6888
  "hasDynamicHelp": false,
6891
- "hiddenAliases": [],
6892
- "id": "context:imports:download",
6889
+ "hiddenAliases": [
6890
+ "dataset:embeddings:enable"
6891
+ ],
6892
+ "id": "datasets:embeddings:enable",
6893
6893
  "pluginAlias": "@sanity/cli",
6894
6894
  "pluginName": "@sanity/cli",
6895
6895
  "pluginType": "core",
@@ -6898,47 +6898,44 @@
6898
6898
  "relativePath": [
6899
6899
  "dist",
6900
6900
  "commands",
6901
- "context",
6902
- "imports",
6903
- "download.js"
6901
+ "datasets",
6902
+ "embeddings",
6903
+ "enable.js"
6904
6904
  ]
6905
6905
  },
6906
- "context:imports:get": {
6906
+ "datasets:embeddings:status": {
6907
6907
  "aliases": [],
6908
6908
  "args": {
6909
- "knowledgeBaseId": {
6910
- "description": "Knowledge base ID",
6911
- "name": "knowledgeBaseId",
6912
- "required": true
6913
- },
6914
- "importId": {
6915
- "description": "Import ID",
6916
- "name": "importId",
6917
- "required": true
6909
+ "dataset": {
6910
+ "description": "The name of the dataset to check embeddings status for",
6911
+ "name": "dataset",
6912
+ "required": false
6918
6913
  }
6919
6914
  },
6920
- "description": "Get details of an import",
6915
+ "description": "Show embeddings settings and status for a dataset",
6921
6916
  "examples": [
6922
6917
  {
6923
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6924
- "description": "Get details of a specific import"
6925
- },
6926
- {
6927
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456 --json",
6928
- "description": "Output the import as JSON"
6918
+ "command": "<%= config.bin %> <%= command.id %> production",
6919
+ "description": "Show embeddings status for the production dataset"
6929
6920
  }
6930
6921
  ],
6931
6922
  "flags": {
6932
- "json": {
6933
- "description": "Output the import in JSON format",
6934
- "name": "json",
6935
- "allowNo": false,
6936
- "type": "boolean"
6923
+ "project-id": {
6924
+ "char": "p",
6925
+ "description": "Project ID to check embeddings status for (overrides CLI configuration)",
6926
+ "helpGroup": "OVERRIDE",
6927
+ "name": "project-id",
6928
+ "hasDynamicHelp": false,
6929
+ "helpValue": "<id>",
6930
+ "multiple": false,
6931
+ "type": "option"
6937
6932
  }
6938
6933
  },
6939
6934
  "hasDynamicHelp": false,
6940
- "hiddenAliases": [],
6941
- "id": "context:imports:get",
6935
+ "hiddenAliases": [
6936
+ "dataset:embeddings:status"
6937
+ ],
6938
+ "id": "datasets:embeddings:status",
6942
6939
  "pluginAlias": "@sanity/cli",
6943
6940
  "pluginName": "@sanity/cli",
6944
6941
  "pluginType": "core",
@@ -6947,42 +6944,44 @@
6947
6944
  "relativePath": [
6948
6945
  "dist",
6949
6946
  "commands",
6950
- "context",
6951
- "imports",
6952
- "get.js"
6947
+ "datasets",
6948
+ "embeddings",
6949
+ "status.js"
6953
6950
  ]
6954
6951
  },
6955
- "context:imports:list": {
6952
+ "datasets:visibility:get": {
6956
6953
  "aliases": [],
6957
6954
  "args": {
6958
- "knowledgeBaseId": {
6959
- "description": "Knowledge base ID",
6960
- "name": "knowledgeBaseId",
6955
+ "dataset": {
6956
+ "description": "The name of the dataset to get visibility for",
6957
+ "name": "dataset",
6961
6958
  "required": true
6962
6959
  }
6963
6960
  },
6964
- "description": "List imports for a knowledge base",
6961
+ "description": "Get the visibility of a dataset",
6965
6962
  "examples": [
6966
6963
  {
6967
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
6968
- "description": "List all imports for a knowledge base"
6969
- },
6970
- {
6971
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
6972
- "description": "Output imports as JSON"
6964
+ "command": "<%= config.bin %> <%= command.id %> my-dataset",
6965
+ "description": "Check the visibility of a dataset"
6973
6966
  }
6974
6967
  ],
6975
6968
  "flags": {
6976
- "json": {
6977
- "description": "Output imports in JSON format",
6978
- "name": "json",
6979
- "allowNo": false,
6980
- "type": "boolean"
6969
+ "project-id": {
6970
+ "char": "p",
6971
+ "description": "Project ID to get dataset visibility for (overrides CLI configuration)",
6972
+ "helpGroup": "OVERRIDE",
6973
+ "name": "project-id",
6974
+ "hasDynamicHelp": false,
6975
+ "helpValue": "<id>",
6976
+ "multiple": false,
6977
+ "type": "option"
6981
6978
  }
6982
6979
  },
6983
6980
  "hasDynamicHelp": false,
6984
- "hiddenAliases": [],
6985
- "id": "context:imports:list",
6981
+ "hiddenAliases": [
6982
+ "dataset:visibility:get"
6983
+ ],
6984
+ "id": "datasets:visibility:get",
6986
6985
  "pluginAlias": "@sanity/cli",
6987
6986
  "pluginName": "@sanity/cli",
6988
6987
  "pluginType": "core",
@@ -6991,53 +6990,57 @@
6991
6990
  "relativePath": [
6992
6991
  "dist",
6993
6992
  "commands",
6994
- "context",
6995
- "imports",
6996
- "list.js"
6993
+ "datasets",
6994
+ "visibility",
6995
+ "get.js"
6997
6996
  ]
6998
6997
  },
6999
- "context:jobs:get": {
6998
+ "datasets:visibility:set": {
7000
6999
  "aliases": [],
7001
7000
  "args": {
7002
- "knowledgeBaseId": {
7003
- "description": "Knowledge base ID",
7004
- "name": "knowledgeBaseId",
7001
+ "dataset": {
7002
+ "description": "The name of the dataset to set visibility for",
7003
+ "name": "dataset",
7005
7004
  "required": true
7006
7005
  },
7007
- "jobId": {
7008
- "description": "Job ID",
7009
- "name": "jobId",
7006
+ "mode": {
7007
+ "description": "The visibility mode to set",
7008
+ "name": "mode",
7009
+ "options": [
7010
+ "public",
7011
+ "private"
7012
+ ],
7010
7013
  "required": true
7011
7014
  }
7012
7015
  },
7013
- "description": "Get the status of a knowledge base job",
7016
+ "description": "Set the visibility of a dataset",
7014
7017
  "examples": [
7015
7018
  {
7016
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456",
7017
- "description": "Get the current status of a job"
7019
+ "command": "<%= config.bin %> <%= command.id %> my-dataset private",
7020
+ "description": "Make a dataset private"
7018
7021
  },
7019
7022
  {
7020
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456 --watch",
7021
- "description": "Wait for the job to finish (non-zero exit if it does not succeed)"
7023
+ "command": "<%= config.bin %> <%= command.id %> my-dataset public",
7024
+ "description": "Make a dataset public"
7022
7025
  }
7023
7026
  ],
7024
7027
  "flags": {
7025
- "json": {
7026
- "description": "Output the job in JSON format",
7027
- "name": "json",
7028
- "allowNo": false,
7029
- "type": "boolean"
7030
- },
7031
- "watch": {
7032
- "description": "Poll until the job reaches a terminal state",
7033
- "name": "watch",
7034
- "allowNo": false,
7035
- "type": "boolean"
7028
+ "project-id": {
7029
+ "char": "p",
7030
+ "description": "Project ID to set dataset visibility for (overrides CLI configuration)",
7031
+ "helpGroup": "OVERRIDE",
7032
+ "name": "project-id",
7033
+ "hasDynamicHelp": false,
7034
+ "helpValue": "<id>",
7035
+ "multiple": false,
7036
+ "type": "option"
7036
7037
  }
7037
7038
  },
7038
7039
  "hasDynamicHelp": false,
7039
- "hiddenAliases": [],
7040
- "id": "context:jobs:get",
7040
+ "hiddenAliases": [
7041
+ "dataset:visibility:set"
7042
+ ],
7043
+ "id": "datasets:visibility:set",
7041
7044
  "pluginAlias": "@sanity/cli",
7042
7045
  "pluginName": "@sanity/cli",
7043
7046
  "pluginType": "core",
@@ -7046,11 +7049,11 @@
7046
7049
  "relativePath": [
7047
7050
  "dist",
7048
7051
  "commands",
7049
- "context",
7050
- "jobs",
7051
- "get.js"
7052
+ "datasets",
7053
+ "visibility",
7054
+ "set.js"
7052
7055
  ]
7053
7056
  }
7054
7057
  },
7055
- "version": "8.13.1"
7058
+ "version": "8.14.0"
7056
7059
  }