@sanity/cli 8.15.0 → 8.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -359,6 +359,10 @@
359
359
  "command": "<%= config.bin %> <%= command.id %> --external",
360
360
  "description": "Register an externally hosted studio (studioHost contains full URL)"
361
361
  },
362
+ {
363
+ "command": "<%= config.bin %> <%= command.id %> --external --url https://apps.example.com",
364
+ "description": "Register an externally hosted studio, served from the provided origin"
365
+ },
362
366
  {
363
367
  "command": "<%= config.bin %> <%= command.id %> --create --title \"My App\" --yes --json",
364
368
  "description": "Create and deploy an App SDK app without prompts. Save application.id as deployment.appId, then omit --create on later deploys"
@@ -406,8 +410,7 @@
406
410
  "description": "Register an externally hosted studio",
407
411
  "exclusive": [
408
412
  "source-maps",
409
- "minify",
410
- "build"
413
+ "minify"
411
414
  ],
412
415
  "name": "external",
413
416
  "allowNo": false,
@@ -446,7 +449,7 @@
446
449
  "type": "option"
447
450
  },
448
451
  "url": {
449
- "description": "Studio URL for deployment. For external studios, the full URL. For hosted studios, the hostname (e.g. \"my-studio\" or \"my-studio.sanity.studio\")",
452
+ "description": "Studio URL for deployment. For external deploys, the full URL. For hosted studios, the hostname (e.g. \"my-studio\" or \"my-studio.sanity.studio\")",
450
453
  "name": "url",
451
454
  "hasDynamicHelp": false,
452
455
  "multiple": false,
@@ -1773,156 +1776,50 @@
1773
1776
  "list.js"
1774
1777
  ]
1775
1778
  },
