@sanity/cli 8.13.0 → 8.13.1

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.
@@ -1770,156 +1770,55 @@
1770
1770
  "list.js"
1771
1771
  ]
1772
1772
  },
1773
- "context:build": {
1773
+ "cors:add": {
1774
1774
  "aliases": [],
1775
1775
  "args": {
1776
- "knowledgeBaseId": {
1777
- "description": "Knowledge base ID",
1778
- "name": "knowledgeBaseId",
1776
+ "origin": {
1777
+ "description": "Origin to allow (e.g., https://example.com)",
1778
+ "name": "origin",
1779
1779
  "required": true
1780
1780
  }
1781
1781
  },
1782
- "description": "Build a knowledge base from its imported content",
1782
+ "description": "Add a CORS origin to the project",
1783
1783
  "examples": [
1784
1784
  {
1785
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
1786
- "description": "Start a build and return the job ID"
1787
- },
1788
- {
1789
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --watch",
1790
- "description": "Start a build and wait for it to finish (non-zero exit on failure)"
1785
+ "command": "<%= config.bin %> <%= command.id %>",
1786
+ "description": "Interactively add a CORS origin"
1791
1787
  },
1792
1788
  {
1793
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --cancel",
1794
- "description": "Cancel the running build, if any"
1795
- }
1796
- ],
1797
- "flags": {
1798
- "cancel": {
1799
- "description": "Cancel the running build instead of starting one",
1800
- "exclusive": [
1801
- "watch"
1802
- ],
1803
- "name": "cancel",
1804
- "allowNo": false,
1805
- "type": "boolean"
1789
+ "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
1790
+ "description": "Add a localhost origin without credentials"
1806
1791
  },
1807
- "watch": {
1808
- "description": "Wait for the build to finish, exiting non-zero if it fails",
1809
- "name": "watch",
1810
- "allowNo": false,
1811
- "type": "boolean"
1812
- }
1813
- },
1814
- "hasDynamicHelp": false,
1815
- "hiddenAliases": [],
1816
- "id": "context:build",
1817
- "pluginAlias": "@sanity/cli",
1818
- "pluginName": "@sanity/cli",
1819
- "pluginType": "core",
1820
- "strict": true,
1821
- "isESM": true,
1822
- "relativePath": [
1823
- "dist",
1824
- "commands",
1825
- "context",
1826
- "build.js"
1827
- ]
1828
- },
1829
- "context:create": {
1830
- "aliases": [],
1831
- "args": {},
1832
- "description": "Create a knowledge base",
1833
- "examples": [
1834
1792
  {
1835
- "command": "<%= config.bin %> <%= command.id %>",
1836
- "description": "Interactively create a knowledge base"
1793
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
1794
+ "description": "Add a production origin with credentials allowed"
1837
1795
  },
1838
1796
  {
1839
- "command": "<%= config.bin %> <%= command.id %> --organization org-abc123 --title \"Support docs\" --description \"Product docs and troubleshooting guides\"",
1840
- "description": "Create a knowledge base in a specific organization"
1797
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project-id abc123",
1798
+ "description": "Add a CORS origin for a specific project"
1841
1799
  }
1842
1800
  ],
1843
1801
  "flags": {
1844
- "organization": {
1845
- "description": "Organization to create the knowledge base in (overrides CLI configuration)",
1802
+ "project-id": {
1803
+ "char": "p",
1804
+ "description": "Project ID to add CORS origin to (overrides CLI configuration)",
1846
1805
  "helpGroup": "OVERRIDE",
1847
- "name": "organization",
1806
+ "name": "project-id",
1848
1807
  "hasDynamicHelp": false,
1849
1808
  "helpValue": "<id>",
1850
1809
  "multiple": false,
1851
1810
  "type": "option"
1852
1811
  },
1853
- "description": {
1854
- "description": "Knowledge base description",
1855
- "name": "description",
1856
- "hasDynamicHelp": false,
1857
- "multiple": false,
1858
- "type": "option"
1859
- },
1860
- "title": {
1861
- "description": "Knowledge base title",
1862
- "name": "title",
1863
- "hasDynamicHelp": false,
1864
- "multiple": false,
1865
- "type": "option"
1866
- }
1867
- },
1868
- "hasDynamicHelp": false,
1869
- "hiddenAliases": [],
1870
- "id": "context:create",
1871
- "pluginAlias": "@sanity/cli",
1872
- "pluginName": "@sanity/cli",
1873
- "pluginType": "core",
1874
- "strict": true,
1875
- "telemetry": {
1876
- "redactedFlags": [
1877
- {
1878
- "canonical": "--title",
1879
- "flags": [
1880
- "--title"
1881
- ]
1882
- },
1883
- {
1884
- "canonical": "--description",
1885
- "flags": [
1886
- "--description"
1887
- ]
1888
- }
1889
- ]
1890
- },
1891
- "isESM": true,
1892
- "relativePath": [
1893
- "dist",
1894
- "commands",
1895
- "context",
1896
- "create.js"
1897
- ]
1898
- },
1899
- "context:delete": {
1900
- "aliases": [],
1901
- "args": {
1902
- "knowledgeBaseId": {
1903
- "description": "Knowledge base ID",
1904
- "name": "knowledgeBaseId",
1905
- "required": true
1906
- }
1907
- },
1908
- "description": "Delete a knowledge base and its generated content",
1909
- "examples": [
1910
- {
1911
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
1912
- "description": "Delete a knowledge base after confirmation"
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"
1913
1818
  },
1914
- {
1915
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --yes",
1916
- "description": "Delete a knowledge base without confirmation prompt"
1917
- }
1918
- ],
1919
- "flags": {
1920
1819
  "yes": {
1921
1820
  "char": "y",
1922
- "description": "Skip confirmation prompt (unattended mode)",
1821
+ "description": "Confirm risky wildcard origins without prompting",
1923
1822
  "name": "yes",
1924
1823
  "allowNo": false,
1925
1824
  "type": "boolean"
@@ -1927,7 +1826,7 @@
1927
1826
  },
1928
1827
  "hasDynamicHelp": false,
1929
1828
  "hiddenAliases": [],
1930
- "id": "context:delete",
1829
+ "id": "cors:add",
1931
1830
  "pluginAlias": "@sanity/cli",
1932
1831
  "pluginName": "@sanity/cli",
1933
1832
  "pluginType": "core",
@@ -1936,41 +1835,49 @@
1936
1835
  "relativePath": [
1937
1836
  "dist",
1938
1837
  "commands",
1939
- "context",
1940
- "delete.js"
1838
+ "cors",
1839
+ "add.js"
1941
1840
  ]
1942
1841
  },
1943
- "context:get": {
1842
+ "cors:delete": {
1944
1843
  "aliases": [],
1945
1844
  "args": {
1946
- "knowledgeBaseId": {
1947
- "description": "Knowledge base ID",
1948
- "name": "knowledgeBaseId",
1949
- "required": true
1845
+ "origin": {
1846
+ "description": "Origin to delete (will prompt if not provided)",
1847
+ "name": "origin",
1848
+ "required": false
1950
1849
  }
1951
1850
  },
1952
- "description": "Get details of a knowledge base",
1851
+ "description": "Delete a CORS origin from the project",
1953
1852
  "examples": [
1954
1853
  {
1955
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
1956
- "description": "Get details of a specific knowledge base"
1854
+ "command": "<%= config.bin %> <%= command.id %>",
1855
+ "description": "Interactively select and delete a CORS origin"
1957
1856
  },
1958
1857
  {
1959
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
1960
- "description": "Output the knowledge base as JSON"
1858
+ "command": "<%= config.bin %> <%= command.id %> https://example.com",
1859
+ "description": "Delete a specific CORS origin"
1860
+ },
1861
+ {
1862
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
1863
+ "description": "Delete a CORS origin from a specific project"
1961
1864
  }
1962
1865
  ],
1963
1866
  "flags": {
1964
- "json": {
1965
- "description": "Output the knowledge base in JSON format",
1966
- "name": "json",
1967
- "allowNo": false,
1968
- "type": "boolean"
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"
1969
1876
  }
1970
1877
  },
1971
1878
  "hasDynamicHelp": false,
1972
1879
  "hiddenAliases": [],
1973
- "id": "context:get",
1880
+ "id": "cors:delete",
1974
1881
  "pluginAlias": "@sanity/cli",
1975
1882
  "pluginName": "@sanity/cli",
1976
1883
  "pluginType": "core",
@@ -1979,48 +1886,39 @@
1979
1886
  "relativePath": [
1980
1887
  "dist",
1981
1888
  "commands",
1982
- "context",
1983
- "get.js"
1889
+ "cors",
1890
+ "delete.js"
1984
1891
  ]
1985
1892
  },
1986
- "context:list": {
1893
+ "cors:list": {
1987
1894
  "aliases": [],
1988
1895
  "args": {},
1989
- "description": "List knowledge bases in an organization",
1896
+ "description": "List CORS origins for the project",
1990
1897
  "examples": [
1991
1898
  {
1992
1899
  "command": "<%= config.bin %> <%= command.id %>",
1993
- "description": "List knowledge bases, selecting the organization interactively"
1994
- },
1995
- {
1996
- "command": "<%= config.bin %> <%= command.id %> --organization org-abc123",
1997
- "description": "List knowledge bases in a specific organization"
1900
+ "description": "List CORS origins for the project"
1998
1901
  },
1999
1902
  {
2000
- "command": "<%= config.bin %> <%= command.id %> --organization org-abc123 --json",
2001
- "description": "Output knowledge bases as JSON"
1903
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
1904
+ "description": "List CORS origins for a specific project"
2002
1905
  }
2003
1906
  ],
2004
1907
  "flags": {
2005
- "organization": {
2006
- "description": "Organization to list knowledge bases for (overrides CLI configuration)",
1908
+ "project-id": {
1909
+ "char": "p",
1910
+ "description": "Project ID to list CORS origins for (overrides CLI configuration)",
2007
1911
  "helpGroup": "OVERRIDE",
2008
- "name": "organization",
1912
+ "name": "project-id",
2009
1913
  "hasDynamicHelp": false,
2010
1914
  "helpValue": "<id>",
2011
1915
  "multiple": false,
2012
1916
  "type": "option"
2013
- },
2014
- "json": {
2015
- "description": "Output knowledge bases in JSON format",
2016
- "name": "json",
2017
- "allowNo": false,
2018
- "type": "boolean"
2019
1917
  }
2020
1918
  },
2021
1919
  "hasDynamicHelp": false,
2022
1920
  "hiddenAliases": [],
2023
- "id": "context:list",
1921
+ "id": "cors:list",
2024
1922
  "pluginAlias": "@sanity/cli",
2025
1923
  "pluginName": "@sanity/cli",
2026
1924
  "pluginType": "core",
@@ -2029,166 +1927,200 @@
2029
1927
  "relativePath": [
2030
1928
  "dist",
2031
1929
  "commands",
2032
- "context",
1930
+ "cors",
2033
1931
  "list.js"
2034
1932
  ]
2035
1933
  },
2036
- "context:refresh": {
1934
+ "datasets:copy": {
2037
1935
  "aliases": [],
2038
1936
  "args": {
2039
- "knowledgeBaseId": {
2040
- "description": "Knowledge base ID",
2041
- "name": "knowledgeBaseId",
2042
- "required": true
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
2043
1946
  }
2044
1947
  },
2045
- "description": "Refresh a knowledge base: re-check sources and apply what changed",
1948
+ "description": "Copy a dataset or manage copy jobs",
2046
1949
  "examples": [
2047
1950
  {
2048
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2049
- "description": "Start an incremental refresh"
2050
- }
2051
- ],
2052
- "flags": {},
2053
- "hasDynamicHelp": false,
2054
- "hiddenAliases": [],
2055
- "id": "context:refresh",
2056
- "pluginAlias": "@sanity/cli",
2057
- "pluginName": "@sanity/cli",
2058
- "pluginType": "core",
2059
- "strict": true,
2060
- "isESM": true,
2061
- "relativePath": [
2062
- "dist",
2063
- "commands",
2064
- "context",
2065
- "refresh.js"
2066
- ]
2067
- },
2068
- "context:update": {
2069
- "aliases": [],
2070
- "args": {
2071
- "knowledgeBaseId": {
2072
- "description": "Knowledge base ID",
2073
- "name": "knowledgeBaseId",
2074
- "required": true
2075
- }
2076
- },
2077
- "description": "Update a knowledge base",
2078
- "examples": [
1951
+ "command": "<%= config.bin %> <%= command.id %>",
1952
+ "description": "Interactively copy a dataset"
1953
+ },
2079
1954
  {
2080
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --title \"New title\"",
2081
- "description": "Rename a knowledge base"
1955
+ "command": "<%= config.bin %> <%= command.id %> source-dataset",
1956
+ "description": "Copy from source-dataset (prompts for target)"
2082
1957
  },
2083
1958
  {
2084
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --refresh-enabled --refresh-frequency weekly",
2085
- "description": "Enable weekly scheduled refresh"
1959
+ "command": "<%= config.bin %> <%= command.id %> source-dataset target-dataset",
1960
+ "description": "Copy from source-dataset to target-dataset"
2086
1961
  },
2087
1962
  {
2088
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --no-refresh-enabled",
2089
- "description": "Disable scheduled refresh"
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
+ },
1974
+ {
1975
+ "command": "<%= config.bin %> <%= command.id %> --attach <job-id>",
1976
+ "description": "Attach to a running copy job to follow progress"
1977
+ },
1978
+ {
1979
+ "command": "<%= config.bin %> <%= command.id %> --list",
1980
+ "description": "List all dataset copy jobs"
1981
+ },
1982
+ {
1983
+ "command": "<%= config.bin %> <%= command.id %> --list --offset 2 --limit 10",
1984
+ "description": "List copy jobs with pagination"
2090
1985
  }
2091
1986
  ],
2092
1987
  "flags": {
2093
- "description": {
2094
- "description": "New knowledge base description",
2095
- "name": "description",
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
2006
  "required": false,
2097
2007
  "hasDynamicHelp": false,
2098
2008
  "multiple": false,
2099
2009
  "type": "option"
2100
2010
  },
2101
- "refresh-enabled": {
2102
- "description": "Enable scheduled refresh (--no-refresh-enabled to disable)",
2103
- "name": "refresh-enabled",
2011
+ "detach": {
2012
+ "description": "Start the copy without waiting for it to finish",
2013
+ "exclusive": [
2014
+ "list",
2015
+ "attach"
2016
+ ],
2017
+ "name": "detach",
2104
2018
  "required": false,
2105
- "allowNo": true,
2019
+ "allowNo": false,
2106
2020
  "type": "boolean"
2107
2021
  },
2108
- "refresh-frequency": {
2109
- "description": "How often scheduled refresh runs",
2110
- "name": "refresh-frequency",
2022
+ "limit": {
2023
+ "dependsOn": [
2024
+ "list"
2025
+ ],
2026
+ "description": "Maximum number of jobs returned (default 10, max 1000)",
2027
+ "name": "limit",
2111
2028
  "required": false,
2112
2029
  "hasDynamicHelp": false,
2113
2030
  "multiple": false,
2114
- "options": [
2115
- "weekly",
2116
- "monthly"
2117
- ],
2118
2031
  "type": "option"
2119
2032
  },
2120
- "title": {
2121
- "description": "New knowledge base title",
2122
- "name": "title",
2033
+ "list": {
2034
+ "description": "Lists all dataset copy jobs",
2035
+ "exclusive": [
2036
+ "attach",
2037
+ "detach",
2038
+ "skip-history"
2039
+ ],
2040
+ "name": "list",
2041
+ "required": false,
2042
+ "allowNo": false,
2043
+ "type": "boolean"
2044
+ },
2045
+ "offset": {
2046
+ "dependsOn": [
2047
+ "list"
2048
+ ],
2049
+ "description": "Start position in the list of jobs (default 0)",
2050
+ "name": "offset",
2123
2051
  "required": false,
2124
2052
  "hasDynamicHelp": false,
2125
2053
  "multiple": false,
2126
2054
  "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"
2127
2077
  }
2128
2078
  },
2129
2079
  "hasDynamicHelp": false,
2130
- "hiddenAliases": [],
2131
- "id": "context:update",
2080
+ "hiddenAliases": [
2081
+ "dataset:copy"
2082
+ ],
2083
+ "id": "datasets:copy",
2132
2084
  "pluginAlias": "@sanity/cli",
2133
2085
  "pluginName": "@sanity/cli",
2134
2086
  "pluginType": "core",
2135
2087
  "strict": true,
2136
- "telemetry": {
2137
- "redactedFlags": [
2138
- {
2139
- "canonical": "--title",
2140
- "flags": [
2141
- "--title"
2142
- ]
2143
- },
2144
- {
2145
- "canonical": "--description",
2146
- "flags": [
2147
- "--description"
2148
- ]
2149
- }
2150
- ]
2151
- },
2152
2088
  "isESM": true,
2153
2089
  "relativePath": [
2154
2090
  "dist",
2155
2091
  "commands",
2156
- "context",
2157
- "update.js"
2092
+ "datasets",
2093
+ "copy.js"
2158
2094
  ]
2159
2095
  },
2160
- "cors:add": {
2096
+ "datasets:create": {
2161
2097
  "aliases": [],
2162
2098
  "args": {
2163
- "origin": {
2164
- "description": "Origin to allow (e.g., https://example.com)",
2165
- "name": "origin",
2166
- "required": true
2099
+ "name": {
2100
+ "description": "Name of the dataset to create",
2101
+ "name": "name",
2102
+ "required": false
2167
2103
  }
2168
2104
  },
2169
- "description": "Add a CORS origin to the project",
2105
+ "description": "Create a new dataset for the project",
2170
2106
  "examples": [
2171
2107
  {
2172
2108
  "command": "<%= config.bin %> <%= command.id %>",
2173
- "description": "Interactively add a CORS origin"
2174
- },
2175
- {
2176
- "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
2177
- "description": "Add a localhost origin without credentials"
2109
+ "description": "Interactively create a dataset"
2178
2110
  },
2179
2111
  {
2180
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
2181
- "description": "Add a production origin with credentials allowed"
2112
+ "command": "<%= config.bin %> <%= command.id %> my-dataset",
2113
+ "description": "Create a dataset named \"my-dataset\""
2182
2114
  },
2183
2115
  {
2184
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project-id abc123",
2185
- "description": "Add a CORS origin for a specific project"
2116
+ "command": "<%= config.bin %> <%= command.id %> my-dataset --visibility private",
2117
+ "description": "Create a private dataset named \"my-dataset\""
2186
2118
  }
2187
2119
  ],
2188
2120
  "flags": {
2189
2121
  "project-id": {
2190
2122
  "char": "p",
2191
- "description": "Project ID to add CORS origin to (overrides CLI configuration)",
2123
+ "description": "Project ID to create dataset in (overrides CLI configuration)",
2192
2124
  "helpGroup": "OVERRIDE",
2193
2125
  "name": "project-id",
2194
2126
  "hasDynamicHelp": false,
@@ -2196,24 +2128,41 @@
2196
2128
  "multiple": false,
2197
2129
  "type": "option"
2198
2130
  },
2199
- "credentials": {
2200
- "description": "Allow credentials (token/cookie) to be sent from this origin",
2201
- "name": "credentials",
2202
- "required": false,
2203
- "allowNo": true,
2204
- "type": "boolean"
2205
- },
2206
- "yes": {
2207
- "char": "y",
2208
- "description": "Confirm risky wildcard origins without prompting",
2209
- "name": "yes",
2131
+ "embeddings": {
2132
+ "description": "Enable embeddings for this dataset",
2133
+ "name": "embeddings",
2210
2134
  "allowNo": false,
2211
2135
  "type": "boolean"
2136
+ },
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"
2212
2159
  }
2213
2160
  },
2214
2161
  "hasDynamicHelp": false,
2215
- "hiddenAliases": [],
2216
- "id": "cors:add",
2162
+ "hiddenAliases": [
2163
+ "dataset:create"
2164
+ ],
2165
+ "id": "datasets:create",
2217
2166
  "pluginAlias": "@sanity/cli",
2218
2167
  "pluginName": "@sanity/cli",
2219
2168
  "pluginType": "core",
@@ -2222,49 +2171,53 @@
2222
2171
  "relativePath": [
2223
2172
  "dist",
2224
2173
  "commands",
2225
- "cors",
2226
- "add.js"
2174
+ "datasets",
2175
+ "create.js"
2227
2176
  ]
2228
2177
  },
2229
- "cors:delete": {
2178
+ "datasets:delete": {
2230
2179
  "aliases": [],
2231
2180
  "args": {
2232
- "origin": {
2233
- "description": "Origin to delete (will prompt if not provided)",
2234
- "name": "origin",
2235
- "required": false
2236
- }
2237
- },
2238
- "description": "Delete a CORS origin from the project",
2181
+ "datasetName": {
2182
+ "description": "Dataset name to delete",
2183
+ "name": "datasetName",
2184
+ "required": true
2185
+ }
2186
+ },
2187
+ "description": "Delete a dataset from the project",
2239
2188
  "examples": [
2240
2189
  {
2241
- "command": "<%= config.bin %> <%= command.id %>",
2242
- "description": "Interactively select and delete a CORS origin"
2243
- },
2244
- {
2245
- "command": "<%= config.bin %> <%= command.id %> https://example.com",
2246
- "description": "Delete a specific CORS origin"
2190
+ "command": "<%= config.bin %> <%= command.id %> my-dataset",
2191
+ "description": "Delete a specific dataset"
2247
2192
  },
2248
2193
  {
2249
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2250
- "description": "Delete a CORS origin from a specific project"
2194
+ "command": "<%= config.bin %> <%= command.id %> my-dataset --force",
2195
+ "description": "Delete a specific dataset without confirmation"
2251
2196
  }
2252
2197
  ],
2253
2198
  "flags": {
2254
2199
  "project-id": {
2255
2200
  "char": "p",
2256
- "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
2201
+ "description": "Project ID to delete dataset from (overrides CLI configuration)",
2257
2202
  "helpGroup": "OVERRIDE",
2258
2203
  "name": "project-id",
2259
2204
  "hasDynamicHelp": false,
2260
2205
  "helpValue": "<id>",
2261
2206
  "multiple": false,
2262
2207
  "type": "option"
2208
+ },
2209
+ "force": {
2210
+ "description": "Do not prompt for delete confirmation - forcefully delete",
2211
+ "name": "force",
2212
+ "allowNo": false,
2213
+ "type": "boolean"
2263
2214
  }
2264
2215
  },
2265
2216
  "hasDynamicHelp": false,
2266
- "hiddenAliases": [],
2267
- "id": "cors:delete",
2217
+ "hiddenAliases": [
2218
+ "dataset:delete"
2219
+ ],
2220
+ "id": "datasets:delete",
2268
2221
  "pluginAlias": "@sanity/cli",
2269
2222
  "pluginName": "@sanity/cli",
2270
2223
  "pluginType": "core",
@@ -2273,267 +2226,278 @@
2273
2226
  "relativePath": [
2274
2227
  "dist",
2275
2228
  "commands",
2276
- "cors",
2229
+ "datasets",
2277
2230
  "delete.js"
2278
2231
  ]
2279
2232
  },
2280
- "cors:list": {
2233
+ "datasets:export": {
2281
2234
  "aliases": [],
2282
- "args": {},
2283
- "description": "List CORS origins for the project",
2235
+ "args": {
2236
+ "name": {
2237
+ "description": "Name of the dataset to export",
2238
+ "name": "name"
2239
+ },
2240
+ "destination": {
2241
+ "description": "Output destination file path",
2242
+ "name": "destination"
2243
+ }
2244
+ },
2245
+ "description": "Export a dataset to a local gzipped tarball. Assets returning 401, 403, or 404 are excluded from the export.",
2284
2246
  "examples": [
2285
2247
  {
2286
- "command": "<%= config.bin %> <%= command.id %>",
2287
- "description": "List CORS origins for the project"
2248
+ "command": "<%= config.bin %> <%= command.id %> moviedb localPath.tar.gz",
2249
+ "description": "Export dataset \"moviedb\" to localPath.tar.gz"
2288
2250
  },
2289
2251
  {
2290
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2291
- "description": "List CORS origins for a specific project"
2252
+ "command": "<%= config.bin %> <%= command.id %> moviedb assetless.tar.gz --no-assets",
2253
+ "description": "Export dataset without assets"
2254
+ },
2255
+ {
2256
+ "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --raw",
2257
+ "description": "Export raw documents without asset reference rewriting"
2258
+ },
2259
+ {
2260
+ "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --types products,shops",
2261
+ "description": "Export specific document types"
2262
+ },
2263
+ {
2264
+ "command": "<%= config.bin %> <%= command.id %> moviedb moviedb.tar.gz --no-strict-asset-verification",
2265
+ "description": "Export dataset without aborting on asset verification failures"
2292
2266
  }
2293
2267
  ],
2294
2268
  "flags": {
2295
2269
  "project-id": {
2296
2270
  "char": "p",
2297
- "description": "Project ID to list CORS origins for (overrides CLI configuration)",
2271
+ "description": "Project ID to export dataset from (overrides CLI configuration)",
2298
2272
  "helpGroup": "OVERRIDE",
2299
2273
  "name": "project-id",
2300
2274
  "hasDynamicHelp": false,
2301
2275
  "helpValue": "<id>",
2302
2276
  "multiple": false,
2303
2277
  "type": "option"
2278
+ },
2279
+ "asset-concurrency": {
2280
+ "description": "Concurrent number of asset downloads",
2281
+ "name": "asset-concurrency",
2282
+ "default": 8,
2283
+ "hasDynamicHelp": false,
2284
+ "multiple": false,
2285
+ "type": "option"
2286
+ },
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"
2296
+ ],
2297
+ "type": "option"
2298
+ },
2299
+ "no-assets": {
2300
+ "description": "Export only non-asset documents and remove references to image assets",
2301
+ "name": "no-assets",
2302
+ "allowNo": false,
2303
+ "type": "boolean"
2304
+ },
2305
+ "no-compress": {
2306
+ "description": "Skips compressing tarball entries (still generates a gzip file)",
2307
+ "name": "no-compress",
2308
+ "allowNo": false,
2309
+ "type": "boolean"
2310
+ },
2311
+ "no-drafts": {
2312
+ "description": "Export only published versions of documents",
2313
+ "name": "no-drafts",
2314
+ "allowNo": false,
2315
+ "type": "boolean"
2316
+ },
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"
2322
+ },
2323
+ "overwrite": {
2324
+ "description": "Overwrite any file with the same name",
2325
+ "name": "overwrite",
2326
+ "allowNo": false,
2327
+ "type": "boolean"
2328
+ },
2329
+ "raw": {
2330
+ "description": "Extract only documents, without rewriting asset references",
2331
+ "name": "raw",
2332
+ "allowNo": false,
2333
+ "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"
2304
2341
  }
2305
2342
  },
2306
2343
  "hasDynamicHelp": false,
2307
- "hiddenAliases": [],
2308
- "id": "cors:list",
2309
- "pluginAlias": "@sanity/cli",
2310
- "pluginName": "@sanity/cli",
2311
- "pluginType": "core",
2312
- "strict": true,
2313
- "isESM": true,
2314
- "relativePath": [
2315
- "dist",
2316
- "commands",
2317
- "cors",
2318
- "list.js"
2319
- ]
2320
- },
2321
- "docs:browse": {
2322
- "aliases": [],
2323
- "args": {},
2324
- "description": "Open Sanity docs in your browser",
2325
- "flags": {},
2326
- "hasDynamicHelp": false,
2327
- "hiddenAliases": [],
2328
- "id": "docs:browse",
2344
+ "hiddenAliases": [
2345
+ "dataset:export"
2346
+ ],
2347
+ "id": "datasets:export",
2329
2348
  "pluginAlias": "@sanity/cli",
2330
2349
  "pluginName": "@sanity/cli",
2331
2350
  "pluginType": "core",
2332
2351
  "strict": true,
2333
- "enableJsonFlag": false,
2334
2352
  "isESM": true,
2335
2353
  "relativePath": [
2336
2354
  "dist",
2337
2355
  "commands",
2338
- "docs",
2339
- "browse.js"
2356
+ "datasets",
2357
+ "export.js"
2340
2358
  ]
2341
2359
  },
2342
- "docs:read": {
2360
+ "datasets:import": {
2343
2361
  "aliases": [],
2344
2362
  "args": {
2345
- "path": {
2346
- "description": "Path or URL to article, found in search results and docs content as links",
2347
- "name": "path",
2363
+ "source": {
2364
+ "description": "Source file (use \"-\" for stdin)",
2365
+ "name": "source",
2348
2366
  "required": true
2367
+ },
2368
+ "targetDataset": {
2369
+ "description": "Target dataset (prefer --dataset flag instead)",
2370
+ "name": "targetDataset",
2371
+ "required": false
2349
2372
  }
2350
2373
  },
2351
- "description": "Read an article in terminal",
2374
+ "description": "Import documents to a Sanity dataset",
2352
2375
  "examples": [
2353
2376
  {
2354
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
2355
- "description": "Read as markdown in terminal"
2377
+ "command": "<%= config.bin %> <%= command.id %> -d staging my-dataset.ndjson",
2378
+ "description": "Import \"./my-dataset.ndjson\" into dataset \"staging\""
2356
2379
  },
2357
2380
  {
2358
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
2359
- "description": "Read using full URL"
2381
+ "command": "cat my-dataset.ndjson | <%= config.bin %> <%= command.id %> -d test -",
2382
+ "description": "Import into dataset \"test\" from stdin"
2360
2383
  },
2361
2384
  {
2362
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
2363
- "description": "Open in web browser"
2385
+ "command": "<%= config.bin %> <%= command.id %> -p projectId -d staging my-dataset.ndjson",
2386
+ "description": "Import with explicit project ID (overrides CLI configuration)"
2364
2387
  },
2365
2388
  {
2366
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
2367
- "description": "Open using full URL in web browser"
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)"
2368
2391
  }
2369
2392
  ],
2370
2393
  "flags": {
2371
- "web": {
2372
- "aliases": [
2373
- "w"
2374
- ],
2375
- "description": "Open in a web browser",
2376
- "name": "web",
2394
+ "allow-assets-in-different-dataset": {
2395
+ "description": "Allow asset documents to reference different project/dataset",
2396
+ "name": "allow-assets-in-different-dataset",
2377
2397
  "allowNo": false,
2378
2398
  "type": "boolean"
2379
- }
2380
- },
2381
- "hasDynamicHelp": false,
2382
- "hiddenAliases": [],
2383
- "id": "docs:read",
2384
- "pluginAlias": "@sanity/cli",
2385
- "pluginName": "@sanity/cli",
2386
- "pluginType": "core",
2387
- "strict": true,
2388
- "isESM": true,
2389
- "relativePath": [
2390
- "dist",
2391
- "commands",
2392
- "docs",
2393
- "read.js"
2394
- ]
2395
- },
2396
- "docs:search": {
2397
- "aliases": [],
2398
- "args": {
2399
- "query": {
2400
- "description": "Search query for documentation",
2401
- "name": "query",
2402
- "required": true
2403
- }
2404
- },
2405
- "description": "Search Sanity docs",
2406
- "examples": [
2407
- {
2408
- "command": "<%= config.bin %> <%= command.id %> schema",
2409
- "description": "Search for documentation about schemas"
2410
2399
  },
2411
- {
2412
- "command": "<%= config.bin %> <%= command.id %> \"groq functions\"",
2413
- "description": "Search with phrase"
2400
+ "allow-failing-assets": {
2401
+ "description": "Skip assets that cannot be fetched/uploaded",
2402
+ "name": "allow-failing-assets",
2403
+ "allowNo": false,
2404
+ "type": "boolean"
2414
2405
  },
2415
- {
2416
- "command": "<%= config.bin %> <%= command.id %> \"deployment\" --limit=5",
2417
- "description": "Limit search results"
2418
- }
2419
- ],
2420
- "flags": {
2421
- "limit": {
2422
- "description": "Maximum number of results to return",
2423
- "name": "limit",
2424
- "default": 10,
2425
- "hasDynamicHelp": false,
2426
- "multiple": false,
2427
- "type": "option"
2428
- }
2429
- },
2430
- "hasDynamicHelp": false,
2431
- "hiddenAliases": [],
2432
- "id": "docs:search",
2433
- "pluginAlias": "@sanity/cli",
2434
- "pluginName": "@sanity/cli",
2435
- "pluginType": "core",
2436
- "strict": true,
2437
- "isESM": true,
2438
- "relativePath": [
2439
- "dist",
2440
- "commands",
2441
- "docs",
2442
- "search.js"
2443
- ]
2444
- },
2445
- "graphql:deploy": {
2446
- "aliases": [],
2447
- "args": {},
2448
- "description": "Deploy a GraphQL API from the current Sanity schema",
2449
- "examples": [
2450
- {
2451
- "command": "<%= config.bin %> <%= command.id %>",
2452
- "description": "Deploy all defined GraphQL APIs"
2453
- },
2454
- {
2455
- "command": "<%= config.bin %> <%= command.id %> --dry-run",
2456
- "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy"
2406
+ "allow-replacement-characters": {
2407
+ "description": "Allow unicode replacement characters in imported documents",
2408
+ "name": "allow-replacement-characters",
2409
+ "allowNo": false,
2410
+ "type": "boolean"
2457
2411
  },
2458
- {
2459
- "command": "<%= config.bin %> <%= command.id %> --api staging --api ios",
2460
- "description": "Deploy only the GraphQL APIs with the IDs \"staging\" and \"ios\""
2412
+ "allow-system-documents": {
2413
+ "description": "Imports system documents",
2414
+ "name": "allow-system-documents",
2415
+ "allowNo": false,
2416
+ "type": "boolean"
2461
2417
  },
2462
- {
2463
- "command": "<%= config.bin %> <%= command.id %> --playground",
2464
- "description": "Deploy all defined GraphQL APIs, overriding any playground setting"
2465
- }
2466
- ],
2467
- "flags": {
2468
- "api": {
2469
- "description": "Only deploy API with this ID (can be specified multiple times)",
2470
- "name": "api",
2418
+ "asset-concurrency": {
2419
+ "description": "Number of parallel asset imports",
2420
+ "name": "asset-concurrency",
2471
2421
  "hasDynamicHelp": false,
2472
- "multiple": true,
2422
+ "multiple": false,
2473
2423
  "type": "option"
2474
2424
  },
2475
2425
  "dataset": {
2476
2426
  "char": "d",
2477
- "description": "Deploy API for the given dataset",
2427
+ "description": "Dataset to import to",
2478
2428
  "name": "dataset",
2479
2429
  "hasDynamicHelp": false,
2480
2430
  "helpValue": "<name>",
2481
2431
  "multiple": false,
2482
2432
  "type": "option"
2483
2433
  },
2484
- "dry-run": {
2485
- "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy",
2486
- "name": "dry-run",
2434
+ "missing": {
2435
+ "description": "Skip documents that already exist",
2436
+ "exclusive": [
2437
+ "replace"
2438
+ ],
2439
+ "name": "missing",
2487
2440
  "allowNo": false,
2488
2441
  "type": "boolean"
2489
2442
  },
2490
- "force": {
2491
- "description": "Deploy API without confirming breaking changes",
2492
- "name": "force",
2493
- "allowNo": false,
2494
- "type": "boolean"
2443
+ "project-id": {
2444
+ "char": "p",
2445
+ "description": "Project ID to import to (overrides CLI configuration)",
2446
+ "helpGroup": "OVERRIDE",
2447
+ "name": "project-id",
2448
+ "hasDynamicHelp": false,
2449
+ "helpValue": "<id>",
2450
+ "multiple": false,
2451
+ "type": "option"
2495
2452
  },
2496
- "generation": {
2497
- "description": "API generation to deploy (defaults to \"gen3\")",
2498
- "name": "generation",
2453
+ "project": {
2454
+ "deprecated": {
2455
+ "to": "project-id"
2456
+ },
2457
+ "description": "Project ID to import to",
2458
+ "hidden": true,
2459
+ "name": "project",
2499
2460
  "hasDynamicHelp": false,
2500
2461
  "multiple": false,
2501
- "options": [
2502
- "gen1",
2503
- "gen2",
2504
- "gen3"
2505
- ],
2506
2462
  "type": "option"
2507
2463
  },
2508
- "non-null-document-fields": {
2509
- "description": "Use non-null document fields (_id, _type etc)",
2510
- "name": "non-null-document-fields",
2464
+ "replace": {
2465
+ "description": "Replace documents with the same IDs",
2466
+ "exclusive": [
2467
+ "missing"
2468
+ ],
2469
+ "name": "replace",
2511
2470
  "allowNo": false,
2512
2471
  "type": "boolean"
2513
2472
  },
2514
- "playground": {
2515
- "description": "Enable GraphQL playground for easier debugging",
2516
- "name": "playground",
2517
- "allowNo": true,
2473
+ "replace-assets": {
2474
+ "description": "Skip reuse of existing assets",
2475
+ "name": "replace-assets",
2476
+ "allowNo": false,
2518
2477
  "type": "boolean"
2519
2478
  },
2520
- "tag": {
2521
- "description": "Deploy API(s) to given tag (defaults to \"default\")",
2522
- "name": "tag",
2479
+ "skip-cross-dataset-references": {
2480
+ "description": "Skips references to other datasets",
2481
+ "name": "skip-cross-dataset-references",
2482
+ "allowNo": false,
2483
+ "type": "boolean"
2484
+ },
2485
+ "token": {
2486
+ "char": "t",
2487
+ "description": "Token to authenticate with",
2488
+ "env": "SANITY_IMPORT_TOKEN",
2489
+ "name": "token",
2490
+ "required": false,
2523
2491
  "hasDynamicHelp": false,
2524
2492
  "multiple": false,
2525
2493
  "type": "option"
2526
- },
2527
- "with-union-cache": {
2528
- "description": "Cache union types (faster for schemas with many self-references)",
2529
- "name": "with-union-cache",
2530
- "allowNo": false,
2531
- "type": "boolean"
2532
2494
  }
2533
2495
  },
2534
2496
  "hasDynamicHelp": false,
2535
- "hiddenAliases": [],
2536
- "id": "graphql:deploy",
2497
+ "hiddenAliases": [
2498
+ "dataset:import"
2499
+ ],
2500
+ "id": "datasets:import",
2537
2501
  "pluginAlias": "@sanity/cli",
2538
2502
  "pluginName": "@sanity/cli",
2539
2503
  "pluginType": "core",
@@ -2542,28 +2506,28 @@
2542
2506
  "relativePath": [
2543
2507
  "dist",
2544
2508
  "commands",
2545
- "graphql",
2546
- "deploy.js"
2509
+ "datasets",
2510
+ "import.js"
2547
2511
  ]
2548
2512
  },
2549
- "graphql:list": {
2513
+ "datasets:list": {
2550
2514
  "aliases": [],
2551
2515
  "args": {},
2552
- "description": "List deployed GraphQL endpoints for the project",
2516
+ "description": "List datasets for the project",
2553
2517
  "examples": [
2554
2518
  {
2555
2519
  "command": "<%= config.bin %> <%= command.id %>",
2556
- "description": "List GraphQL endpoints for the project"
2520
+ "description": "List datasets for the project"
2557
2521
  },
2558
2522
  {
2559
2523
  "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2560
- "description": "List GraphQL endpoints for a specific project"
2524
+ "description": "List datasets for a specific project"
2561
2525
  }
2562
2526
  ],
2563
2527
  "flags": {
2564
2528
  "project-id": {
2565
2529
  "char": "p",
2566
- "description": "Project ID to list GraphQL endpoints for (overrides CLI configuration)",
2530
+ "description": "Project ID to list datasets for (overrides CLI configuration)",
2567
2531
  "helpGroup": "OVERRIDE",
2568
2532
  "name": "project-id",
2569
2533
  "hasDynamicHelp": false,
@@ -2573,8 +2537,10 @@
2573
2537
  }
2574
2538
  },
2575
2539
  "hasDynamicHelp": false,
2576
- "hiddenAliases": [],
2577
- "id": "graphql:list",
2540
+ "hiddenAliases": [
2541
+ "dataset:list"
2542
+ ],
2543
+ "id": "datasets:list",
2578
2544
  "pluginAlias": "@sanity/cli",
2579
2545
  "pluginName": "@sanity/cli",
2580
2546
  "pluginType": "core",
@@ -2583,96 +2549,100 @@
2583
2549
  "relativePath": [
2584
2550
  "dist",
2585
2551
  "commands",
2586
- "graphql",
2552
+ "datasets",
2587
2553
  "list.js"
2588
2554
  ]
2589
2555
  },
2590
- "graphql:undeploy": {
2556
+ "context:build": {
2591
2557
  "aliases": [],
2592
- "args": {},
2593
- "description": "Remove a deployed GraphQL API",
2558
+ "args": {
2559
+ "knowledgeBaseId": {
2560
+ "description": "Knowledge base ID",
2561
+ "name": "knowledgeBaseId",
2562
+ "required": true
2563
+ }
2564
+ },
2565
+ "description": "Build a knowledge base from its imported content",
2594
2566
  "examples": [
2595
2567
  {
2596
- "command": "<%= config.bin %> <%= command.id %>",
2597
- "description": "Undeploy GraphQL API for current project and dataset"
2598
- },
2599
- {
2600
- "command": "<%= config.bin %> <%= command.id %> --api ios",
2601
- "description": "Undeploy API with ID \"ios\""
2568
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2569
+ "description": "Start a build and return the job ID"
2602
2570
  },
2603
2571
  {
2604
- "command": "<%= config.bin %> <%= command.id %> --dataset staging",
2605
- "description": "Undeploy GraphQL API for staging dataset"
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)"
2606
2574
  },
2607
2575
  {
2608
- "command": "<%= config.bin %> <%= command.id %> --dataset staging --tag next",
2609
- "description": "Undeploy GraphQL API for staging dataset with \"next\" tag"
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"
2610
2589
  },
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": [
2611
2617
  {
2612
- "command": "<%= config.bin %> <%= command.id %> --force",
2613
- "description": "Undeploy GraphQL API without confirmation prompt"
2618
+ "command": "<%= config.bin %> <%= command.id %>",
2619
+ "description": "Interactively create a knowledge base"
2614
2620
  },
2615
2621
  {
2616
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
2617
- "description": "Undeploy GraphQL API for a specific project and dataset"
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"
2618
2624
  }
2619
2625
  ],
2620
2626
  "flags": {
2621
- "project-id": {
2622
- "char": "p",
2623
- "description": "Project ID to undeploy GraphQL API from (overrides CLI configuration)",
2627
+ "organization": {
2628
+ "description": "Organization to create the knowledge base in (overrides CLI configuration)",
2624
2629
  "helpGroup": "OVERRIDE",
2625
- "name": "project-id",
2630
+ "name": "organization",
2626
2631
  "hasDynamicHelp": false,
2627
2632
  "helpValue": "<id>",
2628
2633
  "multiple": false,
2629
2634
  "type": "option"
2630
2635
  },
2631
- "api": {
2632
- "description": "Undeploy API with this ID",
2633
- "exclusive": [
2634
- "project-id",
2635
- "project"
2636
- ],
2637
- "name": "api",
2638
- "required": false,
2636
+ "description": {
2637
+ "description": "Knowledge base description",
2638
+ "name": "description",
2639
2639
  "hasDynamicHelp": false,
2640
2640
  "multiple": false,
2641
2641
  "type": "option"
2642
2642
  },
2643
- "dataset": {
2644
- "char": "d",
2645
- "description": "Dataset to undeploy GraphQL API from (overrides CLI configuration)",
2646
- "helpGroup": "OVERRIDE",
2647
- "name": "dataset",
2648
- "hasDynamicHelp": false,
2649
- "helpValue": "<name>",
2650
- "multiple": false,
2651
- "type": "option"
2652
- },
2653
- "force": {
2654
- "description": "Skip confirmation prompt",
2655
- "name": "force",
2656
- "allowNo": false,
2657
- "type": "boolean"
2658
- },
2659
- "project": {
2660
- "deprecated": {
2661
- "to": "project-id"
2662
- },
2663
- "description": "Project ID to delete GraphQL API for",
2664
- "hidden": true,
2665
- "name": "project",
2666
- "required": false,
2667
- "hasDynamicHelp": false,
2668
- "multiple": false,
2669
- "type": "option"
2670
- },
2671
- "tag": {
2672
- "description": "Tag to undeploy GraphQL API from",
2673
- "name": "tag",
2674
- "required": false,
2675
- "default": "default",
2643
+ "title": {
2644
+ "description": "Knowledge base title",
2645
+ "name": "title",
2676
2646
  "hasDynamicHelp": false,
2677
2647
  "multiple": false,
2678
2648
  "type": "option"
@@ -2680,251 +2650,359 @@
2680
2650
  },
2681
2651
  "hasDynamicHelp": false,
2682
2652
  "hiddenAliases": [],
2683
- "id": "graphql:undeploy",
2653
+ "id": "context:create",
2684
2654
  "pluginAlias": "@sanity/cli",
2685
2655
  "pluginName": "@sanity/cli",
2686
2656
  "pluginType": "core",
2687
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
+ },
2688
2674
  "isESM": true,
2689
2675
  "relativePath": [
2690
2676
  "dist",
2691
2677
  "commands",
2692
- "graphql",
2693
- "undeploy.js"
2678
+ "context",
2679
+ "create.js"
2694
2680
  ]
2695
2681
  },
2696
- "datasets:copy": {
2682
+ "context:delete": {
2697
2683
  "aliases": [],
2698
2684
  "args": {
2699
- "source": {
2700
- "description": "Name of the dataset to copy from",
2701
- "name": "source",
2702
- "required": false
2703
- },
2704
- "target": {
2705
- "description": "Name of the dataset to copy to",
2706
- "name": "target",
2707
- "required": false
2685
+ "knowledgeBaseId": {
2686
+ "description": "Knowledge base ID",
2687
+ "name": "knowledgeBaseId",
2688
+ "required": true
2708
2689
  }
2709
2690
  },
2710
- "description": "Copy a dataset or manage copy jobs",
2691
+ "description": "Delete a knowledge base and its generated content",
2711
2692
  "examples": [
2712
2693
  {
2713
- "command": "<%= config.bin %> <%= command.id %>",
2714
- "description": "Interactively copy a dataset"
2715
- },
2716
- {
2717
- "command": "<%= config.bin %> <%= command.id %> source-dataset",
2718
- "description": "Copy from source-dataset (prompts for target)"
2719
- },
2720
- {
2721
- "command": "<%= config.bin %> <%= command.id %> source-dataset target-dataset",
2722
- "description": "Copy from source-dataset to target-dataset"
2694
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2695
+ "description": "Delete a knowledge base after confirmation"
2723
2696
  },
2724
2697
  {
2725
- "command": "<%= config.bin %> <%= command.id %> --skip-history source target",
2726
- "description": "Copy without preserving document history (faster for large datasets)"
2727
- },
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",
2707
+ "allowNo": false,
2708
+ "type": "boolean"
2709
+ }
2710
+ },
2711
+ "hasDynamicHelp": false,
2712
+ "hiddenAliases": [],
2713
+ "id": "context:delete",
2714
+ "pluginAlias": "@sanity/cli",
2715
+ "pluginName": "@sanity/cli",
2716
+ "pluginType": "core",
2717
+ "strict": true,
2718
+ "isESM": true,
2719
+ "relativePath": [
2720
+ "dist",
2721
+ "commands",
2722
+ "context",
2723
+ "delete.js"
2724
+ ]
2725
+ },
2726
+ "context:get": {
2727
+ "aliases": [],
2728
+ "args": {
2729
+ "knowledgeBaseId": {
2730
+ "description": "Knowledge base ID",
2731
+ "name": "knowledgeBaseId",
2732
+ "required": true
2733
+ }
2734
+ },
2735
+ "description": "Get details of a knowledge base",
2736
+ "examples": [
2728
2737
  {
2729
- "command": "<%= config.bin %> <%= command.id %> --skip-content-releases source target",
2730
- "description": "Copy without content release documents"
2738
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2739
+ "description": "Get details of a specific knowledge base"
2731
2740
  },
2732
2741
  {
2733
- "command": "<%= config.bin %> <%= command.id %> --detach source target",
2734
- "description": "Start copy job without waiting for completion"
2735
- },
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": [
2736
2774
  {
2737
- "command": "<%= config.bin %> <%= command.id %> --attach <job-id>",
2738
- "description": "Attach to a running copy job to follow progress"
2775
+ "command": "<%= config.bin %> <%= command.id %>",
2776
+ "description": "List knowledge bases, selecting the organization interactively"
2739
2777
  },
2740
2778
  {
2741
- "command": "<%= config.bin %> <%= command.id %> --list",
2742
- "description": "List all dataset copy jobs"
2779
+ "command": "<%= config.bin %> <%= command.id %> --organization org-abc123",
2780
+ "description": "List knowledge bases in a specific organization"
2743
2781
  },
2744
2782
  {
2745
- "command": "<%= config.bin %> <%= command.id %> --list --offset 2 --limit 10",
2746
- "description": "List copy jobs with pagination"
2783
+ "command": "<%= config.bin %> <%= command.id %> --organization org-abc123 --json",
2784
+ "description": "Output knowledge bases as JSON"
2747
2785
  }
2748
2786
  ],
2749
2787
  "flags": {
2750
- "project-id": {
2751
- "char": "p",
2752
- "description": "Project ID to copy dataset in (overrides CLI configuration)",
2788
+ "organization": {
2789
+ "description": "Organization to list knowledge bases for (overrides CLI configuration)",
2753
2790
  "helpGroup": "OVERRIDE",
2754
- "name": "project-id",
2791
+ "name": "organization",
2755
2792
  "hasDynamicHelp": false,
2756
2793
  "helpValue": "<id>",
2757
2794
  "multiple": false,
2758
2795
  "type": "option"
2759
2796
  },
2760
- "attach": {
2761
- "description": "Attach to the running copy process to show progress",
2762
- "exclusive": [
2763
- "list",
2764
- "detach",
2765
- "skip-history"
2766
- ],
2767
- "name": "attach",
2768
- "required": false,
2769
- "hasDynamicHelp": false,
2770
- "multiple": false,
2771
- "type": "option"
2772
- },
2773
- "detach": {
2774
- "description": "Start the copy without waiting for it to finish",
2775
- "exclusive": [
2776
- "list",
2777
- "attach"
2778
- ],
2779
- "name": "detach",
2780
- "required": false,
2797
+ "json": {
2798
+ "description": "Output knowledge bases in JSON format",
2799
+ "name": "json",
2781
2800
  "allowNo": false,
2782
2801
  "type": "boolean"
2802
+ }
2803
+ },
2804
+ "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
+ }
2834
+ ],
2835
+ "flags": {},
2836
+ "hasDynamicHelp": false,
2837
+ "hiddenAliases": [],
2838
+ "id": "context:refresh",
2839
+ "pluginAlias": "@sanity/cli",
2840
+ "pluginName": "@sanity/cli",
2841
+ "pluginType": "core",
2842
+ "strict": true,
2843
+ "isESM": true,
2844
+ "relativePath": [
2845
+ "dist",
2846
+ "commands",
2847
+ "context",
2848
+ "refresh.js"
2849
+ ]
2850
+ },
2851
+ "context:update": {
2852
+ "aliases": [],
2853
+ "args": {
2854
+ "knowledgeBaseId": {
2855
+ "description": "Knowledge base ID",
2856
+ "name": "knowledgeBaseId",
2857
+ "required": true
2858
+ }
2859
+ },
2860
+ "description": "Update a knowledge base",
2861
+ "examples": [
2862
+ {
2863
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --title \"New title\"",
2864
+ "description": "Rename a knowledge base"
2783
2865
  },
2784
- "limit": {
2785
- "dependsOn": [
2786
- "list"
2787
- ],
2788
- "description": "Maximum number of jobs returned (default 10, max 1000)",
2789
- "name": "limit",
2866
+ {
2867
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --refresh-enabled --refresh-frequency weekly",
2868
+ "description": "Enable weekly scheduled refresh"
2869
+ },
2870
+ {
2871
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --no-refresh-enabled",
2872
+ "description": "Disable scheduled refresh"
2873
+ }
2874
+ ],
2875
+ "flags": {
2876
+ "description": {
2877
+ "description": "New knowledge base description",
2878
+ "name": "description",
2790
2879
  "required": false,
2791
2880
  "hasDynamicHelp": false,
2792
2881
  "multiple": false,
2793
2882
  "type": "option"
2794
2883
  },
2795
- "list": {
2796
- "description": "Lists all dataset copy jobs",
2797
- "exclusive": [
2798
- "attach",
2799
- "detach",
2800
- "skip-history"
2801
- ],
2802
- "name": "list",
2884
+ "refresh-enabled": {
2885
+ "description": "Enable scheduled refresh (--no-refresh-enabled to disable)",
2886
+ "name": "refresh-enabled",
2803
2887
  "required": false,
2804
- "allowNo": false,
2888
+ "allowNo": true,
2805
2889
  "type": "boolean"
2806
2890
  },
2807
- "offset": {
2808
- "dependsOn": [
2809
- "list"
2810
- ],
2811
- "description": "Start position in the list of jobs (default 0)",
2812
- "name": "offset",
2891
+ "refresh-frequency": {
2892
+ "description": "How often scheduled refresh runs",
2893
+ "name": "refresh-frequency",
2813
2894
  "required": false,
2814
2895
  "hasDynamicHelp": false,
2815
2896
  "multiple": false,
2816
- "type": "option"
2817
- },
2818
- "skip-content-releases": {
2819
- "description": "Don't copy content release documents to the target dataset",
2820
- "exclusive": [
2821
- "list",
2822
- "attach"
2823
- ],
2824
- "name": "skip-content-releases",
2825
- "required": false,
2826
- "allowNo": false,
2827
- "type": "boolean"
2828
- },
2829
- "skip-history": {
2830
- "description": "Don't preserve document history on copy",
2831
- "exclusive": [
2832
- "list",
2833
- "attach"
2897
+ "options": [
2898
+ "weekly",
2899
+ "monthly"
2834
2900
  ],
2835
- "name": "skip-history",
2901
+ "type": "option"
2902
+ },
2903
+ "title": {
2904
+ "description": "New knowledge base title",
2905
+ "name": "title",
2836
2906
  "required": false,
2837
- "allowNo": false,
2838
- "type": "boolean"
2907
+ "hasDynamicHelp": false,
2908
+ "multiple": false,
2909
+ "type": "option"
2839
2910
  }
2840
2911
  },
2841
2912
  "hasDynamicHelp": false,
2842
- "hiddenAliases": [
2843
- "dataset:copy"
2844
- ],
2845
- "id": "datasets:copy",
2913
+ "hiddenAliases": [],
2914
+ "id": "context:update",
2846
2915
  "pluginAlias": "@sanity/cli",
2847
2916
  "pluginName": "@sanity/cli",
2848
2917
  "pluginType": "core",
2849
2918
  "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
+ },
2850
2935
  "isESM": true,
2851
2936
  "relativePath": [
2852
2937
  "dist",
2853
2938
  "commands",
2854
- "datasets",
2855
- "copy.js"
2939
+ "context",
2940
+ "update.js"
2856
2941
  ]
2857
2942
  },
2858
- "datasets:create": {
2943
+ "docs:browse": {
2944
+ "aliases": [],
2945
+ "args": {},
2946
+ "description": "Open Sanity docs in your browser",
2947
+ "flags": {},
2948
+ "hasDynamicHelp": false,
2949
+ "hiddenAliases": [],
2950
+ "id": "docs:browse",
2951
+ "pluginAlias": "@sanity/cli",
2952
+ "pluginName": "@sanity/cli",
2953
+ "pluginType": "core",
2954
+ "strict": true,
2955
+ "enableJsonFlag": false,
2956
+ "isESM": true,
2957
+ "relativePath": [
2958
+ "dist",
2959
+ "commands",
2960
+ "docs",
2961
+ "browse.js"
2962
+ ]
2963
+ },
2964
+ "docs:read": {
2859
2965
  "aliases": [],
2860
2966
  "args": {
2861
- "name": {
2862
- "description": "Name of the dataset to create",
2863
- "name": "name",
2864
- "required": false
2967
+ "path": {
2968
+ "description": "Path or URL to article, found in search results and docs content as links",
2969
+ "name": "path",
2970
+ "required": true
2865
2971
  }
2866
2972
  },
2867
- "description": "Create a new dataset for the project",
2973
+ "description": "Read an article in terminal",
2868
2974
  "examples": [
2869
2975
  {
2870
- "command": "<%= config.bin %> <%= command.id %>",
2871
- "description": "Interactively create a dataset"
2976
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
2977
+ "description": "Read as markdown in terminal"
2872
2978
  },
2873
2979
  {
2874
- "command": "<%= config.bin %> <%= command.id %> my-dataset",
2875
- "description": "Create a dataset named \"my-dataset\""
2980
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
2981
+ "description": "Read using full URL"
2876
2982
  },
2877
2983
  {
2878
- "command": "<%= config.bin %> <%= command.id %> my-dataset --visibility private",
2879
- "description": "Create a private dataset named \"my-dataset\""
2984
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
2985
+ "description": "Open in web browser"
2986
+ },
2987
+ {
2988
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
2989
+ "description": "Open using full URL in web browser"
2880
2990
  }
2881
2991
  ],
2882
2992
  "flags": {
2883
- "project-id": {
2884
- "char": "p",
2885
- "description": "Project ID to create dataset in (overrides CLI configuration)",
2886
- "helpGroup": "OVERRIDE",
2887
- "name": "project-id",
2888
- "hasDynamicHelp": false,
2889
- "helpValue": "<id>",
2890
- "multiple": false,
2891
- "type": "option"
2892
- },
2893
- "embeddings": {
2894
- "description": "Enable embeddings for this dataset",
2895
- "name": "embeddings",
2993
+ "web": {
2994
+ "aliases": [
2995
+ "w"
2996
+ ],
2997
+ "description": "Open in a web browser",
2998
+ "name": "web",
2896
2999
  "allowNo": false,
2897
3000
  "type": "boolean"
2898
- },
2899
- "embeddings-projection": {
2900
- "dependsOn": [
2901
- "embeddings"
2902
- ],
2903
- "description": "GROQ projection for embeddings indexing (e.g. \"{ title, body }\")",
2904
- "name": "embeddings-projection",
2905
- "hasDynamicHelp": false,
2906
- "multiple": false,
2907
- "type": "option"
2908
- },
2909
- "visibility": {
2910
- "description": "Set visibility for this dataset (custom/private/public)",
2911
- "name": "visibility",
2912
- "required": false,
2913
- "hasDynamicHelp": false,
2914
- "multiple": false,
2915
- "options": [
2916
- "custom",
2917
- "private",
2918
- "public"
2919
- ],
2920
- "type": "option"
2921
3001
  }
2922
3002
  },
2923
3003
  "hasDynamicHelp": false,
2924
- "hiddenAliases": [
2925
- "dataset:create"
2926
- ],
2927
- "id": "datasets:create",
3004
+ "hiddenAliases": [],
3005
+ "id": "docs:read",
2928
3006
  "pluginAlias": "@sanity/cli",
2929
3007
  "pluginName": "@sanity/cli",
2930
3008
  "pluginType": "core",
@@ -2933,53 +3011,47 @@
2933
3011
  "relativePath": [
2934
3012
  "dist",
2935
3013
  "commands",
2936
- "datasets",
2937
- "create.js"
3014
+ "docs",
3015
+ "read.js"
2938
3016
  ]
2939
3017
  },
2940
- "datasets:delete": {
3018
+ "docs:search": {
2941
3019
  "aliases": [],
2942
3020
  "args": {
2943
- "datasetName": {
2944
- "description": "Dataset name to delete",
2945
- "name": "datasetName",
3021
+ "query": {
3022
+ "description": "Search query for documentation",
3023
+ "name": "query",
2946
3024
  "required": true
2947
3025
  }
2948
3026
  },
2949
- "description": "Delete a dataset from the project",
3027
+ "description": "Search Sanity docs",
2950
3028
  "examples": [
2951
3029
  {
2952
- "command": "<%= config.bin %> <%= command.id %> my-dataset",
2953
- "description": "Delete a specific dataset"
3030
+ "command": "<%= config.bin %> <%= command.id %> schema",
3031
+ "description": "Search for documentation about schemas"
2954
3032
  },
2955
3033
  {
2956
- "command": "<%= config.bin %> <%= command.id %> my-dataset --force",
2957
- "description": "Delete a specific dataset without confirmation"
3034
+ "command": "<%= config.bin %> <%= command.id %> \"groq functions\"",
3035
+ "description": "Search with phrase"
3036
+ },
3037
+ {
3038
+ "command": "<%= config.bin %> <%= command.id %> \"deployment\" --limit=5",
3039
+ "description": "Limit search results"
2958
3040
  }
2959
3041
  ],
2960
3042
  "flags": {
2961
- "project-id": {
2962
- "char": "p",
2963
- "description": "Project ID to delete dataset from (overrides CLI configuration)",
2964
- "helpGroup": "OVERRIDE",
2965
- "name": "project-id",
3043
+ "limit": {
3044
+ "description": "Maximum number of results to return",
3045
+ "name": "limit",
3046
+ "default": 10,
2966
3047
  "hasDynamicHelp": false,
2967
- "helpValue": "<id>",
2968
3048
  "multiple": false,
2969
3049
  "type": "option"
2970
- },
2971
- "force": {
2972
- "description": "Do not prompt for delete confirmation - forcefully delete",
2973
- "name": "force",
2974
- "allowNo": false,
2975
- "type": "boolean"
2976
3050
  }
2977
3051
  },
2978
3052
  "hasDynamicHelp": false,
2979
- "hiddenAliases": [
2980
- "dataset:delete"
2981
- ],
2982
- "id": "datasets:delete",
3053
+ "hiddenAliases": [],
3054
+ "id": "docs:search",
2983
3055
  "pluginAlias": "@sanity/cli",
2984
3056
  "pluginName": "@sanity/cli",
2985
3057
  "pluginType": "core",
@@ -2988,49 +3060,46 @@
2988
3060
  "relativePath": [
2989
3061
  "dist",
2990
3062
  "commands",
2991
- "datasets",
2992
- "delete.js"
3063
+ "docs",
3064
+ "search.js"
2993
3065
  ]
2994
3066
  },
2995
- "datasets:export": {
3067
+ "documents:create": {
2996
3068
  "aliases": [],
2997
3069
  "args": {
2998
- "name": {
2999
- "description": "Name of the dataset to export",
3000
- "name": "name"
3001
- },
3002
- "destination": {
3003
- "description": "Output destination file path",
3004
- "name": "destination"
3070
+ "file": {
3071
+ "description": "JSON file to create document(s) from",
3072
+ "name": "file",
3073
+ "required": false
3005
3074
  }
3006
3075
  },
3007
- "description": "Export a dataset to a local gzipped tarball. Assets returning 401, 403, or 404 are excluded from the export.",
3076
+ "description": "Create one or more documents",
3008
3077
  "examples": [
3009
3078
  {
3010
- "command": "<%= config.bin %> <%= command.id %> moviedb localPath.tar.gz",
3011
- "description": "Export dataset \"moviedb\" to localPath.tar.gz"
3079
+ "command": "<%= config.bin %> <%= command.id %> myDocument.json",
3080
+ "description": "Create the document specified in \"myDocument.json\""
3012
3081
  },
3013
3082
  {
3014
- "command": "<%= config.bin %> <%= command.id %> moviedb assetless.tar.gz --no-assets",
3015
- "description": "Export dataset without assets"
3083
+ "command": "<%= config.bin %> <%= command.id %>",
3084
+ "description": "Open configured $EDITOR and create the specified document(s)"
3016
3085
  },
3017
3086
  {
3018
- "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --raw",
3019
- "description": "Export raw documents without asset reference rewriting"
3087
+ "command": "<%= config.bin %> <%= command.id %> --id myDocId --replace",
3088
+ "description": "Fetch document with the ID \"myDocId\" and open configured $EDITOR with the current document content (if any). Replace document with the edited version when the editor closes"
3020
3089
  },
3021
3090
  {
3022
- "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --types products,shops",
3023
- "description": "Export specific document types"
3091
+ "command": "<%= config.bin %> <%= command.id %> --id myDocId --watch --replace --json5",
3092
+ "description": "Open configured $EDITOR and replace the document with the given content on each save. Use JSON5 file extension and parser for simplified syntax."
3024
3093
  },
3025
3094
  {
3026
- "command": "<%= config.bin %> <%= command.id %> moviedb moviedb.tar.gz --no-strict-asset-verification",
3027
- "description": "Export dataset without aborting on asset verification failures"
3095
+ "command": "<%= config.bin %> <%= command.id %> myDocument.json --project-id abc123",
3096
+ "description": "Create documents in a specific project"
3028
3097
  }
3029
3098
  ],
3030
3099
  "flags": {
3031
3100
  "project-id": {
3032
3101
  "char": "p",
3033
- "description": "Project ID to export dataset from (overrides CLI configuration)",
3102
+ "description": "Project ID to create document(s) in (overrides CLI configuration)",
3034
3103
  "helpGroup": "OVERRIDE",
3035
3104
  "name": "project-id",
3036
3105
  "hasDynamicHelp": false,
@@ -3038,75 +3107,53 @@
3038
3107
  "multiple": false,
3039
3108
  "type": "option"
3040
3109
  },
3041
- "asset-concurrency": {
3042
- "description": "Concurrent number of asset downloads",
3043
- "name": "asset-concurrency",
3044
- "default": 8,
3110
+ "dataset": {
3111
+ "char": "d",
3112
+ "description": "Dataset to create document(s) in (overrides CLI configuration)",
3113
+ "helpGroup": "OVERRIDE",
3114
+ "name": "dataset",
3045
3115
  "hasDynamicHelp": false,
3116
+ "helpValue": "<name>",
3046
3117
  "multiple": false,
3047
3118
  "type": "option"
3048
3119
  },
3049
- "mode": {
3050
- "description": "Export mode ('cursor' is faster for large datasets but may miss concurrent changes)",
3051
- "name": "mode",
3052
- "default": "stream",
3120
+ "id": {
3121
+ "description": "Specify a document ID to use. Will fetch remote document ID and populate editor.",
3122
+ "name": "id",
3053
3123
  "hasDynamicHelp": false,
3054
- "multiple": false,
3055
- "options": [
3056
- "stream",
3057
- "cursor"
3058
- ],
3059
- "type": "option"
3060
- },
3061
- "no-assets": {
3062
- "description": "Export only non-asset documents and remove references to image assets",
3063
- "name": "no-assets",
3064
- "allowNo": false,
3065
- "type": "boolean"
3066
- },
3067
- "no-compress": {
3068
- "description": "Skips compressing tarball entries (still generates a gzip file)",
3069
- "name": "no-compress",
3070
- "allowNo": false,
3071
- "type": "boolean"
3124
+ "multiple": false,
3125
+ "type": "option"
3072
3126
  },
3073
- "no-drafts": {
3074
- "description": "Export only published versions of documents",
3075
- "name": "no-drafts",
3127
+ "json5": {
3128
+ "description": "Use JSON5 file type to allow a \"simplified\" version of JSON",
3129
+ "name": "json5",
3076
3130
  "allowNo": false,
3077
3131
  "type": "boolean"
3078
3132
  },
3079
- "no-strict-asset-verification": {
3080
- "description": "Do not abort the export when an asset fails hash or content-length verification",
3081
- "name": "no-strict-asset-verification",
3133
+ "missing": {
3134
+ "description": "On duplicate document IDs, don't modify the target document(s)",
3135
+ "name": "missing",
3082
3136
  "allowNo": false,
3083
3137
  "type": "boolean"
3084
3138
  },
3085
- "overwrite": {
3086
- "description": "Overwrite any file with the same name",
3087
- "name": "overwrite",
3139
+ "replace": {
3140
+ "description": "On duplicate document IDs, replace existing document with specified document(s)",
3141
+ "name": "replace",
3088
3142
  "allowNo": false,
3089
3143
  "type": "boolean"
3090
3144
  },
3091
- "raw": {
3092
- "description": "Extract only documents, without rewriting asset references",
3093
- "name": "raw",
3145
+ "watch": {
3146
+ "description": "Write the documents whenever the target file or buffer changes",
3147
+ "name": "watch",
3094
3148
  "allowNo": false,
3095
3149
  "type": "boolean"
3096
- },
3097
- "types": {
3098
- "description": "Defines which document types to export (comma-separated)",
3099
- "name": "types",
3100
- "hasDynamicHelp": false,
3101
- "multiple": false,
3102
- "type": "option"
3103
3150
  }
3104
3151
  },
3105
3152
  "hasDynamicHelp": false,
3106
3153
  "hiddenAliases": [
3107
- "dataset:export"
3154
+ "document:create"
3108
3155
  ],
3109
- "id": "datasets:export",
3156
+ "id": "documents:create",
3110
3157
  "pluginAlias": "@sanity/cli",
3111
3158
  "pluginName": "@sanity/cli",
3112
3159
  "pluginType": "core",
@@ -3115,96 +3162,51 @@
3115
3162
  "relativePath": [
3116
3163
  "dist",
3117
3164
  "commands",
3118
- "datasets",
3119
- "export.js"
3165
+ "documents",
3166
+ "create.js"
3120
3167
  ]
3121
3168
  },
3122
- "datasets:import": {
3169
+ "documents:delete": {
3123
3170
  "aliases": [],
3124
3171
  "args": {
3125
- "source": {
3126
- "description": "Source file (use \"-\" for stdin)",
3127
- "name": "source",
3172
+ "id": {
3173
+ "description": "Document ID to delete",
3174
+ "name": "id",
3128
3175
  "required": true
3129
3176
  },
3130
- "targetDataset": {
3131
- "description": "Target dataset (prefer --dataset flag instead)",
3132
- "name": "targetDataset",
3177
+ "ids": {
3178
+ "description": "Additional document IDs to delete",
3179
+ "name": "ids",
3133
3180
  "required": false
3134
3181
  }
3135
3182
  },
3136
- "description": "Import documents to a Sanity dataset",
3183
+ "description": "Delete one or more documents from the project's configured dataset",
3137
3184
  "examples": [
3138
3185
  {
3139
- "command": "<%= config.bin %> <%= command.id %> -d staging my-dataset.ndjson",
3140
- "description": "Import \"./my-dataset.ndjson\" into dataset \"staging\""
3186
+ "command": "<%= config.bin %> <%= command.id %> myDocId",
3187
+ "description": "Delete the document with the ID \"myDocId\""
3141
3188
  },
3142
3189
  {
3143
- "command": "cat my-dataset.ndjson | <%= config.bin %> <%= command.id %> -d test -",
3144
- "description": "Import into dataset \"test\" from stdin"
3190
+ "command": "<%= config.bin %> <%= command.id %> 'myDocId'",
3191
+ "description": "ID wrapped in double or single quote works equally well"
3145
3192
  },
3146
3193
  {
3147
- "command": "<%= config.bin %> <%= command.id %> -p projectId -d staging my-dataset.ndjson",
3148
- "description": "Import with explicit project ID (overrides CLI configuration)"
3194
+ "command": "<%= config.bin %> <%= command.id %> --dataset=blog someDocId",
3195
+ "description": "Delete document with ID \"someDocId\" from dataset \"blog\""
3149
3196
  },
3150
3197
  {
3151
- "command": "<%= config.bin %> <%= command.id %> -d staging -t someSecretToken my-dataset.ndjson",
3152
- "description": "Import with an explicit token (e.g. for CI/CD)"
3198
+ "command": "<%= config.bin %> <%= command.id %> doc1 doc2",
3199
+ "description": "Delete the document with ID \"doc1\" and \"doc2\""
3200
+ },
3201
+ {
3202
+ "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
3203
+ "description": "Delete a document from a specific project"
3153
3204
  }
3154
3205
  ],
3155
3206
  "flags": {
3156
- "allow-assets-in-different-dataset": {
3157
- "description": "Allow asset documents to reference different project/dataset",
3158
- "name": "allow-assets-in-different-dataset",
3159
- "allowNo": false,
3160
- "type": "boolean"
3161
- },
3162
- "allow-failing-assets": {
3163
- "description": "Skip assets that cannot be fetched/uploaded",
3164
- "name": "allow-failing-assets",
3165
- "allowNo": false,
3166
- "type": "boolean"
3167
- },
3168
- "allow-replacement-characters": {
3169
- "description": "Allow unicode replacement characters in imported documents",
3170
- "name": "allow-replacement-characters",
3171
- "allowNo": false,
3172
- "type": "boolean"
3173
- },
3174
- "allow-system-documents": {
3175
- "description": "Imports system documents",
3176
- "name": "allow-system-documents",
3177
- "allowNo": false,
3178
- "type": "boolean"
3179
- },
3180
- "asset-concurrency": {
3181
- "description": "Number of parallel asset imports",
3182
- "name": "asset-concurrency",
3183
- "hasDynamicHelp": false,
3184
- "multiple": false,
3185
- "type": "option"
3186
- },
3187
- "dataset": {
3188
- "char": "d",
3189
- "description": "Dataset to import to",
3190
- "name": "dataset",
3191
- "hasDynamicHelp": false,
3192
- "helpValue": "<name>",
3193
- "multiple": false,
3194
- "type": "option"
3195
- },
3196
- "missing": {
3197
- "description": "Skip documents that already exist",
3198
- "exclusive": [
3199
- "replace"
3200
- ],
3201
- "name": "missing",
3202
- "allowNo": false,
3203
- "type": "boolean"
3204
- },
3205
3207
  "project-id": {
3206
3208
  "char": "p",
3207
- "description": "Project ID to import to (overrides CLI configuration)",
3209
+ "description": "Project ID to delete from (overrides CLI configuration)",
3208
3210
  "helpGroup": "OVERRIDE",
3209
3211
  "name": "project-id",
3210
3212
  "hasDynamicHelp": false,
@@ -3212,97 +3214,95 @@
3212
3214
  "multiple": false,
3213
3215
  "type": "option"
3214
3216
  },
3215
- "project": {
3216
- "deprecated": {
3217
- "to": "project-id"
3218
- },
3219
- "description": "Project ID to import to",
3220
- "hidden": true,
3221
- "name": "project",
3222
- "hasDynamicHelp": false,
3223
- "multiple": false,
3224
- "type": "option"
3225
- },
3226
- "replace": {
3227
- "description": "Replace documents with the same IDs",
3228
- "exclusive": [
3229
- "missing"
3230
- ],
3231
- "name": "replace",
3232
- "allowNo": false,
3233
- "type": "boolean"
3234
- },
3235
- "replace-assets": {
3236
- "description": "Skip reuse of existing assets",
3237
- "name": "replace-assets",
3238
- "allowNo": false,
3239
- "type": "boolean"
3240
- },
3241
- "skip-cross-dataset-references": {
3242
- "description": "Skips references to other datasets",
3243
- "name": "skip-cross-dataset-references",
3244
- "allowNo": false,
3245
- "type": "boolean"
3246
- },
3247
- "token": {
3248
- "char": "t",
3249
- "description": "Token to authenticate with",
3250
- "env": "SANITY_IMPORT_TOKEN",
3251
- "name": "token",
3252
- "required": false,
3217
+ "dataset": {
3218
+ "char": "d",
3219
+ "description": "Dataset to delete from (overrides CLI configuration)",
3220
+ "helpGroup": "OVERRIDE",
3221
+ "name": "dataset",
3253
3222
  "hasDynamicHelp": false,
3223
+ "helpValue": "<name>",
3254
3224
  "multiple": false,
3255
3225
  "type": "option"
3256
3226
  }
3257
3227
  },
3258
3228
  "hasDynamicHelp": false,
3259
3229
  "hiddenAliases": [
3260
- "dataset:import"
3230
+ "document:delete"
3261
3231
  ],
3262
- "id": "datasets:import",
3232
+ "id": "documents:delete",
3263
3233
  "pluginAlias": "@sanity/cli",
3264
3234
  "pluginName": "@sanity/cli",
3265
3235
  "pluginType": "core",
3266
- "strict": true,
3236
+ "strict": false,
3267
3237
  "isESM": true,
3268
3238
  "relativePath": [
3269
3239
  "dist",
3270
3240
  "commands",
3271
- "datasets",
3272
- "import.js"
3241
+ "documents",
3242
+ "delete.js"
3273
3243
  ]
3274
3244
  },
3275
- "datasets:list": {
3245
+ "documents:get": {
3276
3246
  "aliases": [],
3277
- "args": {},
3278
- "description": "List datasets for the project",
3247
+ "args": {
3248
+ "documentId": {
3249
+ "description": "Document ID to retrieve",
3250
+ "name": "documentId",
3251
+ "required": true
3252
+ }
3253
+ },
3254
+ "description": "Get and print a document by ID",
3279
3255
  "examples": [
3280
3256
  {
3281
- "command": "<%= config.bin %> <%= command.id %>",
3282
- "description": "List datasets for the project"
3257
+ "command": "<%= config.bin %> <%= command.id %> myDocId",
3258
+ "description": "Get the document with ID \"myDocId\""
3283
3259
  },
3284
3260
  {
3285
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3286
- "description": "List datasets for a specific project"
3261
+ "command": "<%= config.bin %> <%= command.id %> myDocId --pretty",
3262
+ "description": "Get document with colorized JSON output"
3263
+ },
3264
+ {
3265
+ "command": "<%= config.bin %> <%= command.id %> myDocId --dataset production",
3266
+ "description": "Get document from a specific dataset"
3267
+ },
3268
+ {
3269
+ "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
3270
+ "description": "Get a document from a specific project"
3287
3271
  }
3288
3272
  ],
3289
3273
  "flags": {
3290
3274
  "project-id": {
3291
3275
  "char": "p",
3292
- "description": "Project ID to list datasets for (overrides CLI configuration)",
3276
+ "description": "Project ID to get document from (overrides CLI configuration)",
3293
3277
  "helpGroup": "OVERRIDE",
3294
3278
  "name": "project-id",
3295
3279
  "hasDynamicHelp": false,
3296
3280
  "helpValue": "<id>",
3297
3281
  "multiple": false,
3298
3282
  "type": "option"
3283
+ },
3284
+ "dataset": {
3285
+ "char": "d",
3286
+ "description": "Dataset to get document from (overrides CLI configuration)",
3287
+ "helpGroup": "OVERRIDE",
3288
+ "name": "dataset",
3289
+ "hasDynamicHelp": false,
3290
+ "helpValue": "<name>",
3291
+ "multiple": false,
3292
+ "type": "option"
3293
+ },
3294
+ "pretty": {
3295
+ "description": "Colorize JSON output",
3296
+ "name": "pretty",
3297
+ "allowNo": false,
3298
+ "type": "boolean"
3299
3299
  }
3300
3300
  },
3301
3301
  "hasDynamicHelp": false,
3302
3302
  "hiddenAliases": [
3303
- "dataset:list"
3303
+ "document:get"
3304
3304
  ],
3305
- "id": "datasets:list",
3305
+ "id": "documents:get",
3306
3306
  "pluginAlias": "@sanity/cli",
3307
3307
  "pluginName": "@sanity/cli",
3308
3308
  "pluginType": "core",
@@ -3311,46 +3311,42 @@
3311
3311
  "relativePath": [
3312
3312
  "dist",
3313
3313
  "commands",
3314
- "datasets",
3315
- "list.js"
3314
+ "documents",
3315
+ "get.js"
3316
3316
  ]
3317
3317
  },
3318
- "documents:create": {
3318
+ "documents:query": {
3319
3319
  "aliases": [],
3320
3320
  "args": {
3321
- "file": {
3322
- "description": "JSON file to create document(s) from",
3323
- "name": "file",
3324
- "required": false
3321
+ "query": {
3322
+ "description": "GROQ query to run against the dataset",
3323
+ "name": "query",
3324
+ "required": true
3325
3325
  }
3326
3326
  },
3327
- "description": "Create one or more documents",
3327
+ "description": "Query for documents",
3328
3328
  "examples": [
3329
3329
  {
3330
- "command": "<%= config.bin %> <%= command.id %> myDocument.json",
3331
- "description": "Create the document specified in \"myDocument.json\""
3332
- },
3333
- {
3334
- "command": "<%= config.bin %> <%= command.id %>",
3335
- "description": "Open configured $EDITOR and create the specified document(s)"
3330
+ "command": "<%= config.bin %> <%= command.id %> '*[_type == \"movie\"][0..4]'",
3331
+ "description": "Fetch 5 documents of type \"movie\""
3336
3332
  },
3337
3333
  {
3338
- "command": "<%= config.bin %> <%= command.id %> --id myDocId --replace",
3339
- "description": "Fetch document with the ID \"myDocId\" and open configured $EDITOR with the current document content (if any). Replace document with the edited version when the editor closes"
3334
+ "command": "<%= config.bin %> <%= command.id %> '*[_type == \"movie\"]|order(releaseDate asc)[0]{title}' --dataset staging",
3335
+ "description": "Fetch title of the oldest movie in the dataset named \"staging\""
3340
3336
  },
3341
3337
  {
3342
- "command": "<%= config.bin %> <%= command.id %> --id myDocId --watch --replace --json5",
3343
- "description": "Open configured $EDITOR and replace the document with the given content on each save. Use JSON5 file extension and parser for simplified syntax."
3338
+ "command": "<%= config.bin %> <%= command.id %> '*[_id == \"header\"] { \"headerText\": pt::text(body) }' --api-version v2021-06-07",
3339
+ "description": "Use API version v2021-06-07 and do a query"
3344
3340
  },
3345
3341
  {
3346
- "command": "<%= config.bin %> <%= command.id %> myDocument.json --project-id abc123",
3347
- "description": "Create documents in a specific project"
3342
+ "command": "<%= config.bin %> <%= command.id %> '*[_type == \"post\"]' --project-id abc123 --dataset production",
3343
+ "description": "Query documents in a specific project and dataset"
3348
3344
  }
3349
3345
  ],
3350
3346
  "flags": {
3351
3347
  "project-id": {
3352
3348
  "char": "p",
3353
- "description": "Project ID to create document(s) in (overrides CLI configuration)",
3349
+ "description": "Project ID to query (overrides CLI configuration)",
3354
3350
  "helpGroup": "OVERRIDE",
3355
3351
  "name": "project-id",
3356
3352
  "hasDynamicHelp": false,
@@ -3360,7 +3356,7 @@
3360
3356
  },
3361
3357
  "dataset": {
3362
3358
  "char": "d",
3363
- "description": "Dataset to create document(s) in (overrides CLI configuration)",
3359
+ "description": "Dataset to query (overrides CLI configuration)",
3364
3360
  "helpGroup": "OVERRIDE",
3365
3361
  "name": "dataset",
3366
3362
  "hasDynamicHelp": false,
@@ -3368,43 +3364,42 @@
3368
3364
  "multiple": false,
3369
3365
  "type": "option"
3370
3366
  },
3371
- "id": {
3372
- "description": "Specify a document ID to use. Will fetch remote document ID and populate editor.",
3373
- "name": "id",
3374
- "hasDynamicHelp": false,
3375
- "multiple": false,
3376
- "type": "option"
3377
- },
3378
- "json5": {
3379
- "description": "Use JSON5 file type to allow a \"simplified\" version of JSON",
3380
- "name": "json5",
3367
+ "anonymous": {
3368
+ "description": "Send the query without any authorization token",
3369
+ "name": "anonymous",
3381
3370
  "allowNo": false,
3382
3371
  "type": "boolean"
3383
3372
  },
3384
- "missing": {
3385
- "description": "On duplicate document IDs, don't modify the target document(s)",
3386
- "name": "missing",
3387
- "allowNo": false,
3388
- "type": "boolean"
3373
+ "api-version": {
3374
+ "description": "API version to use (defaults to 2025-08-15)",
3375
+ "name": "api-version",
3376
+ "hasDynamicHelp": false,
3377
+ "multiple": false,
3378
+ "type": "option"
3389
3379
  },
3390
- "replace": {
3391
- "description": "On duplicate document IDs, replace existing document with specified document(s)",
3392
- "name": "replace",
3380
+ "pretty": {
3381
+ "description": "Colorize JSON output",
3382
+ "name": "pretty",
3393
3383
  "allowNo": false,
3394
3384
  "type": "boolean"
3395
3385
  },
3396
- "watch": {
3397
- "description": "Write the documents whenever the target file or buffer changes",
3398
- "name": "watch",
3399
- "allowNo": false,
3400
- "type": "boolean"
3386
+ "project": {
3387
+ "deprecated": {
3388
+ "to": "project-id"
3389
+ },
3390
+ "description": "Project ID to query",
3391
+ "hidden": true,
3392
+ "name": "project",
3393
+ "hasDynamicHelp": false,
3394
+ "multiple": false,
3395
+ "type": "option"
3401
3396
  }
3402
3397
  },
3403
3398
  "hasDynamicHelp": false,
3404
3399
  "hiddenAliases": [
3405
- "document:create"
3400
+ "document:query"
3406
3401
  ],
3407
- "id": "documents:create",
3402
+ "id": "documents:query",
3408
3403
  "pluginAlias": "@sanity/cli",
3409
3404
  "pluginName": "@sanity/cli",
3410
3405
  "pluginType": "core",
@@ -3414,51 +3409,39 @@
3414
3409
  "dist",
3415
3410
  "commands",
3416
3411
  "documents",
3417
- "create.js"
3412
+ "query.js"
3418
3413
  ]
3419
3414
  },
3420
- "documents:delete": {
3415
+ "documents:validate": {
3421
3416
  "aliases": [],
3422
- "args": {
3423
- "id": {
3424
- "description": "Document ID to delete",
3425
- "name": "id",
3426
- "required": true
3427
- },
3428
- "ids": {
3429
- "description": "Additional document IDs to delete",
3430
- "name": "ids",
3431
- "required": false
3432
- }
3433
- },
3434
- "description": "Delete one or more documents from the project's configured dataset",
3417
+ "args": {},
3418
+ "description": "Validate documents in a dataset against the studio schema",
3435
3419
  "examples": [
3436
3420
  {
3437
- "command": "<%= config.bin %> <%= command.id %> myDocId",
3438
- "description": "Delete the document with the ID \"myDocId\""
3421
+ "command": "<%= config.bin %> <%= command.id %> --workspace default",
3422
+ "description": "Validates all documents in a Sanity project with more than one workspace"
3439
3423
  },
3440
3424
  {
3441
- "command": "<%= config.bin %> <%= command.id %> 'myDocId'",
3442
- "description": "ID wrapped in double or single quote works equally well"
3425
+ "command": "<%= config.bin %> <%= command.id %> --workspace default --dataset staging",
3426
+ "description": "Override the dataset specified in the workspace"
3443
3427
  },
3444
3428
  {
3445
- "command": "<%= config.bin %> <%= command.id %> --dataset=blog someDocId",
3446
- "description": "Delete document with ID \"someDocId\" from dataset \"blog\""
3429
+ "command": "<%= config.bin %> <%= command.id %> --yes > report.txt",
3430
+ "description": "Save the results of the report into a file"
3447
3431
  },
3448
3432
  {
3449
- "command": "<%= config.bin %> <%= command.id %> doc1 doc2",
3450
- "description": "Delete the document with ID \"doc1\" and \"doc2\""
3433
+ "command": "<%= config.bin %> <%= command.id %> --level info",
3434
+ "description": "Report out info level validation markers too"
3451
3435
  },
3452
3436
  {
3453
- "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
3454
- "description": "Delete a document from a specific project"
3437
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
3438
+ "description": "Validate documents in a specific project and dataset"
3455
3439
  }
3456
3440
  ],
3457
3441
  "flags": {
3458
3442
  "project-id": {
3459
3443
  "char": "p",
3460
- "description": "Project ID to delete from (overrides CLI configuration)",
3461
- "helpGroup": "OVERRIDE",
3444
+ "description": "Override the project ID used. By default, this is derived from the given workspace",
3462
3445
  "name": "project-id",
3463
3446
  "hasDynamicHelp": false,
3464
3447
  "helpValue": "<id>",
@@ -3467,93 +3450,185 @@
3467
3450
  },
3468
3451
  "dataset": {
3469
3452
  "char": "d",
3470
- "description": "Dataset to delete from (overrides CLI configuration)",
3471
- "helpGroup": "OVERRIDE",
3453
+ "description": "Override the dataset used. By default, this is derived from the given workspace",
3472
3454
  "name": "dataset",
3473
3455
  "hasDynamicHelp": false,
3474
3456
  "helpValue": "<name>",
3475
3457
  "multiple": false,
3476
3458
  "type": "option"
3459
+ },
3460
+ "file": {
3461
+ "description": "Path to an NDJSON file or tar archive containing an NDJSON file (optionally gzip-compressed)",
3462
+ "name": "file",
3463
+ "hasDynamicHelp": false,
3464
+ "multiple": false,
3465
+ "type": "option"
3466
+ },
3467
+ "format": {
3468
+ "description": "The output format used to print the found validation markers and report progress",
3469
+ "name": "format",
3470
+ "hasDynamicHelp": false,
3471
+ "multiple": false,
3472
+ "options": [
3473
+ "json",
3474
+ "ndjson",
3475
+ "pretty"
3476
+ ],
3477
+ "type": "option"
3478
+ },
3479
+ "level": {
3480
+ "description": "The minimum level reported. Defaults to warning",
3481
+ "name": "level",
3482
+ "default": "warning",
3483
+ "hasDynamicHelp": false,
3484
+ "multiple": false,
3485
+ "options": [
3486
+ "error",
3487
+ "warning",
3488
+ "info"
3489
+ ],
3490
+ "type": "option"
3491
+ },
3492
+ "max-custom-validation-concurrency": {
3493
+ "description": "Specify how many custom validators can run concurrently",
3494
+ "name": "max-custom-validation-concurrency",
3495
+ "default": 5,
3496
+ "hasDynamicHelp": false,
3497
+ "multiple": false,
3498
+ "type": "option"
3499
+ },
3500
+ "max-fetch-concurrency": {
3501
+ "description": "Specify how many `client.fetch` requests are allowed to run concurrently",
3502
+ "name": "max-fetch-concurrency",
3503
+ "default": 25,
3504
+ "hasDynamicHelp": false,
3505
+ "multiple": false,
3506
+ "type": "option"
3507
+ },
3508
+ "workspace": {
3509
+ "description": "The name of the workspace to use when downloading and validating all documents",
3510
+ "name": "workspace",
3511
+ "hasDynamicHelp": false,
3512
+ "multiple": false,
3513
+ "type": "option"
3514
+ },
3515
+ "yes": {
3516
+ "char": "y",
3517
+ "description": "Skips the first confirmation prompt",
3518
+ "name": "yes",
3519
+ "allowNo": false,
3520
+ "type": "boolean"
3477
3521
  }
3478
3522
  },
3479
3523
  "hasDynamicHelp": false,
3480
3524
  "hiddenAliases": [
3481
- "document:delete"
3525
+ "document:validate"
3482
3526
  ],
3483
- "id": "documents:delete",
3527
+ "id": "documents:validate",
3484
3528
  "pluginAlias": "@sanity/cli",
3485
3529
  "pluginName": "@sanity/cli",
3486
3530
  "pluginType": "core",
3487
- "strict": false,
3531
+ "strict": true,
3488
3532
  "isESM": true,
3489
3533
  "relativePath": [
3490
3534
  "dist",
3491
3535
  "commands",
3492
3536
  "documents",
3493
- "delete.js"
3537
+ "validate.js"
3494
3538
  ]
3495
3539
  },
3496
- "documents:get": {
3540
+ "graphql:deploy": {
3497
3541
  "aliases": [],
3498
- "args": {
3499
- "documentId": {
3500
- "description": "Document ID to retrieve",
3501
- "name": "documentId",
3502
- "required": true
3503
- }
3504
- },
3505
- "description": "Get and print a document by ID",
3542
+ "args": {},
3543
+ "description": "Deploy a GraphQL API from the current Sanity schema",
3506
3544
  "examples": [
3507
3545
  {
3508
- "command": "<%= config.bin %> <%= command.id %> myDocId",
3509
- "description": "Get the document with ID \"myDocId\""
3546
+ "command": "<%= config.bin %> <%= command.id %>",
3547
+ "description": "Deploy all defined GraphQL APIs"
3510
3548
  },
3511
3549
  {
3512
- "command": "<%= config.bin %> <%= command.id %> myDocId --pretty",
3513
- "description": "Get document with colorized JSON output"
3550
+ "command": "<%= config.bin %> <%= command.id %> --dry-run",
3551
+ "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy"
3514
3552
  },
3515
3553
  {
3516
- "command": "<%= config.bin %> <%= command.id %> myDocId --dataset production",
3517
- "description": "Get document from a specific dataset"
3554
+ "command": "<%= config.bin %> <%= command.id %> --api staging --api ios",
3555
+ "description": "Deploy only the GraphQL APIs with the IDs \"staging\" and \"ios\""
3518
3556
  },
3519
3557
  {
3520
- "command": "<%= config.bin %> <%= command.id %> myDocId --project-id abc123",
3521
- "description": "Get a document from a specific project"
3558
+ "command": "<%= config.bin %> <%= command.id %> --playground",
3559
+ "description": "Deploy all defined GraphQL APIs, overriding any playground setting"
3522
3560
  }
3523
3561
  ],
3524
3562
  "flags": {
3525
- "project-id": {
3526
- "char": "p",
3527
- "description": "Project ID to get document from (overrides CLI configuration)",
3528
- "helpGroup": "OVERRIDE",
3529
- "name": "project-id",
3563
+ "api": {
3564
+ "description": "Only deploy API with this ID (can be specified multiple times)",
3565
+ "name": "api",
3566
+ "hasDynamicHelp": false,
3567
+ "multiple": true,
3568
+ "type": "option"
3569
+ },
3570
+ "dataset": {
3571
+ "char": "d",
3572
+ "description": "Deploy API for the given dataset",
3573
+ "name": "dataset",
3574
+ "hasDynamicHelp": false,
3575
+ "helpValue": "<name>",
3576
+ "multiple": false,
3577
+ "type": "option"
3578
+ },
3579
+ "dry-run": {
3580
+ "description": "Validate defined GraphQL APIs, check for breaking changes, skip deploy",
3581
+ "name": "dry-run",
3582
+ "allowNo": false,
3583
+ "type": "boolean"
3584
+ },
3585
+ "force": {
3586
+ "description": "Deploy API without confirming breaking changes",
3587
+ "name": "force",
3588
+ "allowNo": false,
3589
+ "type": "boolean"
3590
+ },
3591
+ "generation": {
3592
+ "description": "API generation to deploy (defaults to \"gen3\")",
3593
+ "name": "generation",
3530
3594
  "hasDynamicHelp": false,
3531
- "helpValue": "<id>",
3532
3595
  "multiple": false,
3596
+ "options": [
3597
+ "gen1",
3598
+ "gen2",
3599
+ "gen3"
3600
+ ],
3533
3601
  "type": "option"
3534
3602
  },
3535
- "dataset": {
3536
- "char": "d",
3537
- "description": "Dataset to get document from (overrides CLI configuration)",
3538
- "helpGroup": "OVERRIDE",
3539
- "name": "dataset",
3603
+ "non-null-document-fields": {
3604
+ "description": "Use non-null document fields (_id, _type etc)",
3605
+ "name": "non-null-document-fields",
3606
+ "allowNo": false,
3607
+ "type": "boolean"
3608
+ },
3609
+ "playground": {
3610
+ "description": "Enable GraphQL playground for easier debugging",
3611
+ "name": "playground",
3612
+ "allowNo": true,
3613
+ "type": "boolean"
3614
+ },
3615
+ "tag": {
3616
+ "description": "Deploy API(s) to given tag (defaults to \"default\")",
3617
+ "name": "tag",
3540
3618
  "hasDynamicHelp": false,
3541
- "helpValue": "<name>",
3542
3619
  "multiple": false,
3543
3620
  "type": "option"
3544
3621
  },
3545
- "pretty": {
3546
- "description": "Colorize JSON output",
3547
- "name": "pretty",
3622
+ "with-union-cache": {
3623
+ "description": "Cache union types (faster for schemas with many self-references)",
3624
+ "name": "with-union-cache",
3548
3625
  "allowNo": false,
3549
3626
  "type": "boolean"
3550
3627
  }
3551
3628
  },
3552
3629
  "hasDynamicHelp": false,
3553
- "hiddenAliases": [
3554
- "document:get"
3555
- ],
3556
- "id": "documents:get",
3630
+ "hiddenAliases": [],
3631
+ "id": "graphql:deploy",
3557
3632
  "pluginAlias": "@sanity/cli",
3558
3633
  "pluginName": "@sanity/cli",
3559
3634
  "pluginType": "core",
@@ -3562,95 +3637,39 @@
3562
3637
  "relativePath": [
3563
3638
  "dist",
3564
3639
  "commands",
3565
- "documents",
3566
- "get.js"
3640
+ "graphql",
3641
+ "deploy.js"
3567
3642
  ]
3568
3643
  },
3569
- "documents:query": {
3644
+ "graphql:list": {
3570
3645
  "aliases": [],
3571
- "args": {
3572
- "query": {
3573
- "description": "GROQ query to run against the dataset",
3574
- "name": "query",
3575
- "required": true
3576
- }
3577
- },
3578
- "description": "Query for documents",
3646
+ "args": {},
3647
+ "description": "List deployed GraphQL endpoints for the project",
3579
3648
  "examples": [
3580
3649
  {
3581
- "command": "<%= config.bin %> <%= command.id %> '*[_type == \"movie\"][0..4]'",
3582
- "description": "Fetch 5 documents of type \"movie\""
3583
- },
3584
- {
3585
- "command": "<%= config.bin %> <%= command.id %> '*[_type == \"movie\"]|order(releaseDate asc)[0]{title}' --dataset staging",
3586
- "description": "Fetch title of the oldest movie in the dataset named \"staging\""
3587
- },
3588
- {
3589
- "command": "<%= config.bin %> <%= command.id %> '*[_id == \"header\"] { \"headerText\": pt::text(body) }' --api-version v2021-06-07",
3590
- "description": "Use API version v2021-06-07 and do a query"
3650
+ "command": "<%= config.bin %> <%= command.id %>",
3651
+ "description": "List GraphQL endpoints for the project"
3591
3652
  },
3592
3653
  {
3593
- "command": "<%= config.bin %> <%= command.id %> '*[_type == \"post\"]' --project-id abc123 --dataset production",
3594
- "description": "Query documents in a specific project and dataset"
3654
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
3655
+ "description": "List GraphQL endpoints for a specific project"
3595
3656
  }
3596
3657
  ],
3597
3658
  "flags": {
3598
3659
  "project-id": {
3599
3660
  "char": "p",
3600
- "description": "Project ID to query (overrides CLI configuration)",
3661
+ "description": "Project ID to list GraphQL endpoints for (overrides CLI configuration)",
3601
3662
  "helpGroup": "OVERRIDE",
3602
3663
  "name": "project-id",
3603
3664
  "hasDynamicHelp": false,
3604
3665
  "helpValue": "<id>",
3605
3666
  "multiple": false,
3606
3667
  "type": "option"
3607
- },
3608
- "dataset": {
3609
- "char": "d",
3610
- "description": "Dataset to query (overrides CLI configuration)",
3611
- "helpGroup": "OVERRIDE",
3612
- "name": "dataset",
3613
- "hasDynamicHelp": false,
3614
- "helpValue": "<name>",
3615
- "multiple": false,
3616
- "type": "option"
3617
- },
3618
- "anonymous": {
3619
- "description": "Send the query without any authorization token",
3620
- "name": "anonymous",
3621
- "allowNo": false,
3622
- "type": "boolean"
3623
- },
3624
- "api-version": {
3625
- "description": "API version to use (defaults to 2025-08-15)",
3626
- "name": "api-version",
3627
- "hasDynamicHelp": false,
3628
- "multiple": false,
3629
- "type": "option"
3630
- },
3631
- "pretty": {
3632
- "description": "Colorize JSON output",
3633
- "name": "pretty",
3634
- "allowNo": false,
3635
- "type": "boolean"
3636
- },
3637
- "project": {
3638
- "deprecated": {
3639
- "to": "project-id"
3640
- },
3641
- "description": "Project ID to query",
3642
- "hidden": true,
3643
- "name": "project",
3644
- "hasDynamicHelp": false,
3645
- "multiple": false,
3646
- "type": "option"
3647
3668
  }
3648
3669
  },
3649
3670
  "hasDynamicHelp": false,
3650
- "hiddenAliases": [
3651
- "document:query"
3652
- ],
3653
- "id": "documents:query",
3671
+ "hiddenAliases": [],
3672
+ "id": "graphql:list",
3654
3673
  "pluginAlias": "@sanity/cli",
3655
3674
  "pluginName": "@sanity/cli",
3656
3675
  "pluginType": "core",
@@ -3659,123 +3678,104 @@
3659
3678
  "relativePath": [
3660
3679
  "dist",
3661
3680
  "commands",
3662
- "documents",
3663
- "query.js"
3681
+ "graphql",
3682
+ "list.js"
3664
3683
  ]
3665
3684
  },
3666
- "documents:validate": {
3685
+ "graphql:undeploy": {
3667
3686
  "aliases": [],
3668
3687
  "args": {},
3669
- "description": "Validate documents in a dataset against the studio schema",
3688
+ "description": "Remove a deployed GraphQL API",
3670
3689
  "examples": [
3671
3690
  {
3672
- "command": "<%= config.bin %> <%= command.id %> --workspace default",
3673
- "description": "Validates all documents in a Sanity project with more than one workspace"
3691
+ "command": "<%= config.bin %> <%= command.id %>",
3692
+ "description": "Undeploy GraphQL API for current project and dataset"
3674
3693
  },
3675
3694
  {
3676
- "command": "<%= config.bin %> <%= command.id %> --workspace default --dataset staging",
3677
- "description": "Override the dataset specified in the workspace"
3695
+ "command": "<%= config.bin %> <%= command.id %> --api ios",
3696
+ "description": "Undeploy API with ID \"ios\""
3678
3697
  },
3679
3698
  {
3680
- "command": "<%= config.bin %> <%= command.id %> --yes > report.txt",
3681
- "description": "Save the results of the report into a file"
3699
+ "command": "<%= config.bin %> <%= command.id %> --dataset staging",
3700
+ "description": "Undeploy GraphQL API for staging dataset"
3682
3701
  },
3683
3702
  {
3684
- "command": "<%= config.bin %> <%= command.id %> --level info",
3685
- "description": "Report out info level validation markers too"
3703
+ "command": "<%= config.bin %> <%= command.id %> --dataset staging --tag next",
3704
+ "description": "Undeploy GraphQL API for staging dataset with \"next\" tag"
3705
+ },
3706
+ {
3707
+ "command": "<%= config.bin %> <%= command.id %> --force",
3708
+ "description": "Undeploy GraphQL API without confirmation prompt"
3686
3709
  },
3687
3710
  {
3688
3711
  "command": "<%= config.bin %> <%= command.id %> --project-id abc123 --dataset production",
3689
- "description": "Validate documents in a specific project and dataset"
3712
+ "description": "Undeploy GraphQL API for a specific project and dataset"
3690
3713
  }
3691
3714
  ],
3692
3715
  "flags": {
3693
3716
  "project-id": {
3694
3717
  "char": "p",
3695
- "description": "Override the project ID used. By default, this is derived from the given workspace",
3718
+ "description": "Project ID to undeploy GraphQL API from (overrides CLI configuration)",
3719
+ "helpGroup": "OVERRIDE",
3696
3720
  "name": "project-id",
3697
3721
  "hasDynamicHelp": false,
3698
3722
  "helpValue": "<id>",
3699
3723
  "multiple": false,
3700
3724
  "type": "option"
3701
3725
  },
3702
- "dataset": {
3703
- "char": "d",
3704
- "description": "Override the dataset used. By default, this is derived from the given workspace",
3705
- "name": "dataset",
3706
- "hasDynamicHelp": false,
3707
- "helpValue": "<name>",
3708
- "multiple": false,
3709
- "type": "option"
3710
- },
3711
- "file": {
3712
- "description": "Path to an NDJSON file or tar archive containing an NDJSON file (optionally gzip-compressed)",
3713
- "name": "file",
3714
- "hasDynamicHelp": false,
3715
- "multiple": false,
3716
- "type": "option"
3717
- },
3718
- "format": {
3719
- "description": "The output format used to print the found validation markers and report progress",
3720
- "name": "format",
3721
- "hasDynamicHelp": false,
3722
- "multiple": false,
3723
- "options": [
3724
- "json",
3725
- "ndjson",
3726
- "pretty"
3726
+ "api": {
3727
+ "description": "Undeploy API with this ID",
3728
+ "exclusive": [
3729
+ "project-id",
3730
+ "project"
3727
3731
  ],
3728
- "type": "option"
3729
- },
3730
- "level": {
3731
- "description": "The minimum level reported. Defaults to warning",
3732
- "name": "level",
3733
- "default": "warning",
3732
+ "name": "api",
3733
+ "required": false,
3734
3734
  "hasDynamicHelp": false,
3735
3735
  "multiple": false,
3736
- "options": [
3737
- "error",
3738
- "warning",
3739
- "info"
3740
- ],
3741
3736
  "type": "option"
3742
3737
  },
3743
- "max-custom-validation-concurrency": {
3744
- "description": "Specify how many custom validators can run concurrently",
3745
- "name": "max-custom-validation-concurrency",
3746
- "default": 5,
3738
+ "dataset": {
3739
+ "char": "d",
3740
+ "description": "Dataset to undeploy GraphQL API from (overrides CLI configuration)",
3741
+ "helpGroup": "OVERRIDE",
3742
+ "name": "dataset",
3747
3743
  "hasDynamicHelp": false,
3744
+ "helpValue": "<name>",
3748
3745
  "multiple": false,
3749
3746
  "type": "option"
3750
3747
  },
3751
- "max-fetch-concurrency": {
3752
- "description": "Specify how many `client.fetch` requests are allowed to run concurrently",
3753
- "name": "max-fetch-concurrency",
3754
- "default": 25,
3748
+ "force": {
3749
+ "description": "Skip confirmation prompt",
3750
+ "name": "force",
3751
+ "allowNo": false,
3752
+ "type": "boolean"
3753
+ },
3754
+ "project": {
3755
+ "deprecated": {
3756
+ "to": "project-id"
3757
+ },
3758
+ "description": "Project ID to delete GraphQL API for",
3759
+ "hidden": true,
3760
+ "name": "project",
3761
+ "required": false,
3755
3762
  "hasDynamicHelp": false,
3756
3763
  "multiple": false,
3757
3764
  "type": "option"
3758
3765
  },
3759
- "workspace": {
3760
- "description": "The name of the workspace to use when downloading and validating all documents",
3761
- "name": "workspace",
3766
+ "tag": {
3767
+ "description": "Tag to undeploy GraphQL API from",
3768
+ "name": "tag",
3769
+ "required": false,
3770
+ "default": "default",
3762
3771
  "hasDynamicHelp": false,
3763
3772
  "multiple": false,
3764
3773
  "type": "option"
3765
- },
3766
- "yes": {
3767
- "char": "y",
3768
- "description": "Skips the first confirmation prompt",
3769
- "name": "yes",
3770
- "allowNo": false,
3771
- "type": "boolean"
3772
3774
  }
3773
3775
  },
3774
3776
  "hasDynamicHelp": false,
3775
- "hiddenAliases": [
3776
- "document:validate"
3777
- ],
3778
- "id": "documents:validate",
3777
+ "hiddenAliases": [],
3778
+ "id": "graphql:undeploy",
3779
3779
  "pluginAlias": "@sanity/cli",
3780
3780
  "pluginName": "@sanity/cli",
3781
3781
  "pluginType": "core",
@@ -3784,8 +3784,8 @@
3784
3784
  "relativePath": [
3785
3785
  "dist",
3786
3786
  "commands",
3787
- "documents",
3788
- "validate.js"
3787
+ "graphql",
3788
+ "undeploy.js"
3789
3789
  ]
3790
3790
  },
3791
3791
  "hooks:attempt": {
@@ -6116,221 +6116,112 @@
6116
6116
  "list.js"
6117
6117
  ]
6118
6118
  },
6119
- "context:imports:create": {
6119
+ "datasets:alias:create": {
6120
6120
  "aliases": [],
6121
6121
  "args": {
6122
- "knowledgeBaseId": {
6123
- "description": "Knowledge base ID",
6124
- "name": "knowledgeBaseId",
6125
- "required": true
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
6126
6131
  }
6127
6132
  },
6128
- "description": "Import content into a knowledge base",
6133
+ "description": "Create a dataset alias for the project",
6129
6134
  "examples": [
6130
- {
6131
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --text \"Refunds are processed within 5 days\" --title \"Refund policy\"",
6132
- "description": "Import inline text"
6135
+ {
6136
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123 conference conf-2025",
6137
+ "description": "Create alias in a specific project"
6133
6138
  },
6134
6139
  {
6135
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --file ./handbook.pdf",
6136
- "description": "Upload and import a local file"
6140
+ "command": "<%= config.bin %> <%= command.id %>",
6141
+ "description": "Create an alias with interactive prompts"
6137
6142
  },
6138
6143
  {
6139
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --url https://example.com/docs",
6140
- "description": "Crawl a website"
6144
+ "command": "<%= config.bin %> <%= command.id %> conference",
6145
+ "description": "Create alias named \"conference\" with interactive dataset selection"
6141
6146
  },
6142
6147
  {
6143
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --query '*[_type == \"article\"]' --sanity-project abc123 --sanity-dataset production",
6144
- "description": "Bind a Sanity dataset as a source"
6148
+ "command": "<%= config.bin %> <%= command.id %> conference conf-2025",
6149
+ "description": "Create alias \"conference\" linked to \"conf-2025\" dataset"
6145
6150
  }
6146
6151
  ],
6147
6152
  "flags": {
6148
- "content-type": {
6149
- "description": "Content type of the import (--text: text/markdown or text/plain; --file: any MIME type, inferred from the file extension when omitted)",
6150
- "name": "content-type",
6151
- "required": false,
6152
- "hasDynamicHelp": false,
6153
- "helpValue": "<mime>",
6154
- "multiple": false,
6155
- "type": "option"
6156
- },
6157
- "file": {
6158
- "description": "Path to a local file to import",
6159
- "exclusive": [
6160
- "text",
6161
- "url",
6162
- "query"
6163
- ],
6164
- "name": "file",
6165
- "required": false,
6166
- "hasDynamicHelp": false,
6167
- "helpValue": "<path>",
6168
- "multiple": false,
6169
- "type": "option"
6170
- },
6171
- "query": {
6172
- "description": "GROQ query binding a Sanity dataset as a source",
6173
- "exclusive": [
6174
- "text",
6175
- "url",
6176
- "file"
6177
- ],
6178
- "name": "query",
6179
- "required": false,
6180
- "hasDynamicHelp": false,
6181
- "multiple": false,
6182
- "type": "option"
6183
- },
6184
- "sanity-dataset": {
6185
- "dependsOn": [
6186
- "query"
6187
- ],
6188
- "description": "Sanity dataset for a dataset import",
6189
- "name": "sanity-dataset",
6190
- "required": false,
6191
- "hasDynamicHelp": false,
6192
- "helpValue": "<name>",
6193
- "multiple": false,
6194
- "type": "option"
6195
- },
6196
- "sanity-project": {
6197
- "dependsOn": [
6198
- "query"
6199
- ],
6200
- "description": "Sanity project ID for a dataset import",
6201
- "name": "sanity-project",
6202
- "required": false,
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",
6203
6158
  "hasDynamicHelp": false,
6204
6159
  "helpValue": "<id>",
6205
6160
  "multiple": false,
6206
6161
  "type": "option"
6207
- },
6208
- "text": {
6209
- "description": "Inline text content to import (requires --title)",
6210
- "exclusive": [
6211
- "file",
6212
- "url",
6213
- "query"
6214
- ],
6215
- "name": "text",
6216
- "required": false,
6217
- "hasDynamicHelp": false,
6218
- "multiple": false,
6219
- "type": "option"
6220
- },
6221
- "title": {
6222
- "dependsOn": [
6223
- "text"
6224
- ],
6225
- "description": "Title for an inline text import",
6226
- "name": "title",
6227
- "required": false,
6228
- "hasDynamicHelp": false,
6229
- "multiple": false,
6230
- "type": "option"
6231
- },
6232
- "url": {
6233
- "description": "Website URL to crawl",
6234
- "exclusive": [
6235
- "text",
6236
- "file",
6237
- "query"
6238
- ],
6239
- "name": "url",
6240
- "required": false,
6241
- "hasDynamicHelp": false,
6242
- "helpValue": "<url>",
6243
- "multiple": false,
6244
- "type": "option"
6245
6162
  }
6246
6163
  },
6247
6164
  "hasDynamicHelp": false,
6248
- "hiddenAliases": [],
6249
- "id": "context:imports:create",
6165
+ "hiddenAliases": [
6166
+ "dataset:alias:create"
6167
+ ],
6168
+ "id": "datasets:alias:create",
6250
6169
  "pluginAlias": "@sanity/cli",
6251
6170
  "pluginName": "@sanity/cli",
6252
6171
  "pluginType": "core",
6253
6172
  "strict": true,
6254
- "telemetry": {
6255
- "redactedFlags": [
6256
- {
6257
- "canonical": "--text",
6258
- "flags": [
6259
- "--text"
6260
- ]
6261
- },
6262
- {
6263
- "canonical": "--file",
6264
- "flags": [
6265
- "--file"
6266
- ]
6267
- },
6268
- {
6269
- "canonical": "--url",
6270
- "flags": [
6271
- "--url"
6272
- ]
6273
- },
6274
- {
6275
- "canonical": "--title",
6276
- "flags": [
6277
- "--title"
6278
- ]
6279
- },
6280
- {
6281
- "canonical": "--query",
6282
- "flags": [
6283
- "--query"
6284
- ]
6285
- }
6286
- ]
6287
- },
6288
6173
  "isESM": true,
6289
6174
  "relativePath": [
6290
6175
  "dist",
6291
6176
  "commands",
6292
- "context",
6293
- "imports",
6177
+ "datasets",
6178
+ "alias",
6294
6179
  "create.js"
6295
6180
  ]
6296
6181
  },
6297
- "context:imports:delete": {
6182
+ "datasets:alias:delete": {
6298
6183
  "aliases": [],
6299
6184
  "args": {
6300
- "knowledgeBaseId": {
6301
- "description": "Knowledge base ID",
6302
- "name": "knowledgeBaseId",
6303
- "required": true
6304
- },
6305
- "importId": {
6306
- "description": "Import ID",
6307
- "name": "importId",
6185
+ "aliasName": {
6186
+ "description": "Dataset alias name to delete",
6187
+ "name": "aliasName",
6308
6188
  "required": true
6309
6189
  }
6310
6190
  },
6311
- "description": "Delete an import from a knowledge base",
6191
+ "description": "Delete a dataset alias from the project",
6312
6192
  "examples": [
6313
6193
  {
6314
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6315
- "description": "Delete an import after confirmation"
6194
+ "command": "<%= config.bin %> <%= command.id %> conference",
6195
+ "description": "Delete alias named \"conference\" with confirmation prompt"
6316
6196
  },
6317
6197
  {
6318
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456 --yes",
6319
- "description": "Delete an import without confirmation prompt"
6198
+ "command": "<%= config.bin %> <%= command.id %> conference --force",
6199
+ "description": "Delete alias named \"conference\" without confirmation prompt"
6320
6200
  }
6321
6201
  ],
6322
6202
  "flags": {
6323
- "yes": {
6324
- "char": "y",
6325
- "description": "Skip confirmation prompt (unattended mode)",
6326
- "name": "yes",
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",
6327
6216
  "allowNo": false,
6328
6217
  "type": "boolean"
6329
6218
  }
6330
6219
  },
6331
6220
  "hasDynamicHelp": false,
6332
- "hiddenAliases": [],
6333
- "id": "context:imports:delete",
6221
+ "hiddenAliases": [
6222
+ "dataset:alias:delete"
6223
+ ],
6224
+ "id": "datasets:alias:delete",
6334
6225
  "pluginAlias": "@sanity/cli",
6335
6226
  "pluginName": "@sanity/cli",
6336
6227
  "pluginType": "core",
@@ -6339,43 +6230,68 @@
6339
6230
  "relativePath": [
6340
6231
  "dist",
6341
6232
  "commands",
6342
- "context",
6343
- "imports",
6233
+ "datasets",
6234
+ "alias",
6344
6235
  "delete.js"
6345
6236
  ]
6346
6237
  },
6347
- "context:imports:download": {
6238
+ "datasets:alias:link": {
6348
6239
  "aliases": [],
6349
6240
  "args": {
6350
- "knowledgeBaseId": {
6351
- "description": "Knowledge base ID",
6352
- "name": "knowledgeBaseId",
6353
- "required": true
6241
+ "aliasName": {
6242
+ "description": "Dataset alias name to link",
6243
+ "name": "aliasName",
6244
+ "required": false
6354
6245
  },
6355
- "importId": {
6356
- "description": "Import ID",
6357
- "name": "importId",
6358
- "required": true
6246
+ "targetDataset": {
6247
+ "description": "Target dataset name to link the alias to",
6248
+ "name": "targetDataset",
6249
+ "required": false
6359
6250
  }
6360
6251
  },
6361
- "description": "Get a short-lived signed URL for the original uploaded bytes of a file import",
6252
+ "description": "Link a dataset alias to a dataset in the project",
6362
6253
  "examples": [
6363
6254
  {
6364
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6365
- "description": "Get a download URL for an uploaded file"
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)"
6366
6269
  }
6367
6270
  ],
6368
6271
  "flags": {
6369
- "json": {
6370
- "description": "Output the download URL in JSON format",
6371
- "name": "json",
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,
6372
6286
  "allowNo": false,
6373
6287
  "type": "boolean"
6374
6288
  }
6375
6289
  },
6376
6290
  "hasDynamicHelp": false,
6377
- "hiddenAliases": [],
6378
- "id": "context:imports:download",
6291
+ "hiddenAliases": [
6292
+ "dataset:alias:link"
6293
+ ],
6294
+ "id": "datasets:alias:link",
6379
6295
  "pluginAlias": "@sanity/cli",
6380
6296
  "pluginName": "@sanity/cli",
6381
6297
  "pluginType": "core",
@@ -6384,47 +6300,58 @@
6384
6300
  "relativePath": [
6385
6301
  "dist",
6386
6302
  "commands",
6387
- "context",
6388
- "imports",
6389
- "download.js"
6303
+ "datasets",
6304
+ "alias",
6305
+ "link.js"
6390
6306
  ]
6391
6307
  },
6392
- "context:imports:get": {
6308
+ "datasets:alias:unlink": {
6393
6309
  "aliases": [],
6394
6310
  "args": {
6395
- "knowledgeBaseId": {
6396
- "description": "Knowledge base ID",
6397
- "name": "knowledgeBaseId",
6398
- "required": true
6399
- },
6400
- "importId": {
6401
- "description": "Import ID",
6402
- "name": "importId",
6403
- "required": true
6311
+ "aliasName": {
6312
+ "description": "Dataset alias name to unlink",
6313
+ "name": "aliasName",
6314
+ "required": false
6404
6315
  }
6405
6316
  },
6406
- "description": "Get details of an import",
6317
+ "description": "Unlink a dataset alias from its dataset in the project",
6407
6318
  "examples": [
6408
6319
  {
6409
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6410
- "description": "Get details of a specific import"
6320
+ "command": "<%= config.bin %> <%= command.id %>",
6321
+ "description": "Unlink an alias with interactive selection"
6411
6322
  },
6412
6323
  {
6413
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456 --json",
6414
- "description": "Output the import as JSON"
6324
+ "command": "<%= config.bin %> <%= command.id %> conference",
6325
+ "description": "Unlink alias \"conference\" with confirmation prompt"
6326
+ },
6327
+ {
6328
+ "command": "<%= config.bin %> <%= command.id %> conference --force",
6329
+ "description": "Unlink alias \"conference\" without confirmation prompt"
6415
6330
  }
6416
6331
  ],
6417
6332
  "flags": {
6418
- "json": {
6419
- "description": "Output the import in JSON format",
6420
- "name": "json",
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
6346
  "allowNo": false,
6422
6347
  "type": "boolean"
6423
6348
  }
6424
6349
  },
6425
6350
  "hasDynamicHelp": false,
6426
- "hiddenAliases": [],
6427
- "id": "context:imports:get",
6351
+ "hiddenAliases": [
6352
+ "dataset:alias:unlink"
6353
+ ],
6354
+ "id": "datasets:alias:unlink",
6428
6355
  "pluginAlias": "@sanity/cli",
6429
6356
  "pluginName": "@sanity/cli",
6430
6357
  "pluginType": "core",
@@ -6433,42 +6360,44 @@
6433
6360
  "relativePath": [
6434
6361
  "dist",
6435
6362
  "commands",
6436
- "context",
6437
- "imports",
6438
- "get.js"
6363
+ "datasets",
6364
+ "alias",
6365
+ "unlink.js"
6439
6366
  ]
6440
6367
  },
6441
- "context:imports:list": {
6368
+ "datasets:embeddings:disable": {
6442
6369
  "aliases": [],
6443
6370
  "args": {
6444
- "knowledgeBaseId": {
6445
- "description": "Knowledge base ID",
6446
- "name": "knowledgeBaseId",
6447
- "required": true
6371
+ "dataset": {
6372
+ "description": "Dataset name to disable embeddings for",
6373
+ "name": "dataset",
6374
+ "required": false
6448
6375
  }
6449
6376
  },
6450
- "description": "List imports for a knowledge base",
6377
+ "description": "Disable embeddings for a dataset",
6451
6378
  "examples": [
6452
6379
  {
6453
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
6454
- "description": "List all imports for a knowledge base"
6455
- },
6456
- {
6457
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
6458
- "description": "Output imports as JSON"
6380
+ "command": "<%= config.bin %> <%= command.id %> production",
6381
+ "description": "Disable embeddings for the production dataset"
6459
6382
  }
6460
6383
  ],
6461
6384
  "flags": {
6462
- "json": {
6463
- "description": "Output imports in JSON format",
6464
- "name": "json",
6465
- "allowNo": false,
6466
- "type": "boolean"
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"
6467
6394
  }
6468
6395
  },
6469
6396
  "hasDynamicHelp": false,
6470
- "hiddenAliases": [],
6471
- "id": "context:imports:list",
6397
+ "hiddenAliases": [
6398
+ "dataset:embeddings:disable"
6399
+ ],
6400
+ "id": "datasets:embeddings:disable",
6472
6401
  "pluginAlias": "@sanity/cli",
6473
6402
  "pluginName": "@sanity/cli",
6474
6403
  "pluginType": "core",
@@ -6477,53 +6406,66 @@
6477
6406
  "relativePath": [
6478
6407
  "dist",
6479
6408
  "commands",
6480
- "context",
6481
- "imports",
6482
- "list.js"
6409
+ "datasets",
6410
+ "embeddings",
6411
+ "disable.js"
6483
6412
  ]
6484
6413
  },
6485
- "context:jobs:get": {
6414
+ "datasets:embeddings:enable": {
6486
6415
  "aliases": [],
6487
6416
  "args": {
6488
- "knowledgeBaseId": {
6489
- "description": "Knowledge base ID",
6490
- "name": "knowledgeBaseId",
6491
- "required": true
6492
- },
6493
- "jobId": {
6494
- "description": "Job ID",
6495
- "name": "jobId",
6496
- "required": true
6417
+ "dataset": {
6418
+ "description": "Dataset name to enable embeddings for",
6419
+ "name": "dataset",
6420
+ "required": false
6497
6421
  }
6498
6422
  },
6499
- "description": "Get the status of a knowledge base job",
6423
+ "description": "Enable embeddings for a dataset",
6500
6424
  "examples": [
6501
6425
  {
6502
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456",
6503
- "description": "Get the current status of a job"
6426
+ "command": "<%= config.bin %> <%= command.id %> production",
6427
+ "description": "Enable embeddings for the production dataset"
6504
6428
  },
6505
6429
  {
6506
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456 --watch",
6507
- "description": "Wait for the job to finish (non-zero exit if it does not succeed)"
6430
+ "command": "<%= config.bin %> <%= command.id %> production --projection \"{ title, body }\"",
6431
+ "description": "Enable embeddings with a specific projection"
6432
+ },
6433
+ {
6434
+ "command": "<%= config.bin %> <%= command.id %> production --wait",
6435
+ "description": "Enable embeddings and wait for processing to complete"
6508
6436
  }
6509
6437
  ],
6510
6438
  "flags": {
6511
- "json": {
6512
- "description": "Output the job in JSON format",
6513
- "name": "json",
6514
- "allowNo": false,
6515
- "type": "boolean"
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"
6516
6448
  },
6517
- "watch": {
6518
- "description": "Poll until the job reaches a terminal state",
6519
- "name": "watch",
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"
6456
+ },
6457
+ "wait": {
6458
+ "description": "Wait for embeddings processing to complete before returning",
6459
+ "name": "wait",
6520
6460
  "allowNo": false,
6521
6461
  "type": "boolean"
6522
6462
  }
6523
6463
  },
6524
6464
  "hasDynamicHelp": false,
6525
- "hiddenAliases": [],
6526
- "id": "context:jobs:get",
6465
+ "hiddenAliases": [
6466
+ "dataset:embeddings:enable"
6467
+ ],
6468
+ "id": "datasets:embeddings:enable",
6527
6469
  "pluginAlias": "@sanity/cli",
6528
6470
  "pluginName": "@sanity/cli",
6529
6471
  "pluginType": "core",
@@ -6532,48 +6474,31 @@
6532
6474
  "relativePath": [
6533
6475
  "dist",
6534
6476
  "commands",
6535
- "context",
6536
- "jobs",
6537
- "get.js"
6477
+ "datasets",
6478
+ "embeddings",
6479
+ "enable.js"
6538
6480
  ]
6539
6481
  },
6540
- "datasets:alias:create": {
6482
+ "datasets:embeddings:status": {
6541
6483
  "aliases": [],
6542
6484
  "args": {
6543
- "aliasName": {
6544
- "description": "Dataset alias name to create",
6545
- "name": "aliasName",
6546
- "required": false
6547
- },
6548
- "targetDataset": {
6549
- "description": "Target dataset name to link the alias to",
6550
- "name": "targetDataset",
6485
+ "dataset": {
6486
+ "description": "The name of the dataset to check embeddings status for",
6487
+ "name": "dataset",
6551
6488
  "required": false
6552
6489
  }
6553
6490
  },
6554
- "description": "Create a dataset alias for the project",
6491
+ "description": "Show embeddings settings and status for a dataset",
6555
6492
  "examples": [
6556
6493
  {
6557
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123 conference conf-2025",
6558
- "description": "Create alias in a specific project"
6559
- },
6560
- {
6561
- "command": "<%= config.bin %> <%= command.id %>",
6562
- "description": "Create an alias with interactive prompts"
6563
- },
6564
- {
6565
- "command": "<%= config.bin %> <%= command.id %> conference",
6566
- "description": "Create alias named \"conference\" with interactive dataset selection"
6567
- },
6568
- {
6569
- "command": "<%= config.bin %> <%= command.id %> conference conf-2025",
6570
- "description": "Create alias \"conference\" linked to \"conf-2025\" dataset"
6494
+ "command": "<%= config.bin %> <%= command.id %> production",
6495
+ "description": "Show embeddings status for the production dataset"
6571
6496
  }
6572
6497
  ],
6573
6498
  "flags": {
6574
6499
  "project-id": {
6575
6500
  "char": "p",
6576
- "description": "Project ID to create dataset alias in (overrides CLI configuration)",
6501
+ "description": "Project ID to check embeddings status for (overrides CLI configuration)",
6577
6502
  "helpGroup": "OVERRIDE",
6578
6503
  "name": "project-id",
6579
6504
  "hasDynamicHelp": false,
@@ -6584,9 +6509,9 @@
6584
6509
  },
6585
6510
  "hasDynamicHelp": false,
6586
6511
  "hiddenAliases": [
6587
- "dataset:alias:create"
6512
+ "dataset:embeddings:status"
6588
6513
  ],
6589
- "id": "datasets:alias:create",
6514
+ "id": "datasets:embeddings:status",
6590
6515
  "pluginAlias": "@sanity/cli",
6591
6516
  "pluginName": "@sanity/cli",
6592
6517
  "pluginType": "core",
@@ -6596,53 +6521,43 @@
6596
6521
  "dist",
6597
6522
  "commands",
6598
6523
  "datasets",
6599
- "alias",
6600
- "create.js"
6524
+ "embeddings",
6525
+ "status.js"
6601
6526
  ]
6602
6527
  },
6603
- "datasets:alias:delete": {
6528
+ "datasets:visibility:get": {
6604
6529
  "aliases": [],
6605
6530
  "args": {
6606
- "aliasName": {
6607
- "description": "Dataset alias name to delete",
6608
- "name": "aliasName",
6531
+ "dataset": {
6532
+ "description": "The name of the dataset to get visibility for",
6533
+ "name": "dataset",
6609
6534
  "required": true
6610
6535
  }
6611
6536
  },
6612
- "description": "Delete a dataset alias from the project",
6537
+ "description": "Get the visibility of a dataset",
6613
6538
  "examples": [
6614
6539
  {
6615
- "command": "<%= config.bin %> <%= command.id %> conference",
6616
- "description": "Delete alias named \"conference\" with confirmation prompt"
6617
- },
6618
- {
6619
- "command": "<%= config.bin %> <%= command.id %> conference --force",
6620
- "description": "Delete alias named \"conference\" without confirmation prompt"
6540
+ "command": "<%= config.bin %> <%= command.id %> my-dataset",
6541
+ "description": "Check the visibility of a dataset"
6621
6542
  }
6622
6543
  ],
6623
6544
  "flags": {
6624
6545
  "project-id": {
6625
6546
  "char": "p",
6626
- "description": "Project ID to delete dataset alias from (overrides CLI configuration)",
6547
+ "description": "Project ID to get dataset visibility for (overrides CLI configuration)",
6627
6548
  "helpGroup": "OVERRIDE",
6628
6549
  "name": "project-id",
6629
6550
  "hasDynamicHelp": false,
6630
6551
  "helpValue": "<id>",
6631
6552
  "multiple": false,
6632
6553
  "type": "option"
6633
- },
6634
- "force": {
6635
- "description": "Skip confirmation prompt and delete immediately",
6636
- "name": "force",
6637
- "allowNo": false,
6638
- "type": "boolean"
6639
6554
  }
6640
6555
  },
6641
6556
  "hasDynamicHelp": false,
6642
6557
  "hiddenAliases": [
6643
- "dataset:alias:delete"
6558
+ "dataset:visibility:get"
6644
6559
  ],
6645
- "id": "datasets:alias:delete",
6560
+ "id": "datasets:visibility:get",
6646
6561
  "pluginAlias": "@sanity/cli",
6647
6562
  "pluginName": "@sanity/cli",
6648
6563
  "pluginType": "core",
@@ -6652,67 +6567,56 @@
6652
6567
  "dist",
6653
6568
  "commands",
6654
6569
  "datasets",
6655
- "alias",
6656
- "delete.js"
6570
+ "visibility",
6571
+ "get.js"
6657
6572
  ]
6658
6573
  },
6659
- "datasets:alias:link": {
6574
+ "datasets:visibility:set": {
6660
6575
  "aliases": [],
6661
6576
  "args": {
6662
- "aliasName": {
6663
- "description": "Dataset alias name to link",
6664
- "name": "aliasName",
6665
- "required": false
6577
+ "dataset": {
6578
+ "description": "The name of the dataset to set visibility for",
6579
+ "name": "dataset",
6580
+ "required": true
6666
6581
  },
6667
- "targetDataset": {
6668
- "description": "Target dataset name to link the alias to",
6669
- "name": "targetDataset",
6670
- "required": false
6582
+ "mode": {
6583
+ "description": "The visibility mode to set",
6584
+ "name": "mode",
6585
+ "options": [
6586
+ "public",
6587
+ "private"
6588
+ ],
6589
+ "required": true
6671
6590
  }
6672
6591
  },
6673
- "description": "Link a dataset alias to a dataset in the project",
6592
+ "description": "Set the visibility of a dataset",
6674
6593
  "examples": [
6675
6594
  {
6676
- "command": "<%= config.bin %> <%= command.id %>",
6677
- "description": "Link an alias with interactive prompts"
6678
- },
6679
- {
6680
- "command": "<%= config.bin %> <%= command.id %> conference",
6681
- "description": "Link alias named \"conference\" with interactive dataset selection"
6682
- },
6683
- {
6684
- "command": "<%= config.bin %> <%= command.id %> conference conf-2025",
6685
- "description": "Link alias \"conference\" to \"conf-2025\" dataset"
6595
+ "command": "<%= config.bin %> <%= command.id %> my-dataset private",
6596
+ "description": "Make a dataset private"
6686
6597
  },
6687
6598
  {
6688
- "command": "<%= config.bin %> <%= command.id %> conference conf-2025 --force",
6689
- "description": "Force link without confirmation (skip relink prompt)"
6599
+ "command": "<%= config.bin %> <%= command.id %> my-dataset public",
6600
+ "description": "Make a dataset public"
6690
6601
  }
6691
6602
  ],
6692
6603
  "flags": {
6693
6604
  "project-id": {
6694
6605
  "char": "p",
6695
- "description": "Project ID to link dataset alias in (overrides CLI configuration)",
6606
+ "description": "Project ID to set dataset visibility for (overrides CLI configuration)",
6696
6607
  "helpGroup": "OVERRIDE",
6697
6608
  "name": "project-id",
6698
6609
  "hasDynamicHelp": false,
6699
6610
  "helpValue": "<id>",
6700
6611
  "multiple": false,
6701
6612
  "type": "option"
6702
- },
6703
- "force": {
6704
- "description": "Skip confirmation prompt when relinking existing alias",
6705
- "name": "force",
6706
- "required": false,
6707
- "allowNo": false,
6708
- "type": "boolean"
6709
6613
  }
6710
6614
  },
6711
6615
  "hasDynamicHelp": false,
6712
6616
  "hiddenAliases": [
6713
- "dataset:alias:link"
6617
+ "dataset:visibility:set"
6714
6618
  ],
6715
- "id": "datasets:alias:link",
6619
+ "id": "datasets:visibility:set",
6716
6620
  "pluginAlias": "@sanity/cli",
6717
6621
  "pluginName": "@sanity/cli",
6718
6622
  "pluginType": "core",
@@ -6722,103 +6626,225 @@
6722
6626
  "dist",
6723
6627
  "commands",
6724
6628
  "datasets",
6725
- "alias",
6726
- "link.js"
6629
+ "visibility",
6630
+ "set.js"
6727
6631
  ]
6728
6632
  },
6729
- "datasets:alias:unlink": {
6633
+ "context:imports:create": {
6730
6634
  "aliases": [],
6731
6635
  "args": {
6732
- "aliasName": {
6733
- "description": "Dataset alias name to unlink",
6734
- "name": "aliasName",
6735
- "required": false
6636
+ "knowledgeBaseId": {
6637
+ "description": "Knowledge base ID",
6638
+ "name": "knowledgeBaseId",
6639
+ "required": true
6736
6640
  }
6737
6641
  },
6738
- "description": "Unlink a dataset alias from its dataset in the project",
6642
+ "description": "Import content into a knowledge base",
6739
6643
  "examples": [
6740
6644
  {
6741
- "command": "<%= config.bin %> <%= command.id %>",
6742
- "description": "Unlink an alias with interactive selection"
6645
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --text \"Refunds are processed within 5 days\" --title \"Refund policy\"",
6646
+ "description": "Import inline text"
6743
6647
  },
6744
6648
  {
6745
- "command": "<%= config.bin %> <%= command.id %> conference",
6746
- "description": "Unlink alias \"conference\" with confirmation prompt"
6649
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --file ./handbook.pdf",
6650
+ "description": "Upload and import a local file"
6747
6651
  },
6748
6652
  {
6749
- "command": "<%= config.bin %> <%= command.id %> conference --force",
6750
- "description": "Unlink alias \"conference\" without confirmation prompt"
6653
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --url https://example.com/docs",
6654
+ "description": "Crawl a website"
6655
+ },
6656
+ {
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"
6751
6659
  }
6752
6660
  ],
6753
6661
  "flags": {
6754
- "project-id": {
6755
- "char": "p",
6756
- "description": "Project ID to unlink dataset alias in (overrides CLI configuration)",
6757
- "helpGroup": "OVERRIDE",
6758
- "name": "project-id",
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,
6759
6717
  "hasDynamicHelp": false,
6760
6718
  "helpValue": "<id>",
6761
6719
  "multiple": false,
6762
6720
  "type": "option"
6763
6721
  },
6764
- "force": {
6765
- "description": "Skip confirmation prompt and unlink immediately",
6766
- "name": "force",
6767
- "allowNo": false,
6768
- "type": "boolean"
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"
6769
6759
  }
6770
6760
  },
6771
6761
  "hasDynamicHelp": false,
6772
- "hiddenAliases": [
6773
- "dataset:alias:unlink"
6774
- ],
6775
- "id": "datasets:alias:unlink",
6762
+ "hiddenAliases": [],
6763
+ "id": "context:imports:create",
6776
6764
  "pluginAlias": "@sanity/cli",
6777
6765
  "pluginName": "@sanity/cli",
6778
6766
  "pluginType": "core",
6779
6767
  "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
+ },
6780
6802
  "isESM": true,
6781
6803
  "relativePath": [
6782
6804
  "dist",
6783
6805
  "commands",
6784
- "datasets",
6785
- "alias",
6786
- "unlink.js"
6806
+ "context",
6807
+ "imports",
6808
+ "create.js"
6787
6809
  ]
6788
6810
  },
6789
- "datasets:embeddings:disable": {
6811
+ "context:imports:delete": {
6790
6812
  "aliases": [],
6791
6813
  "args": {
6792
- "dataset": {
6793
- "description": "Dataset name to disable embeddings for",
6794
- "name": "dataset",
6795
- "required": false
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
6796
6823
  }
6797
6824
  },
6798
- "description": "Disable embeddings for a dataset",
6825
+ "description": "Delete an import from a knowledge base",
6799
6826
  "examples": [
6800
6827
  {
6801
- "command": "<%= config.bin %> <%= command.id %> production",
6802
- "description": "Disable embeddings for the production dataset"
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"
6803
6834
  }
6804
6835
  ],
6805
6836
  "flags": {
6806
- "project-id": {
6807
- "char": "p",
6808
- "description": "Project ID to disable embeddings for (overrides CLI configuration)",
6809
- "helpGroup": "OVERRIDE",
6810
- "name": "project-id",
6811
- "hasDynamicHelp": false,
6812
- "helpValue": "<id>",
6813
- "multiple": false,
6814
- "type": "option"
6837
+ "yes": {
6838
+ "char": "y",
6839
+ "description": "Skip confirmation prompt (unattended mode)",
6840
+ "name": "yes",
6841
+ "allowNo": false,
6842
+ "type": "boolean"
6815
6843
  }
6816
6844
  },
6817
6845
  "hasDynamicHelp": false,
6818
- "hiddenAliases": [
6819
- "dataset:embeddings:disable"
6820
- ],
6821
- "id": "datasets:embeddings:disable",
6846
+ "hiddenAliases": [],
6847
+ "id": "context:imports:delete",
6822
6848
  "pluginAlias": "@sanity/cli",
6823
6849
  "pluginName": "@sanity/cli",
6824
6850
  "pluginType": "core",
@@ -6827,66 +6853,43 @@
6827
6853
  "relativePath": [
6828
6854
  "dist",
6829
6855
  "commands",
6830
- "datasets",
6831
- "embeddings",
6832
- "disable.js"
6856
+ "context",
6857
+ "imports",
6858
+ "delete.js"
6833
6859
  ]
6834
6860
  },
6835
- "datasets:embeddings:enable": {
6861
+ "context:imports:download": {
6836
6862
  "aliases": [],
6837
6863
  "args": {
6838
- "dataset": {
6839
- "description": "Dataset name to enable embeddings for",
6840
- "name": "dataset",
6841
- "required": false
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
6842
6873
  }
6843
6874
  },
6844
- "description": "Enable embeddings for a dataset",
6875
+ "description": "Get a short-lived signed URL for the original uploaded bytes of a file import",
6845
6876
  "examples": [
6846
6877
  {
6847
- "command": "<%= config.bin %> <%= command.id %> production",
6848
- "description": "Enable embeddings for the production dataset"
6849
- },
6850
- {
6851
- "command": "<%= config.bin %> <%= command.id %> production --projection \"{ title, body }\"",
6852
- "description": "Enable embeddings with a specific projection"
6853
- },
6854
- {
6855
- "command": "<%= config.bin %> <%= command.id %> production --wait",
6856
- "description": "Enable embeddings and wait for processing to complete"
6878
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6879
+ "description": "Get a download URL for an uploaded file"
6857
6880
  }
6858
6881
  ],
6859
6882
  "flags": {
6860
- "project-id": {
6861
- "char": "p",
6862
- "description": "Project ID to enable embeddings for (overrides CLI configuration)",
6863
- "helpGroup": "OVERRIDE",
6864
- "name": "project-id",
6865
- "hasDynamicHelp": false,
6866
- "helpValue": "<id>",
6867
- "multiple": false,
6868
- "type": "option"
6869
- },
6870
- "projection": {
6871
- "description": "GROQ projection defining which fields to embed (e.g. \"{ title, body }\")",
6872
- "name": "projection",
6873
- "required": false,
6874
- "hasDynamicHelp": false,
6875
- "multiple": false,
6876
- "type": "option"
6877
- },
6878
- "wait": {
6879
- "description": "Wait for embeddings processing to complete before returning",
6880
- "name": "wait",
6883
+ "json": {
6884
+ "description": "Output the download URL in JSON format",
6885
+ "name": "json",
6881
6886
  "allowNo": false,
6882
6887
  "type": "boolean"
6883
6888
  }
6884
6889
  },
6885
6890
  "hasDynamicHelp": false,
6886
- "hiddenAliases": [
6887
- "dataset:embeddings:enable"
6888
- ],
6889
- "id": "datasets:embeddings:enable",
6891
+ "hiddenAliases": [],
6892
+ "id": "context:imports:download",
6890
6893
  "pluginAlias": "@sanity/cli",
6891
6894
  "pluginName": "@sanity/cli",
6892
6895
  "pluginType": "core",
@@ -6895,44 +6898,47 @@
6895
6898
  "relativePath": [
6896
6899
  "dist",
6897
6900
  "commands",
6898
- "datasets",
6899
- "embeddings",
6900
- "enable.js"
6901
+ "context",
6902
+ "imports",
6903
+ "download.js"
6901
6904
  ]
6902
6905
  },
6903
- "datasets:embeddings:status": {
6906
+ "context:imports:get": {
6904
6907
  "aliases": [],
6905
6908
  "args": {
6906
- "dataset": {
6907
- "description": "The name of the dataset to check embeddings status for",
6908
- "name": "dataset",
6909
- "required": false
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
6910
6918
  }
6911
6919
  },
6912
- "description": "Show embeddings settings and status for a dataset",
6920
+ "description": "Get details of an import",
6913
6921
  "examples": [
6914
6922
  {
6915
- "command": "<%= config.bin %> <%= command.id %> production",
6916
- "description": "Show embeddings status for the production dataset"
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"
6917
6929
  }
6918
6930
  ],
6919
6931
  "flags": {
6920
- "project-id": {
6921
- "char": "p",
6922
- "description": "Project ID to check embeddings status for (overrides CLI configuration)",
6923
- "helpGroup": "OVERRIDE",
6924
- "name": "project-id",
6925
- "hasDynamicHelp": false,
6926
- "helpValue": "<id>",
6927
- "multiple": false,
6928
- "type": "option"
6932
+ "json": {
6933
+ "description": "Output the import in JSON format",
6934
+ "name": "json",
6935
+ "allowNo": false,
6936
+ "type": "boolean"
6929
6937
  }
6930
6938
  },
6931
6939
  "hasDynamicHelp": false,
6932
- "hiddenAliases": [
6933
- "dataset:embeddings:status"
6934
- ],
6935
- "id": "datasets:embeddings:status",
6940
+ "hiddenAliases": [],
6941
+ "id": "context:imports:get",
6936
6942
  "pluginAlias": "@sanity/cli",
6937
6943
  "pluginName": "@sanity/cli",
6938
6944
  "pluginType": "core",
@@ -6941,44 +6947,42 @@
6941
6947
  "relativePath": [
6942
6948
  "dist",
6943
6949
  "commands",
6944
- "datasets",
6945
- "embeddings",
6946
- "status.js"
6950
+ "context",
6951
+ "imports",
6952
+ "get.js"
6947
6953
  ]
6948
6954
  },
6949
- "datasets:visibility:get": {
6955
+ "context:imports:list": {
6950
6956
  "aliases": [],
6951
6957
  "args": {
6952
- "dataset": {
6953
- "description": "The name of the dataset to get visibility for",
6954
- "name": "dataset",
6958
+ "knowledgeBaseId": {
6959
+ "description": "Knowledge base ID",
6960
+ "name": "knowledgeBaseId",
6955
6961
  "required": true
6956
6962
  }
6957
6963
  },
6958
- "description": "Get the visibility of a dataset",
6964
+ "description": "List imports for a knowledge base",
6959
6965
  "examples": [
6960
6966
  {
6961
- "command": "<%= config.bin %> <%= command.id %> my-dataset",
6962
- "description": "Check the visibility of a dataset"
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"
6963
6973
  }
6964
6974
  ],
6965
6975
  "flags": {
6966
- "project-id": {
6967
- "char": "p",
6968
- "description": "Project ID to get dataset visibility for (overrides CLI configuration)",
6969
- "helpGroup": "OVERRIDE",
6970
- "name": "project-id",
6971
- "hasDynamicHelp": false,
6972
- "helpValue": "<id>",
6973
- "multiple": false,
6974
- "type": "option"
6976
+ "json": {
6977
+ "description": "Output imports in JSON format",
6978
+ "name": "json",
6979
+ "allowNo": false,
6980
+ "type": "boolean"
6975
6981
  }
6976
6982
  },
6977
6983
  "hasDynamicHelp": false,
6978
- "hiddenAliases": [
6979
- "dataset:visibility:get"
6980
- ],
6981
- "id": "datasets:visibility:get",
6984
+ "hiddenAliases": [],
6985
+ "id": "context:imports:list",
6982
6986
  "pluginAlias": "@sanity/cli",
6983
6987
  "pluginName": "@sanity/cli",
6984
6988
  "pluginType": "core",
@@ -6987,57 +6991,53 @@
6987
6991
  "relativePath": [
6988
6992
  "dist",
6989
6993
  "commands",
6990
- "datasets",
6991
- "visibility",
6992
- "get.js"
6994
+ "context",
6995
+ "imports",
6996
+ "list.js"
6993
6997
  ]
6994
6998
  },
6995
- "datasets:visibility:set": {
6999
+ "context:jobs:get": {
6996
7000
  "aliases": [],
6997
7001
  "args": {
6998
- "dataset": {
6999
- "description": "The name of the dataset to set visibility for",
7000
- "name": "dataset",
7002
+ "knowledgeBaseId": {
7003
+ "description": "Knowledge base ID",
7004
+ "name": "knowledgeBaseId",
7001
7005
  "required": true
7002
7006
  },
7003
- "mode": {
7004
- "description": "The visibility mode to set",
7005
- "name": "mode",
7006
- "options": [
7007
- "public",
7008
- "private"
7009
- ],
7007
+ "jobId": {
7008
+ "description": "Job ID",
7009
+ "name": "jobId",
7010
7010
  "required": true
7011
7011
  }
7012
7012
  },
7013
- "description": "Set the visibility of a dataset",
7013
+ "description": "Get the status of a knowledge base job",
7014
7014
  "examples": [
7015
7015
  {
7016
- "command": "<%= config.bin %> <%= command.id %> my-dataset private",
7017
- "description": "Make a dataset private"
7016
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456",
7017
+ "description": "Get the current status of a job"
7018
7018
  },
7019
7019
  {
7020
- "command": "<%= config.bin %> <%= command.id %> my-dataset public",
7021
- "description": "Make a dataset public"
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)"
7022
7022
  }
7023
7023
  ],
7024
7024
  "flags": {
7025
- "project-id": {
7026
- "char": "p",
7027
- "description": "Project ID to set dataset visibility for (overrides CLI configuration)",
7028
- "helpGroup": "OVERRIDE",
7029
- "name": "project-id",
7030
- "hasDynamicHelp": false,
7031
- "helpValue": "<id>",
7032
- "multiple": false,
7033
- "type": "option"
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"
7034
7036
  }
7035
7037
  },
7036
7038
  "hasDynamicHelp": false,
7037
- "hiddenAliases": [
7038
- "dataset:visibility:set"
7039
- ],
7040
- "id": "datasets:visibility:set",
7039
+ "hiddenAliases": [],
7040
+ "id": "context:jobs:get",
7041
7041
  "pluginAlias": "@sanity/cli",
7042
7042
  "pluginName": "@sanity/cli",
7043
7043
  "pluginType": "core",
@@ -7046,11 +7046,11 @@
7046
7046
  "relativePath": [
7047
7047
  "dist",
7048
7048
  "commands",
7049
- "datasets",
7050
- "visibility",
7051
- "set.js"
7049
+ "context",
7050
+ "jobs",
7051
+ "get.js"
7052
7052
  ]
7053
7053
  }
7054
7054
  },
7055
- "version": "8.13.0"
7055
+ "version": "8.13.1"
7056
7056
  }