1776
- "datasets:copy": {
1779
+ "context:build": {
1777
1780
  "aliases": [],
1778
1781
  "args": {
1779
- "source": {
1780
- "description": "Name of the dataset to copy from",
1781
- "name": "source",
1782
- "required": false
1783
- },
1784
- "target": {
1785
- "description": "Name of the dataset to copy to",
1786
- "name": "target",
1787
- "required": false
1782
+ "knowledgeBaseId": {
1783
+ "description": "Knowledge base ID",
1784
+ "name": "knowledgeBaseId",
1785
+ "required": true
1788
1786
  }
1789
1787
  },
1790
- "description": "Copy a dataset or manage copy jobs",
1788
+ "description": "Build a knowledge base from its imported content",
1791
1789
  "examples": [
1792
1790
  {
1793
- "command": "<%= config.bin %> <%= command.id %>",
1794
- "description": "Interactively copy a dataset"
1795
- },
1796
- {
1797
- "command": "<%= config.bin %> <%= command.id %> source-dataset",
1798
- "description": "Copy from source-dataset (prompts for target)"
1799
- },
1800
- {
1801
- "command": "<%= config.bin %> <%= command.id %> source-dataset target-dataset",
1802
- "description": "Copy from source-dataset to target-dataset"
1803
- },
1804
- {
1805
- "command": "<%= config.bin %> <%= command.id %> --skip-history source target",
1806
- "description": "Copy without preserving document history (faster for large datasets)"
1807
- },
1808
- {
1809
- "command": "<%= config.bin %> <%= command.id %> --skip-content-releases source target",
1810
- "description": "Copy without content release documents"
1811
- },
1812
- {
1813
- "command": "<%= config.bin %> <%= command.id %> --detach source target",
1814
- "description": "Start copy job without waiting for completion"
1815
- },
1816
- {
1817
- "command": "<%= config.bin %> <%= command.id %> --attach <job-id>",
1818
- "description": "Attach to a running copy job to follow progress"
1791
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
1792
+ "description": "Start a build and return the job ID"
1819
1793
  },
1820
1794
  {
1821
- "command": "<%= config.bin %> <%= command.id %> --list",
1822
- "description": "List all dataset copy jobs"
1795
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --watch",
1796
+ "description": "Start a build and wait for it to finish (non-zero exit on failure)"
1823
1797
  },
1824
1798
  {
1825
- "command": "<%= config.bin %> <%= command.id %> --list --offset 2 --limit 10",
1826
- "description": "List copy jobs with pagination"
1799
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --cancel",
1800
+ "description": "Cancel the running build, if any"
1827
1801
  }
1828
1802
  ],
1829
1803
  "flags": {
1830
- "project-id": {
1831
- "char": "p",
1832
- "description": "Project ID to copy dataset in (overrides CLI configuration)",
1833
- "helpGroup": "OVERRIDE",
1834
- "name": "project-id",
1835
- "hasDynamicHelp": false,
1836
- "helpValue": "<id>",
1837
- "multiple": false,
1838
- "type": "option"
1839
- },
1840
- "attach": {
1841
- "description": "Attach to the running copy process to show progress",
1842
- "exclusive": [
1843
- "list",
1844
- "detach",
1845
- "skip-history"
1846
- ],
1847
- "name": "attach",
1848
- "required": false,
1849
- "hasDynamicHelp": false,
1850
- "multiple": false,
1851
- "type": "option"
1852
- },
1853
- "detach": {
1854
- "description": "Start the copy without waiting for it to finish",
1855
- "exclusive": [
1856
- "list",
1857
- "attach"
1858
- ],
1859
- "name": "detach",
1860
- "required": false,
1861
- "allowNo": false,
1862
- "type": "boolean"
1863
- },
1864
- "limit": {
1865
- "dependsOn": [
1866
- "list"
1867
- ],
1868
- "description": "Maximum number of jobs returned (default 10, max 1000)",
1869
- "name": "limit",
1870
- "required": false,
1871
- "hasDynamicHelp": false,
1872
- "multiple": false,
1873
- "type": "option"
1874
- },
1875
- "list": {
1876
- "description": "Lists all dataset copy jobs",
1877
- "exclusive": [
1878
- "attach",
1879
- "detach",
1880
- "skip-history"
1881
- ],
1882
- "name": "list",
1883
- "required": false,
1884
- "allowNo": false,
1885
- "type": "boolean"
1886
- },
1887
- "offset": {
1888
- "dependsOn": [
1889
- "list"
1890
- ],
1891
- "description": "Start position in the list of jobs (default 0)",
1892
- "name": "offset",
1893
- "required": false,
1894
- "hasDynamicHelp": false,
1895
- "multiple": false,
1896
- "type": "option"
1897
- },
1898
- "skip-content-releases": {
1899
- "description": "Don't copy content release documents to the target dataset",
1804
+ "cancel": {
1805
+ "description": "Cancel the running build instead of starting one",
1900
1806
  "exclusive": [
1901
- "list",
1902
- "attach"
1807
+ "watch"
1903
1808
  ],
1904
- "name": "skip-content-releases",
1905
- "required": false,
1809
+ "name": "cancel",
1906
1810
  "allowNo": false,
1907
1811
  "type": "boolean"
1908
1812
  },
1909
- "skip-history": {
1910
- "description": "Don't preserve document history on copy",
1911
- "exclusive": [
1912
- "list",
1913
- "attach"
1914
- ],
1915
- "name": "skip-history",
1916
- "required": false,
1813
+ "watch": {
1814
+ "description": "Wait for the build to finish, exiting non-zero if it fails",
1815
+ "name": "watch",
1917
1816
  "allowNo": false,
1918
1817
  "type": "boolean"
1919
1818
  }
1920
1819
  },
1921
1820
  "hasDynamicHelp": false,
1922
- "hiddenAliases": [
1923
- "dataset:copy"
1924
- ],
1925
- "id": "datasets:copy",
1821
+ "hiddenAliases": [],
1822
+ "id": "context:build",
1926
1823
  "pluginAlias": "@sanity/cli",
1927
1824
  "pluginName": "@sanity/cli",
1928
1825
  "pluginType": "core",
@@ -1931,135 +1828,112 @@
1931
1828
  "relativePath": [
1932
1829
  "dist",
1933
1830
  "commands",
1934
- "datasets",
1935
- "copy.js"
1831
+ "context",
1832
+ "build.js"
1936
1833
  ]
1937
1834
  },
1938
- "datasets:create": {
1835
+ "context:create": {
1939
1836
  "aliases": [],
1940
- "args": {
1941
- "name": {
1942
- "description": "Name of the dataset to create",
1943
- "name": "name",
1944
- "required": false
1945
- }
1946
- },
1947
- "description": "Create a new dataset for the project",
1837
+ "args": {},
1838
+ "description": "Create a knowledge base",
1948
1839
  "examples": [
1949
1840
  {
1950
1841
  "command": "<%= config.bin %> <%= command.id %>",
1951
- "description": "Interactively create a dataset"
1952
- },
1953
- {
1954
- "command": "<%= config.bin %> <%= command.id %> my-dataset",
1955
- "description": "Create a dataset named \"my-dataset\""
1842
+ "description": "Interactively create a knowledge base"
1956
1843
  },
1957
1844
  {
1958
- "command": "<%= config.bin %> <%= command.id %> my-dataset --visibility private",
1959
- "description": "Create a private dataset named \"my-dataset\""
1845
+ "command": "<%= config.bin %> <%= command.id %> --organization org-abc123 --title \"Support docs\" --description \"Product docs and troubleshooting guides\"",
1846
+ "description": "Create a knowledge base in a specific organization"
1960
1847
  }
1961
1848
  ],
1962
1849
  "flags": {
1963
- "project-id": {
1964
- "char": "p",
1965
- "description": "Project ID to create dataset in (overrides CLI configuration)",
1850
+ "organization": {
1851
+ "description": "Organization to create the knowledge base in (overrides CLI configuration)",
1966
1852
  "helpGroup": "OVERRIDE",
1967
- "name": "project-id",
1853
+ "name": "organization",
1968
1854
  "hasDynamicHelp": false,
1969
1855
  "helpValue": "<id>",
1970
1856
  "multiple": false,
1971
1857
  "type": "option"
1972
1858
  },
1973
- "embeddings": {
1974
- "description": "Enable embeddings for this dataset",
1975
- "name": "embeddings",
1976
- "allowNo": false,
1977
- "type": "boolean"
1978
- },
1979
- "embeddings-projection": {
1980
- "dependsOn": [
1981
- "embeddings"
1982
- ],
1983
- "description": "GROQ projection for embeddings indexing (e.g. \"{ title, body }\")",
1984
- "name": "embeddings-projection",
1859
+ "description": {
1860
+ "description": "Knowledge base description",
1861
+ "name": "description",
1985
1862
  "hasDynamicHelp": false,
1986
1863
  "multiple": false,
1987
1864
  "type": "option"
1988
1865
  },
1989
- "visibility": {
1990
- "description": "Set visibility for this dataset (custom/private/public)",
1991
- "name": "visibility",
1992
- "required": false,
1866
+ "title": {
1867
+ "description": "Knowledge base title",
1868
+ "name": "title",
1993
1869
  "hasDynamicHelp": false,
1994
1870
  "multiple": false,
1995
- "options": [
1996
- "custom",
1997
- "private",
1998
- "public"
1999
- ],
2000
1871
  "type": "option"
2001
1872
  }
2002
1873
  },
2003
1874
  "hasDynamicHelp": false,
2004
- "hiddenAliases": [
2005
- "dataset:create"
2006
- ],
2007
- "id": "datasets:create",
1875
+ "hiddenAliases": [],
1876
+ "id": "context:create",
2008
1877
  "pluginAlias": "@sanity/cli",
2009
1878
  "pluginName": "@sanity/cli",
2010
1879
  "pluginType": "core",
2011
1880
  "strict": true,
1881
+ "telemetry": {
1882
+ "redactedFlags": [
1883
+ {
1884
+ "canonical": "--title",
1885
+ "flags": [
1886
+ "--title"
1887
+ ]
1888
+ },
1889
+ {
1890
+ "canonical": "--description",
1891
+ "flags": [
1892
+ "--description"
1893
+ ]
1894
+ }
1895
+ ]
1896
+ },
2012
1897
  "isESM": true,
2013
1898
  "relativePath": [
2014
1899
  "dist",
2015
1900
  "commands",
2016
- "datasets",
1901
+ "context",
2017
1902
  "create.js"
2018
1903
  ]
2019
1904
  },
2020
- "datasets:delete": {
1905
+ "context:delete": {
2021
1906
  "aliases": [],
2022
1907
  "args": {
2023
- "datasetName": {
2024
- "description": "Dataset name to delete",
2025
- "name": "datasetName",
1908
+ "knowledgeBaseId": {
1909
+ "description": "Knowledge base ID",
1910
+ "name": "knowledgeBaseId",
2026
1911
  "required": true
2027
1912
  }
2028
1913
  },
2029
- "description": "Delete a dataset from the project",
1914
+ "description": "Delete a knowledge base and its generated content",
2030
1915
  "examples": [
2031
1916
  {
2032
- "command": "<%= config.bin %> <%= command.id %> my-dataset",
2033
- "description": "Delete a specific dataset"
1917
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
1918
+ "description": "Delete a knowledge base after confirmation"
2034
1919
  },
2035
1920
  {
2036
- "command": "<%= config.bin %> <%= command.id %> my-dataset --force",
2037
- "description": "Delete a specific dataset without confirmation"
1921
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --yes",
1922
+ "description": "Delete a knowledge base without confirmation prompt"
2038
1923
  }
2039
1924
  ],
2040
1925
  "flags": {
2041
- "project-id": {
2042
- "char": "p",
2043
- "description": "Project ID to delete dataset from (overrides CLI configuration)",
2044
- "helpGroup": "OVERRIDE",
2045
- "name": "project-id",
2046
- "hasDynamicHelp": false,
2047
- "helpValue": "<id>",
2048
- "multiple": false,
2049
- "type": "option"
2050
- },
2051
- "force": {
2052
- "description": "Do not prompt for delete confirmation - forcefully delete",
2053
- "name": "force",
1926
+ "yes": {
1927
+ "char": "y",
1928
+ "description": "Skip confirmation prompt (unattended mode)",
1929
+ "name": "yes",
2054
1930
  "allowNo": false,
2055
1931
  "type": "boolean"
2056
1932
  }
2057
1933
  },
2058
1934
  "hasDynamicHelp": false,
2059
- "hiddenAliases": [
2060
- "dataset:delete"
2061
- ],
2062
- "id": "datasets:delete",
1935
+ "hiddenAliases": [],
1936
+ "id": "context:delete",
2063
1937
  "pluginAlias": "@sanity/cli",
2064
1938
  "pluginName": "@sanity/cli",
2065
1939
  "pluginType": "core",
@@ -2068,278 +1942,41 @@
2068
1942
  "relativePath": [
2069
1943
  "dist",
2070
1944
  "commands",
2071
- "datasets",
1945
+ "context",
2072
1946
  "delete.js"
2073
1947
  ]
2074
1948
  },
2075
- "datasets:export": {
2076
- "aliases": [],
2077
- "args": {
2078
- "name": {
2079
- "description": "Name of the dataset to export",
2080
- "name": "name"
2081
- },
2082
- "destination": {
2083
- "description": "Output destination file path",
2084
- "name": "destination"
2085
- }
2086
- },
2087
- "description": "Export a dataset to a local gzipped tarball. Assets returning 401, 403, or 404 are excluded from the export.",
2088
- "examples": [
2089
- {
2090
- "command": "<%= config.bin %> <%= command.id %> moviedb localPath.tar.gz",
2091
- "description": "Export dataset \"moviedb\" to localPath.tar.gz"
2092
- },
2093
- {
2094
- "command": "<%= config.bin %> <%= command.id %> moviedb assetless.tar.gz --no-assets",
2095
- "description": "Export dataset without assets"
2096
- },
2097
- {
2098
- "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --raw",
2099
- "description": "Export raw documents without asset reference rewriting"
2100
- },
2101
- {
2102
- "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --types products,shops",
2103
- "description": "Export specific document types"
2104
- },
2105
- {
2106
- "command": "<%= config.bin %> <%= command.id %> moviedb moviedb.tar.gz --no-strict-asset-verification",
2107
- "description": "Export dataset without aborting on asset verification failures"
2108
- }
2109
- ],
2110
- "flags": {
2111
- "project-id": {
2112
- "char": "p",
2113
- "description": "Project ID to export dataset from (overrides CLI configuration)",
2114
- "helpGroup": "OVERRIDE",
2115
- "name": "project-id",
2116
- "hasDynamicHelp": false,
2117
- "helpValue": "<id>",
2118
- "multiple": false,
2119
- "type": "option"
2120
- },
2121
- "asset-concurrency": {
2122
- "description": "Concurrent number of asset downloads",
2123
- "name": "asset-concurrency",
2124
- "default": 8,
2125
- "hasDynamicHelp": false,
2126
- "multiple": false,
2127
- "type": "option"
2128
- },
2129
- "mode": {
2130
- "description": "Export mode ('cursor' is faster for large datasets but may miss concurrent changes)",
2131
- "name": "mode",
2132
- "default": "stream",
2133
- "hasDynamicHelp": false,
2134
- "multiple": false,
2135
- "options": [
2136
- "stream",
2137
- "cursor"
2138
- ],
2139
- "type": "option"
2140
- },
2141
- "no-assets": {
2142
- "description": "Export only non-asset documents and remove references to image assets",
2143
- "name": "no-assets",
2144
- "allowNo": false,
2145
- "type": "boolean"
2146
- },
2147
- "no-compress": {
2148
- "description": "Skips compressing tarball entries (still generates a gzip file)",
2149
- "name": "no-compress",
2150
- "allowNo": false,
2151
- "type": "boolean"
2152
- },
2153
- "no-drafts": {
2154
- "description": "Export only published versions of documents",
2155
- "name": "no-drafts",
2156
- "allowNo": false,
2157
- "type": "boolean"
2158
- },
2159
- "no-strict-asset-verification": {
2160
- "description": "Do not abort the export when an asset fails hash or content-length verification",
2161
- "name": "no-strict-asset-verification",
2162
- "allowNo": false,
2163
- "type": "boolean"
2164
- },
2165
- "overwrite": {
2166
- "description": "Overwrite any file with the same name",
2167
- "name": "overwrite",
2168
- "allowNo": false,
2169
- "type": "boolean"
2170
- },
2171
- "raw": {
2172
- "description": "Extract only documents, without rewriting asset references",
2173
- "name": "raw",
2174
- "allowNo": false,
2175
- "type": "boolean"
2176
- },
2177
- "types": {
2178
- "description": "Defines which document types to export (comma-separated)",
2179
- "name": "types",
2180
- "hasDynamicHelp": false,
2181
- "multiple": false,
2182
- "type": "option"
2183
- }
2184
- },
2185
- "hasDynamicHelp": false,
2186
- "hiddenAliases": [
2187
- "dataset:export"
2188
- ],
2189
- "id": "datasets:export",
2190
- "pluginAlias": "@sanity/cli",
2191
- "pluginName": "@sanity/cli",
2192
- "pluginType": "core",
2193
- "strict": true,
2194
- "isESM": true,
2195
- "relativePath": [
2196
- "dist",
2197
- "commands",
2198
- "datasets",
2199
- "export.js"
2200
- ]
2201
- },
2202
- "datasets:import": {
1949
+ "context:get": {
2203
1950
  "aliases": [],
2204
1951
  "args": {
2205
- "source": {
2206
- "description": "Source file (use \"-\" for stdin)",
2207
- "name": "source",
1952
+ "knowledgeBaseId": {
1953
+ "description": "Knowledge base ID",
1954
+ "name": "knowledgeBaseId",
2208
1955
  "required": true
2209
- },
2210
- "targetDataset": {
2211
- "description": "Target dataset (prefer --dataset flag instead)",
2212
- "name": "targetDataset",
2213
- "required": false
2214
1956
  }
2215
1957
  },
2216
- "description": "Import documents to a Sanity dataset",
1958
+ "description": "Get details of a knowledge base",
2217
1959
  "examples": [
2218
1960
  {
2219
- "command": "<%= config.bin %> <%= command.id %> -d staging my-dataset.ndjson",
2220
- "description": "Import \"./my-dataset.ndjson\" into dataset \"staging\""
2221
- },
2222
- {
2223
- "command": "cat my-dataset.ndjson | <%= config.bin %> <%= command.id %> -d test -",
2224
- "description": "Import into dataset \"test\" from stdin"
2225
- },
2226
- {
2227
- "command": "<%= config.bin %> <%= command.id %> -p projectId -d staging my-dataset.ndjson",
2228
- "description": "Import with explicit project ID (overrides CLI configuration)"
1961
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
1962
+ "description": "Get details of a specific knowledge base"
2229
1963
  },
2230
1964
  {
2231
- "command": "<%= config.bin %> <%= command.id %> -d staging -t someSecretToken my-dataset.ndjson",
2232
- "description": "Import with an explicit token (e.g. for CI/CD)"
1965
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
1966
+ "description": "Output the knowledge base as JSON"
2233
1967
  }
2234
1968
  ],
2235
1969
  "flags": {
2236
- "allow-assets-in-different-dataset": {
2237
- "description": "Allow asset documents to reference different project/dataset",
2238
- "name": "allow-assets-in-different-dataset",
2239
- "allowNo": false,
2240
- "type": "boolean"
2241
- },
2242
- "allow-failing-assets": {
2243
- "description": "Skip assets that cannot be fetched/uploaded",
2244
- "name": "allow-failing-assets",
2245
- "allowNo": false,
2246
- "type": "boolean"
2247
- },
2248
- "allow-replacement-characters": {
2249
- "description": "Allow unicode replacement characters in imported documents",
2250
- "name": "allow-replacement-characters",
2251
- "allowNo": false,
2252
- "type": "boolean"
2253
- },
2254
- "allow-system-documents": {
2255
- "description": "Imports system documents",
2256
- "name": "allow-system-documents",
2257
- "allowNo": false,
2258
- "type": "boolean"
2259
- },
2260
- "asset-concurrency": {
2261
- "description": "Number of parallel asset imports",
2262
- "name": "asset-concurrency",
2263
- "hasDynamicHelp": false,
2264
- "multiple": false,
2265
- "type": "option"
2266
- },
2267
- "dataset": {
2268
- "char": "d",
2269
- "description": "Dataset to import to",
2270
- "name": "dataset",
2271
- "hasDynamicHelp": false,
2272
- "helpValue": "<name>",
2273
- "multiple": false,
2274
- "type": "option"
2275
- },
2276
- "missing": {
2277
- "description": "Skip documents that already exist",
2278
- "exclusive": [
2279
- "replace"
2280
- ],
2281
- "name": "missing",
2282
- "allowNo": false,
2283
- "type": "boolean"
2284
- },
2285
- "project-id": {
2286
- "char": "p",
2287
- "description": "Project ID to import to (overrides CLI configuration)",
2288
- "helpGroup": "OVERRIDE",
2289
- "name": "project-id",
2290
- "hasDynamicHelp": false,
2291
- "helpValue": "<id>",
2292
- "multiple": false,
2293
- "type": "option"
2294
- },
2295
- "project": {
2296
- "deprecated": {
2297
- "to": "project-id"
2298
- },
2299
- "description": "Project ID to import to",
2300
- "hidden": true,
2301
- "name": "project",
2302
- "hasDynamicHelp": false,
2303
- "multiple": false,
2304
- "type": "option"
2305
- },
2306
- "replace": {
2307
- "description": "Replace documents with the same IDs",
2308
- "exclusive": [
2309
- "missing"
2310
- ],
2311
- "name": "replace",
2312
- "allowNo": false,
2313
- "type": "boolean"
2314
- },
2315
- "replace-assets": {
2316
- "description": "Skip reuse of existing assets",
2317
- "name": "replace-assets",
2318
- "allowNo": false,
2319
- "type": "boolean"
2320
- },
2321
- "skip-cross-dataset-references": {
2322
- "description": "Skips references to other datasets",
2323
- "name": "skip-cross-dataset-references",
1970
+ "json": {
1971
+ "description": "Output the knowledge base in JSON format",
1972
+ "name": "json",
2324
1973
  "allowNo": false,
2325
1974
  "type": "boolean"
2326
- },
2327
- "token": {
2328
- "char": "t",
2329
- "description": "Token to authenticate with",
2330
- "env": "SANITY_IMPORT_TOKEN",
2331
- "name": "token",
2332
- "required": false,
2333
- "hasDynamicHelp": false,
2334
- "multiple": false,
2335
- "type": "option"
2336
1975
  }
2337
1976
  },
2338
1977
  "hasDynamicHelp": false,
2339
- "hiddenAliases": [
2340
- "dataset:import"
2341
- ],
2342
- "id": "datasets:import",
1978
+ "hiddenAliases": [],
1979
+ "id": "context:get",
2343
1980
  "pluginAlias": "@sanity/cli",
2344
1981
  "pluginName": "@sanity/cli",
2345
1982
  "pluginType": "core",
@@ -2348,41 +1985,48 @@
2348
1985
  "relativePath": [
2349
1986
  "dist",
2350
1987
  "commands",
2351
- "datasets",
2352
- "import.js"
1988
+ "context",
1989
+ "get.js"
2353
1990
  ]
2354
1991
  },
2355
- "datasets:list": {
1992
+ "context:list": {
2356
1993
  "aliases": [],
2357
1994
  "args": {},
2358
- "description": "List datasets for the project",
1995
+ "description": "List knowledge bases in an organization",
2359
1996
  "examples": [
2360
1997
  {
2361
1998
  "command": "<%= config.bin %> <%= command.id %>",
2362
- "description": "List datasets for the project"
1999
+ "description": "List knowledge bases, selecting the organization interactively"
2363
2000
  },
2364
2001
  {
2365
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2366
- "description": "List datasets for a specific project"
2002
+ "command": "<%= config.bin %> <%= command.id %> --organization org-abc123",
2003
+ "description": "List knowledge bases in a specific organization"
2004
+ },
2005
+ {
2006
+ "command": "<%= config.bin %> <%= command.id %> --organization org-abc123 --json",
2007
+ "description": "Output knowledge bases as JSON"
2367
2008
  }
2368
2009
  ],
2369
2010
  "flags": {
2370
- "project-id": {
2371
- "char": "p",
2372
- "description": "Project ID to list datasets for (overrides CLI configuration)",
2011
+ "organization": {
2012
+ "description": "Organization to list knowledge bases for (overrides CLI configuration)",
2373
2013
  "helpGroup": "OVERRIDE",
2374
- "name": "project-id",
2014
+ "name": "organization",
2375
2015
  "hasDynamicHelp": false,
2376
2016
  "helpValue": "<id>",
2377
2017
  "multiple": false,
2378
2018
  "type": "option"
2019
+ },
2020
+ "json": {
2021
+ "description": "Output knowledge bases in JSON format",
2022
+ "name": "json",
2023
+ "allowNo": false,
2024
+ "type": "boolean"
2379
2025
  }
2380
2026
  },
2381
2027
  "hasDynamicHelp": false,
2382
- "hiddenAliases": [
2383
- "dataset:list"
2384
- ],
2385
- "id": "datasets:list",
2028
+ "hiddenAliases": [],
2029
+ "id": "context:list",
2386
2030
  "pluginAlias": "@sanity/cli",
2387
2031
  "pluginName": "@sanity/cli",
2388
2032
  "pluginType": "core",
@@ -2391,11 +2035,11 @@
2391
2035
  "relativePath": [
2392
2036
  "dist",
2393
2037
  "commands",
2394
- "datasets",
2038
+ "context",
2395
2039
  "list.js"
2396
2040
  ]
2397
2041
  },
2398
- "context:build": {
2042
+ "context:refresh": {
2399
2043
  "aliases": [],
2400
2044
  "args": {
2401
2045
  "knowledgeBaseId": {
@@ -2404,41 +2048,17 @@
2404
2048
  "required": true
2405
2049
  }
2406
2050
  },
2407
- "description": "Build a knowledge base from its imported content",
2051
+ "description": "Refresh a knowledge base: re-check sources and apply what changed",
2408
2052
  "examples": [
2409
2053
  {
2410
2054
  "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2411
- "description": "Start a build and return the job ID"
2412
- },
2413
- {
2414
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --watch",
2415
- "description": "Start a build and wait for it to finish (non-zero exit on failure)"
2416
- },
2417
- {
2418
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --cancel",
2419
- "description": "Cancel the running build, if any"
2055
+ "description": "Start an incremental refresh"
2420
2056
  }
2421
2057
  ],
2422
- "flags": {
2423
- "cancel": {
2424
- "description": "Cancel the running build instead of starting one",
2425
- "exclusive": [
2426
- "watch"
2427
- ],
2428
- "name": "cancel",
2429
- "allowNo": false,
2430
- "type": "boolean"
2431
- },
2432
- "watch": {
2433
- "description": "Wait for the build to finish, exiting non-zero if it fails",
2434
- "name": "watch",
2435
- "allowNo": false,
2436
- "type": "boolean"
2437
- }
2438
- },
2058
+ "flags": {},
2439
2059
  "hasDynamicHelp": false,
2440
2060
  "hiddenAliases": [],
2441
- "id": "context:build",
2061
+ "id": "context:refresh",
2442
2062
  "pluginAlias": "@sanity/cli",
2443
2063
  "pluginName": "@sanity/cli",
2444
2064
  "pluginType": "core",
@@ -2448,43 +2068,65 @@
2448
2068
  "dist",
2449
2069
  "commands",
2450
2070
  "context",
2451
- "build.js"
2071
+ "refresh.js"
2452
2072
  ]
2453
2073
  },
2454
- "context:create": {
2074
+ "context:update": {
2455
2075
  "aliases": [],
2456
- "args": {},
2457
- "description": "Create a knowledge base",
2076
+ "args": {
2077
+ "knowledgeBaseId": {
2078
+ "description": "Knowledge base ID",
2079
+ "name": "knowledgeBaseId",
2080
+ "required": true
2081
+ }
2082
+ },
2083
+ "description": "Update a knowledge base",
2458
2084
  "examples": [
2459
2085
  {
2460
- "command": "<%= config.bin %> <%= command.id %>",
2461
- "description": "Interactively create a knowledge base"
2086
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --title \"New title\"",
2087
+ "description": "Rename a knowledge base"
2462
2088
  },
2463
2089
  {
2464
- "command": "<%= config.bin %> <%= command.id %> --organization org-abc123 --title \"Support docs\" --description \"Product docs and troubleshooting guides\"",
2465
- "description": "Create a knowledge base in a specific organization"
2090
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --refresh-enabled --refresh-frequency weekly",
2091
+ "description": "Enable weekly scheduled refresh"
2092
+ },
2093
+ {
2094
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --no-refresh-enabled",
2095
+ "description": "Disable scheduled refresh"
2466
2096
  }
2467
2097
  ],
2468
2098
  "flags": {
2469
- "organization": {
2470
- "description": "Organization to create the knowledge base in (overrides CLI configuration)",
2471
- "helpGroup": "OVERRIDE",
2472
- "name": "organization",
2099
+ "description": {
2100
+ "description": "New knowledge base description",
2101
+ "name": "description",
2102
+ "required": false,
2473
2103
  "hasDynamicHelp": false,
2474
- "helpValue": "<id>",
2475
2104
  "multiple": false,
2476
2105
  "type": "option"
2477
2106
  },
2478
- "description": {
2479
- "description": "Knowledge base description",
2480
- "name": "description",
2107
+ "refresh-enabled": {
2108
+ "description": "Enable scheduled refresh (--no-refresh-enabled to disable)",
2109
+ "name": "refresh-enabled",
2110
+ "required": false,
2111
+ "allowNo": true,
2112
+ "type": "boolean"
2113
+ },
2114
+ "refresh-frequency": {
2115
+ "description": "How often scheduled refresh runs",
2116
+ "name": "refresh-frequency",
2117
+ "required": false,
2481
2118
  "hasDynamicHelp": false,
2482
2119
  "multiple": false,
2120
+ "options": [
2121
+ "weekly",
2122
+ "monthly"
2123
+ ],
2483
2124
  "type": "option"
2484
2125
  },
2485
2126
  "title": {
2486
- "description": "Knowledge base title",
2127
+ "description": "New knowledge base title",
2487
2128
  "name": "title",
2129
+ "required": false,
2488
2130
  "hasDynamicHelp": false,
2489
2131
  "multiple": false,
2490
2132
  "type": "option"
@@ -2492,7 +2134,7 @@
2492
2134
  },
2493
2135
  "hasDynamicHelp": false,
2494
2136
  "hiddenAliases": [],
2495
- "id": "context:create",
2137
+ "id": "context:update",
2496
2138
  "pluginAlias": "@sanity/cli",
2497
2139
  "pluginName": "@sanity/cli",
2498
2140
  "pluginType": "core",
@@ -2518,33 +2160,58 @@
2518
2160
  "dist",
2519
2161
  "commands",
2520
2162
  "context",
2521
- "create.js"
2163
+ "update.js"
2522
2164
  ]
2523
2165
  },
2524
- "context:delete": {
2166
+ "cors:add": {
2525
2167
  "aliases": [],
2526
2168
  "args": {
2527
- "knowledgeBaseId": {
2528
- "description": "Knowledge base ID",
2529
- "name": "knowledgeBaseId",
2169
+ "origin": {
2170
+ "description": "Origin to allow (e.g., https://example.com)",
2171
+ "name": "origin",
2530
2172
  "required": true
2531
2173
  }
2532
2174
  },
2533
- "description": "Delete a knowledge base and its generated content",
2175
+ "description": "Add a CORS origin to the project",
2534
2176
  "examples": [
2535
2177
  {
2536
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2537
- "description": "Delete a knowledge base after confirmation"
2178
+ "command": "<%= config.bin %> <%= command.id %>",
2179
+ "description": "Interactively add a CORS origin"
2538
2180
  },
2539
2181
  {
2540
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --yes",
2541
- "description": "Delete a knowledge base without confirmation prompt"
2182
+ "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
2183
+ "description": "Add a localhost origin without credentials"
2184
+ },
2185
+ {
2186
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
2187
+ "description": "Add a production origin with credentials allowed"
2188
+ },
2189
+ {
2190
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project-id abc123",
2191
+ "description": "Add a CORS origin for a specific project"
2542
2192
  }
2543
2193
  ],
2544
2194
  "flags": {
2195
+ "project-id": {
2196
+ "char": "p",
2197
+ "description": "Project ID to add CORS origin to (overrides CLI configuration)",
2198
+ "helpGroup": "OVERRIDE",
2199
+ "name": "project-id",
2200
+ "hasDynamicHelp": false,
2201
+ "helpValue": "<id>",
2202
+ "multiple": false,
2203
+ "type": "option"
2204
+ },
2205
+ "credentials": {
2206
+ "description": "Allow credentials (token/cookie) to be sent from this origin",
2207
+ "name": "credentials",
2208
+ "required": false,
2209
+ "allowNo": true,
2210
+ "type": "boolean"
2211
+ },
2545
2212
  "yes": {
2546
2213
  "char": "y",
2547
- "description": "Skip confirmation prompt (unattended mode)",
2214
+ "description": "Confirm risky wildcard origins without prompting",
2548
2215
  "name": "yes",
2549
2216
  "allowNo": false,
2550
2217
  "type": "boolean"
@@ -2552,7 +2219,7 @@
2552
2219
  },
2553
2220
  "hasDynamicHelp": false,
2554
2221
  "hiddenAliases": [],
2555
- "id": "context:delete",
2222
+ "id": "cors:add",
2556
2223
  "pluginAlias": "@sanity/cli",
2557
2224
  "pluginName": "@sanity/cli",
2558
2225
  "pluginType": "core",
@@ -2561,91 +2228,49 @@
2561
2228
  "relativePath": [
2562
2229
  "dist",
2563
2230
  "commands",
2564
- "context",
2565
- "delete.js"
2231
+ "cors",
2232
+ "add.js"
2566
2233
  ]
2567
2234
  },
2568
- "context:get": {
2235
+ "cors:delete": {
2569
2236
  "aliases": [],
2570
2237
  "args": {
2571
- "knowledgeBaseId": {
2572
- "description": "Knowledge base ID",
2573
- "name": "knowledgeBaseId",
2574
- "required": true
2575
- }
2576
- },
2577
- "description": "Get details of a knowledge base",
2578
- "examples": [
2579
- {
2580
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2581
- "description": "Get details of a specific knowledge base"
2582
- },
2583
- {
2584
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
2585
- "description": "Output the knowledge base as JSON"
2586
- }
2587
- ],
2588
- "flags": {
2589
- "json": {
2590
- "description": "Output the knowledge base in JSON format",
2591
- "name": "json",
2592
- "allowNo": false,
2593
- "type": "boolean"
2238
+ "origin": {
2239
+ "description": "Origin to delete (will prompt if not provided)",
2240
+ "name": "origin",
2241
+ "required": false
2594
2242
  }
2595
2243
  },
2596
- "hasDynamicHelp": false,
2597
- "hiddenAliases": [],
2598
- "id": "context:get",
2599
- "pluginAlias": "@sanity/cli",
2600
- "pluginName": "@sanity/cli",
2601
- "pluginType": "core",
2602
- "strict": true,
2603
- "isESM": true,
2604
- "relativePath": [
2605
- "dist",
2606
- "commands",
2607
- "context",
2608
- "get.js"
2609
- ]
2610
- },
2611
- "context:list": {
2612
- "aliases": [],
2613
- "args": {},
2614
- "description": "List knowledge bases in an organization",
2244
+ "description": "Delete a CORS origin from the project",
2615
2245
  "examples": [
2616
2246
  {
2617
2247
  "command": "<%= config.bin %> <%= command.id %>",
2618
- "description": "List knowledge bases, selecting the organization interactively"
2248
+ "description": "Interactively select and delete a CORS origin"
2619
2249
  },
2620
2250
  {
2621
- "command": "<%= config.bin %> <%= command.id %> --organization org-abc123",
2622
- "description": "List knowledge bases in a specific organization"
2251
+ "command": "<%= config.bin %> <%= command.id %> https://example.com",
2252
+ "description": "Delete a specific CORS origin"
2623
2253
  },
2624
2254
  {
2625
- "command": "<%= config.bin %> <%= command.id %> --organization org-abc123 --json",
2626
- "description": "Output knowledge bases as JSON"
2255
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2256
+ "description": "Delete a CORS origin from a specific project"
2627
2257
  }
2628
2258
  ],
2629
2259
  "flags": {
2630
- "organization": {
2631
- "description": "Organization to list knowledge bases for (overrides CLI configuration)",
2260
+ "project-id": {
2261
+ "char": "p",
2262
+ "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
2632
2263
  "helpGroup": "OVERRIDE",
2633
- "name": "organization",
2264
+ "name": "project-id",
2634
2265
  "hasDynamicHelp": false,
2635
2266
  "helpValue": "<id>",
2636
2267
  "multiple": false,
2637
2268
  "type": "option"
2638
- },
2639
- "json": {
2640
- "description": "Output knowledge bases in JSON format",
2641
- "name": "json",
2642
- "allowNo": false,
2643
- "type": "boolean"
2644
2269
  }
2645
2270
  },
2646
2271
  "hasDynamicHelp": false,
2647
2272
  "hiddenAliases": [],
2648
- "id": "context:list",
2273
+ "id": "cors:delete",
2649
2274
  "pluginAlias": "@sanity/cli",
2650
2275
  "pluginName": "@sanity/cli",
2651
2276
  "pluginType": "core",
@@ -2654,30 +2279,39 @@
2654
2279
  "relativePath": [
2655
2280
  "dist",
2656
2281
  "commands",
2657
- "context",
2658
- "list.js"
2659
- ]
2660
- },
2661
- "context:refresh": {
2662
- "aliases": [],
2663
- "args": {
2664
- "knowledgeBaseId": {
2665
- "description": "Knowledge base ID",
2666
- "name": "knowledgeBaseId",
2667
- "required": true
2668
- }
2669
- },
2670
- "description": "Refresh a knowledge base: re-check sources and apply what changed",
2282
+ "cors",
2283
+ "delete.js"
2284
+ ]
2285
+ },
2286
+ "cors:list": {
2287
+ "aliases": [],
2288
+ "args": {},
2289
+ "description": "List CORS origins for the project",
2671
2290
  "examples": [
2672
2291
  {
2673
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2674
- "description": "Start an incremental refresh"
2292
+ "command": "<%= config.bin %> <%= command.id %>",
2293
+ "description": "List CORS origins for the project"
2294
+ },
2295
+ {
2296
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2297
+ "description": "List CORS origins for a specific project"
2675
2298
  }
2676
2299
  ],
2677
- "flags": {},
2300
+ "flags": {
2301
+ "project-id": {
2302
+ "char": "p",
2303
+ "description": "Project ID to list CORS origins for (overrides CLI configuration)",
2304
+ "helpGroup": "OVERRIDE",
2305
+ "name": "project-id",
2306
+ "hasDynamicHelp": false,
2307
+ "helpValue": "<id>",
2308
+ "multiple": false,
2309
+ "type": "option"
2310
+ }
2311
+ },
2678
2312
  "hasDynamicHelp": false,
2679
2313
  "hiddenAliases": [],
2680
- "id": "context:refresh",
2314
+ "id": "cors:list",
2681
2315
  "pluginAlias": "@sanity/cli",
2682
2316
  "pluginName": "@sanity/cli",
2683
2317
  "pluginType": "core",
@@ -2686,159 +2320,242 @@
2686
2320
  "relativePath": [
2687
2321
  "dist",
2688
2322
  "commands",
2689
- "context",
2690
- "refresh.js"
2323
+ "cors",
2324
+ "list.js"
2691
2325
  ]
2692
2326
  },
2693
- "context:update": {
2327
+ "datasets:copy": {
2694
2328
  "aliases": [],
2695
2329
  "args": {
2696
- "knowledgeBaseId": {
2697
- "description": "Knowledge base ID",
2698
- "name": "knowledgeBaseId",
2699
- "required": true
2330
+ "source": {
2331
+ "description": "Name of the dataset to copy from",
2332
+ "name": "source",
2333
+ "required": false
2334
+ },
2335
+ "target": {
2336
+ "description": "Name of the dataset to copy to",
2337
+ "name": "target",
2338
+ "required": false
2700
2339
  }
2701
2340
  },
2702
- "description": "Update a knowledge base",
2341
+ "description": "Copy a dataset or manage copy jobs",
2703
2342
  "examples": [
2704
2343
  {
2705
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --title \"New title\"",
2706
- "description": "Rename a knowledge base"
2344
+ "command": "<%= config.bin %> <%= command.id %>",
2345
+ "description": "Interactively copy a dataset"
2707
2346
  },
2708
2347
  {
2709
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --refresh-enabled --refresh-frequency weekly",
2710
- "description": "Enable weekly scheduled refresh"
2348
+ "command": "<%= config.bin %> <%= command.id %> source-dataset",
2349
+ "description": "Copy from source-dataset (prompts for target)"
2711
2350
  },
2712
2351
  {
2713
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --no-refresh-enabled",
2714
- "description": "Disable scheduled refresh"
2352
+ "command": "<%= config.bin %> <%= command.id %> source-dataset target-dataset",
2353
+ "description": "Copy from source-dataset to target-dataset"
2354
+ },
2355
+ {
2356
+ "command": "<%= config.bin %> <%= command.id %> --skip-history source target",
2357
+ "description": "Copy without preserving document history (faster for large datasets)"
2358
+ },
2359
+ {
2360
+ "command": "<%= config.bin %> <%= command.id %> --skip-content-releases source target",
2361
+ "description": "Copy without content release documents"
2362
+ },
2363
+ {
2364
+ "command": "<%= config.bin %> <%= command.id %> --detach source target",
2365
+ "description": "Start copy job without waiting for completion"
2366
+ },
2367
+ {
2368
+ "command": "<%= config.bin %> <%= command.id %> --attach <job-id>",
2369
+ "description": "Attach to a running copy job to follow progress"
2370
+ },
2371
+ {
2372
+ "command": "<%= config.bin %> <%= command.id %> --list",
2373
+ "description": "List all dataset copy jobs"
2374
+ },
2375
+ {
2376
+ "command": "<%= config.bin %> <%= command.id %> --list --offset 2 --limit 10",
2377
+ "description": "List copy jobs with pagination"
2715
2378
  }
2716
2379
  ],
2717
2380
  "flags": {
2718
- "description": {
2719
- "description": "New knowledge base description",
2720
- "name": "description",
2381
+ "project-id": {
2382
+ "char": "p",
2383
+ "description": "Project ID to copy dataset in (overrides CLI configuration)",
2384
+ "helpGroup": "OVERRIDE",
2385
+ "name": "project-id",
2386
+ "hasDynamicHelp": false,
2387
+ "helpValue": "<id>",
2388
+ "multiple": false,
2389
+ "type": "option"
2390
+ },
2391
+ "attach": {
2392
+ "description": "Attach to the running copy process to show progress",
2393
+ "exclusive": [
2394
+ "list",
2395
+ "detach",
2396
+ "skip-history"
2397
+ ],
2398
+ "name": "attach",
2721
2399
  "required": false,
2722
2400
  "hasDynamicHelp": false,
2723
2401
  "multiple": false,
2724
2402
  "type": "option"
2725
2403
  },
2726
- "refresh-enabled": {
2727
- "description": "Enable scheduled refresh (--no-refresh-enabled to disable)",
2728
- "name": "refresh-enabled",
2404
+ "detach": {
2405
+ "description": "Start the copy without waiting for it to finish",
2406
+ "exclusive": [
2407
+ "list",
2408
+ "attach"
2409
+ ],
2410
+ "name": "detach",
2729
2411
  "required": false,
2730
- "allowNo": true,
2412
+ "allowNo": false,
2731
2413
  "type": "boolean"
2732
2414
  },
2733
- "refresh-frequency": {
2734
- "description": "How often scheduled refresh runs",
2735
- "name": "refresh-frequency",
2415
+ "limit": {
2416
+ "dependsOn": [
2417
+ "list"
2418
+ ],
2419
+ "description": "Maximum number of jobs returned (default 10, max 1000)",
2420
+ "name": "limit",
2736
2421
  "required": false,
2737
2422
  "hasDynamicHelp": false,
2738
2423
  "multiple": false,
2739
- "options": [
2740
- "weekly",
2741
- "monthly"
2742
- ],
2743
2424
  "type": "option"
2744
2425
  },
2745
- "title": {
2746
- "description": "New knowledge base title",
2747
- "name": "title",
2426
+ "list": {
2427
+ "description": "Lists all dataset copy jobs",
2428
+ "exclusive": [
2429
+ "attach",
2430
+ "detach",
2431
+ "skip-history"
2432
+ ],
2433
+ "name": "list",
2434
+ "required": false,
2435
+ "allowNo": false,
2436
+ "type": "boolean"
2437
+ },
2438
+ "offset": {
2439
+ "dependsOn": [
2440
+ "list"
2441
+ ],
2442
+ "description": "Start position in the list of jobs (default 0)",
2443
+ "name": "offset",
2748
2444
  "required": false,
2749
2445
  "hasDynamicHelp": false,
2750
2446
  "multiple": false,
2751
2447
  "type": "option"
2448
+ },
2449
+ "skip-content-releases": {
2450
+ "description": "Don't copy content release documents to the target dataset",
2451
+ "exclusive": [
2452
+ "list",
2453
+ "attach"
2454
+ ],
2455
+ "name": "skip-content-releases",
2456
+ "required": false,
2457
+ "allowNo": false,
2458
+ "type": "boolean"
2459
+ },
2460
+ "skip-history": {
2461
+ "description": "Don't preserve document history on copy",
2462
+ "exclusive": [
2463
+ "list",
2464
+ "attach"
2465
+ ],
2466
+ "name": "skip-history",
2467
+ "required": false,
2468
+ "allowNo": false,
2469
+ "type": "boolean"
2752
2470
  }
2753
2471
  },
2754
2472
  "hasDynamicHelp": false,
2755
- "hiddenAliases": [],
2756
- "id": "context:update",
2473
+ "hiddenAliases": [
2474
+ "dataset:copy"
2475
+ ],
2476
+ "id": "datasets:copy",
2757
2477
  "pluginAlias": "@sanity/cli",
2758
2478
  "pluginName": "@sanity/cli",
2759
2479
  "pluginType": "core",
2760
2480
  "strict": true,
2761
- "telemetry": {
2762
- "redactedFlags": [
2763
- {
2764
- "canonical": "--title",
2765
- "flags": [
2766
- "--title"
2767
- ]
2768
- },
2769
- {
2770
- "canonical": "--description",
2771
- "flags": [
2772
- "--description"
2773
- ]
2774
- }
2775
- ]
2776
- },
2777
2481
  "isESM": true,
2778
2482
  "relativePath": [
2779
2483
  "dist",
2780
2484
  "commands",
2781
- "context",
2782
- "update.js"
2485
+ "datasets",
2486
+ "copy.js"
2783
2487
  ]
2784
2488
  },
2785
- "cors:add": {
2489
+ "datasets:create": {
2786
2490
  "aliases": [],
2787
2491
  "args": {
2788
- "origin": {
2789
- "description": "Origin to allow (e.g., https://example.com)",
2790
- "name": "origin",
2791
- "required": true
2492
+ "name": {
2493
+ "description": "Name of the dataset to create",
2494
+ "name": "name",
2495
+ "required": false
2792
2496
  }
2793
2497
  },
2794
- "description": "Add a CORS origin to the project",
2498
+ "description": "Create a new dataset for the project",
2795
2499
  "examples": [
2796
2500
  {
2797
2501
  "command": "<%= config.bin %> <%= command.id %>",
2798
- "description": "Interactively add a CORS origin"
2799
- },
2800
- {
2801
- "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
2802
- "description": "Add a localhost origin without credentials"
2502
+ "description": "Interactively create a dataset"
2803
2503
  },
2804
2504
  {
2805
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
2806
- "description": "Add a production origin with credentials allowed"
2505
+ "command": "<%= config.bin %> <%= command.id %> my-dataset",
2506
+ "description": "Create a dataset named \"my-dataset\""
2807
2507
  },
2808
2508
  {
2809
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project-id abc123",
2810
- "description": "Add a CORS origin for a specific project"
2509
+ "command": "<%= config.bin %> <%= command.id %> my-dataset --visibility private",
2510
+ "description": "Create a private dataset named \"my-dataset\""
2811
2511
  }
2812
2512
  ],
2813
2513
  "flags": {
2814
2514
  "project-id": {
2815
2515
  "char": "p",
2816
- "description": "Project ID to add CORS origin to (overrides CLI configuration)",
2516
+ "description": "Project ID to create dataset in (overrides CLI configuration)",
2817
2517
  "helpGroup": "OVERRIDE",
2818
2518
  "name": "project-id",
2819
2519
  "hasDynamicHelp": false,
2820
- "helpValue": "<id>",
2520
+ "helpValue": "<id>",
2521
+ "multiple": false,
2522
+ "type": "option"
2523
+ },
2524
+ "embeddings": {
2525
+ "description": "Enable embeddings for this dataset",
2526
+ "name": "embeddings",
2527
+ "allowNo": false,
2528
+ "type": "boolean"
2529
+ },
2530
+ "embeddings-projection": {
2531
+ "dependsOn": [
2532
+ "embeddings"
2533
+ ],
2534
+ "description": "GROQ projection for embeddings indexing (e.g. \"{ title, body }\")",
2535
+ "name": "embeddings-projection",
2536
+ "hasDynamicHelp": false,
2537
+ "multiple": false,
2538
+ "type": "option"
2539
+ },
2540
+ "visibility": {
2541
+ "description": "Set visibility for this dataset (custom/private/public)",
2542
+ "name": "visibility",
2543
+ "required": false,
2544
+ "hasDynamicHelp": false,
2821
2545
  "multiple": false,
2546
+ "options": [
2547
+ "custom",
2548
+ "private",
2549
+ "public"
2550
+ ],
2822
2551
  "type": "option"
2823
- },
2824
- "credentials": {
2825
- "description": "Allow credentials (token/cookie) to be sent from this origin",
2826
- "name": "credentials",
2827
- "required": false,
2828
- "allowNo": true,
2829
- "type": "boolean"
2830
- },
2831
- "yes": {
2832
- "char": "y",
2833
- "description": "Confirm risky wildcard origins without prompting",
2834
- "name": "yes",
2835
- "allowNo": false,
2836
- "type": "boolean"
2837
2552
  }
2838
2553
  },
2839
2554
  "hasDynamicHelp": false,
2840
- "hiddenAliases": [],
2841
- "id": "cors:add",
2555
+ "hiddenAliases": [
2556
+ "dataset:create"
2557
+ ],
2558
+ "id": "datasets:create",
2842
2559
  "pluginAlias": "@sanity/cli",
2843
2560
  "pluginName": "@sanity/cli",
2844
2561
  "pluginType": "core",
@@ -2847,49 +2564,53 @@
2847
2564
  "relativePath": [
2848
2565
  "dist",
2849
2566
  "commands",
2850
- "cors",
2851
- "add.js"
2567
+ "datasets",
2568
+ "create.js"
2852
2569
  ]
2853
2570
  },
2854
- "cors:delete": {
2571
+ "datasets:delete": {
2855
2572
  "aliases": [],
2856
2573
  "args": {
2857
- "origin": {
2858
- "description": "Origin to delete (will prompt if not provided)",
2859
- "name": "origin",
2860
- "required": false
2574
+ "datasetName": {
2575
+ "description": "Dataset name to delete",
2576
+ "name": "datasetName",
2577
+ "required": true
2861
2578
  }
2862
2579
  },
2863
- "description": "Delete a CORS origin from the project",
2580
+ "description": "Delete a dataset from the project",
2864
2581
  "examples": [
2865
2582
  {
2866
- "command": "<%= config.bin %> <%= command.id %>",
2867
- "description": "Interactively select and delete a CORS origin"
2868
- },
2869
- {
2870
- "command": "<%= config.bin %> <%= command.id %> https://example.com",
2871
- "description": "Delete a specific CORS origin"
2583
+ "command": "<%= config.bin %> <%= command.id %> my-dataset",
2584
+ "description": "Delete a specific dataset"
2872
2585
  },
2873
2586
  {
2874
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2875
- "description": "Delete a CORS origin from a specific project"
2587
+ "command": "<%= config.bin %> <%= command.id %> my-dataset --force",
2588
+ "description": "Delete a specific dataset without confirmation"
2876
2589
  }
2877
2590
  ],
2878
2591
  "flags": {
2879
2592
  "project-id": {
2880
2593
  "char": "p",
2881
- "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
2594
+ "description": "Project ID to delete dataset from (overrides CLI configuration)",
2882
2595
  "helpGroup": "OVERRIDE",
2883
2596
  "name": "project-id",
2884
2597
  "hasDynamicHelp": false,
2885
2598
  "helpValue": "<id>",
2886
2599
  "multiple": false,
2887
2600
  "type": "option"
2601
+ },
2602
+ "force": {
2603
+ "description": "Do not prompt for delete confirmation - forcefully delete",
2604
+ "name": "force",
2605
+ "allowNo": false,
2606
+ "type": "boolean"
2888
2607
  }
2889
2608
  },
2890
2609
  "hasDynamicHelp": false,
2891
- "hiddenAliases": [],
2892
- "id": "cors:delete",
2610
+ "hiddenAliases": [
2611
+ "dataset:delete"
2612
+ ],
2613
+ "id": "datasets:delete",
2893
2614
  "pluginAlias": "@sanity/cli",
2894
2615
  "pluginName": "@sanity/cli",
2895
2616
  "pluginType": "core",
@@ -2898,114 +2619,278 @@
2898
2619
  "relativePath": [
2899
2620
  "dist",
2900
2621
  "commands",
2901
- "cors",
2622
+ "datasets",
2902
2623
  "delete.js"
2903
2624
  ]
2904
2625
  },
2905
- "cors:list": {
2626
+ "datasets:export": {
2906
2627
  "aliases": [],
2907
- "args": {},
2908
- "description": "List CORS origins for the project",
2628
+ "args": {
2629
+ "name": {
2630
+ "description": "Name of the dataset to export",
2631
+ "name": "name"
2632
+ },
2633
+ "destination": {
2634
+ "description": "Output destination file path",
2635
+ "name": "destination"
2636
+ }
2637
+ },
2638
+ "description": "Export a dataset to a local gzipped tarball. Assets returning 401, 403, or 404 are excluded from the export.",
2909
2639
  "examples": [
2910
2640
  {
2911
- "command": "<%= config.bin %> <%= command.id %>",
2912
- "description": "List CORS origins for the project"
2641
+ "command": "<%= config.bin %> <%= command.id %> moviedb localPath.tar.gz",
2642
+ "description": "Export dataset \"moviedb\" to localPath.tar.gz"
2913
2643
  },
2914
2644
  {
2915
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2916
- "description": "List CORS origins for a specific project"
2645
+ "command": "<%= config.bin %> <%= command.id %> moviedb assetless.tar.gz --no-assets",
2646
+ "description": "Export dataset without assets"
2647
+ },
2648
+ {
2649
+ "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --raw",
2650
+ "description": "Export raw documents without asset reference rewriting"
2651
+ },
2652
+ {
2653
+ "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --types products,shops",
2654
+ "description": "Export specific document types"
2655
+ },
2656
+ {
2657
+ "command": "<%= config.bin %> <%= command.id %> moviedb moviedb.tar.gz --no-strict-asset-verification",
2658
+ "description": "Export dataset without aborting on asset verification failures"
2917
2659
  }
2918
2660
  ],
2919
2661
  "flags": {
2920
2662
  "project-id": {
2921
2663
  "char": "p",
2922
- "description": "Project ID to list CORS origins for (overrides CLI configuration)",
2664
+ "description": "Project ID to export dataset from (overrides CLI configuration)",
2923
2665
  "helpGroup": "OVERRIDE",
2924
2666
  "name": "project-id",
2925
2667
  "hasDynamicHelp": false,
2926
2668
  "helpValue": "<id>",
2927
2669
  "multiple": false,
2928
2670
  "type": "option"
2671
+ },
2672
+ "asset-concurrency": {
2673
+ "description": "Concurrent number of asset downloads",
2674
+ "name": "asset-concurrency",
2675
+ "default": 8,
2676
+ "hasDynamicHelp": false,
2677
+ "multiple": false,
2678
+ "type": "option"
2679
+ },
2680
+ "mode": {
2681
+ "description": "Export mode ('cursor' is faster for large datasets but may miss concurrent changes)",
2682
+ "name": "mode",
2683
+ "default": "stream",
2684
+ "hasDynamicHelp": false,
2685
+ "multiple": false,
2686
+ "options": [
2687
+ "stream",
2688
+ "cursor"
2689
+ ],
2690
+ "type": "option"
2691
+ },
2692
+ "no-assets": {
2693
+ "description": "Export only non-asset documents and remove references to image assets",
2694
+ "name": "no-assets",
2695
+ "allowNo": false,
2696
+ "type": "boolean"
2697
+ },
2698
+ "no-compress": {
2699
+ "description": "Skips compressing tarball entries (still generates a gzip file)",
2700
+ "name": "no-compress",
2701
+ "allowNo": false,
2702
+ "type": "boolean"
2703
+ },
2704
+ "no-drafts": {
2705
+ "description": "Export only published versions of documents",
2706
+ "name": "no-drafts",
2707
+ "allowNo": false,
2708
+ "type": "boolean"
2709
+ },
2710
+ "no-strict-asset-verification": {
2711
+ "description": "Do not abort the export when an asset fails hash or content-length verification",
2712
+ "name": "no-strict-asset-verification",
2713
+ "allowNo": false,
2714
+ "type": "boolean"
2715
+ },
2716
+ "overwrite": {
2717
+ "description": "Overwrite any file with the same name",
2718
+ "name": "overwrite",
2719
+ "allowNo": false,
2720
+ "type": "boolean"
2721
+ },
2722
+ "raw": {
2723
+ "description": "Extract only documents, without rewriting asset references",
2724
+ "name": "raw",
2725
+ "allowNo": false,
2726
+ "type": "boolean"
2727
+ },
2728
+ "types": {
2729
+ "description": "Defines which document types to export (comma-separated)",
2730
+ "name": "types",
2731
+ "hasDynamicHelp": false,
2732
+ "multiple": false,
2733
+ "type": "option"
2929
2734
  }
2930
2735
  },
2931
2736
  "hasDynamicHelp": false,
2932
- "hiddenAliases": [],
2933
- "id": "cors:list",
2934
- "pluginAlias": "@sanity/cli",
2935
- "pluginName": "@sanity/cli",
2936
- "pluginType": "core",
2937
- "strict": true,
2938
- "isESM": true,
2939
- "relativePath": [
2940
- "dist",
2941
- "commands",
2942
- "cors",
2943
- "list.js"
2944
- ]
2945
- },
2946
- "docs:browse": {
2947
- "aliases": [],
2948
- "args": {},
2949
- "description": "Open Sanity docs in your browser",
2950
- "flags": {},
2951
- "hasDynamicHelp": false,
2952
- "hiddenAliases": [],
2953
- "id": "docs:browse",
2737
+ "hiddenAliases": [
2738
+ "dataset:export"
2739
+ ],
2740
+ "id": "datasets:export",
2954
2741
  "pluginAlias": "@sanity/cli",
2955
2742
  "pluginName": "@sanity/cli",
2956
2743
  "pluginType": "core",
2957
2744
  "strict": true,
2958
- "enableJsonFlag": false,
2959
2745
  "isESM": true,
2960
2746
  "relativePath": [
2961
2747
  "dist",
2962
2748
  "commands",
2963
- "docs",
2964
- "browse.js"
2749
+ "datasets",
2750
+ "export.js"
2965
2751
  ]
2966
2752
  },
2967
- "docs:read": {
2753
+ "datasets:import": {
2968
2754
  "aliases": [],
2969
2755
  "args": {
2970
- "path": {
2971
- "description": "Path or URL to article, found in search results and docs content as links",
2972
- "name": "path",
2756
+ "source": {
2757
+ "description": "Source file (use \"-\" for stdin)",
2758
+ "name": "source",
2973
2759
  "required": true
2760
+ },
2761
+ "targetDataset": {
2762
+ "description": "Target dataset (prefer --dataset flag instead)",
2763
+ "name": "targetDataset",
2764
+ "required": false
2974
2765
  }
2975
2766
  },
2976
- "description": "Read an article in terminal",
2767
+ "description": "Import documents to a Sanity dataset",
2977
2768
  "examples": [
2978
2769
  {
2979
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
2980
- "description": "Read as markdown in terminal"
2770
+ "command": "<%= config.bin %> <%= command.id %> -d staging my-dataset.ndjson",
2771
+ "description": "Import \"./my-dataset.ndjson\" into dataset \"staging\""
2772
+ },
2773
+ {
2774
+ "command": "cat my-dataset.ndjson | <%= config.bin %> <%= command.id %> -d test -",
2775
+ "description": "Import into dataset \"test\" from stdin"
2776
+ },
2777
+ {
2778
+ "command": "<%= config.bin %> <%= command.id %> -p projectId -d staging my-dataset.ndjson",
2779
+ "description": "Import with explicit project ID (overrides CLI configuration)"
2780
+ },
2781
+ {
2782
+ "command": "<%= config.bin %> <%= command.id %> -d staging -t someSecretToken my-dataset.ndjson",
2783
+ "description": "Import with an explicit token (e.g. for CI/CD)"
2784
+ }
2785
+ ],
2786
+ "flags": {
2787
+ "allow-assets-in-different-dataset": {
2788
+ "description": "Allow asset documents to reference different project/dataset",
2789
+ "name": "allow-assets-in-different-dataset",
2790
+ "allowNo": false,
2791
+ "type": "boolean"
2792
+ },
2793
+ "allow-failing-assets": {
2794
+ "description": "Skip assets that cannot be fetched/uploaded",
2795
+ "name": "allow-failing-assets",
2796
+ "allowNo": false,
2797
+ "type": "boolean"
2798
+ },
2799
+ "allow-replacement-characters": {
2800
+ "description": "Allow unicode replacement characters in imported documents",
2801
+ "name": "allow-replacement-characters",
2802
+ "allowNo": false,
2803
+ "type": "boolean"
2804
+ },
2805
+ "allow-system-documents": {
2806
+ "description": "Imports system documents",
2807
+ "name": "allow-system-documents",
2808
+ "allowNo": false,
2809
+ "type": "boolean"
2981
2810
  },
2982
- {
2983
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
2984
- "description": "Read using full URL"
2811
+ "asset-concurrency": {
2812
+ "description": "Number of parallel asset imports",
2813
+ "name": "asset-concurrency",
2814
+ "hasDynamicHelp": false,
2815
+ "multiple": false,
2816
+ "type": "option"
2985
2817
  },
2986
- {
2987
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
2988
- "description": "Open in web browser"
2818
+ "dataset": {
2819
+ "char": "d",
2820
+ "description": "Dataset to import to",
2821
+ "name": "dataset",
2822
+ "hasDynamicHelp": false,
2823
+ "helpValue": "<name>",
2824
+ "multiple": false,
2825
+ "type": "option"
2989
2826
  },
2990
- {
2991
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
2992
- "description": "Open using full URL in web browser"
2993
- }
2994
- ],
2995
- "flags": {
2996
- "web": {
2997
- "aliases": [
2998
- "w"
2827
+ "missing": {
2828
+ "description": "Skip documents that already exist",
2829
+ "exclusive": [
2830
+ "replace"
2999
2831
  ],
3000
- "description": "Open in a web browser",
3001
- "name": "web",
2832
+ "name": "missing",
2833
+ "allowNo": false,
2834
+ "type": "boolean"
2835
+ },
2836
+ "project-id": {
2837
+ "char": "p",
2838
+ "description": "Project ID to import to (overrides CLI configuration)",
2839
+ "helpGroup": "OVERRIDE",
2840
+ "name": "project-id",
2841
+ "hasDynamicHelp": false,
2842
+ "helpValue": "<id>",
2843
+ "multiple": false,
2844
+ "type": "option"
2845
+ },
2846
+ "project": {
2847
+ "deprecated": {
2848
+ "to": "project-id"
2849
+ },
2850
+ "description": "Project ID to import to",
2851
+ "hidden": true,
2852
+ "name": "project",
2853
+ "hasDynamicHelp": false,
2854
+ "multiple": false,
2855
+ "type": "option"
2856
+ },
2857
+ "replace": {
2858
+ "description": "Replace documents with the same IDs",
2859
+ "exclusive": [
2860
+ "missing"
2861
+ ],
2862
+ "name": "replace",
2863
+ "allowNo": false,
2864
+ "type": "boolean"
2865
+ },
2866
+ "replace-assets": {
2867
+ "description": "Skip reuse of existing assets",
2868
+ "name": "replace-assets",
2869
+ "allowNo": false,
2870
+ "type": "boolean"
2871
+ },
2872
+ "skip-cross-dataset-references": {
2873
+ "description": "Skips references to other datasets",
2874
+ "name": "skip-cross-dataset-references",
3002
2875
  "allowNo": false,
3003
2876
  "type": "boolean"
2877
+ },
2878
+ "token": {
2879
+ "char": "t",
2880
+ "description": "Token to authenticate with",
2881
+ "env": "SANITY_IMPORT_TOKEN",
2882
+ "name": "token",
2883
+ "required": false,
2884
+ "hasDynamicHelp": false,
2885
+ "multiple": false,
2886
+ "type": "option"
3004
2887
  }
3005
2888
  },
3006
2889
  "hasDynamicHelp": false,
3007
- "hiddenAliases": [],
3008
- "id": "docs:read",
2890
+ "hiddenAliases": [
2891
+ "dataset:import"
2892
+ ],
2893
+ "id": "datasets:import",
3009
2894
  "pluginAlias": "@sanity/cli",
3010
2895
  "pluginName": "@sanity/cli",
3011
2896
  "pluginType": "core",
@@ -3014,47 +2899,41 @@
3014
2899
  "relativePath": [
3015
2900
  "dist",
3016
2901
  "commands",
3017
- "docs",
3018
- "read.js"
2902
+ "datasets",
2903
+ "import.js"
3019
2904
  ]
3020
2905
  },
3021
- "docs:search": {
2906
+ "datasets:list": {
3022
2907
  "aliases": [],
3023
- "args": {
3024
- "query": {
3025
- "description": "Search query for documentation",
3026
- "name": "query",
3027
- "required": true
3028
- }
3029
- },
3030
- "description": "Search Sanity docs",
2908
+ "args": {},
2909
+ "description": "List datasets for the project",
3031
2910
  "examples": [
3032
2911
  {
3033
- "command": "<%= config.bin %> <%= command.id %> schema",
3034
- "description": "Search for documentation about schemas"
3035
- },
3036
- {
3037
- "command": "<%= config.bin %> <%= command.id %> \"groq functions\"",
3038
- "description": "Search with phrase"
2912
+ "command": "<%= config.bin %> <%= command.id %>",
2913
+ "description": "List datasets for the project"
3039
2914
  },
3040
2915
  {
3041
- "command": "<%= config.bin %> <%= command.id %> \"deployment\" --limit=5",
3042
- "description": "Limit search results"
2916
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2917
+ "description": "List datasets for a specific project"
3043
2918
  }
3044
2919
  ],
3045
2920
  "flags": {
3046
- "limit": {
3047
- "description": "Maximum number of results to return",
3048
- "name": "limit",
3049
- "default": 10,
2921
+ "project-id": {
2922
+ "char": "p",
2923
+ "description": "Project ID to list datasets for (overrides CLI configuration)",
2924
+ "helpGroup": "OVERRIDE",
2925
+ "name": "project-id",
3050
2926
  "hasDynamicHelp": false,
2927
+ "helpValue": "<id>",
3051
2928
  "multiple": false,
3052
2929
  "type": "option"
3053
2930
  }
3054
2931
  },
3055
2932
  "hasDynamicHelp": false,
3056
- "hiddenAliases": [],
3057
- "id": "docs:search",
2933
+ "hiddenAliases": [
2934
+ "dataset:list"
2935
+ ],
2936
+ "id": "datasets:list",
3058
2937
  "pluginAlias": "@sanity/cli",
3059
2938
  "pluginName": "@sanity/cli",
3060
2939
  "pluginType": "core",
@@ -3063,8 +2942,8 @@
3063
2942
  "relativePath": [
3064
2943
  "dist",
3065
2944
  "commands",
3066
- "docs",
3067
- "search.js"
2945
+ "datasets",
2946
+ "list.js"
3068
2947
  ]
3069
2948
  },
3070
2949
  "documents:create": {
@@ -3766,11 +3645,135 @@
3766
3645
  "multiple": false,
3767
3646
  "type": "option"
3768
3647
  },
3769
- "tag": {
3770
- "description": "Tag to undeploy GraphQL API from",
3771
- "name": "tag",
3772
- "required": false,
3773
- "default": "default",
3648
+ "tag": {
3649
+ "description": "Tag to undeploy GraphQL API from",
3650
+ "name": "tag",
3651
+ "required": false,
3652
+ "default": "default",
3653
+ "hasDynamicHelp": false,
3654
+ "multiple": false,
3655
+ "type": "option"
3656
+ }
3657
+ },
3658
+ "hasDynamicHelp": false,
3659
+ "hiddenAliases": [],
3660
+ "id": "graphql:undeploy",
3661
+ "pluginAlias": "@sanity/cli",
3662
+ "pluginName": "@sanity/cli",
3663
+ "pluginType": "core",
3664
+ "strict": true,
3665
+ "isESM": true,
3666
+ "relativePath": [
3667
+ "dist",
3668
+ "commands",
3669
+ "graphql",
3670
+ "undeploy.js"
3671
+ ]
3672
+ },
3673
+ "docs:browse": {
3674
+ "aliases": [],
3675
+ "args": {},
3676
+ "description": "Open Sanity docs in your browser",
3677
+ "flags": {},
3678
+ "hasDynamicHelp": false,
3679
+ "hiddenAliases": [],
3680
+ "id": "docs:browse",
3681
+ "pluginAlias": "@sanity/cli",
3682
+ "pluginName": "@sanity/cli",
3683
+ "pluginType": "core",
3684
+ "strict": true,
3685
+ "enableJsonFlag": false,
3686
+ "isESM": true,
3687
+ "relativePath": [
3688
+ "dist",
3689
+ "commands",
3690
+ "docs",
3691
+ "browse.js"
3692
+ ]
3693
+ },
3694
+ "docs:read": {
3695
+ "aliases": [],
3696
+ "args": {
3697
+ "path": {
3698
+ "description": "Path or URL to article, found in search results and docs content as links",
3699
+ "name": "path",
3700
+ "required": true
3701
+ }
3702
+ },
3703
+ "description": "Read an article in terminal",
3704
+ "examples": [
3705
+ {
3706
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
3707
+ "description": "Read as markdown in terminal"
3708
+ },
3709
+ {
3710
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
3711
+ "description": "Read using full URL"
3712
+ },
3713
+ {
3714
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
3715
+ "description": "Open in web browser"
3716
+ },
3717
+ {
3718
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
3719
+ "description": "Open using full URL in web browser"
3720
+ }
3721
+ ],
3722
+ "flags": {
3723
+ "web": {
3724
+ "aliases": [
3725
+ "w"
3726
+ ],
3727
+ "description": "Open in a web browser",
3728
+ "name": "web",
3729
+ "allowNo": false,
3730
+ "type": "boolean"
3731
+ }
3732
+ },
3733
+ "hasDynamicHelp": false,
3734
+ "hiddenAliases": [],
3735
+ "id": "docs:read",
3736
+ "pluginAlias": "@sanity/cli",
3737
+ "pluginName": "@sanity/cli",
3738
+ "pluginType": "core",
3739
+ "strict": true,
3740
+ "isESM": true,
3741
+ "relativePath": [
3742
+ "dist",
3743
+ "commands",
3744
+ "docs",
3745
+ "read.js"
3746
+ ]
3747
+ },
3748
+ "docs:search": {
3749
+ "aliases": [],
3750
+ "args": {
3751
+ "query": {
3752
+ "description": "Search query for documentation",
3753
+ "name": "query",
3754
+ "required": true
3755
+ }
3756
+ },
3757
+ "description": "Search Sanity docs",
3758
+ "examples": [
3759
+ {
3760
+ "command": "<%= config.bin %> <%= command.id %> schema",
3761
+ "description": "Search for documentation about schemas"
3762
+ },
3763
+ {
3764
+ "command": "<%= config.bin %> <%= command.id %> \"groq functions\"",
3765
+ "description": "Search with phrase"
3766
+ },
3767
+ {
3768
+ "command": "<%= config.bin %> <%= command.id %> \"deployment\" --limit=5",
3769
+ "description": "Limit search results"
3770
+ }
3771
+ ],
3772
+ "flags": {
3773
+ "limit": {
3774
+ "description": "Maximum number of results to return",
3775
+ "name": "limit",
3776
+ "default": 10,
3774
3777
  "hasDynamicHelp": false,
3775
3778
  "multiple": false,
3776
3779
  "type": "option"
@@ -3778,7 +3781,7 @@
3778
3781
  },
3779
3782
  "hasDynamicHelp": false,
3780
3783
  "hiddenAliases": [],
3781
- "id": "graphql:undeploy",
3784
+ "id": "docs:search",
3782
3785
  "pluginAlias": "@sanity/cli",
3783
3786
  "pluginName": "@sanity/cli",
3784
3787
  "pluginType": "core",
@@ -3787,8 +3790,8 @@
3787
3790
  "relativePath": [
3788
3791
  "dist",
3789
3792
  "commands",
3790
- "graphql",
3791
- "undeploy.js"
3793
+ "docs",
3794
+ "search.js"
3792
3795
  ]
3793
3796
  },
3794
3797
  "hooks:attempt": {
@@ -4004,257 +4007,94 @@
4004
4007
  }
4005
4008
  ],
4006
4009
  "flags": {
4007
- "project-id": {
4008
- "char": "p",
4009
- "description": "Project ID to view webhook logs for (overrides CLI configuration)",
4010
- "helpGroup": "OVERRIDE",
4011
- "name": "project-id",
4012
- "hasDynamicHelp": false,
4013
- "helpValue": "<id>",
4014
- "multiple": false,
4015
- "type": "option"
4016
- },
4017
- "detailed": {
4018
- "description": "Include detailed payload and attempts",
4019
- "name": "detailed",
4020
- "required": false,
4021
- "allowNo": false,
4022
- "type": "boolean"
4023
- }
4024
- },
4025
- "hasDynamicHelp": false,
4026
- "hiddenAliases": [
4027
- "hook:logs"
4028
- ],
4029
- "id": "hooks:logs",
4030
- "pluginAlias": "@sanity/cli",
4031
- "pluginName": "@sanity/cli",
4032
- "pluginType": "core",
4033
- "strict": true,
4034
- "isESM": true,
4035
- "relativePath": [
4036
- "dist",
4037
- "commands",
4038
- "hooks",
4039
- "logs.js"
4040
- ]
4041
- },
4042
- "manifest:extract": {
4043
- "aliases": [],
4044
- "args": {},
4045
- "description": "Extract studio configuration as JSON manifest files.\n\nNote: This command is experimental and subject to change. It is currently intended for use with Create only.",
4046
- "examples": [
4047
- {
4048
- "command": "<%= config.bin %> <%= command.id %>",
4049
- "description": "Extracts manifests"
4050
- },
4051
- {
4052
- "command": "<%= config.bin %> <%= command.id %> --path /public/static",
4053
- "description": "Extracts manifests into /public/static"
4054
- }
4055
- ],
4056
- "flags": {
4057
- "path": {
4058
- "description": "Optional path to specify destination directory of the manifest files",
4059
- "name": "path",
4060
- "default": "dist/static",
4061
- "hasDynamicHelp": false,
4062
- "multiple": false,
4063
- "type": "option"
4064
- }
4065
- },
4066
- "hasDynamicHelp": false,
4067
- "hiddenAliases": [],
4068
- "id": "manifest:extract",
4069
- "pluginAlias": "@sanity/cli",
4070
- "pluginName": "@sanity/cli",
4071
- "pluginType": "core",
4072
- "strict": true,
4073
- "isESM": true,
4074
- "relativePath": [
4075
- "dist",
4076
- "commands",
4077
- "manifest",
4078
- "extract.js"
4079
- ]
4080
- },
4081
- "mcp:configure": {
4082
- "aliases": [],
4083
- "args": {},
4084
- "description": "Configure Sanity MCP server for AI editors (Antigravity, Claude Code, Cline, Cline CLI, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, MCPorter, OpenCode, VS Code, VS Code Insiders, Zed)",
4085
- "examples": [
4086
- {
4087
- "command": "<%= config.bin %> <%= command.id %>",
4088
- "description": "Configure Sanity MCP server for detected AI editors"
4089
- }
4090
- ],
4091
- "flags": {},
4092
- "hasDynamicHelp": false,
4093
- "hiddenAliases": [],
4094
- "id": "mcp:configure",
4095
- "pluginAlias": "@sanity/cli",
4096
- "pluginName": "@sanity/cli",
4097
- "pluginType": "core",
4098
- "strict": true,
4099
- "isESM": true,
4100
- "relativePath": [
4101
- "dist",
4102
- "commands",
4103
- "mcp",
4104
- "configure.js"
4105
- ]
4106
- },
4107
- "migrations:create": {
4108
- "aliases": [],
4109
- "args": {
4110
- "title": {
4111
- "description": "Title of migration",
4112
- "name": "title",
4113
- "required": false
4114
- }
4115
- },
4116
- "description": "Create a new migration within your project",
4117
- "examples": [
4118
- {
4119
- "command": "<%= config.bin %> <%= command.id %>",
4120
- "description": "Create a new migration, prompting for title and options"
4121
- },
4122
- {
4123
- "command": "<%= config.bin %> <%= command.id %> \"Rename field from location to address\"",
4124
- "description": "Create a new migration with the provided title, prompting for options"
4125
- }
4126
- ],
4127
- "flags": {},
4128
- "hasDynamicHelp": false,
4129
- "hiddenAliases": [
4130
- "migration:create"
4131
- ],
4132
- "id": "migrations:create",
4133
- "pluginAlias": "@sanity/cli",
4134
- "pluginName": "@sanity/cli",
4135
- "pluginType": "core",
4136
- "strict": true,
4137
- "isESM": true,
4138
- "relativePath": [
4139
- "dist",
4140
- "commands",
4141
- "migrations",
4142
- "create.js"
4143
- ]
4144
- },
4145
- "migrations:list": {
4146
- "aliases": [],
4147
- "args": {},
4148
- "description": "List available migrations",
4149
- "examples": [
4150
- {
4151
- "command": "<%= config.bin %> <%= command.id %>",
4152
- "description": "List all available migrations in the project"
4153
- }
4154
- ],
4155
- "flags": {},
4156
- "hasDynamicHelp": false,
4157
- "hiddenAliases": [
4158
- "migration:list"
4159
- ],
4160
- "id": "migrations:list",
4161
- "pluginAlias": "@sanity/cli",
4162
- "pluginName": "@sanity/cli",
4163
- "pluginType": "core",
4164
- "strict": true,
4165
- "isESM": true,
4166
- "relativePath": [
4167
- "dist",
4168
- "commands",
4169
- "migrations",
4170
- "list.js"
4171
- ]
4172
- },
4173
- "migrations:run": {
4174
- "aliases": [],
4175
- "args": {
4176
- "id": {
4177
- "description": "ID",
4178
- "name": "id",
4179
- "required": false
4180
- }
4181
- },
4182
- "description": "Run a migration against a dataset",
4183
- "examples": [
4184
- {
4185
- "command": "<%= config.bin %> <%= command.id %> <id>",
4186
- "description": "dry run the migration"
4187
- },
4188
- {
4189
- "command": "<%= config.bin %> <%= command.id %> <id> --no-dry-run --project xyz --dataset staging",
4190
- "description": "execute the migration against a dataset"
4191
- },
4192
- {
4193
- "command": "<%= config.bin %> <%= command.id %> <id> --from-export=production.tar.gz --no-dry-run --project xyz --dataset staging",
4194
- "description": "execute the migration using a dataset export as the source"
4195
- }
4196
- ],
4197
- "flags": {
4198
- "api-version": {
4199
- "description": "API version to use when migrating. Defaults to v2024-01-29.",
4200
- "name": "api-version",
4201
- "hasDynamicHelp": false,
4202
- "multiple": false,
4203
- "type": "option"
4204
- },
4205
- "concurrency": {
4206
- "description": "How many mutation requests to run in parallel. Must be between 1 and 10. Default: 6.",
4207
- "name": "concurrency",
4208
- "default": 6,
4209
- "hasDynamicHelp": false,
4210
- "multiple": false,
4211
- "type": "option"
4212
- },
4213
- "confirm": {
4214
- "description": "Prompt for confirmation before running the migration (default: true). Use --no-confirm to skip.",
4215
- "name": "confirm",
4216
- "allowNo": true,
4217
- "type": "boolean"
4218
- },
4219
- "dataset": {
4220
- "description": "Dataset to migrate. Defaults to the dataset configured in your Sanity CLI config.",
4221
- "name": "dataset",
4222
- "hasDynamicHelp": false,
4223
- "multiple": false,
4224
- "type": "option"
4225
- },
4226
- "dry-run": {
4227
- "description": "By default the migration runs in dry mode. Use --no-dry-run to migrate dataset.",
4228
- "name": "dry-run",
4229
- "allowNo": true,
4230
- "type": "boolean"
4231
- },
4232
- "from-export": {
4233
- "description": "Use a local dataset export as source for migration instead of calling the Sanity API. Note: this is only supported for dry runs.",
4234
- "name": "from-export",
4010
+ "project-id": {
4011
+ "char": "p",
4012
+ "description": "Project ID to view webhook logs for (overrides CLI configuration)",
4013
+ "helpGroup": "OVERRIDE",
4014
+ "name": "project-id",
4235
4015
  "hasDynamicHelp": false,
4016
+ "helpValue": "<id>",
4236
4017
  "multiple": false,
4237
4018
  "type": "option"
4238
4019
  },
4239
- "progress": {
4240
- "description": "Display progress during migration (default: true). Use --no-progress to hide output.",
4241
- "name": "progress",
4242
- "allowNo": true,
4020
+ "detailed": {
4021
+ "description": "Include detailed payload and attempts",
4022
+ "name": "detailed",
4023
+ "required": false,
4024
+ "allowNo": false,
4243
4025
  "type": "boolean"
4026
+ }
4027
+ },
4028
+ "hasDynamicHelp": false,
4029
+ "hiddenAliases": [
4030
+ "hook:logs"
4031
+ ],
4032
+ "id": "hooks:logs",
4033
+ "pluginAlias": "@sanity/cli",
4034
+ "pluginName": "@sanity/cli",
4035
+ "pluginType": "core",
4036
+ "strict": true,
4037
+ "isESM": true,
4038
+ "relativePath": [
4039
+ "dist",
4040
+ "commands",
4041
+ "hooks",
4042
+ "logs.js"
4043
+ ]
4044
+ },
4045
+ "manifest:extract": {
4046
+ "aliases": [],
4047
+ "args": {},
4048
+ "description": "Extract studio configuration as JSON manifest files.\n\nNote: This command is experimental and subject to change. It is currently intended for use with Create only.",
4049
+ "examples": [
4050
+ {
4051
+ "command": "<%= config.bin %> <%= command.id %>",
4052
+ "description": "Extracts manifests"
4244
4053
  },
4245
- "project": {
4246
- "description": "Project ID of the dataset to migrate. Defaults to the projectId configured in your Sanity CLI config.",
4247
- "name": "project",
4054
+ {
4055
+ "command": "<%= config.bin %> <%= command.id %> --path /public/static",
4056
+ "description": "Extracts manifests into /public/static"
4057
+ }
4058
+ ],
4059
+ "flags": {
4060
+ "path": {
4061
+ "description": "Optional path to specify destination directory of the manifest files",
4062
+ "name": "path",
4063
+ "default": "dist/static",
4248
4064
  "hasDynamicHelp": false,
4249
4065
  "multiple": false,
4250
4066
  "type": "option"
4251
4067
  }
4252
4068
  },
4253
4069
  "hasDynamicHelp": false,
4254
- "hiddenAliases": [
4255
- "migration:run"
4070
+ "hiddenAliases": [],
4071
+ "id": "manifest:extract",
4072
+ "pluginAlias": "@sanity/cli",
4073
+ "pluginName": "@sanity/cli",
4074
+ "pluginType": "core",
4075
+ "strict": true,
4076
+ "isESM": true,
4077
+ "relativePath": [
4078
+ "dist",
4079
+ "commands",
4080
+ "manifest",
4081
+ "extract.js"
4082
+ ]
4083
+ },
4084
+ "mcp:configure": {
4085
+ "aliases": [],
4086
+ "args": {},
4087
+ "description": "Configure Sanity MCP server for AI editors (Antigravity, Claude Code, Cline, Cline CLI, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, MCPorter, OpenCode, VS Code, VS Code Insiders, Zed)",
4088
+ "examples": [
4089
+ {
4090
+ "command": "<%= config.bin %> <%= command.id %>",
4091
+ "description": "Configure Sanity MCP server for detected AI editors"
4092
+ }
4256
4093
  ],
4257
- "id": "migrations:run",
4094
+ "flags": {},
4095
+ "hasDynamicHelp": false,
4096
+ "hiddenAliases": [],
4097
+ "id": "mcp:configure",
4258
4098
  "pluginAlias": "@sanity/cli",
4259
4099
  "pluginName": "@sanity/cli",
4260
4100
  "pluginType": "core",
@@ -4263,8 +4103,8 @@
4263
4103
  "relativePath": [
4264
4104
  "dist",
4265
4105
  "commands",
4266
- "migrations",
4267
- "run.js"
4106
+ "mcp",
4107
+ "configure.js"
4268
4108
  ]
4269
4109
  },
4270
4110
  "media:create-aspect": {
@@ -4503,108 +4343,271 @@
4503
4343
  "export.js"
4504
4344
  ]
4505
4345
  },
4506
- "media:import": {
4346
+ "media:import": {
4347
+ "aliases": [],
4348
+ "args": {
4349
+ "source": {
4350
+ "description": "Directory, archive, or asset URL to import from. An https URL imports one asset that Sanity fetches itself",
4351
+ "name": "source",
4352
+ "required": true
4353
+ }
4354
+ },
4355
+ "description": "Import a set of assets to the target media library.",
4356
+ "examples": [
4357
+ {
4358
+ "command": "<%= config.bin %> <%= command.id %> products",
4359
+ "description": "Import all assets from the \"products\" directory"
4360
+ },
4361
+ {
4362
+ "command": "<%= config.bin %> <%= command.id %> gallery.tar.gz",
4363
+ "description": "Import all assets from \"gallery\" archive"
4364
+ },
4365
+ {
4366
+ "command": "<%= config.bin %> <%= command.id %> products --replace-aspects",
4367
+ "description": "Import all assets from the \"products\" directory and replace aspects"
4368
+ },
4369
+ {
4370
+ "command": "<%= config.bin %> <%= command.id %> https://example.com/hero.png",
4371
+ "description": "Have Sanity fetch a single asset from a public URL"
4372
+ },
4373
+ {
4374
+ "command": "<%= config.bin %> <%= command.id %> https://example.com/hero.png --aspect department=Brand",
4375
+ "description": "Fetch an asset from a URL and set aspect data on it"
4376
+ }
4377
+ ],
4378
+ "flags": {
4379
+ "project-id": {
4380
+ "char": "p",
4381
+ "description": "Project ID to import media to (overrides CLI configuration)",
4382
+ "helpGroup": "OVERRIDE",
4383
+ "name": "project-id",
4384
+ "hasDynamicHelp": false,
4385
+ "helpValue": "<id>",
4386
+ "multiple": false,
4387
+ "type": "option"
4388
+ },
4389
+ "aspect": {
4390
+ "description": "Aspect value to set on the imported asset, as key=value. Repeatable. Only applies when the source is a URL - directory and archive imports read aspects from their data.ndjson",
4391
+ "name": "aspect",
4392
+ "hasDynamicHelp": false,
4393
+ "helpValue": "<key=value>",
4394
+ "multiple": true,
4395
+ "type": "option"
4396
+ },
4397
+ "filename": {
4398
+ "description": "Original filename to store on the asset. Only applies when the source is a URL. Defaults to a name derived from the URL",
4399
+ "name": "filename",
4400
+ "hasDynamicHelp": false,
4401
+ "helpValue": "<filename>",
4402
+ "multiple": false,
4403
+ "type": "option"
4404
+ },
4405
+ "media-library-id": {
4406
+ "description": "The id of the target media library",
4407
+ "name": "media-library-id",
4408
+ "hasDynamicHelp": false,
4409
+ "multiple": false,
4410
+ "type": "option"
4411
+ },
4412
+ "replace-aspects": {
4413
+ "description": "Replace existing aspect data. All versions will be replaced (e.g. published and draft aspect data). Only applies to directory and archive imports",
4414
+ "name": "replace-aspects",
4415
+ "allowNo": false,
4416
+ "type": "boolean"
4417
+ }
4418
+ },
4419
+ "hasDynamicHelp": false,
4420
+ "hiddenAliases": [],
4421
+ "id": "media:import",
4422
+ "pluginAlias": "@sanity/cli",
4423
+ "pluginName": "@sanity/cli",
4424
+ "pluginType": "core",
4425
+ "strict": true,
4426
+ "telemetry": {
4427
+ "redactedFlags": [
4428
+ {
4429
+ "canonical": "--aspect",
4430
+ "flags": [
4431
+ "--aspect"
4432
+ ]
4433
+ },
4434
+ {
4435
+ "canonical": "--filename",
4436
+ "flags": [
4437
+ "--filename"
4438
+ ]
4439
+ }
4440
+ ]
4441
+ },
4442
+ "isESM": true,
4443
+ "relativePath": [
4444
+ "dist",
4445
+ "commands",
4446
+ "media",
4447
+ "import.js"
4448
+ ]
4449
+ },
4450
+ "migrations:create": {
4451
+ "aliases": [],
4452
+ "args": {
4453
+ "title": {
4454
+ "description": "Title of migration",
4455
+ "name": "title",
4456
+ "required": false
4457
+ }
4458
+ },
4459
+ "description": "Create a new migration within your project",
4460
+ "examples": [
4461
+ {
4462
+ "command": "<%= config.bin %> <%= command.id %>",
4463
+ "description": "Create a new migration, prompting for title and options"
4464
+ },
4465
+ {
4466
+ "command": "<%= config.bin %> <%= command.id %> \"Rename field from location to address\"",
4467
+ "description": "Create a new migration with the provided title, prompting for options"
4468
+ }
4469
+ ],
4470
+ "flags": {},
4471
+ "hasDynamicHelp": false,
4472
+ "hiddenAliases": [
4473
+ "migration:create"
4474
+ ],
4475
+ "id": "migrations:create",
4476
+ "pluginAlias": "@sanity/cli",
4477
+ "pluginName": "@sanity/cli",
4478
+ "pluginType": "core",
4479
+ "strict": true,
4480
+ "isESM": true,
4481
+ "relativePath": [
4482
+ "dist",
4483
+ "commands",
4484
+ "migrations",
4485
+ "create.js"
4486
+ ]
4487
+ },
4488
+ "migrations:list": {
4489
+ "aliases": [],
4490
+ "args": {},
4491
+ "description": "List available migrations",
4492
+ "examples": [
4493
+ {
4494
+ "command": "<%= config.bin %> <%= command.id %>",
4495
+ "description": "List all available migrations in the project"
4496
+ }
4497
+ ],
4498
+ "flags": {},
4499
+ "hasDynamicHelp": false,
4500
+ "hiddenAliases": [
4501
+ "migration:list"
4502
+ ],
4503
+ "id": "migrations:list",
4504
+ "pluginAlias": "@sanity/cli",
4505
+ "pluginName": "@sanity/cli",
4506
+ "pluginType": "core",
4507
+ "strict": true,
4508
+ "isESM": true,
4509
+ "relativePath": [
4510
+ "dist",
4511
+ "commands",
4512
+ "migrations",
4513
+ "list.js"
4514
+ ]
4515
+ },
4516
+ "migrations:run": {
4507
4517
  "aliases": [],
4508
4518
  "args": {
4509
- "source": {
4510
- "description": "Directory, archive, or asset URL to import from. An https URL imports one asset that Sanity fetches itself",
4511
- "name": "source",
4512
- "required": true
4519
+ "id": {
4520
+ "description": "ID",
4521
+ "name": "id",
4522
+ "required": false
4513
4523
  }
4514
4524
  },
4515
- "description": "Import a set of assets to the target media library.",
4525
+ "description": "Run a migration against a dataset",
4516
4526
  "examples": [
4517
4527
  {
4518
- "command": "<%= config.bin %> <%= command.id %> products",
4519
- "description": "Import all assets from the \"products\" directory"
4520
- },
4521
- {
4522
- "command": "<%= config.bin %> <%= command.id %> gallery.tar.gz",
4523
- "description": "Import all assets from \"gallery\" archive"
4524
- },
4525
- {
4526
- "command": "<%= config.bin %> <%= command.id %> products --replace-aspects",
4527
- "description": "Import all assets from the \"products\" directory and replace aspects"
4528
+ "command": "<%= config.bin %> <%= command.id %> <id>",
4529
+ "description": "dry run the migration"
4528
4530
  },
4529
4531
  {
4530
- "command": "<%= config.bin %> <%= command.id %> https://example.com/hero.png",
4531
- "description": "Have Sanity fetch a single asset from a public URL"
4532
+ "command": "<%= config.bin %> <%= command.id %> <id> --no-dry-run --project xyz --dataset staging",
4533
+ "description": "execute the migration against a dataset"
4532
4534
  },
4533
4535
  {
4534
- "command": "<%= config.bin %> <%= command.id %> https://example.com/hero.png --aspect department=Brand",
4535
- "description": "Fetch an asset from a URL and set aspect data on it"
4536
+ "command": "<%= config.bin %> <%= command.id %> <id> --from-export=production.tar.gz --no-dry-run --project xyz --dataset staging",
4537
+ "description": "execute the migration using a dataset export as the source"
4536
4538
  }
4537
4539
  ],
4538
4540
  "flags": {
4539
- "project-id": {
4540
- "char": "p",
4541
- "description": "Project ID to import media to (overrides CLI configuration)",
4542
- "helpGroup": "OVERRIDE",
4543
- "name": "project-id",
4541
+ "api-version": {
4542
+ "description": "API version to use when migrating. Defaults to v2024-01-29.",
4543
+ "name": "api-version",
4544
4544
  "hasDynamicHelp": false,
4545
- "helpValue": "<id>",
4546
4545
  "multiple": false,
4547
4546
  "type": "option"
4548
4547
  },
4549
- "aspect": {
4550
- "description": "Aspect value to set on the imported asset, as key=value. Repeatable. Only applies when the source is a URL - directory and archive imports read aspects from their data.ndjson",
4551
- "name": "aspect",
4548
+ "concurrency": {
4549
+ "description": "How many mutation requests to run in parallel. Must be between 1 and 10. Default: 6.",
4550
+ "name": "concurrency",
4551
+ "default": 6,
4552
4552
  "hasDynamicHelp": false,
4553
- "helpValue": "<key=value>",
4554
- "multiple": true,
4553
+ "multiple": false,
4555
4554
  "type": "option"
4556
4555
  },
4557
- "filename": {
4558
- "description": "Original filename to store on the asset. Only applies when the source is a URL. Defaults to a name derived from the URL",
4559
- "name": "filename",
4556
+ "confirm": {
4557
+ "description": "Prompt for confirmation before running the migration (default: true). Use --no-confirm to skip.",
4558
+ "name": "confirm",
4559
+ "allowNo": true,
4560
+ "type": "boolean"
4561
+ },
4562
+ "dataset": {
4563
+ "description": "Dataset to migrate. Defaults to the dataset configured in your Sanity CLI config.",
4564
+ "name": "dataset",
4560
4565
  "hasDynamicHelp": false,
4561
- "helpValue": "<filename>",
4562
4566
  "multiple": false,
4563
4567
  "type": "option"
4564
4568
  },
4565
- "media-library-id": {
4566
- "description": "The id of the target media library",
4567
- "name": "media-library-id",
4569
+ "dry-run": {
4570
+ "description": "By default the migration runs in dry mode. Use --no-dry-run to migrate dataset.",
4571
+ "name": "dry-run",
4572
+ "allowNo": true,
4573
+ "type": "boolean"
4574
+ },
4575
+ "from-export": {
4576
+ "description": "Use a local dataset export as source for migration instead of calling the Sanity API. Note: this is only supported for dry runs.",
4577
+ "name": "from-export",
4568
4578
  "hasDynamicHelp": false,
4569
4579
  "multiple": false,
4570
4580
  "type": "option"
4571
4581
  },
4572
- "replace-aspects": {
4573
- "description": "Replace existing aspect data. All versions will be replaced (e.g. published and draft aspect data). Only applies to directory and archive imports",
4574
- "name": "replace-aspects",
4575
- "allowNo": false,
4582
+ "progress": {
4583
+ "description": "Display progress during migration (default: true). Use --no-progress to hide output.",
4584
+ "name": "progress",
4585
+ "allowNo": true,
4576
4586
  "type": "boolean"
4587
+ },
4588
+ "project": {
4589
+ "description": "Project ID of the dataset to migrate. Defaults to the projectId configured in your Sanity CLI config.",
4590
+ "name": "project",
4591
+ "hasDynamicHelp": false,
4592
+ "multiple": false,
4593
+ "type": "option"
4577
4594
  }
4578
4595
  },
4579
4596
  "hasDynamicHelp": false,
4580
- "hiddenAliases": [],
4581
- "id": "media:import",
4597
+ "hiddenAliases": [
4598
+ "migration:run"
4599
+ ],
4600
+ "id": "migrations:run",
4582
4601
  "pluginAlias": "@sanity/cli",
4583
4602
  "pluginName": "@sanity/cli",
4584
4603
  "pluginType": "core",
4585
4604
  "strict": true,
4586
- "telemetry": {
4587
- "redactedFlags": [
4588
- {
4589
- "canonical": "--aspect",
4590
- "flags": [
4591
- "--aspect"
4592
- ]
4593
- },
4594
- {
4595
- "canonical": "--filename",
4596
- "flags": [
4597
- "--filename"
4598
- ]
4599
- }
4600
- ]
4601
- },
4602
4605
  "isESM": true,
4603
4606
  "relativePath": [
4604
4607
  "dist",
4605
4608
  "commands",
4606
- "media",
4607
- "import.js"
4609
+ "migrations",
4610
+ "run.js"
4608
4611
  ]
4609
4612
  },
4610
4613
  "openapi:get": {
@@ -5156,6 +5159,32 @@
5156
5159
  "unclaimed.js"
5157
5160
  ]
5158
5161
  },
5162
+ "skills:install": {
5163
+ "aliases": [],
5164
+ "args": {},
5165
+ "description": "Install Sanity agent skills for detected AI editors (Antigravity, Claude Code, Cline, Cline CLI, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, VS Code, VS Code Insiders)",
5166
+ "examples": [
5167
+ {
5168
+ "command": "<%= config.bin %> <%= command.id %>",
5169
+ "description": "Install Sanity agent skills for detected AI editors"
5170
+ }
5171
+ ],
5172
+ "flags": {},
5173
+ "hasDynamicHelp": false,
5174
+ "hiddenAliases": [],
5175
+ "id": "skills:install",
5176
+ "pluginAlias": "@sanity/cli",
5177
+ "pluginName": "@sanity/cli",
5178
+ "pluginType": "core",
5179
+ "strict": true,
5180
+ "isESM": true,
5181
+ "relativePath": [
5182
+ "dist",
5183
+ "commands",
5184
+ "skills",
5185
+ "install.js"
5186
+ ]
5187
+ },
5159
5188
  "schemas:delete": {
5160
5189
  "aliases": [],
5161
5190
  "args": {},
@@ -5555,32 +5584,6 @@
5555
5584
  "validate.js"
5556
5585
  ]
5557
5586
  },
5558
- "skills:install": {
5559
- "aliases": [],
5560
- "args": {},
5561
- "description": "Install Sanity agent skills for detected AI editors (Antigravity, Claude Code, Cline, Cline CLI, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, VS Code, VS Code Insiders)",
5562
- "examples": [
5563
- {
5564
- "command": "<%= config.bin %> <%= command.id %>",
5565
- "description": "Install Sanity agent skills for detected AI editors"
5566
- }
5567
- ],
5568
- "flags": {},
5569
- "hasDynamicHelp": false,
5570
- "hiddenAliases": [],
5571
- "id": "skills:install",
5572
- "pluginAlias": "@sanity/cli",
5573
- "pluginName": "@sanity/cli",
5574
- "pluginType": "core",
5575
- "strict": true,
5576
- "isESM": true,
5577
- "relativePath": [
5578
- "dist",
5579
- "commands",
5580
- "skills",
5581
- "install.js"
5582
- ]
5583
- },
5584
5587
  "telemetry:disable": {
5585
5588
  "aliases": [],
5586
5589
  "args": {},
@@ -5659,48 +5662,6 @@
5659
5662
  "status.js"
5660
5663
  ]
5661
5664
  },
5662
- "typegen:generate": {
5663
- "aliases": [],
5664
- "args": {},
5665
- "description": "Sanity TypeGen\n\nConfiguration:\nThis command can utilize configuration settings defined in a `sanity-typegen.json` file. These settings include:\n\n- \"path\": Specifies a glob pattern to locate your TypeScript or JavaScript files.\n Default: \"./src/**/*.{ts,tsx,js,jsx}\"\n\n- \"schema\": Defines the path to your Sanity schema file. This file should be generated using the `sanity schema extract` command.\n Default: \"schema.json\"\n\n- \"generates\": Indicates the path where the generated TypeScript type definitions will be saved.\n Default: \"./sanity.types.ts\"\n\nThe default configuration values listed above are used if not overridden in your `sanity-typegen.json` configuration file. To customize the behavior of the type generation, adjust these properties in the configuration file according to your project's needs.\n\nNote:\n- The `sanity schema extract` command is a prerequisite for extracting your Sanity Studio schema into a `schema.json` file, which is then used by the `sanity typegen generate` command to generate type definitions.",
5666
- "examples": [
5667
- {
5668
- "command": "<%= config.bin %> <%= command.id %>",
5669
- "description": "Generate TypeScript type definitions from a Sanity Studio schema extracted using the `sanity schema extract` command."
5670
- }
5671
- ],
5672
- "flags": {
5673
- "config-path": {
5674
- "description": "[Default: sanity-typegen.json] Specifies the path to the typegen configuration file. This file should be a JSON file that contains settings for the type generation process.",
5675
- "name": "config-path",
5676
- "hasDynamicHelp": false,
5677
- "multiple": false,
5678
- "type": "option"
5679
- },
5680
- "watch": {
5681
- "description": "[Default: false] Run the typegen in watch mode",
5682
- "name": "watch",
5683
- "allowNo": false,
5684
- "type": "boolean"
5685
- }
5686
- },
5687
- "hasDynamicHelp": false,
5688
- "hiddenAliases": [
5689
- "typegen:generate"
5690
- ],
5691
- "id": "typegen:generate",
5692
- "pluginAlias": "@sanity/cli",
5693
- "pluginName": "@sanity/cli",
5694
- "pluginType": "core",
5695
- "strict": true,
5696
- "isESM": true,
5697
- "relativePath": [
5698
- "dist",
5699
- "commands",
5700
- "typegen",
5701
- "generate.js"
5702
- ]
5703
- },
5704
5665
  "tokens:create": {
5705
5666
  "aliases": [],
5706
5667
  "args": {
@@ -5933,27 +5894,69 @@
5933
5894
  }
5934
5895
  ],
5935
5896
  "flags": {
5936
- "json": {
5937
- "description": "Output as JSON",
5938
- "name": "json",
5939
- "allowNo": false,
5940
- "type": "boolean"
5941
- },
5942
- "token": {
5943
- "char": "t",
5944
- "description": "Token to rotate (prefer standard input to keep it out of shell history)",
5945
- "name": "token",
5897
+ "json": {
5898
+ "description": "Output as JSON",
5899
+ "name": "json",
5900
+ "allowNo": false,
5901
+ "type": "boolean"
5902
+ },
5903
+ "token": {
5904
+ "char": "t",
5905
+ "description": "Token to rotate (prefer standard input to keep it out of shell history)",
5906
+ "name": "token",
5907
+ "hasDynamicHelp": false,
5908
+ "helpValue": "<token>",
5909
+ "multiple": false,
5910
+ "type": "option"
5911
+ }
5912
+ },
5913
+ "hasDynamicHelp": false,
5914
+ "hiddenAliases": [
5915
+ "token:rotate"
5916
+ ],
5917
+ "id": "tokens:rotate",
5918
+ "pluginAlias": "@sanity/cli",
5919
+ "pluginName": "@sanity/cli",
5920
+ "pluginType": "core",
5921
+ "strict": true,
5922
+ "isESM": true,
5923
+ "relativePath": [
5924
+ "dist",
5925
+ "commands",
5926
+ "tokens",
5927
+ "rotate.js"
5928
+ ]
5929
+ },
5930
+ "typegen:generate": {
5931
+ "aliases": [],
5932
+ "args": {},
5933
+ "description": "Sanity TypeGen\n\nConfiguration:\nThis command can utilize configuration settings defined in a `sanity-typegen.json` file. These settings include:\n\n- \"path\": Specifies a glob pattern to locate your TypeScript or JavaScript files.\n Default: \"./src/**/*.{ts,tsx,js,jsx}\"\n\n- \"schema\": Defines the path to your Sanity schema file. This file should be generated using the `sanity schema extract` command.\n Default: \"schema.json\"\n\n- \"generates\": Indicates the path where the generated TypeScript type definitions will be saved.\n Default: \"./sanity.types.ts\"\n\nThe default configuration values listed above are used if not overridden in your `sanity-typegen.json` configuration file. To customize the behavior of the type generation, adjust these properties in the configuration file according to your project's needs.\n\nNote:\n- The `sanity schema extract` command is a prerequisite for extracting your Sanity Studio schema into a `schema.json` file, which is then used by the `sanity typegen generate` command to generate type definitions.\n- To generate types for several datasets, list them in `typegen.resources` in `sanity.cli.ts` (beta). Each resource uses its own `schema` file, or the schema bound to its dataset when `schema` is omitted.",
5934
+ "examples": [
5935
+ {
5936
+ "command": "<%= config.bin %> <%= command.id %>",
5937
+ "description": "Generate TypeScript type definitions from a Sanity Studio schema extracted using the `sanity schema extract` command."
5938
+ }
5939
+ ],
5940
+ "flags": {
5941
+ "config-path": {
5942
+ "description": "[Default: sanity-typegen.json] Specifies the path to the typegen configuration file. This file should be a JSON file that contains settings for the type generation process.",
5943
+ "name": "config-path",
5946
5944
  "hasDynamicHelp": false,
5947
- "helpValue": "<token>",
5948
5945
  "multiple": false,
5949
5946
  "type": "option"
5947
+ },
5948
+ "watch": {
5949
+ "description": "[Default: false] Run the typegen in watch mode",
5950
+ "name": "watch",
5951
+ "allowNo": false,
5952
+ "type": "boolean"
5950
5953
  }
5951
5954
  },
5952
5955
  "hasDynamicHelp": false,
5953
5956
  "hiddenAliases": [
5954
- "token:rotate"
5957
+ "typegen:generate"
5955
5958
  ],
5956
- "id": "tokens:rotate",
5959
+ "id": "typegen:generate",
5957
5960
  "pluginAlias": "@sanity/cli",
5958
5961
  "pluginName": "@sanity/cli",
5959
5962
  "pluginType": "core",
@@ -5962,8 +5965,8 @@
5962
5965
  "relativePath": [
5963
5966
  "dist",
5964
5967
  "commands",
5965
- "tokens",
5966
- "rotate.js"
5968
+ "typegen",
5969
+ "generate.js"
5967
5970
  ]
5968
5971
  },
5969
5972
  "users:invite": {
@@ -6087,26 +6090,253 @@
6087
6090
  "allowNo": true,
6088
6091
  "type": "boolean"
6089
6092
  },
6090
- "sort": {
6091
- "description": "Sort users by specified column",
6092
- "name": "sort",
6093
- "default": "date",
6094
- "hasDynamicHelp": false,
6095
- "multiple": false,
6096
- "options": [
6097
- "id",
6098
- "name",
6099
- "role",
6100
- "date"
6101
- ],
6102
- "type": "option"
6093
+ "sort": {
6094
+ "description": "Sort users by specified column",
6095
+ "name": "sort",
6096
+ "default": "date",
6097
+ "hasDynamicHelp": false,
6098
+ "multiple": false,
6099
+ "options": [
6100
+ "id",
6101
+ "name",
6102
+ "role",
6103
+ "date"
6104
+ ],
6105
+ "type": "option"
6106
+ }
6107
+ },
6108
+ "hasDynamicHelp": false,
6109
+ "hiddenAliases": [
6110
+ "user:list"
6111
+ ],
6112
+ "id": "users:list",
6113
+ "pluginAlias": "@sanity/cli",
6114
+ "pluginName": "@sanity/cli",
6115
+ "pluginType": "core",
6116
+ "strict": true,
6117
+ "isESM": true,
6118
+ "relativePath": [
6119
+ "dist",
6120
+ "commands",
6121
+ "users",
6122
+ "list.js"
6123
+ ]
6124
+ },
6125
+ "context:imports:create": {
6126
+ "aliases": [],
6127
+ "args": {
6128
+ "knowledgeBaseId": {
6129
+ "description": "Knowledge base ID",
6130
+ "name": "knowledgeBaseId",
6131
+ "required": true
6132
+ }
6133
+ },
6134
+ "description": "Import content into a knowledge base",
6135
+ "examples": [
6136
+ {
6137
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --text \"Refunds are processed within 5 days\" --title \"Refund policy\"",
6138
+ "description": "Import inline text"
6139
+ },
6140
+ {
6141
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --file ./handbook.pdf",
6142
+ "description": "Upload and import a local file"
6143
+ },
6144
+ {
6145
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --url https://example.com/docs",
6146
+ "description": "Crawl a website"
6147
+ },
6148
+ {
6149
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --query '*[_type == \"article\"]' --sanity-project abc123 --sanity-dataset production",
6150
+ "description": "Bind a Sanity dataset as a source"
6151
+ }
6152
+ ],
6153
+ "flags": {
6154
+ "content-type": {
6155
+ "description": "Content type of the import (--text: text/markdown or text/plain; --file: any MIME type, inferred from the file extension when omitted)",
6156
+ "name": "content-type",
6157
+ "required": false,
6158
+ "hasDynamicHelp": false,
6159
+ "helpValue": "<mime>",
6160
+ "multiple": false,
6161
+ "type": "option"
6162
+ },
6163
+ "file": {
6164
+ "description": "Path to a local file to import",
6165
+ "exclusive": [
6166
+ "text",
6167
+ "url",
6168
+ "query"
6169
+ ],
6170
+ "name": "file",
6171
+ "required": false,
6172
+ "hasDynamicHelp": false,
6173
+ "helpValue": "<path>",
6174
+ "multiple": false,
6175
+ "type": "option"
6176
+ },
6177
+ "query": {
6178
+ "description": "GROQ query binding a Sanity dataset as a source",
6179
+ "exclusive": [
6180
+ "text",
6181
+ "url",
6182
+ "file"
6183
+ ],
6184
+ "name": "query",
6185
+ "required": false,
6186
+ "hasDynamicHelp": false,
6187
+ "multiple": false,
6188
+ "type": "option"
6189
+ },
6190
+ "sanity-dataset": {
6191
+ "dependsOn": [
6192
+ "query"
6193
+ ],
6194
+ "description": "Sanity dataset for a dataset import",
6195
+ "name": "sanity-dataset",
6196
+ "required": false,
6197
+ "hasDynamicHelp": false,
6198
+ "helpValue": "<name>",
6199
+ "multiple": false,
6200
+ "type": "option"
6201
+ },
6202
+ "sanity-project": {
6203
+ "dependsOn": [
6204
+ "query"
6205
+ ],
6206
+ "description": "Sanity project ID for a dataset import",
6207
+ "name": "sanity-project",
6208
+ "required": false,
6209
+ "hasDynamicHelp": false,
6210
+ "helpValue": "<id>",
6211
+ "multiple": false,
6212
+ "type": "option"
6213
+ },
6214
+ "text": {
6215
+ "description": "Inline text content to import (requires --title)",
6216
+ "exclusive": [
6217
+ "file",
6218
+ "url",
6219
+ "query"
6220
+ ],
6221
+ "name": "text",
6222
+ "required": false,
6223
+ "hasDynamicHelp": false,
6224
+ "multiple": false,
6225
+ "type": "option"
6226
+ },
6227
+ "title": {
6228
+ "dependsOn": [
6229
+ "text"
6230
+ ],
6231
+ "description": "Title for an inline text import",
6232
+ "name": "title",
6233
+ "required": false,
6234
+ "hasDynamicHelp": false,
6235
+ "multiple": false,
6236
+ "type": "option"
6237
+ },
6238
+ "url": {
6239
+ "description": "Website URL to crawl",
6240
+ "exclusive": [
6241
+ "text",
6242
+ "file",
6243
+ "query"
6244
+ ],
6245
+ "name": "url",
6246
+ "required": false,
6247
+ "hasDynamicHelp": false,
6248
+ "helpValue": "<url>",
6249
+ "multiple": false,
6250
+ "type": "option"
6251
+ }
6252
+ },
6253
+ "hasDynamicHelp": false,
6254
+ "hiddenAliases": [],
6255
+ "id": "context:imports:create",
6256
+ "pluginAlias": "@sanity/cli",
6257
+ "pluginName": "@sanity/cli",
6258
+ "pluginType": "core",
6259
+ "strict": true,
6260
+ "telemetry": {
6261
+ "redactedFlags": [
6262
+ {
6263
+ "canonical": "--text",
6264
+ "flags": [
6265
+ "--text"
6266
+ ]
6267
+ },
6268
+ {
6269
+ "canonical": "--file",
6270
+ "flags": [
6271
+ "--file"
6272
+ ]
6273
+ },
6274
+ {
6275
+ "canonical": "--url",
6276
+ "flags": [
6277
+ "--url"
6278
+ ]
6279
+ },
6280
+ {
6281
+ "canonical": "--title",
6282
+ "flags": [
6283
+ "--title"
6284
+ ]
6285
+ },
6286
+ {
6287
+ "canonical": "--query",
6288
+ "flags": [
6289
+ "--query"
6290
+ ]
6291
+ }
6292
+ ]
6293
+ },
6294
+ "isESM": true,
6295
+ "relativePath": [
6296
+ "dist",
6297
+ "commands",
6298
+ "context",
6299
+ "imports",
6300
+ "create.js"
6301
+ ]
6302
+ },
6303
+ "context:imports:delete": {
6304
+ "aliases": [],
6305
+ "args": {
6306
+ "knowledgeBaseId": {
6307
+ "description": "Knowledge base ID",
6308
+ "name": "knowledgeBaseId",
6309
+ "required": true
6310
+ },
6311
+ "importId": {
6312
+ "description": "Import ID",
6313
+ "name": "importId",
6314
+ "required": true
6315
+ }
6316
+ },
6317
+ "description": "Delete an import from a knowledge base",
6318
+ "examples": [
6319
+ {
6320
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6321
+ "description": "Delete an import after confirmation"
6322
+ },
6323
+ {
6324
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456 --yes",
6325
+ "description": "Delete an import without confirmation prompt"
6326
+ }
6327
+ ],
6328
+ "flags": {
6329
+ "yes": {
6330
+ "char": "y",
6331
+ "description": "Skip confirmation prompt (unattended mode)",
6332
+ "name": "yes",
6333
+ "allowNo": false,
6334
+ "type": "boolean"
6103
6335
  }
6104
6336
  },
6105
6337
  "hasDynamicHelp": false,
6106
- "hiddenAliases": [
6107
- "user:list"
6108
- ],
6109
- "id": "users:list",
6338
+ "hiddenAliases": [],
6339
+ "id": "context:imports:delete",
6110
6340
  "pluginAlias": "@sanity/cli",
6111
6341
  "pluginName": "@sanity/cli",
6112
6342
  "pluginType": "core",
@@ -6115,60 +6345,43 @@
6115
6345
  "relativePath": [
6116
6346
  "dist",
6117
6347
  "commands",
6118
- "users",
6119
- "list.js"
6348
+ "context",
6349
+ "imports",
6350
+ "delete.js"
6120
6351
  ]
6121
6352
  },
6122
- "datasets:alias:create": {
6353
+ "context:imports:download": {
6123
6354
  "aliases": [],
6124
6355
  "args": {
6125
- "aliasName": {
6126
- "description": "Dataset alias name to create",
6127
- "name": "aliasName",
6128
- "required": false
6356
+ "knowledgeBaseId": {
6357
+ "description": "Knowledge base ID",
6358
+ "name": "knowledgeBaseId",
6359
+ "required": true
6129
6360
  },
6130
- "targetDataset": {
6131
- "description": "Target dataset name to link the alias to",
6132
- "name": "targetDataset",
6133
- "required": false
6361
+ "importId": {
6362
+ "description": "Import ID",
6363
+ "name": "importId",
6364
+ "required": true
6134
6365
  }
6135
6366
  },
6136
- "description": "Create a dataset alias for the project",
6367
+ "description": "Get a short-lived signed URL for the original uploaded bytes of a file import",
6137
6368
  "examples": [
6138
6369
  {
6139
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123 conference conf-2025",
6140
- "description": "Create alias in a specific project"
6141
- },
6142
- {
6143
- "command": "<%= config.bin %> <%= command.id %>",
6144
- "description": "Create an alias with interactive prompts"
6145
- },
6146
- {
6147
- "command": "<%= config.bin %> <%= command.id %> conference",
6148
- "description": "Create alias named \"conference\" with interactive dataset selection"
6149
- },
6150
- {
6151
- "command": "<%= config.bin %> <%= command.id %> conference conf-2025",
6152
- "description": "Create alias \"conference\" linked to \"conf-2025\" dataset"
6370
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6371
+ "description": "Get a download URL for an uploaded file"
6153
6372
  }
6154
6373
  ],
6155
6374
  "flags": {
6156
- "project-id": {
6157
- "char": "p",
6158
- "description": "Project ID to create dataset alias in (overrides CLI configuration)",
6159
- "helpGroup": "OVERRIDE",
6160
- "name": "project-id",
6161
- "hasDynamicHelp": false,
6162
- "helpValue": "<id>",
6163
- "multiple": false,
6164
- "type": "option"
6375
+ "json": {
6376
+ "description": "Output the download URL in JSON format",
6377
+ "name": "json",
6378
+ "allowNo": false,
6379
+ "type": "boolean"
6165
6380
  }
6166
6381
  },
6167
6382
  "hasDynamicHelp": false,
6168
- "hiddenAliases": [
6169
- "dataset:alias:create"
6170
- ],
6171
- "id": "datasets:alias:create",
6383
+ "hiddenAliases": [],
6384
+ "id": "context:imports:download",
6172
6385
  "pluginAlias": "@sanity/cli",
6173
6386
  "pluginName": "@sanity/cli",
6174
6387
  "pluginType": "core",
@@ -6177,54 +6390,47 @@
6177
6390
  "relativePath": [
6178
6391
  "dist",
6179
6392
  "commands",
6180
- "datasets",
6181
- "alias",
6182
- "create.js"
6393
+ "context",
6394
+ "imports",
6395
+ "download.js"
6183
6396
  ]
6184
6397
  },
6185
- "datasets:alias:delete": {
6398
+ "context:imports:get": {
6186
6399
  "aliases": [],
6187
6400
  "args": {
6188
- "aliasName": {
6189
- "description": "Dataset alias name to delete",
6190
- "name": "aliasName",
6401
+ "knowledgeBaseId": {
6402
+ "description": "Knowledge base ID",
6403
+ "name": "knowledgeBaseId",
6404
+ "required": true
6405
+ },
6406
+ "importId": {
6407
+ "description": "Import ID",
6408
+ "name": "importId",
6191
6409
  "required": true
6192
6410
  }
6193
6411
  },
6194
- "description": "Delete a dataset alias from the project",
6412
+ "description": "Get details of an import",
6195
6413
  "examples": [
6196
6414
  {
6197
- "command": "<%= config.bin %> <%= command.id %> conference",
6198
- "description": "Delete alias named \"conference\" with confirmation prompt"
6415
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6416
+ "description": "Get details of a specific import"
6199
6417
  },
6200
6418
  {
6201
- "command": "<%= config.bin %> <%= command.id %> conference --force",
6202
- "description": "Delete alias named \"conference\" without confirmation prompt"
6419
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456 --json",
6420
+ "description": "Output the import as JSON"
6203
6421
  }
6204
6422
  ],
6205
6423
  "flags": {
6206
- "project-id": {
6207
- "char": "p",
6208
- "description": "Project ID to delete dataset alias from (overrides CLI configuration)",
6209
- "helpGroup": "OVERRIDE",
6210
- "name": "project-id",
6211
- "hasDynamicHelp": false,
6212
- "helpValue": "<id>",
6213
- "multiple": false,
6214
- "type": "option"
6215
- },
6216
- "force": {
6217
- "description": "Skip confirmation prompt and delete immediately",
6218
- "name": "force",
6424
+ "json": {
6425
+ "description": "Output the import in JSON format",
6426
+ "name": "json",
6219
6427
  "allowNo": false,
6220
6428
  "type": "boolean"
6221
6429
  }
6222
6430
  },
6223
6431
  "hasDynamicHelp": false,
6224
- "hiddenAliases": [
6225
- "dataset:alias:delete"
6226
- ],
6227
- "id": "datasets:alias:delete",
6432
+ "hiddenAliases": [],
6433
+ "id": "context:imports:get",
6228
6434
  "pluginAlias": "@sanity/cli",
6229
6435
  "pluginName": "@sanity/cli",
6230
6436
  "pluginType": "core",
@@ -6233,68 +6439,42 @@
6233
6439
  "relativePath": [
6234
6440
  "dist",
6235
6441
  "commands",
6236
- "datasets",
6237
- "alias",
6238
- "delete.js"
6442
+ "context",
6443
+ "imports",
6444
+ "get.js"
6239
6445
  ]
6240
6446
  },
6241
- "datasets:alias:link": {
6447
+ "context:imports:list": {
6242
6448
  "aliases": [],
6243
6449
  "args": {
6244
- "aliasName": {
6245
- "description": "Dataset alias name to link",
6246
- "name": "aliasName",
6247
- "required": false
6248
- },
6249
- "targetDataset": {
6250
- "description": "Target dataset name to link the alias to",
6251
- "name": "targetDataset",
6252
- "required": false
6450
+ "knowledgeBaseId": {
6451
+ "description": "Knowledge base ID",
6452
+ "name": "knowledgeBaseId",
6453
+ "required": true
6253
6454
  }
6254
6455
  },
6255
- "description": "Link a dataset alias to a dataset in the project",
6456
+ "description": "List imports for a knowledge base",
6256
6457
  "examples": [
6257
6458
  {
6258
- "command": "<%= config.bin %> <%= command.id %>",
6259
- "description": "Link an alias with interactive prompts"
6260
- },
6261
- {
6262
- "command": "<%= config.bin %> <%= command.id %> conference",
6263
- "description": "Link alias named \"conference\" with interactive dataset selection"
6264
- },
6265
- {
6266
- "command": "<%= config.bin %> <%= command.id %> conference conf-2025",
6267
- "description": "Link alias \"conference\" to \"conf-2025\" dataset"
6459
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
6460
+ "description": "List all imports for a knowledge base"
6268
6461
  },
6269
6462
  {
6270
- "command": "<%= config.bin %> <%= command.id %> conference conf-2025 --force",
6271
- "description": "Force link without confirmation (skip relink prompt)"
6463
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
6464
+ "description": "Output imports as JSON"
6272
6465
  }
6273
6466
  ],
6274
6467
  "flags": {
6275
- "project-id": {
6276
- "char": "p",
6277
- "description": "Project ID to link dataset alias in (overrides CLI configuration)",
6278
- "helpGroup": "OVERRIDE",
6279
- "name": "project-id",
6280
- "hasDynamicHelp": false,
6281
- "helpValue": "<id>",
6282
- "multiple": false,
6283
- "type": "option"
6284
- },
6285
- "force": {
6286
- "description": "Skip confirmation prompt when relinking existing alias",
6287
- "name": "force",
6288
- "required": false,
6468
+ "json": {
6469
+ "description": "Output imports in JSON format",
6470
+ "name": "json",
6289
6471
  "allowNo": false,
6290
6472
  "type": "boolean"
6291
6473
  }
6292
6474
  },
6293
6475
  "hasDynamicHelp": false,
6294
- "hiddenAliases": [
6295
- "dataset:alias:link"
6296
- ],
6297
- "id": "datasets:alias:link",
6476
+ "hiddenAliases": [],
6477
+ "id": "context:imports:list",
6298
6478
  "pluginAlias": "@sanity/cli",
6299
6479
  "pluginName": "@sanity/cli",
6300
6480
  "pluginType": "core",
@@ -6303,58 +6483,53 @@
6303
6483
  "relativePath": [
6304
6484
  "dist",
6305
6485
  "commands",
6306
- "datasets",
6307
- "alias",
6308
- "link.js"
6486
+ "context",
6487
+ "imports",
6488
+ "list.js"
6309
6489
  ]
6310
6490
  },
6311
- "datasets:alias:unlink": {
6491
+ "context:jobs:get": {
6312
6492
  "aliases": [],
6313
6493
  "args": {
6314
- "aliasName": {
6315
- "description": "Dataset alias name to unlink",
6316
- "name": "aliasName",
6317
- "required": false
6494
+ "knowledgeBaseId": {
6495
+ "description": "Knowledge base ID",
6496
+ "name": "knowledgeBaseId",
6497
+ "required": true
6498
+ },
6499
+ "jobId": {
6500
+ "description": "Job ID",
6501
+ "name": "jobId",
6502
+ "required": true
6318
6503
  }
6319
6504
  },
6320
- "description": "Unlink a dataset alias from its dataset in the project",
6505
+ "description": "Get the status of a knowledge base job",
6321
6506
  "examples": [
6322
6507
  {
6323
- "command": "<%= config.bin %> <%= command.id %>",
6324
- "description": "Unlink an alias with interactive selection"
6325
- },
6326
- {
6327
- "command": "<%= config.bin %> <%= command.id %> conference",
6328
- "description": "Unlink alias \"conference\" with confirmation prompt"
6508
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456",
6509
+ "description": "Get the current status of a job"
6329
6510
  },
6330
6511
  {
6331
- "command": "<%= config.bin %> <%= command.id %> conference --force",
6332
- "description": "Unlink alias \"conference\" without confirmation prompt"
6512
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456 --watch",
6513
+ "description": "Wait for the job to finish (non-zero exit if it does not succeed)"
6333
6514
  }
6334
6515
  ],
6335
6516
  "flags": {
6336
- "project-id": {
6337
- "char": "p",
6338
- "description": "Project ID to unlink dataset alias in (overrides CLI configuration)",
6339
- "helpGroup": "OVERRIDE",
6340
- "name": "project-id",
6341
- "hasDynamicHelp": false,
6342
- "helpValue": "<id>",
6343
- "multiple": false,
6344
- "type": "option"
6517
+ "json": {
6518
+ "description": "Output the job in JSON format",
6519
+ "name": "json",
6520
+ "allowNo": false,
6521
+ "type": "boolean"
6345
6522
  },
6346
- "force": {
6347
- "description": "Skip confirmation prompt and unlink immediately",
6348
- "name": "force",
6523
+ "watch": {
6524
+ "description": "Poll until the job reaches a terminal state",
6525
+ "name": "watch",
6349
6526
  "allowNo": false,
6350
6527
  "type": "boolean"
6351
6528
  }
6352
6529
  },
6353
6530
  "hasDynamicHelp": false,
6354
- "hiddenAliases": [
6355
- "dataset:alias:unlink"
6356
- ],
6357
- "id": "datasets:alias:unlink",
6531
+ "hiddenAliases": [],
6532
+ "id": "context:jobs:get",
6358
6533
  "pluginAlias": "@sanity/cli",
6359
6534
  "pluginName": "@sanity/cli",
6360
6535
  "pluginType": "core",
@@ -6363,9 +6538,9 @@
6363
6538
  "relativePath": [
6364
6539
  "dist",
6365
6540
  "commands",
6366
- "datasets",
6367
- "alias",
6368
- "unlink.js"
6541
+ "context",
6542
+ "jobs",
6543
+ "get.js"
6369
6544
  ]
6370
6545
  },
6371
6546
  "datasets:embeddings:disable": {
@@ -6605,249 +6780,21 @@
6605
6780
  ],
6606
6781
  "flags": {
6607
6782
  "project-id": {
6608
- "char": "p",
6609
- "description": "Project ID to set dataset visibility for (overrides CLI configuration)",
6610
- "helpGroup": "OVERRIDE",
6611
- "name": "project-id",
6612
- "hasDynamicHelp": false,
6613
- "helpValue": "<id>",
6614
- "multiple": false,
6615
- "type": "option"
6616
- }
6617
- },
6618
- "hasDynamicHelp": false,
6619
- "hiddenAliases": [
6620
- "dataset:visibility:set"
6621
- ],
6622
- "id": "datasets:visibility:set",
6623
- "pluginAlias": "@sanity/cli",
6624
- "pluginName": "@sanity/cli",
6625
- "pluginType": "core",
6626
- "strict": true,
6627
- "isESM": true,
6628
- "relativePath": [
6629
- "dist",
6630
- "commands",
6631
- "datasets",
6632
- "visibility",
6633
- "set.js"
6634
- ]
6635
- },
6636
- "context:imports:create": {
6637
- "aliases": [],
6638
- "args": {
6639
- "knowledgeBaseId": {
6640
- "description": "Knowledge base ID",
6641
- "name": "knowledgeBaseId",
6642
- "required": true
6643
- }
6644
- },
6645
- "description": "Import content into a knowledge base",
6646
- "examples": [
6647
- {
6648
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --text \"Refunds are processed within 5 days\" --title \"Refund policy\"",
6649
- "description": "Import inline text"
6650
- },
6651
- {
6652
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --file ./handbook.pdf",
6653
- "description": "Upload and import a local file"
6654
- },
6655
- {
6656
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --url https://example.com/docs",
6657
- "description": "Crawl a website"
6658
- },
6659
- {
6660
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --query '*[_type == \"article\"]' --sanity-project abc123 --sanity-dataset production",
6661
- "description": "Bind a Sanity dataset as a source"
6662
- }
6663
- ],
6664
- "flags": {
6665
- "content-type": {
6666
- "description": "Content type of the import (--text: text/markdown or text/plain; --file: any MIME type, inferred from the file extension when omitted)",
6667
- "name": "content-type",
6668
- "required": false,
6669
- "hasDynamicHelp": false,
6670
- "helpValue": "<mime>",
6671
- "multiple": false,
6672
- "type": "option"
6673
- },
6674
- "file": {
6675
- "description": "Path to a local file to import",
6676
- "exclusive": [
6677
- "text",
6678
- "url",
6679
- "query"
6680
- ],
6681
- "name": "file",
6682
- "required": false,
6683
- "hasDynamicHelp": false,
6684
- "helpValue": "<path>",
6685
- "multiple": false,
6686
- "type": "option"
6687
- },
6688
- "query": {
6689
- "description": "GROQ query binding a Sanity dataset as a source",
6690
- "exclusive": [
6691
- "text",
6692
- "url",
6693
- "file"
6694
- ],
6695
- "name": "query",
6696
- "required": false,
6697
- "hasDynamicHelp": false,
6698
- "multiple": false,
6699
- "type": "option"
6700
- },
6701
- "sanity-dataset": {
6702
- "dependsOn": [
6703
- "query"
6704
- ],
6705
- "description": "Sanity dataset for a dataset import",
6706
- "name": "sanity-dataset",
6707
- "required": false,
6708
- "hasDynamicHelp": false,
6709
- "helpValue": "<name>",
6710
- "multiple": false,
6711
- "type": "option"
6712
- },
6713
- "sanity-project": {
6714
- "dependsOn": [
6715
- "query"
6716
- ],
6717
- "description": "Sanity project ID for a dataset import",
6718
- "name": "sanity-project",
6719
- "required": false,
6720
- "hasDynamicHelp": false,
6721
- "helpValue": "<id>",
6722
- "multiple": false,
6723
- "type": "option"
6724
- },
6725
- "text": {
6726
- "description": "Inline text content to import (requires --title)",
6727
- "exclusive": [
6728
- "file",
6729
- "url",
6730
- "query"
6731
- ],
6732
- "name": "text",
6733
- "required": false,
6734
- "hasDynamicHelp": false,
6735
- "multiple": false,
6736
- "type": "option"
6737
- },
6738
- "title": {
6739
- "dependsOn": [
6740
- "text"
6741
- ],
6742
- "description": "Title for an inline text import",
6743
- "name": "title",
6744
- "required": false,
6745
- "hasDynamicHelp": false,
6746
- "multiple": false,
6747
- "type": "option"
6748
- },
6749
- "url": {
6750
- "description": "Website URL to crawl",
6751
- "exclusive": [
6752
- "text",
6753
- "file",
6754
- "query"
6755
- ],
6756
- "name": "url",
6757
- "required": false,
6758
- "hasDynamicHelp": false,
6759
- "helpValue": "<url>",
6760
- "multiple": false,
6761
- "type": "option"
6762
- }
6763
- },
6764
- "hasDynamicHelp": false,
6765
- "hiddenAliases": [],
6766
- "id": "context:imports:create",
6767
- "pluginAlias": "@sanity/cli",
6768
- "pluginName": "@sanity/cli",
6769
- "pluginType": "core",
6770
- "strict": true,
6771
- "telemetry": {
6772
- "redactedFlags": [
6773
- {
6774
- "canonical": "--text",
6775
- "flags": [
6776
- "--text"
6777
- ]
6778
- },
6779
- {
6780
- "canonical": "--file",
6781
- "flags": [
6782
- "--file"
6783
- ]
6784
- },
6785
- {
6786
- "canonical": "--url",
6787
- "flags": [
6788
- "--url"
6789
- ]
6790
- },
6791
- {
6792
- "canonical": "--title",
6793
- "flags": [
6794
- "--title"
6795
- ]
6796
- },
6797
- {
6798
- "canonical": "--query",
6799
- "flags": [
6800
- "--query"
6801
- ]
6802
- }
6803
- ]
6804
- },
6805
- "isESM": true,
6806
- "relativePath": [
6807
- "dist",
6808
- "commands",
6809
- "context",
6810
- "imports",
6811
- "create.js"
6812
- ]
6813
- },
6814
- "context:imports:delete": {
6815
- "aliases": [],
6816
- "args": {
6817
- "knowledgeBaseId": {
6818
- "description": "Knowledge base ID",
6819
- "name": "knowledgeBaseId",
6820
- "required": true
6821
- },
6822
- "importId": {
6823
- "description": "Import ID",
6824
- "name": "importId",
6825
- "required": true
6826
- }
6827
- },
6828
- "description": "Delete an import from a knowledge base",
6829
- "examples": [
6830
- {
6831
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6832
- "description": "Delete an import after confirmation"
6833
- },
6834
- {
6835
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456 --yes",
6836
- "description": "Delete an import without confirmation prompt"
6837
- }
6838
- ],
6839
- "flags": {
6840
- "yes": {
6841
- "char": "y",
6842
- "description": "Skip confirmation prompt (unattended mode)",
6843
- "name": "yes",
6844
- "allowNo": false,
6845
- "type": "boolean"
6783
+ "char": "p",
6784
+ "description": "Project ID to set dataset visibility for (overrides CLI configuration)",
6785
+ "helpGroup": "OVERRIDE",
6786
+ "name": "project-id",
6787
+ "hasDynamicHelp": false,
6788
+ "helpValue": "<id>",
6789
+ "multiple": false,
6790
+ "type": "option"
6846
6791
  }
6847
6792
  },
6848
6793
  "hasDynamicHelp": false,
6849
- "hiddenAliases": [],
6850
- "id": "context:imports:delete",
6794
+ "hiddenAliases": [
6795
+ "dataset:visibility:set"
6796
+ ],
6797
+ "id": "datasets:visibility:set",
6851
6798
  "pluginAlias": "@sanity/cli",
6852
6799
  "pluginName": "@sanity/cli",
6853
6800
  "pluginType": "core",
@@ -6856,43 +6803,61 @@
6856
6803
  "relativePath": [
6857
6804
  "dist",
6858
6805
  "commands",
6859
- "context",
6860
- "imports",
6861
- "delete.js"
6806
+ "datasets",
6807
+ "visibility",
6808
+ "set.js"
6862
6809
  ]
6863
6810
  },
6864
- "context:imports:download": {
6811
+ "datasets:alias:create": {
6865
6812
  "aliases": [],
6866
6813
  "args": {
6867
- "knowledgeBaseId": {
6868
- "description": "Knowledge base ID",
6869
- "name": "knowledgeBaseId",
6870
- "required": true
6814
+ "aliasName": {
6815
+ "description": "Dataset alias name to create",
6816
+ "name": "aliasName",
6817
+ "required": false
6871
6818
  },
6872
- "importId": {
6873
- "description": "Import ID",
6874
- "name": "importId",
6875
- "required": true
6819
+ "targetDataset": {
6820
+ "description": "Target dataset name to link the alias to",
6821
+ "name": "targetDataset",
6822
+ "required": false
6876
6823
  }
6877
6824
  },
6878
- "description": "Get a short-lived signed URL for the original uploaded bytes of a file import",
6825
+ "description": "Create a dataset alias for the project",
6879
6826
  "examples": [
6880
6827
  {
6881
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6882
- "description": "Get a download URL for an uploaded file"
6828
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123 conference conf-2025",
6829
+ "description": "Create alias in a specific project"
6830
+ },
6831
+ {
6832
+ "command": "<%= config.bin %> <%= command.id %>",
6833
+ "description": "Create an alias with interactive prompts"
6834
+ },
6835
+ {
6836
+ "command": "<%= config.bin %> <%= command.id %> conference",
6837
+ "description": "Create alias named \"conference\" with interactive dataset selection"
6838
+ },
6839
+ {
6840
+ "command": "<%= config.bin %> <%= command.id %> conference conf-2025",
6841
+ "description": "Create alias \"conference\" linked to \"conf-2025\" dataset"
6883
6842
  }
6884
6843
  ],
6885
6844
  "flags": {
6886
- "json": {
6887
- "description": "Output the download URL in JSON format",
6888
- "name": "json",
6889
- "allowNo": false,
6890
- "type": "boolean"
6845
+ "project-id": {
6846
+ "char": "p",
6847
+ "description": "Project ID to create dataset alias in (overrides CLI configuration)",
6848
+ "helpGroup": "OVERRIDE",
6849
+ "name": "project-id",
6850
+ "hasDynamicHelp": false,
6851
+ "helpValue": "<id>",
6852
+ "multiple": false,
6853
+ "type": "option"
6891
6854
  }
6892
6855
  },
6893
6856
  "hasDynamicHelp": false,
6894
- "hiddenAliases": [],
6895
- "id": "context:imports:download",
6857
+ "hiddenAliases": [
6858
+ "dataset:alias:create"
6859
+ ],
6860
+ "id": "datasets:alias:create",
6896
6861
  "pluginAlias": "@sanity/cli",
6897
6862
  "pluginName": "@sanity/cli",
6898
6863
  "pluginType": "core",
@@ -6901,47 +6866,54 @@
6901
6866
  "relativePath": [
6902
6867
  "dist",
6903
6868
  "commands",
6904
- "context",
6905
- "imports",
6906
- "download.js"
6869
+ "datasets",
6870
+ "alias",
6871
+ "create.js"
6907
6872
  ]
6908
6873
  },
6909
- "context:imports:get": {
6874
+ "datasets:alias:delete": {
6910
6875
  "aliases": [],
6911
6876
  "args": {
6912
- "knowledgeBaseId": {
6913
- "description": "Knowledge base ID",
6914
- "name": "knowledgeBaseId",
6915
- "required": true
6916
- },
6917
- "importId": {
6918
- "description": "Import ID",
6919
- "name": "importId",
6877
+ "aliasName": {
6878
+ "description": "Dataset alias name to delete",
6879
+ "name": "aliasName",
6920
6880
  "required": true
6921
6881
  }
6922
6882
  },
6923
- "description": "Get details of an import",
6883
+ "description": "Delete a dataset alias from the project",
6924
6884
  "examples": [
6925
6885
  {
6926
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6927
- "description": "Get details of a specific import"
6886
+ "command": "<%= config.bin %> <%= command.id %> conference",
6887
+ "description": "Delete alias named \"conference\" with confirmation prompt"
6928
6888
  },
6929
6889
  {
6930
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456 --json",
6931
- "description": "Output the import as JSON"
6890
+ "command": "<%= config.bin %> <%= command.id %> conference --force",
6891
+ "description": "Delete alias named \"conference\" without confirmation prompt"
6932
6892
  }
6933
6893
  ],
6934
6894
  "flags": {
6935
- "json": {
6936
- "description": "Output the import in JSON format",
6937
- "name": "json",
6895
+ "project-id": {
6896
+ "char": "p",
6897
+ "description": "Project ID to delete dataset alias from (overrides CLI configuration)",
6898
+ "helpGroup": "OVERRIDE",
6899
+ "name": "project-id",
6900
+ "hasDynamicHelp": false,
6901
+ "helpValue": "<id>",
6902
+ "multiple": false,
6903
+ "type": "option"
6904
+ },
6905
+ "force": {
6906
+ "description": "Skip confirmation prompt and delete immediately",
6907
+ "name": "force",
6938
6908
  "allowNo": false,
6939
6909
  "type": "boolean"
6940
6910
  }
6941
6911
  },
6942
6912
  "hasDynamicHelp": false,
6943
- "hiddenAliases": [],
6944
- "id": "context:imports:get",
6913
+ "hiddenAliases": [
6914
+ "dataset:alias:delete"
6915
+ ],
6916
+ "id": "datasets:alias:delete",
6945
6917
  "pluginAlias": "@sanity/cli",
6946
6918
  "pluginName": "@sanity/cli",
6947
6919
  "pluginType": "core",
@@ -6950,42 +6922,68 @@
6950
6922
  "relativePath": [
6951
6923
  "dist",
6952
6924
  "commands",
6953
- "context",
6954
- "imports",
6955
- "get.js"
6925
+ "datasets",
6926
+ "alias",
6927
+ "delete.js"
6956
6928
  ]
6957
6929
  },
6958
- "context:imports:list": {
6930
+ "datasets:alias:link": {
6959
6931
  "aliases": [],
6960
6932
  "args": {
6961
- "knowledgeBaseId": {
6962
- "description": "Knowledge base ID",
6963
- "name": "knowledgeBaseId",
6964
- "required": true
6933
+ "aliasName": {
6934
+ "description": "Dataset alias name to link",
6935
+ "name": "aliasName",
6936
+ "required": false
6937
+ },
6938
+ "targetDataset": {
6939
+ "description": "Target dataset name to link the alias to",
6940
+ "name": "targetDataset",
6941
+ "required": false
6965
6942
  }
6966
6943
  },
6967
- "description": "List imports for a knowledge base",
6944
+ "description": "Link a dataset alias to a dataset in the project",
6968
6945
  "examples": [
6969
6946
  {
6970
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
6971
- "description": "List all imports for a knowledge base"
6947
+ "command": "<%= config.bin %> <%= command.id %>",
6948
+ "description": "Link an alias with interactive prompts"
6972
6949
  },
6973
6950
  {
6974
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
6975
- "description": "Output imports as JSON"
6951
+ "command": "<%= config.bin %> <%= command.id %> conference",
6952
+ "description": "Link alias named \"conference\" with interactive dataset selection"
6953
+ },
6954
+ {
6955
+ "command": "<%= config.bin %> <%= command.id %> conference conf-2025",
6956
+ "description": "Link alias \"conference\" to \"conf-2025\" dataset"
6957
+ },
6958
+ {
6959
+ "command": "<%= config.bin %> <%= command.id %> conference conf-2025 --force",
6960
+ "description": "Force link without confirmation (skip relink prompt)"
6976
6961
  }
6977
6962
  ],
6978
6963
  "flags": {
6979
- "json": {
6980
- "description": "Output imports in JSON format",
6981
- "name": "json",
6964
+ "project-id": {
6965
+ "char": "p",
6966
+ "description": "Project ID to link dataset alias in (overrides CLI configuration)",
6967
+ "helpGroup": "OVERRIDE",
6968
+ "name": "project-id",
6969
+ "hasDynamicHelp": false,
6970
+ "helpValue": "<id>",
6971
+ "multiple": false,
6972
+ "type": "option"
6973
+ },
6974
+ "force": {
6975
+ "description": "Skip confirmation prompt when relinking existing alias",
6976
+ "name": "force",
6977
+ "required": false,
6982
6978
  "allowNo": false,
6983
6979
  "type": "boolean"
6984
6980
  }
6985
6981
  },
6986
6982
  "hasDynamicHelp": false,
6987
- "hiddenAliases": [],
6988
- "id": "context:imports:list",
6983
+ "hiddenAliases": [
6984
+ "dataset:alias:link"
6985
+ ],
6986
+ "id": "datasets:alias:link",
6989
6987
  "pluginAlias": "@sanity/cli",
6990
6988
  "pluginName": "@sanity/cli",
6991
6989
  "pluginType": "core",
@@ -6994,53 +6992,58 @@
6994
6992
  "relativePath": [
6995
6993
  "dist",
6996
6994
  "commands",
6997
- "context",
6998
- "imports",
6999
- "list.js"
6995
+ "datasets",
6996
+ "alias",
6997
+ "link.js"
7000
6998
  ]
7001
6999
  },
7002
- "context:jobs:get": {
7000
+ "datasets:alias:unlink": {
7003
7001
  "aliases": [],
7004
7002
  "args": {
7005
- "knowledgeBaseId": {
7006
- "description": "Knowledge base ID",
7007
- "name": "knowledgeBaseId",
7008
- "required": true
7009
- },
7010
- "jobId": {
7011
- "description": "Job ID",
7012
- "name": "jobId",
7013
- "required": true
7003
+ "aliasName": {
7004
+ "description": "Dataset alias name to unlink",
7005
+ "name": "aliasName",
7006
+ "required": false
7014
7007
  }
7015
7008
  },
7016
- "description": "Get the status of a knowledge base job",
7009
+ "description": "Unlink a dataset alias from its dataset in the project",
7017
7010
  "examples": [
7018
7011
  {
7019
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456",
7020
- "description": "Get the current status of a job"
7012
+ "command": "<%= config.bin %> <%= command.id %>",
7013
+ "description": "Unlink an alias with interactive selection"
7021
7014
  },
7022
7015
  {
7023
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456 --watch",
7024
- "description": "Wait for the job to finish (non-zero exit if it does not succeed)"
7016
+ "command": "<%= config.bin %> <%= command.id %> conference",
7017
+ "description": "Unlink alias \"conference\" with confirmation prompt"
7018
+ },
7019
+ {
7020
+ "command": "<%= config.bin %> <%= command.id %> conference --force",
7021
+ "description": "Unlink alias \"conference\" without confirmation prompt"
7025
7022
  }
7026
7023
  ],
7027
7024
  "flags": {
7028
- "json": {
7029
- "description": "Output the job in JSON format",
7030
- "name": "json",
7031
- "allowNo": false,
7032
- "type": "boolean"
7025
+ "project-id": {
7026
+ "char": "p",
7027
+ "description": "Project ID to unlink dataset alias in (overrides CLI configuration)",
7028
+ "helpGroup": "OVERRIDE",
7029
+ "name": "project-id",
7030
+ "hasDynamicHelp": false,
7031
+ "helpValue": "<id>",
7032
+ "multiple": false,
7033
+ "type": "option"
7033
7034
  },
7034
- "watch": {
7035
- "description": "Poll until the job reaches a terminal state",
7036
- "name": "watch",
7035
+ "force": {
7036
+ "description": "Skip confirmation prompt and unlink immediately",
7037
+ "name": "force",
7037
7038
  "allowNo": false,
7038
7039
  "type": "boolean"
7039
7040
  }
7040
7041
  },
7041
7042
  "hasDynamicHelp": false,
7042
- "hiddenAliases": [],
7043
- "id": "context:jobs:get",
7043
+ "hiddenAliases": [
7044
+ "dataset:alias:unlink"
7045
+ ],
7046
+ "id": "datasets:alias:unlink",
7044
7047
  "pluginAlias": "@sanity/cli",
7045
7048
  "pluginName": "@sanity/cli",
7046
7049
  "pluginType": "core",
@@ -7049,11 +7052,11 @@
7049
7052
  "relativePath": [
7050
7053
  "dist",
7051
7054
  "commands",
7052
- "context",
7053
- "jobs",
7054
- "get.js"
7055
+ "datasets",
7056
+ "alias",
7057
+ "unlink.js"
7055
7058
  ]
7056
7059
  }
7057
7060
  },
7058
- "version": "8.15.0"
7061
+ "version": "8.17.0"
7059
7062
  }