@sanity/cli 8.14.0 → 8.15.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.
@@ -1773,50 +1773,156 @@
1773
1773
  "list.js"
1774
1774
  ]
1775
1775
  },
1776
- "context:build": {
1776
+ "datasets:copy": {
1777
1777
  "aliases": [],
1778
1778
  "args": {
1779
- "knowledgeBaseId": {
1780
- "description": "Knowledge base ID",
1781
- "name": "knowledgeBaseId",
1782
- "required": true
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
1783
1788
  }
1784
1789
  },
1785
- "description": "Build a knowledge base from its imported content",
1790
+ "description": "Copy a dataset or manage copy jobs",
1786
1791
  "examples": [
1787
1792
  {
1788
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
1789
- "description": "Start a build and return the job ID"
1793
+ "command": "<%= config.bin %> <%= command.id %>",
1794
+ "description": "Interactively copy a dataset"
1790
1795
  },
1791
1796
  {
1792
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --watch",
1793
- "description": "Start a build and wait for it to finish (non-zero exit on failure)"
1797
+ "command": "<%= config.bin %> <%= command.id %> source-dataset",
1798
+ "description": "Copy from source-dataset (prompts for target)"
1794
1799
  },
1795
1800
  {
1796
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --cancel",
1797
- "description": "Cancel the running build, if any"
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"
1819
+ },
1820
+ {
1821
+ "command": "<%= config.bin %> <%= command.id %> --list",
1822
+ "description": "List all dataset copy jobs"
1823
+ },
1824
+ {
1825
+ "command": "<%= config.bin %> <%= command.id %> --list --offset 2 --limit 10",
1826
+ "description": "List copy jobs with pagination"
1798
1827
  }
1799
1828
  ],
1800
1829
  "flags": {
1801
- "cancel": {
1802
- "description": "Cancel the running build instead of starting one",
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",
1803
1842
  "exclusive": [
1804
- "watch"
1843
+ "list",
1844
+ "detach",
1845
+ "skip-history"
1805
1846
  ],
1806
- "name": "cancel",
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,
1807
1861
  "allowNo": false,
1808
1862
  "type": "boolean"
1809
1863
  },
1810
- "watch": {
1811
- "description": "Wait for the build to finish, exiting non-zero if it fails",
1812
- "name": "watch",
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",
1900
+ "exclusive": [
1901
+ "list",
1902
+ "attach"
1903
+ ],
1904
+ "name": "skip-content-releases",
1905
+ "required": false,
1906
+ "allowNo": false,
1907
+ "type": "boolean"
1908
+ },
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
1917
  "allowNo": false,
1814
1918
  "type": "boolean"
1815
1919
  }
1816
1920
  },
1817
1921
  "hasDynamicHelp": false,
1818
- "hiddenAliases": [],
1819
- "id": "context:build",
1922
+ "hiddenAliases": [
1923
+ "dataset:copy"
1924
+ ],
1925
+ "id": "datasets:copy",
1820
1926
  "pluginAlias": "@sanity/cli",
1821
1927
  "pluginName": "@sanity/cli",
1822
1928
  "pluginType": "core",
@@ -1825,112 +1931,135 @@
1825
1931
  "relativePath": [
1826
1932
  "dist",
1827
1933
  "commands",
1828
- "context",
1829
- "build.js"
1934
+ "datasets",
1935
+ "copy.js"
1830
1936
  ]
1831
1937
  },
1832
- "context:create": {
1938
+ "datasets:create": {
1833
1939
  "aliases": [],
1834
- "args": {},
1835
- "description": "Create a knowledge base",
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",
1836
1948
  "examples": [
1837
1949
  {
1838
1950
  "command": "<%= config.bin %> <%= command.id %>",
1839
- "description": "Interactively create a knowledge base"
1951
+ "description": "Interactively create a dataset"
1840
1952
  },
1841
1953
  {
1842
- "command": "<%= config.bin %> <%= command.id %> --organization org-abc123 --title \"Support docs\" --description \"Product docs and troubleshooting guides\"",
1843
- "description": "Create a knowledge base in a specific organization"
1954
+ "command": "<%= config.bin %> <%= command.id %> my-dataset",
1955
+ "description": "Create a dataset named \"my-dataset\""
1956
+ },
1957
+ {
1958
+ "command": "<%= config.bin %> <%= command.id %> my-dataset --visibility private",
1959
+ "description": "Create a private dataset named \"my-dataset\""
1844
1960
  }
1845
1961
  ],
1846
1962
  "flags": {
1847
- "organization": {
1848
- "description": "Organization to create the knowledge base in (overrides CLI configuration)",
1963
+ "project-id": {
1964
+ "char": "p",
1965
+ "description": "Project ID to create dataset in (overrides CLI configuration)",
1849
1966
  "helpGroup": "OVERRIDE",
1850
- "name": "organization",
1967
+ "name": "project-id",
1851
1968
  "hasDynamicHelp": false,
1852
1969
  "helpValue": "<id>",
1853
1970
  "multiple": false,
1854
1971
  "type": "option"
1855
1972
  },
1856
- "description": {
1857
- "description": "Knowledge base description",
1858
- "name": "description",
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
1985
  "hasDynamicHelp": false,
1860
1986
  "multiple": false,
1861
1987
  "type": "option"
1862
1988
  },
1863
- "title": {
1864
- "description": "Knowledge base title",
1865
- "name": "title",
1989
+ "visibility": {
1990
+ "description": "Set visibility for this dataset (custom/private/public)",
1991
+ "name": "visibility",
1992
+ "required": false,
1866
1993
  "hasDynamicHelp": false,
1867
1994
  "multiple": false,
1995
+ "options": [
1996
+ "custom",
1997
+ "private",
1998
+ "public"
1999
+ ],
1868
2000
  "type": "option"
1869
2001
  }
1870
2002
  },
1871
2003
  "hasDynamicHelp": false,
1872
- "hiddenAliases": [],
1873
- "id": "context:create",
2004
+ "hiddenAliases": [
2005
+ "dataset:create"
2006
+ ],
2007
+ "id": "datasets:create",
1874
2008
  "pluginAlias": "@sanity/cli",
1875
2009
  "pluginName": "@sanity/cli",
1876
2010
  "pluginType": "core",
1877
2011
  "strict": true,
1878
- "telemetry": {
1879
- "redactedFlags": [
1880
- {
1881
- "canonical": "--title",
1882
- "flags": [
1883
- "--title"
1884
- ]
1885
- },
1886
- {
1887
- "canonical": "--description",
1888
- "flags": [
1889
- "--description"
1890
- ]
1891
- }
1892
- ]
1893
- },
1894
2012
  "isESM": true,
1895
2013
  "relativePath": [
1896
2014
  "dist",
1897
2015
  "commands",
1898
- "context",
2016
+ "datasets",
1899
2017
  "create.js"
1900
2018
  ]
1901
2019
  },
1902
- "context:delete": {
2020
+ "datasets:delete": {
1903
2021
  "aliases": [],
1904
2022
  "args": {
1905
- "knowledgeBaseId": {
1906
- "description": "Knowledge base ID",
1907
- "name": "knowledgeBaseId",
2023
+ "datasetName": {
2024
+ "description": "Dataset name to delete",
2025
+ "name": "datasetName",
1908
2026
  "required": true
1909
2027
  }
1910
2028
  },
1911
- "description": "Delete a knowledge base and its generated content",
2029
+ "description": "Delete a dataset from the project",
1912
2030
  "examples": [
1913
2031
  {
1914
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
1915
- "description": "Delete a knowledge base after confirmation"
2032
+ "command": "<%= config.bin %> <%= command.id %> my-dataset",
2033
+ "description": "Delete a specific dataset"
1916
2034
  },
1917
2035
  {
1918
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --yes",
1919
- "description": "Delete a knowledge base without confirmation prompt"
2036
+ "command": "<%= config.bin %> <%= command.id %> my-dataset --force",
2037
+ "description": "Delete a specific dataset without confirmation"
1920
2038
  }
1921
2039
  ],
1922
2040
  "flags": {
1923
- "yes": {
1924
- "char": "y",
1925
- "description": "Skip confirmation prompt (unattended mode)",
1926
- "name": "yes",
1927
- "allowNo": false,
1928
- "type": "boolean"
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",
2054
+ "allowNo": false,
2055
+ "type": "boolean"
1929
2056
  }
1930
2057
  },
1931
2058
  "hasDynamicHelp": false,
1932
- "hiddenAliases": [],
1933
- "id": "context:delete",
2059
+ "hiddenAliases": [
2060
+ "dataset:delete"
2061
+ ],
2062
+ "id": "datasets:delete",
1934
2063
  "pluginAlias": "@sanity/cli",
1935
2064
  "pluginName": "@sanity/cli",
1936
2065
  "pluginType": "core",
@@ -1939,123 +2068,125 @@
1939
2068
  "relativePath": [
1940
2069
  "dist",
1941
2070
  "commands",
1942
- "context",
2071
+ "datasets",
1943
2072
  "delete.js"
1944
2073
  ]
1945
2074
  },
1946
- "context:get": {
2075
+ "datasets:export": {
1947
2076
  "aliases": [],
1948
2077
  "args": {
1949
- "knowledgeBaseId": {
1950
- "description": "Knowledge base ID",
1951
- "name": "knowledgeBaseId",
1952
- "required": true
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"
1953
2085
  }
1954
2086
  },
1955
- "description": "Get details of a knowledge base",
2087
+ "description": "Export a dataset to a local gzipped tarball. Assets returning 401, 403, or 404 are excluded from the export.",
1956
2088
  "examples": [
1957
2089
  {
1958
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
1959
- "description": "Get details of a specific knowledge base"
2090
+ "command": "<%= config.bin %> <%= command.id %> moviedb localPath.tar.gz",
2091
+ "description": "Export dataset \"moviedb\" to localPath.tar.gz"
1960
2092
  },
1961
2093
  {
1962
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
1963
- "description": "Output the knowledge base as JSON"
1964
- }
1965
- ],
1966
- "flags": {
1967
- "json": {
1968
- "description": "Output the knowledge base in JSON format",
1969
- "name": "json",
1970
- "allowNo": false,
1971
- "type": "boolean"
1972
- }
1973
- },
1974
- "hasDynamicHelp": false,
1975
- "hiddenAliases": [],
1976
- "id": "context:get",
1977
- "pluginAlias": "@sanity/cli",
1978
- "pluginName": "@sanity/cli",
1979
- "pluginType": "core",
1980
- "strict": true,
1981
- "isESM": true,
1982
- "relativePath": [
1983
- "dist",
1984
- "commands",
1985
- "context",
1986
- "get.js"
1987
- ]
1988
- },
1989
- "context:list": {
1990
- "aliases": [],
1991
- "args": {},
1992
- "description": "List knowledge bases in an organization",
1993
- "examples": [
2094
+ "command": "<%= config.bin %> <%= command.id %> moviedb assetless.tar.gz --no-assets",
2095
+ "description": "Export dataset without assets"
2096
+ },
1994
2097
  {
1995
- "command": "<%= config.bin %> <%= command.id %>",
1996
- "description": "List knowledge bases, selecting the organization interactively"
2098
+ "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --raw",
2099
+ "description": "Export raw documents without asset reference rewriting"
1997
2100
  },
1998
2101
  {
1999
- "command": "<%= config.bin %> <%= command.id %> --organization org-abc123",
2000
- "description": "List knowledge bases in a specific organization"
2102
+ "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --types products,shops",
2103
+ "description": "Export specific document types"
2001
2104
  },
2002
2105
  {
2003
- "command": "<%= config.bin %> <%= command.id %> --organization org-abc123 --json",
2004
- "description": "Output knowledge bases as JSON"
2106
+ "command": "<%= config.bin %> <%= command.id %> moviedb moviedb.tar.gz --no-strict-asset-verification",
2107
+ "description": "Export dataset without aborting on asset verification failures"
2005
2108
  }
2006
2109
  ],
2007
2110
  "flags": {
2008
- "organization": {
2009
- "description": "Organization to list knowledge bases for (overrides CLI configuration)",
2111
+ "project-id": {
2112
+ "char": "p",
2113
+ "description": "Project ID to export dataset from (overrides CLI configuration)",
2010
2114
  "helpGroup": "OVERRIDE",
2011
- "name": "organization",
2115
+ "name": "project-id",
2012
2116
  "hasDynamicHelp": false,
2013
2117
  "helpValue": "<id>",
2014
2118
  "multiple": false,
2015
2119
  "type": "option"
2016
2120
  },
2017
- "json": {
2018
- "description": "Output knowledge bases in JSON format",
2019
- "name": "json",
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",
2020
2150
  "allowNo": false,
2021
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"
2022
2183
  }
2023
2184
  },
2024
2185
  "hasDynamicHelp": false,
2025
- "hiddenAliases": [],
2026
- "id": "context:list",
2027
- "pluginAlias": "@sanity/cli",
2028
- "pluginName": "@sanity/cli",
2029
- "pluginType": "core",
2030
- "strict": true,
2031
- "isESM": true,
2032
- "relativePath": [
2033
- "dist",
2034
- "commands",
2035
- "context",
2036
- "list.js"
2037
- ]
2038
- },
2039
- "context:refresh": {
2040
- "aliases": [],
2041
- "args": {
2042
- "knowledgeBaseId": {
2043
- "description": "Knowledge base ID",
2044
- "name": "knowledgeBaseId",
2045
- "required": true
2046
- }
2047
- },
2048
- "description": "Refresh a knowledge base: re-check sources and apply what changed",
2049
- "examples": [
2050
- {
2051
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2052
- "description": "Start an incremental refresh"
2053
- }
2186
+ "hiddenAliases": [
2187
+ "dataset:export"
2054
2188
  ],
2055
- "flags": {},
2056
- "hasDynamicHelp": false,
2057
- "hiddenAliases": [],
2058
- "id": "context:refresh",
2189
+ "id": "datasets:export",
2059
2190
  "pluginAlias": "@sanity/cli",
2060
2191
  "pluginName": "@sanity/cli",
2061
2192
  "pluginType": "core",
@@ -2064,65 +2195,140 @@
2064
2195
  "relativePath": [
2065
2196
  "dist",
2066
2197
  "commands",
2067
- "context",
2068
- "refresh.js"
2198
+ "datasets",
2199
+ "export.js"
2069
2200
  ]
2070
2201
  },
2071
- "context:update": {
2202
+ "datasets:import": {
2072
2203
  "aliases": [],
2073
2204
  "args": {
2074
- "knowledgeBaseId": {
2075
- "description": "Knowledge base ID",
2076
- "name": "knowledgeBaseId",
2205
+ "source": {
2206
+ "description": "Source file (use \"-\" for stdin)",
2207
+ "name": "source",
2077
2208
  "required": true
2209
+ },
2210
+ "targetDataset": {
2211
+ "description": "Target dataset (prefer --dataset flag instead)",
2212
+ "name": "targetDataset",
2213
+ "required": false
2078
2214
  }
2079
2215
  },
2080
- "description": "Update a knowledge base",
2216
+ "description": "Import documents to a Sanity dataset",
2081
2217
  "examples": [
2082
2218
  {
2083
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --title \"New title\"",
2084
- "description": "Rename a knowledge base"
2219
+ "command": "<%= config.bin %> <%= command.id %> -d staging my-dataset.ndjson",
2220
+ "description": "Import \"./my-dataset.ndjson\" into dataset \"staging\""
2085
2221
  },
2086
2222
  {
2087
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --refresh-enabled --refresh-frequency weekly",
2088
- "description": "Enable weekly scheduled refresh"
2223
+ "command": "cat my-dataset.ndjson | <%= config.bin %> <%= command.id %> -d test -",
2224
+ "description": "Import into dataset \"test\" from stdin"
2089
2225
  },
2090
2226
  {
2091
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --no-refresh-enabled",
2092
- "description": "Disable scheduled refresh"
2227
+ "command": "<%= config.bin %> <%= command.id %> -p projectId -d staging my-dataset.ndjson",
2228
+ "description": "Import with explicit project ID (overrides CLI configuration)"
2229
+ },
2230
+ {
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)"
2093
2233
  }
2094
2234
  ],
2095
2235
  "flags": {
2096
- "description": {
2097
- "description": "New knowledge base description",
2098
- "name": "description",
2099
- "required": false,
2100
- "hasDynamicHelp": false,
2101
- "multiple": false,
2102
- "type": "option"
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"
2103
2241
  },
2104
- "refresh-enabled": {
2105
- "description": "Enable scheduled refresh (--no-refresh-enabled to disable)",
2106
- "name": "refresh-enabled",
2107
- "required": false,
2108
- "allowNo": true,
2242
+ "allow-failing-assets": {
2243
+ "description": "Skip assets that cannot be fetched/uploaded",
2244
+ "name": "allow-failing-assets",
2245
+ "allowNo": false,
2109
2246
  "type": "boolean"
2110
2247
  },
2111
- "refresh-frequency": {
2112
- "description": "How often scheduled refresh runs",
2113
- "name": "refresh-frequency",
2114
- "required": false,
2115
- "hasDynamicHelp": false,
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,
2116
2264
  "multiple": false,
2117
- "options": [
2118
- "weekly",
2119
- "monthly"
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"
2120
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,
2121
2293
  "type": "option"
2122
2294
  },
2123
- "title": {
2124
- "description": "New knowledge base title",
2125
- "name": "title",
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",
2324
+ "allowNo": false,
2325
+ "type": "boolean"
2326
+ },
2327
+ "token": {
2328
+ "char": "t",
2329
+ "description": "Token to authenticate with",
2330
+ "env": "SANITY_IMPORT_TOKEN",
2331
+ "name": "token",
2126
2332
  "required": false,
2127
2333
  "hasDynamicHelp": false,
2128
2334
  "multiple": false,
@@ -2130,93 +2336,53 @@
2130
2336
  }
2131
2337
  },
2132
2338
  "hasDynamicHelp": false,
2133
- "hiddenAliases": [],
2134
- "id": "context:update",
2339
+ "hiddenAliases": [
2340
+ "dataset:import"
2341
+ ],
2342
+ "id": "datasets:import",
2135
2343
  "pluginAlias": "@sanity/cli",
2136
2344
  "pluginName": "@sanity/cli",
2137
2345
  "pluginType": "core",
2138
2346
  "strict": true,
2139
- "telemetry": {
2140
- "redactedFlags": [
2141
- {
2142
- "canonical": "--title",
2143
- "flags": [
2144
- "--title"
2145
- ]
2146
- },
2147
- {
2148
- "canonical": "--description",
2149
- "flags": [
2150
- "--description"
2151
- ]
2152
- }
2153
- ]
2154
- },
2155
2347
  "isESM": true,
2156
2348
  "relativePath": [
2157
2349
  "dist",
2158
2350
  "commands",
2159
- "context",
2160
- "update.js"
2351
+ "datasets",
2352
+ "import.js"
2161
2353
  ]
2162
2354
  },
2163
- "cors:add": {
2355
+ "datasets:list": {
2164
2356
  "aliases": [],
2165
- "args": {
2166
- "origin": {
2167
- "description": "Origin to allow (e.g., https://example.com)",
2168
- "name": "origin",
2169
- "required": true
2170
- }
2171
- },
2172
- "description": "Add a CORS origin to the project",
2357
+ "args": {},
2358
+ "description": "List datasets for the project",
2173
2359
  "examples": [
2174
2360
  {
2175
2361
  "command": "<%= config.bin %> <%= command.id %>",
2176
- "description": "Interactively add a CORS origin"
2177
- },
2178
- {
2179
- "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
2180
- "description": "Add a localhost origin without credentials"
2181
- },
2182
- {
2183
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
2184
- "description": "Add a production origin with credentials allowed"
2362
+ "description": "List datasets for the project"
2185
2363
  },
2186
2364
  {
2187
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project-id abc123",
2188
- "description": "Add a CORS origin for a specific project"
2365
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2366
+ "description": "List datasets for a specific project"
2189
2367
  }
2190
2368
  ],
2191
2369
  "flags": {
2192
2370
  "project-id": {
2193
2371
  "char": "p",
2194
- "description": "Project ID to add CORS origin to (overrides CLI configuration)",
2372
+ "description": "Project ID to list datasets for (overrides CLI configuration)",
2195
2373
  "helpGroup": "OVERRIDE",
2196
2374
  "name": "project-id",
2197
2375
  "hasDynamicHelp": false,
2198
2376
  "helpValue": "<id>",
2199
2377
  "multiple": false,
2200
2378
  "type": "option"
2201
- },
2202
- "credentials": {
2203
- "description": "Allow credentials (token/cookie) to be sent from this origin",
2204
- "name": "credentials",
2205
- "required": false,
2206
- "allowNo": true,
2207
- "type": "boolean"
2208
- },
2209
- "yes": {
2210
- "char": "y",
2211
- "description": "Confirm risky wildcard origins without prompting",
2212
- "name": "yes",
2213
- "allowNo": false,
2214
- "type": "boolean"
2215
2379
  }
2216
2380
  },
2217
2381
  "hasDynamicHelp": false,
2218
- "hiddenAliases": [],
2219
- "id": "cors:add",
2382
+ "hiddenAliases": [
2383
+ "dataset:list"
2384
+ ],
2385
+ "id": "datasets:list",
2220
2386
  "pluginAlias": "@sanity/cli",
2221
2387
  "pluginName": "@sanity/cli",
2222
2388
  "pluginType": "core",
@@ -2225,49 +2391,54 @@
2225
2391
  "relativePath": [
2226
2392
  "dist",
2227
2393
  "commands",
2228
- "cors",
2229
- "add.js"
2394
+ "datasets",
2395
+ "list.js"
2230
2396
  ]
2231
2397
  },
2232
- "cors:delete": {
2398
+ "context:build": {
2233
2399
  "aliases": [],
2234
2400
  "args": {
2235
- "origin": {
2236
- "description": "Origin to delete (will prompt if not provided)",
2237
- "name": "origin",
2238
- "required": false
2401
+ "knowledgeBaseId": {
2402
+ "description": "Knowledge base ID",
2403
+ "name": "knowledgeBaseId",
2404
+ "required": true
2239
2405
  }
2240
2406
  },
2241
- "description": "Delete a CORS origin from the project",
2407
+ "description": "Build a knowledge base from its imported content",
2242
2408
  "examples": [
2243
2409
  {
2244
- "command": "<%= config.bin %> <%= command.id %>",
2245
- "description": "Interactively select and delete a CORS origin"
2410
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2411
+ "description": "Start a build and return the job ID"
2246
2412
  },
2247
2413
  {
2248
- "command": "<%= config.bin %> <%= command.id %> https://example.com",
2249
- "description": "Delete a specific CORS origin"
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)"
2250
2416
  },
2251
2417
  {
2252
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2253
- "description": "Delete a CORS origin from a specific project"
2418
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --cancel",
2419
+ "description": "Cancel the running build, if any"
2254
2420
  }
2255
2421
  ],
2256
2422
  "flags": {
2257
- "project-id": {
2258
- "char": "p",
2259
- "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
2260
- "helpGroup": "OVERRIDE",
2261
- "name": "project-id",
2262
- "hasDynamicHelp": false,
2263
- "helpValue": "<id>",
2264
- "multiple": false,
2265
- "type": "option"
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"
2266
2437
  }
2267
2438
  },
2268
2439
  "hasDynamicHelp": false,
2269
2440
  "hiddenAliases": [],
2270
- "id": "cors:delete",
2441
+ "id": "context:build",
2271
2442
  "pluginAlias": "@sanity/cli",
2272
2443
  "pluginName": "@sanity/cli",
2273
2444
  "pluginType": "core",
@@ -2276,201 +2447,112 @@
2276
2447
  "relativePath": [
2277
2448
  "dist",
2278
2449
  "commands",
2279
- "cors",
2280
- "delete.js"
2450
+ "context",
2451
+ "build.js"
2281
2452
  ]
2282
2453
  },
2283
- "cors:list": {
2454
+ "context:create": {
2284
2455
  "aliases": [],
2285
2456
  "args": {},
2286
- "description": "List CORS origins for the project",
2457
+ "description": "Create a knowledge base",
2287
2458
  "examples": [
2288
2459
  {
2289
2460
  "command": "<%= config.bin %> <%= command.id %>",
2290
- "description": "List CORS origins for the project"
2461
+ "description": "Interactively create a knowledge base"
2291
2462
  },
2292
2463
  {
2293
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2294
- "description": "List CORS origins for a specific project"
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"
2295
2466
  }
2296
2467
  ],
2297
2468
  "flags": {
2298
- "project-id": {
2299
- "char": "p",
2300
- "description": "Project ID to list CORS origins for (overrides CLI configuration)",
2469
+ "organization": {
2470
+ "description": "Organization to create the knowledge base in (overrides CLI configuration)",
2301
2471
  "helpGroup": "OVERRIDE",
2302
- "name": "project-id",
2472
+ "name": "organization",
2303
2473
  "hasDynamicHelp": false,
2304
2474
  "helpValue": "<id>",
2305
2475
  "multiple": false,
2306
2476
  "type": "option"
2477
+ },
2478
+ "description": {
2479
+ "description": "Knowledge base description",
2480
+ "name": "description",
2481
+ "hasDynamicHelp": false,
2482
+ "multiple": false,
2483
+ "type": "option"
2484
+ },
2485
+ "title": {
2486
+ "description": "Knowledge base title",
2487
+ "name": "title",
2488
+ "hasDynamicHelp": false,
2489
+ "multiple": false,
2490
+ "type": "option"
2307
2491
  }
2308
2492
  },
2309
2493
  "hasDynamicHelp": false,
2310
2494
  "hiddenAliases": [],
2311
- "id": "cors:list",
2495
+ "id": "context:create",
2312
2496
  "pluginAlias": "@sanity/cli",
2313
2497
  "pluginName": "@sanity/cli",
2314
2498
  "pluginType": "core",
2315
2499
  "strict": true,
2316
- "isESM": true,
2317
- "relativePath": [
2318
- "dist",
2319
- "commands",
2320
- "cors",
2321
- "list.js"
2500
+ "telemetry": {
2501
+ "redactedFlags": [
2502
+ {
2503
+ "canonical": "--title",
2504
+ "flags": [
2505
+ "--title"
2506
+ ]
2507
+ },
2508
+ {
2509
+ "canonical": "--description",
2510
+ "flags": [
2511
+ "--description"
2512
+ ]
2513
+ }
2514
+ ]
2515
+ },
2516
+ "isESM": true,
2517
+ "relativePath": [
2518
+ "dist",
2519
+ "commands",
2520
+ "context",
2521
+ "create.js"
2322
2522
  ]
2323
2523
  },
2324
- "datasets:copy": {
2524
+ "context:delete": {
2325
2525
  "aliases": [],
2326
2526
  "args": {
2327
- "source": {
2328
- "description": "Name of the dataset to copy from",
2329
- "name": "source",
2330
- "required": false
2331
- },
2332
- "target": {
2333
- "description": "Name of the dataset to copy to",
2334
- "name": "target",
2335
- "required": false
2527
+ "knowledgeBaseId": {
2528
+ "description": "Knowledge base ID",
2529
+ "name": "knowledgeBaseId",
2530
+ "required": true
2336
2531
  }
2337
2532
  },
2338
- "description": "Copy a dataset or manage copy jobs",
2533
+ "description": "Delete a knowledge base and its generated content",
2339
2534
  "examples": [
2340
2535
  {
2341
- "command": "<%= config.bin %> <%= command.id %>",
2342
- "description": "Interactively copy a dataset"
2343
- },
2344
- {
2345
- "command": "<%= config.bin %> <%= command.id %> source-dataset",
2346
- "description": "Copy from source-dataset (prompts for target)"
2347
- },
2348
- {
2349
- "command": "<%= config.bin %> <%= command.id %> source-dataset target-dataset",
2350
- "description": "Copy from source-dataset to target-dataset"
2351
- },
2352
- {
2353
- "command": "<%= config.bin %> <%= command.id %> --skip-history source target",
2354
- "description": "Copy without preserving document history (faster for large datasets)"
2355
- },
2356
- {
2357
- "command": "<%= config.bin %> <%= command.id %> --skip-content-releases source target",
2358
- "description": "Copy without content release documents"
2359
- },
2360
- {
2361
- "command": "<%= config.bin %> <%= command.id %> --detach source target",
2362
- "description": "Start copy job without waiting for completion"
2363
- },
2364
- {
2365
- "command": "<%= config.bin %> <%= command.id %> --attach <job-id>",
2366
- "description": "Attach to a running copy job to follow progress"
2367
- },
2368
- {
2369
- "command": "<%= config.bin %> <%= command.id %> --list",
2370
- "description": "List all dataset copy jobs"
2536
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2537
+ "description": "Delete a knowledge base after confirmation"
2371
2538
  },
2372
2539
  {
2373
- "command": "<%= config.bin %> <%= command.id %> --list --offset 2 --limit 10",
2374
- "description": "List copy jobs with pagination"
2540
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --yes",
2541
+ "description": "Delete a knowledge base without confirmation prompt"
2375
2542
  }
2376
2543
  ],
2377
2544
  "flags": {
2378
- "project-id": {
2379
- "char": "p",
2380
- "description": "Project ID to copy dataset in (overrides CLI configuration)",
2381
- "helpGroup": "OVERRIDE",
2382
- "name": "project-id",
2383
- "hasDynamicHelp": false,
2384
- "helpValue": "<id>",
2385
- "multiple": false,
2386
- "type": "option"
2387
- },
2388
- "attach": {
2389
- "description": "Attach to the running copy process to show progress",
2390
- "exclusive": [
2391
- "list",
2392
- "detach",
2393
- "skip-history"
2394
- ],
2395
- "name": "attach",
2396
- "required": false,
2397
- "hasDynamicHelp": false,
2398
- "multiple": false,
2399
- "type": "option"
2400
- },
2401
- "detach": {
2402
- "description": "Start the copy without waiting for it to finish",
2403
- "exclusive": [
2404
- "list",
2405
- "attach"
2406
- ],
2407
- "name": "detach",
2408
- "required": false,
2409
- "allowNo": false,
2410
- "type": "boolean"
2411
- },
2412
- "limit": {
2413
- "dependsOn": [
2414
- "list"
2415
- ],
2416
- "description": "Maximum number of jobs returned (default 10, max 1000)",
2417
- "name": "limit",
2418
- "required": false,
2419
- "hasDynamicHelp": false,
2420
- "multiple": false,
2421
- "type": "option"
2422
- },
2423
- "list": {
2424
- "description": "Lists all dataset copy jobs",
2425
- "exclusive": [
2426
- "attach",
2427
- "detach",
2428
- "skip-history"
2429
- ],
2430
- "name": "list",
2431
- "required": false,
2432
- "allowNo": false,
2433
- "type": "boolean"
2434
- },
2435
- "offset": {
2436
- "dependsOn": [
2437
- "list"
2438
- ],
2439
- "description": "Start position in the list of jobs (default 0)",
2440
- "name": "offset",
2441
- "required": false,
2442
- "hasDynamicHelp": false,
2443
- "multiple": false,
2444
- "type": "option"
2445
- },
2446
- "skip-content-releases": {
2447
- "description": "Don't copy content release documents to the target dataset",
2448
- "exclusive": [
2449
- "list",
2450
- "attach"
2451
- ],
2452
- "name": "skip-content-releases",
2453
- "required": false,
2454
- "allowNo": false,
2455
- "type": "boolean"
2456
- },
2457
- "skip-history": {
2458
- "description": "Don't preserve document history on copy",
2459
- "exclusive": [
2460
- "list",
2461
- "attach"
2462
- ],
2463
- "name": "skip-history",
2464
- "required": false,
2545
+ "yes": {
2546
+ "char": "y",
2547
+ "description": "Skip confirmation prompt (unattended mode)",
2548
+ "name": "yes",
2465
2549
  "allowNo": false,
2466
2550
  "type": "boolean"
2467
2551
  }
2468
2552
  },
2469
2553
  "hasDynamicHelp": false,
2470
- "hiddenAliases": [
2471
- "dataset:copy"
2472
- ],
2473
- "id": "datasets:copy",
2554
+ "hiddenAliases": [],
2555
+ "id": "context:delete",
2474
2556
  "pluginAlias": "@sanity/cli",
2475
2557
  "pluginName": "@sanity/cli",
2476
2558
  "pluginType": "core",
@@ -2479,80 +2561,123 @@
2479
2561
  "relativePath": [
2480
2562
  "dist",
2481
2563
  "commands",
2482
- "datasets",
2483
- "copy.js"
2564
+ "context",
2565
+ "delete.js"
2484
2566
  ]
2485
2567
  },
2486
- "datasets:create": {
2568
+ "context:get": {
2487
2569
  "aliases": [],
2488
2570
  "args": {
2489
- "name": {
2490
- "description": "Name of the dataset to create",
2491
- "name": "name",
2492
- "required": false
2571
+ "knowledgeBaseId": {
2572
+ "description": "Knowledge base ID",
2573
+ "name": "knowledgeBaseId",
2574
+ "required": true
2493
2575
  }
2494
2576
  },
2495
- "description": "Create a new dataset for the project",
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"
2594
+ }
2595
+ },
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",
2496
2615
  "examples": [
2497
2616
  {
2498
2617
  "command": "<%= config.bin %> <%= command.id %>",
2499
- "description": "Interactively create a dataset"
2618
+ "description": "List knowledge bases, selecting the organization interactively"
2500
2619
  },
2501
2620
  {
2502
- "command": "<%= config.bin %> <%= command.id %> my-dataset",
2503
- "description": "Create a dataset named \"my-dataset\""
2621
+ "command": "<%= config.bin %> <%= command.id %> --organization org-abc123",
2622
+ "description": "List knowledge bases in a specific organization"
2504
2623
  },
2505
2624
  {
2506
- "command": "<%= config.bin %> <%= command.id %> my-dataset --visibility private",
2507
- "description": "Create a private dataset named \"my-dataset\""
2625
+ "command": "<%= config.bin %> <%= command.id %> --organization org-abc123 --json",
2626
+ "description": "Output knowledge bases as JSON"
2508
2627
  }
2509
2628
  ],
2510
2629
  "flags": {
2511
- "project-id": {
2512
- "char": "p",
2513
- "description": "Project ID to create dataset in (overrides CLI configuration)",
2630
+ "organization": {
2631
+ "description": "Organization to list knowledge bases for (overrides CLI configuration)",
2514
2632
  "helpGroup": "OVERRIDE",
2515
- "name": "project-id",
2633
+ "name": "organization",
2516
2634
  "hasDynamicHelp": false,
2517
2635
  "helpValue": "<id>",
2518
2636
  "multiple": false,
2519
2637
  "type": "option"
2520
2638
  },
2521
- "embeddings": {
2522
- "description": "Enable embeddings for this dataset",
2523
- "name": "embeddings",
2639
+ "json": {
2640
+ "description": "Output knowledge bases in JSON format",
2641
+ "name": "json",
2524
2642
  "allowNo": false,
2525
2643
  "type": "boolean"
2526
- },
2527
- "embeddings-projection": {
2528
- "dependsOn": [
2529
- "embeddings"
2530
- ],
2531
- "description": "GROQ projection for embeddings indexing (e.g. \"{ title, body }\")",
2532
- "name": "embeddings-projection",
2533
- "hasDynamicHelp": false,
2534
- "multiple": false,
2535
- "type": "option"
2536
- },
2537
- "visibility": {
2538
- "description": "Set visibility for this dataset (custom/private/public)",
2539
- "name": "visibility",
2540
- "required": false,
2541
- "hasDynamicHelp": false,
2542
- "multiple": false,
2543
- "options": [
2544
- "custom",
2545
- "private",
2546
- "public"
2547
- ],
2548
- "type": "option"
2549
2644
  }
2550
2645
  },
2551
2646
  "hasDynamicHelp": false,
2552
- "hiddenAliases": [
2553
- "dataset:create"
2647
+ "hiddenAliases": [],
2648
+ "id": "context:list",
2649
+ "pluginAlias": "@sanity/cli",
2650
+ "pluginName": "@sanity/cli",
2651
+ "pluginType": "core",
2652
+ "strict": true,
2653
+ "isESM": true,
2654
+ "relativePath": [
2655
+ "dist",
2656
+ "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",
2671
+ "examples": [
2672
+ {
2673
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
2674
+ "description": "Start an incremental refresh"
2675
+ }
2554
2676
  ],
2555
- "id": "datasets:create",
2677
+ "flags": {},
2678
+ "hasDynamicHelp": false,
2679
+ "hiddenAliases": [],
2680
+ "id": "context:refresh",
2556
2681
  "pluginAlias": "@sanity/cli",
2557
2682
  "pluginName": "@sanity/cli",
2558
2683
  "pluginType": "core",
@@ -2561,104 +2686,134 @@
2561
2686
  "relativePath": [
2562
2687
  "dist",
2563
2688
  "commands",
2564
- "datasets",
2565
- "create.js"
2689
+ "context",
2690
+ "refresh.js"
2566
2691
  ]
2567
2692
  },
2568
- "datasets:delete": {
2693
+ "context:update": {
2569
2694
  "aliases": [],
2570
2695
  "args": {
2571
- "datasetName": {
2572
- "description": "Dataset name to delete",
2573
- "name": "datasetName",
2696
+ "knowledgeBaseId": {
2697
+ "description": "Knowledge base ID",
2698
+ "name": "knowledgeBaseId",
2574
2699
  "required": true
2575
2700
  }
2576
2701
  },
2577
- "description": "Delete a dataset from the project",
2702
+ "description": "Update a knowledge base",
2578
2703
  "examples": [
2579
2704
  {
2580
- "command": "<%= config.bin %> <%= command.id %> my-dataset",
2581
- "description": "Delete a specific dataset"
2705
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --title \"New title\"",
2706
+ "description": "Rename a knowledge base"
2582
2707
  },
2583
2708
  {
2584
- "command": "<%= config.bin %> <%= command.id %> my-dataset --force",
2585
- "description": "Delete a specific dataset without confirmation"
2709
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --refresh-enabled --refresh-frequency weekly",
2710
+ "description": "Enable weekly scheduled refresh"
2711
+ },
2712
+ {
2713
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --no-refresh-enabled",
2714
+ "description": "Disable scheduled refresh"
2586
2715
  }
2587
2716
  ],
2588
2717
  "flags": {
2589
- "project-id": {
2590
- "char": "p",
2591
- "description": "Project ID to delete dataset from (overrides CLI configuration)",
2592
- "helpGroup": "OVERRIDE",
2593
- "name": "project-id",
2718
+ "description": {
2719
+ "description": "New knowledge base description",
2720
+ "name": "description",
2721
+ "required": false,
2594
2722
  "hasDynamicHelp": false,
2595
- "helpValue": "<id>",
2596
2723
  "multiple": false,
2597
2724
  "type": "option"
2598
2725
  },
2599
- "force": {
2600
- "description": "Do not prompt for delete confirmation - forcefully delete",
2601
- "name": "force",
2602
- "allowNo": false,
2726
+ "refresh-enabled": {
2727
+ "description": "Enable scheduled refresh (--no-refresh-enabled to disable)",
2728
+ "name": "refresh-enabled",
2729
+ "required": false,
2730
+ "allowNo": true,
2603
2731
  "type": "boolean"
2732
+ },
2733
+ "refresh-frequency": {
2734
+ "description": "How often scheduled refresh runs",
2735
+ "name": "refresh-frequency",
2736
+ "required": false,
2737
+ "hasDynamicHelp": false,
2738
+ "multiple": false,
2739
+ "options": [
2740
+ "weekly",
2741
+ "monthly"
2742
+ ],
2743
+ "type": "option"
2744
+ },
2745
+ "title": {
2746
+ "description": "New knowledge base title",
2747
+ "name": "title",
2748
+ "required": false,
2749
+ "hasDynamicHelp": false,
2750
+ "multiple": false,
2751
+ "type": "option"
2604
2752
  }
2605
2753
  },
2606
2754
  "hasDynamicHelp": false,
2607
- "hiddenAliases": [
2608
- "dataset:delete"
2609
- ],
2610
- "id": "datasets:delete",
2755
+ "hiddenAliases": [],
2756
+ "id": "context:update",
2611
2757
  "pluginAlias": "@sanity/cli",
2612
2758
  "pluginName": "@sanity/cli",
2613
2759
  "pluginType": "core",
2614
2760
  "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
+ },
2615
2777
  "isESM": true,
2616
2778
  "relativePath": [
2617
2779
  "dist",
2618
2780
  "commands",
2619
- "datasets",
2620
- "delete.js"
2781
+ "context",
2782
+ "update.js"
2621
2783
  ]
2622
2784
  },
2623
- "datasets:export": {
2785
+ "cors:add": {
2624
2786
  "aliases": [],
2625
2787
  "args": {
2626
- "name": {
2627
- "description": "Name of the dataset to export",
2628
- "name": "name"
2629
- },
2630
- "destination": {
2631
- "description": "Output destination file path",
2632
- "name": "destination"
2788
+ "origin": {
2789
+ "description": "Origin to allow (e.g., https://example.com)",
2790
+ "name": "origin",
2791
+ "required": true
2633
2792
  }
2634
2793
  },
2635
- "description": "Export a dataset to a local gzipped tarball. Assets returning 401, 403, or 404 are excluded from the export.",
2794
+ "description": "Add a CORS origin to the project",
2636
2795
  "examples": [
2637
2796
  {
2638
- "command": "<%= config.bin %> <%= command.id %> moviedb localPath.tar.gz",
2639
- "description": "Export dataset \"moviedb\" to localPath.tar.gz"
2640
- },
2641
- {
2642
- "command": "<%= config.bin %> <%= command.id %> moviedb assetless.tar.gz --no-assets",
2643
- "description": "Export dataset without assets"
2797
+ "command": "<%= config.bin %> <%= command.id %>",
2798
+ "description": "Interactively add a CORS origin"
2644
2799
  },
2645
2800
  {
2646
- "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --raw",
2647
- "description": "Export raw documents without asset reference rewriting"
2801
+ "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
2802
+ "description": "Add a localhost origin without credentials"
2648
2803
  },
2649
2804
  {
2650
- "command": "<%= config.bin %> <%= command.id %> staging staging.tar.gz --types products,shops",
2651
- "description": "Export specific document types"
2805
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
2806
+ "description": "Add a production origin with credentials allowed"
2652
2807
  },
2653
2808
  {
2654
- "command": "<%= config.bin %> <%= command.id %> moviedb moviedb.tar.gz --no-strict-asset-verification",
2655
- "description": "Export dataset without aborting on asset verification failures"
2809
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project-id abc123",
2810
+ "description": "Add a CORS origin for a specific project"
2656
2811
  }
2657
2812
  ],
2658
2813
  "flags": {
2659
2814
  "project-id": {
2660
2815
  "char": "p",
2661
- "description": "Project ID to export dataset from (overrides CLI configuration)",
2816
+ "description": "Project ID to add CORS origin to (overrides CLI configuration)",
2662
2817
  "helpGroup": "OVERRIDE",
2663
2818
  "name": "project-id",
2664
2819
  "hasDynamicHelp": false,
@@ -2666,75 +2821,24 @@
2666
2821
  "multiple": false,
2667
2822
  "type": "option"
2668
2823
  },
2669
- "asset-concurrency": {
2670
- "description": "Concurrent number of asset downloads",
2671
- "name": "asset-concurrency",
2672
- "default": 8,
2673
- "hasDynamicHelp": false,
2674
- "multiple": false,
2675
- "type": "option"
2676
- },
2677
- "mode": {
2678
- "description": "Export mode ('cursor' is faster for large datasets but may miss concurrent changes)",
2679
- "name": "mode",
2680
- "default": "stream",
2681
- "hasDynamicHelp": false,
2682
- "multiple": false,
2683
- "options": [
2684
- "stream",
2685
- "cursor"
2686
- ],
2687
- "type": "option"
2688
- },
2689
- "no-assets": {
2690
- "description": "Export only non-asset documents and remove references to image assets",
2691
- "name": "no-assets",
2692
- "allowNo": false,
2693
- "type": "boolean"
2694
- },
2695
- "no-compress": {
2696
- "description": "Skips compressing tarball entries (still generates a gzip file)",
2697
- "name": "no-compress",
2698
- "allowNo": false,
2699
- "type": "boolean"
2700
- },
2701
- "no-drafts": {
2702
- "description": "Export only published versions of documents",
2703
- "name": "no-drafts",
2704
- "allowNo": false,
2705
- "type": "boolean"
2706
- },
2707
- "no-strict-asset-verification": {
2708
- "description": "Do not abort the export when an asset fails hash or content-length verification",
2709
- "name": "no-strict-asset-verification",
2710
- "allowNo": false,
2711
- "type": "boolean"
2712
- },
2713
- "overwrite": {
2714
- "description": "Overwrite any file with the same name",
2715
- "name": "overwrite",
2716
- "allowNo": false,
2824
+ "credentials": {
2825
+ "description": "Allow credentials (token/cookie) to be sent from this origin",
2826
+ "name": "credentials",
2827
+ "required": false,
2828
+ "allowNo": true,
2717
2829
  "type": "boolean"
2718
2830
  },
2719
- "raw": {
2720
- "description": "Extract only documents, without rewriting asset references",
2721
- "name": "raw",
2831
+ "yes": {
2832
+ "char": "y",
2833
+ "description": "Confirm risky wildcard origins without prompting",
2834
+ "name": "yes",
2722
2835
  "allowNo": false,
2723
2836
  "type": "boolean"
2724
- },
2725
- "types": {
2726
- "description": "Defines which document types to export (comma-separated)",
2727
- "name": "types",
2728
- "hasDynamicHelp": false,
2729
- "multiple": false,
2730
- "type": "option"
2731
2837
  }
2732
2838
  },
2733
2839
  "hasDynamicHelp": false,
2734
- "hiddenAliases": [
2735
- "dataset:export"
2736
- ],
2737
- "id": "datasets:export",
2840
+ "hiddenAliases": [],
2841
+ "id": "cors:add",
2738
2842
  "pluginAlias": "@sanity/cli",
2739
2843
  "pluginName": "@sanity/cli",
2740
2844
  "pluginType": "core",
@@ -2743,151 +2847,49 @@
2743
2847
  "relativePath": [
2744
2848
  "dist",
2745
2849
  "commands",
2746
- "datasets",
2747
- "export.js"
2850
+ "cors",
2851
+ "add.js"
2748
2852
  ]
2749
2853
  },
2750
- "datasets:import": {
2854
+ "cors:delete": {
2751
2855
  "aliases": [],
2752
2856
  "args": {
2753
- "source": {
2754
- "description": "Source file (use \"-\" for stdin)",
2755
- "name": "source",
2756
- "required": true
2757
- },
2758
- "targetDataset": {
2759
- "description": "Target dataset (prefer --dataset flag instead)",
2760
- "name": "targetDataset",
2857
+ "origin": {
2858
+ "description": "Origin to delete (will prompt if not provided)",
2859
+ "name": "origin",
2761
2860
  "required": false
2762
2861
  }
2763
2862
  },
2764
- "description": "Import documents to a Sanity dataset",
2863
+ "description": "Delete a CORS origin from the project",
2765
2864
  "examples": [
2766
2865
  {
2767
- "command": "<%= config.bin %> <%= command.id %> -d staging my-dataset.ndjson",
2768
- "description": "Import \"./my-dataset.ndjson\" into dataset \"staging\""
2769
- },
2770
- {
2771
- "command": "cat my-dataset.ndjson | <%= config.bin %> <%= command.id %> -d test -",
2772
- "description": "Import into dataset \"test\" from stdin"
2773
- },
2774
- {
2775
- "command": "<%= config.bin %> <%= command.id %> -p projectId -d staging my-dataset.ndjson",
2776
- "description": "Import with explicit project ID (overrides CLI configuration)"
2777
- },
2778
- {
2779
- "command": "<%= config.bin %> <%= command.id %> -d staging -t someSecretToken my-dataset.ndjson",
2780
- "description": "Import with an explicit token (e.g. for CI/CD)"
2781
- }
2782
- ],
2783
- "flags": {
2784
- "allow-assets-in-different-dataset": {
2785
- "description": "Allow asset documents to reference different project/dataset",
2786
- "name": "allow-assets-in-different-dataset",
2787
- "allowNo": false,
2788
- "type": "boolean"
2789
- },
2790
- "allow-failing-assets": {
2791
- "description": "Skip assets that cannot be fetched/uploaded",
2792
- "name": "allow-failing-assets",
2793
- "allowNo": false,
2794
- "type": "boolean"
2795
- },
2796
- "allow-replacement-characters": {
2797
- "description": "Allow unicode replacement characters in imported documents",
2798
- "name": "allow-replacement-characters",
2799
- "allowNo": false,
2800
- "type": "boolean"
2801
- },
2802
- "allow-system-documents": {
2803
- "description": "Imports system documents",
2804
- "name": "allow-system-documents",
2805
- "allowNo": false,
2806
- "type": "boolean"
2807
- },
2808
- "asset-concurrency": {
2809
- "description": "Number of parallel asset imports",
2810
- "name": "asset-concurrency",
2811
- "hasDynamicHelp": false,
2812
- "multiple": false,
2813
- "type": "option"
2814
- },
2815
- "dataset": {
2816
- "char": "d",
2817
- "description": "Dataset to import to",
2818
- "name": "dataset",
2819
- "hasDynamicHelp": false,
2820
- "helpValue": "<name>",
2821
- "multiple": false,
2822
- "type": "option"
2823
- },
2824
- "missing": {
2825
- "description": "Skip documents that already exist",
2826
- "exclusive": [
2827
- "replace"
2828
- ],
2829
- "name": "missing",
2830
- "allowNo": false,
2831
- "type": "boolean"
2866
+ "command": "<%= config.bin %> <%= command.id %>",
2867
+ "description": "Interactively select and delete a CORS origin"
2832
2868
  },
2869
+ {
2870
+ "command": "<%= config.bin %> <%= command.id %> https://example.com",
2871
+ "description": "Delete a specific CORS origin"
2872
+ },
2873
+ {
2874
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2875
+ "description": "Delete a CORS origin from a specific project"
2876
+ }
2877
+ ],
2878
+ "flags": {
2833
2879
  "project-id": {
2834
2880
  "char": "p",
2835
- "description": "Project ID to import to (overrides CLI configuration)",
2881
+ "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
2836
2882
  "helpGroup": "OVERRIDE",
2837
2883
  "name": "project-id",
2838
2884
  "hasDynamicHelp": false,
2839
2885
  "helpValue": "<id>",
2840
2886
  "multiple": false,
2841
2887
  "type": "option"
2842
- },
2843
- "project": {
2844
- "deprecated": {
2845
- "to": "project-id"
2846
- },
2847
- "description": "Project ID to import to",
2848
- "hidden": true,
2849
- "name": "project",
2850
- "hasDynamicHelp": false,
2851
- "multiple": false,
2852
- "type": "option"
2853
- },
2854
- "replace": {
2855
- "description": "Replace documents with the same IDs",
2856
- "exclusive": [
2857
- "missing"
2858
- ],
2859
- "name": "replace",
2860
- "allowNo": false,
2861
- "type": "boolean"
2862
- },
2863
- "replace-assets": {
2864
- "description": "Skip reuse of existing assets",
2865
- "name": "replace-assets",
2866
- "allowNo": false,
2867
- "type": "boolean"
2868
- },
2869
- "skip-cross-dataset-references": {
2870
- "description": "Skips references to other datasets",
2871
- "name": "skip-cross-dataset-references",
2872
- "allowNo": false,
2873
- "type": "boolean"
2874
- },
2875
- "token": {
2876
- "char": "t",
2877
- "description": "Token to authenticate with",
2878
- "env": "SANITY_IMPORT_TOKEN",
2879
- "name": "token",
2880
- "required": false,
2881
- "hasDynamicHelp": false,
2882
- "multiple": false,
2883
- "type": "option"
2884
2888
  }
2885
2889
  },
2886
2890
  "hasDynamicHelp": false,
2887
- "hiddenAliases": [
2888
- "dataset:import"
2889
- ],
2890
- "id": "datasets:import",
2891
+ "hiddenAliases": [],
2892
+ "id": "cors:delete",
2891
2893
  "pluginAlias": "@sanity/cli",
2892
2894
  "pluginName": "@sanity/cli",
2893
2895
  "pluginType": "core",
@@ -2896,28 +2898,28 @@
2896
2898
  "relativePath": [
2897
2899
  "dist",
2898
2900
  "commands",
2899
- "datasets",
2900
- "import.js"
2901
+ "cors",
2902
+ "delete.js"
2901
2903
  ]
2902
2904
  },
2903
- "datasets:list": {
2905
+ "cors:list": {
2904
2906
  "aliases": [],
2905
2907
  "args": {},
2906
- "description": "List datasets for the project",
2908
+ "description": "List CORS origins for the project",
2907
2909
  "examples": [
2908
2910
  {
2909
2911
  "command": "<%= config.bin %> <%= command.id %>",
2910
- "description": "List datasets for the project"
2912
+ "description": "List CORS origins for the project"
2911
2913
  },
2912
2914
  {
2913
2915
  "command": "<%= config.bin %> <%= command.id %> --project-id abc123",
2914
- "description": "List datasets for a specific project"
2916
+ "description": "List CORS origins for a specific project"
2915
2917
  }
2916
2918
  ],
2917
2919
  "flags": {
2918
2920
  "project-id": {
2919
2921
  "char": "p",
2920
- "description": "Project ID to list datasets for (overrides CLI configuration)",
2922
+ "description": "Project ID to list CORS origins for (overrides CLI configuration)",
2921
2923
  "helpGroup": "OVERRIDE",
2922
2924
  "name": "project-id",
2923
2925
  "hasDynamicHelp": false,
@@ -2927,10 +2929,8 @@
2927
2929
  }
2928
2930
  },
2929
2931
  "hasDynamicHelp": false,
2930
- "hiddenAliases": [
2931
- "dataset:list"
2932
- ],
2933
- "id": "datasets:list",
2932
+ "hiddenAliases": [],
2933
+ "id": "cors:list",
2934
2934
  "pluginAlias": "@sanity/cli",
2935
2935
  "pluginName": "@sanity/cli",
2936
2936
  "pluginType": "core",
@@ -2939,7 +2939,7 @@
2939
2939
  "relativePath": [
2940
2940
  "dist",
2941
2941
  "commands",
2942
- "datasets",
2942
+ "cors",
2943
2943
  "list.js"
2944
2944
  ]
2945
2945
  },
@@ -4048,50 +4048,213 @@
4048
4048
  "command": "<%= config.bin %> <%= command.id %>",
4049
4049
  "description": "Extracts manifests"
4050
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",
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",
4235
+ "hasDynamicHelp": false,
4236
+ "multiple": false,
4237
+ "type": "option"
4238
+ },
4239
+ "progress": {
4240
+ "description": "Display progress during migration (default: true). Use --no-progress to hide output.",
4241
+ "name": "progress",
4242
+ "allowNo": true,
4243
+ "type": "boolean"
4244
+ },
4245
+ "project": {
4246
+ "description": "Project ID of the dataset to migrate. Defaults to the projectId configured in your Sanity CLI config.",
4247
+ "name": "project",
4061
4248
  "hasDynamicHelp": false,
4062
4249
  "multiple": false,
4063
4250
  "type": "option"
4064
4251
  }
4065
4252
  },
4066
4253
  "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
- }
4254
+ "hiddenAliases": [
4255
+ "migration:run"
4090
4256
  ],
4091
- "flags": {},
4092
- "hasDynamicHelp": false,
4093
- "hiddenAliases": [],
4094
- "id": "mcp:configure",
4257
+ "id": "migrations:run",
4095
4258
  "pluginAlias": "@sanity/cli",
4096
4259
  "pluginName": "@sanity/cli",
4097
4260
  "pluginType": "core",
@@ -4100,8 +4263,8 @@
4100
4263
  "relativePath": [
4101
4264
  "dist",
4102
4265
  "commands",
4103
- "mcp",
4104
- "configure.js"
4266
+ "migrations",
4267
+ "run.js"
4105
4268
  ]
4106
4269
  },
4107
4270
  "media:create-aspect": {
@@ -4301,203 +4464,33 @@
4301
4464
  "description": "Concurrent number of asset downloads",
4302
4465
  "name": "asset-concurrency",
4303
4466
  "default": 8,
4304
- "hasDynamicHelp": false,
4305
- "multiple": false,
4306
- "type": "option"
4307
- },
4308
- "media-library-id": {
4309
- "description": "The id of the target media library",
4310
- "name": "media-library-id",
4311
- "hasDynamicHelp": false,
4312
- "multiple": false,
4313
- "type": "option"
4314
- },
4315
- "no-compress": {
4316
- "description": "Skips compressing tarball entries (still generates a gzip file)",
4317
- "name": "no-compress",
4318
- "allowNo": false,
4319
- "type": "boolean"
4320
- },
4321
- "overwrite": {
4322
- "description": "Overwrite any file with the same name",
4323
- "name": "overwrite",
4324
- "allowNo": false,
4325
- "type": "boolean"
4326
- }
4327
- },
4328
- "hasDynamicHelp": false,
4329
- "hiddenAliases": [],
4330
- "id": "media:export",
4331
- "pluginAlias": "@sanity/cli",
4332
- "pluginName": "@sanity/cli",
4333
- "pluginType": "core",
4334
- "strict": true,
4335
- "isESM": true,
4336
- "relativePath": [
4337
- "dist",
4338
- "commands",
4339
- "media",
4340
- "export.js"
4341
- ]
4342
- },
4343
- "media:import": {
4344
- "aliases": [],
4345
- "args": {
4346
- "source": {
4347
- "description": "Directory, archive, or asset URL to import from. An https URL imports one asset that Sanity fetches itself",
4348
- "name": "source",
4349
- "required": true
4350
- }
4351
- },
4352
- "description": "Import a set of assets to the target media library.",
4353
- "examples": [
4354
- {
4355
- "command": "<%= config.bin %> <%= command.id %> products",
4356
- "description": "Import all assets from the \"products\" directory"
4357
- },
4358
- {
4359
- "command": "<%= config.bin %> <%= command.id %> gallery.tar.gz",
4360
- "description": "Import all assets from \"gallery\" archive"
4361
- },
4362
- {
4363
- "command": "<%= config.bin %> <%= command.id %> products --replace-aspects",
4364
- "description": "Import all assets from the \"products\" directory and replace aspects"
4365
- },
4366
- {
4367
- "command": "<%= config.bin %> <%= command.id %> https://example.com/hero.png",
4368
- "description": "Have Sanity fetch a single asset from a public URL"
4369
- },
4370
- {
4371
- "command": "<%= config.bin %> <%= command.id %> https://example.com/hero.png --aspect department=Brand",
4372
- "description": "Fetch an asset from a URL and set aspect data on it"
4373
- }
4374
- ],
4375
- "flags": {
4376
- "project-id": {
4377
- "char": "p",
4378
- "description": "Project ID to import media to (overrides CLI configuration)",
4379
- "helpGroup": "OVERRIDE",
4380
- "name": "project-id",
4381
- "hasDynamicHelp": false,
4382
- "helpValue": "<id>",
4383
- "multiple": false,
4384
- "type": "option"
4385
- },
4386
- "aspect": {
4387
- "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",
4388
- "name": "aspect",
4389
- "hasDynamicHelp": false,
4390
- "helpValue": "<key=value>",
4391
- "multiple": true,
4392
- "type": "option"
4393
- },
4394
- "filename": {
4395
- "description": "Original filename to store on the asset. Only applies when the source is a URL. Defaults to a name derived from the URL",
4396
- "name": "filename",
4397
- "hasDynamicHelp": false,
4398
- "helpValue": "<filename>",
4399
- "multiple": false,
4400
- "type": "option"
4401
- },
4402
- "media-library-id": {
4403
- "description": "The id of the target media library",
4404
- "name": "media-library-id",
4405
- "hasDynamicHelp": false,
4406
- "multiple": false,
4407
- "type": "option"
4408
- },
4409
- "replace-aspects": {
4410
- "description": "Replace existing aspect data. All versions will be replaced (e.g. published and draft aspect data). Only applies to directory and archive imports",
4411
- "name": "replace-aspects",
4412
- "allowNo": false,
4413
- "type": "boolean"
4414
- }
4415
- },
4416
- "hasDynamicHelp": false,
4417
- "hiddenAliases": [],
4418
- "id": "media:import",
4419
- "pluginAlias": "@sanity/cli",
4420
- "pluginName": "@sanity/cli",
4421
- "pluginType": "core",
4422
- "strict": true,
4423
- "telemetry": {
4424
- "redactedFlags": [
4425
- {
4426
- "canonical": "--aspect",
4427
- "flags": [
4428
- "--aspect"
4429
- ]
4430
- },
4431
- {
4432
- "canonical": "--filename",
4433
- "flags": [
4434
- "--filename"
4435
- ]
4436
- }
4437
- ]
4438
- },
4439
- "isESM": true,
4440
- "relativePath": [
4441
- "dist",
4442
- "commands",
4443
- "media",
4444
- "import.js"
4445
- ]
4446
- },
4447
- "migrations:create": {
4448
- "aliases": [],
4449
- "args": {
4450
- "title": {
4451
- "description": "Title of migration",
4452
- "name": "title",
4453
- "required": false
4454
- }
4455
- },
4456
- "description": "Create a new migration within your project",
4457
- "examples": [
4458
- {
4459
- "command": "<%= config.bin %> <%= command.id %>",
4460
- "description": "Create a new migration, prompting for title and options"
4461
- },
4462
- {
4463
- "command": "<%= config.bin %> <%= command.id %> \"Rename field from location to address\"",
4464
- "description": "Create a new migration with the provided title, prompting for options"
4465
- }
4466
- ],
4467
- "flags": {},
4468
- "hasDynamicHelp": false,
4469
- "hiddenAliases": [
4470
- "migration:create"
4471
- ],
4472
- "id": "migrations:create",
4473
- "pluginAlias": "@sanity/cli",
4474
- "pluginName": "@sanity/cli",
4475
- "pluginType": "core",
4476
- "strict": true,
4477
- "isESM": true,
4478
- "relativePath": [
4479
- "dist",
4480
- "commands",
4481
- "migrations",
4482
- "create.js"
4483
- ]
4484
- },
4485
- "migrations:list": {
4486
- "aliases": [],
4487
- "args": {},
4488
- "description": "List available migrations",
4489
- "examples": [
4490
- {
4491
- "command": "<%= config.bin %> <%= command.id %>",
4492
- "description": "List all available migrations in the project"
4467
+ "hasDynamicHelp": false,
4468
+ "multiple": false,
4469
+ "type": "option"
4470
+ },
4471
+ "media-library-id": {
4472
+ "description": "The id of the target media library",
4473
+ "name": "media-library-id",
4474
+ "hasDynamicHelp": false,
4475
+ "multiple": false,
4476
+ "type": "option"
4477
+ },
4478
+ "no-compress": {
4479
+ "description": "Skips compressing tarball entries (still generates a gzip file)",
4480
+ "name": "no-compress",
4481
+ "allowNo": false,
4482
+ "type": "boolean"
4483
+ },
4484
+ "overwrite": {
4485
+ "description": "Overwrite any file with the same name",
4486
+ "name": "overwrite",
4487
+ "allowNo": false,
4488
+ "type": "boolean"
4493
4489
  }
4494
- ],
4495
- "flags": {},
4490
+ },
4496
4491
  "hasDynamicHelp": false,
4497
- "hiddenAliases": [
4498
- "migration:list"
4499
- ],
4500
- "id": "migrations:list",
4492
+ "hiddenAliases": [],
4493
+ "id": "media:export",
4501
4494
  "pluginAlias": "@sanity/cli",
4502
4495
  "pluginName": "@sanity/cli",
4503
4496
  "pluginType": "core",
@@ -4506,105 +4499,112 @@
4506
4499
  "relativePath": [
4507
4500
  "dist",
4508
4501
  "commands",
4509
- "migrations",
4510
- "list.js"
4502
+ "media",
4503
+ "export.js"
4511
4504
  ]
4512
4505
  },
4513
- "migrations:run": {
4506
+ "media:import": {
4514
4507
  "aliases": [],
4515
4508
  "args": {
4516
- "id": {
4517
- "description": "ID",
4518
- "name": "id",
4519
- "required": false
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
4520
4513
  }
4521
4514
  },
4522
- "description": "Run a migration against a dataset",
4515
+ "description": "Import a set of assets to the target media library.",
4523
4516
  "examples": [
4524
4517
  {
4525
- "command": "<%= config.bin %> <%= command.id %> <id>",
4526
- "description": "dry run the migration"
4518
+ "command": "<%= config.bin %> <%= command.id %> products",
4519
+ "description": "Import all assets from the \"products\" directory"
4527
4520
  },
4528
4521
  {
4529
- "command": "<%= config.bin %> <%= command.id %> <id> --no-dry-run --project xyz --dataset staging",
4530
- "description": "execute the migration against a dataset"
4522
+ "command": "<%= config.bin %> <%= command.id %> gallery.tar.gz",
4523
+ "description": "Import all assets from \"gallery\" archive"
4531
4524
  },
4532
4525
  {
4533
- "command": "<%= config.bin %> <%= command.id %> <id> --from-export=production.tar.gz --no-dry-run --project xyz --dataset staging",
4534
- "description": "execute the migration using a dataset export as the source"
4526
+ "command": "<%= config.bin %> <%= command.id %> products --replace-aspects",
4527
+ "description": "Import all assets from the \"products\" directory and replace aspects"
4528
+ },
4529
+ {
4530
+ "command": "<%= config.bin %> <%= command.id %> https://example.com/hero.png",
4531
+ "description": "Have Sanity fetch a single asset from a public URL"
4532
+ },
4533
+ {
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"
4535
4536
  }
4536
4537
  ],
4537
4538
  "flags": {
4538
- "api-version": {
4539
- "description": "API version to use when migrating. Defaults to v2024-01-29.",
4540
- "name": "api-version",
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
4544
  "hasDynamicHelp": false,
4545
+ "helpValue": "<id>",
4542
4546
  "multiple": false,
4543
4547
  "type": "option"
4544
4548
  },
4545
- "concurrency": {
4546
- "description": "How many mutation requests to run in parallel. Must be between 1 and 10. Default: 6.",
4547
- "name": "concurrency",
4548
- "default": 6,
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",
4549
4552
  "hasDynamicHelp": false,
4550
- "multiple": false,
4553
+ "helpValue": "<key=value>",
4554
+ "multiple": true,
4551
4555
  "type": "option"
4552
4556
  },
4553
- "confirm": {
4554
- "description": "Prompt for confirmation before running the migration (default: true). Use --no-confirm to skip.",
4555
- "name": "confirm",
4556
- "allowNo": true,
4557
- "type": "boolean"
4558
- },
4559
- "dataset": {
4560
- "description": "Dataset to migrate. Defaults to the dataset configured in your Sanity CLI config.",
4561
- "name": "dataset",
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",
4562
4560
  "hasDynamicHelp": false,
4561
+ "helpValue": "<filename>",
4563
4562
  "multiple": false,
4564
4563
  "type": "option"
4565
4564
  },
4566
- "dry-run": {
4567
- "description": "By default the migration runs in dry mode. Use --no-dry-run to migrate dataset.",
4568
- "name": "dry-run",
4569
- "allowNo": true,
4570
- "type": "boolean"
4571
- },
4572
- "from-export": {
4573
- "description": "Use a local dataset export as source for migration instead of calling the Sanity API. Note: this is only supported for dry runs.",
4574
- "name": "from-export",
4565
+ "media-library-id": {
4566
+ "description": "The id of the target media library",
4567
+ "name": "media-library-id",
4575
4568
  "hasDynamicHelp": false,
4576
4569
  "multiple": false,
4577
4570
  "type": "option"
4578
4571
  },
4579
- "progress": {
4580
- "description": "Display progress during migration (default: true). Use --no-progress to hide output.",
4581
- "name": "progress",
4582
- "allowNo": true,
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,
4583
4576
  "type": "boolean"
4584
- },
4585
- "project": {
4586
- "description": "Project ID of the dataset to migrate. Defaults to the projectId configured in your Sanity CLI config.",
4587
- "name": "project",
4588
- "hasDynamicHelp": false,
4589
- "multiple": false,
4590
- "type": "option"
4591
4577
  }
4592
4578
  },
4593
4579
  "hasDynamicHelp": false,
4594
- "hiddenAliases": [
4595
- "migration:run"
4596
- ],
4597
- "id": "migrations:run",
4580
+ "hiddenAliases": [],
4581
+ "id": "media:import",
4598
4582
  "pluginAlias": "@sanity/cli",
4599
4583
  "pluginName": "@sanity/cli",
4600
4584
  "pluginType": "core",
4601
4585
  "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
4602
  "isESM": true,
4603
4603
  "relativePath": [
4604
4604
  "dist",
4605
4605
  "commands",
4606
- "migrations",
4607
- "run.js"
4606
+ "media",
4607
+ "import.js"
4608
4608
  ]
4609
4609
  },
4610
4610
  "openapi:get": {
@@ -5659,6 +5659,48 @@
5659
5659
  "status.js"
5660
5660
  ]
5661
5661
  },
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
+ },
5662
5704
  "tokens:create": {
5663
5705
  "aliases": [],
5664
5706
  "args": {
@@ -5924,48 +5966,6 @@
5924
5966
  "rotate.js"
5925
5967
  ]
5926
5968
  },
5927
- "typegen:generate": {
5928
- "aliases": [],
5929
- "args": {},
5930
- "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.",
5931
- "examples": [
5932
- {
5933
- "command": "<%= config.bin %> <%= command.id %>",
5934
- "description": "Generate TypeScript type definitions from a Sanity Studio schema extracted using the `sanity schema extract` command."
5935
- }
5936
- ],
5937
- "flags": {
5938
- "config-path": {
5939
- "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.",
5940
- "name": "config-path",
5941
- "hasDynamicHelp": false,
5942
- "multiple": false,
5943
- "type": "option"
5944
- },
5945
- "watch": {
5946
- "description": "[Default: false] Run the typegen in watch mode",
5947
- "name": "watch",
5948
- "allowNo": false,
5949
- "type": "boolean"
5950
- }
5951
- },
5952
- "hasDynamicHelp": false,
5953
- "hiddenAliases": [
5954
- "typegen:generate"
5955
- ],
5956
- "id": "typegen:generate",
5957
- "pluginAlias": "@sanity/cli",
5958
- "pluginName": "@sanity/cli",
5959
- "pluginType": "core",
5960
- "strict": true,
5961
- "isESM": true,
5962
- "relativePath": [
5963
- "dist",
5964
- "commands",
5965
- "typegen",
5966
- "generate.js"
5967
- ]
5968
- },
5969
5969
  "users:invite": {
5970
5970
  "aliases": [],
5971
5971
  "args": {
@@ -6119,221 +6119,112 @@
6119
6119
  "list.js"
6120
6120
  ]
6121
6121
  },
6122
- "context:imports:create": {
6122
+ "datasets:alias:create": {
6123
6123
  "aliases": [],
6124
6124
  "args": {
6125
- "knowledgeBaseId": {
6126
- "description": "Knowledge base ID",
6127
- "name": "knowledgeBaseId",
6128
- "required": true
6125
+ "aliasName": {
6126
+ "description": "Dataset alias name to create",
6127
+ "name": "aliasName",
6128
+ "required": false
6129
+ },
6130
+ "targetDataset": {
6131
+ "description": "Target dataset name to link the alias to",
6132
+ "name": "targetDataset",
6133
+ "required": false
6129
6134
  }
6130
6135
  },
6131
- "description": "Import content into a knowledge base",
6136
+ "description": "Create a dataset alias for the project",
6132
6137
  "examples": [
6133
- {
6134
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --text \"Refunds are processed within 5 days\" --title \"Refund policy\"",
6135
- "description": "Import inline text"
6138
+ {
6139
+ "command": "<%= config.bin %> <%= command.id %> --project-id abc123 conference conf-2025",
6140
+ "description": "Create alias in a specific project"
6136
6141
  },
6137
6142
  {
6138
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --file ./handbook.pdf",
6139
- "description": "Upload and import a local file"
6143
+ "command": "<%= config.bin %> <%= command.id %>",
6144
+ "description": "Create an alias with interactive prompts"
6140
6145
  },
6141
6146
  {
6142
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --url https://example.com/docs",
6143
- "description": "Crawl a website"
6147
+ "command": "<%= config.bin %> <%= command.id %> conference",
6148
+ "description": "Create alias named \"conference\" with interactive dataset selection"
6144
6149
  },
6145
6150
  {
6146
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --query '*[_type == \"article\"]' --sanity-project abc123 --sanity-dataset production",
6147
- "description": "Bind a Sanity dataset as a source"
6151
+ "command": "<%= config.bin %> <%= command.id %> conference conf-2025",
6152
+ "description": "Create alias \"conference\" linked to \"conf-2025\" dataset"
6148
6153
  }
6149
6154
  ],
6150
6155
  "flags": {
6151
- "content-type": {
6152
- "description": "Content type of the import (--text: text/markdown or text/plain; --file: any MIME type, inferred from the file extension when omitted)",
6153
- "name": "content-type",
6154
- "required": false,
6155
- "hasDynamicHelp": false,
6156
- "helpValue": "<mime>",
6157
- "multiple": false,
6158
- "type": "option"
6159
- },
6160
- "file": {
6161
- "description": "Path to a local file to import",
6162
- "exclusive": [
6163
- "text",
6164
- "url",
6165
- "query"
6166
- ],
6167
- "name": "file",
6168
- "required": false,
6169
- "hasDynamicHelp": false,
6170
- "helpValue": "<path>",
6171
- "multiple": false,
6172
- "type": "option"
6173
- },
6174
- "query": {
6175
- "description": "GROQ query binding a Sanity dataset as a source",
6176
- "exclusive": [
6177
- "text",
6178
- "url",
6179
- "file"
6180
- ],
6181
- "name": "query",
6182
- "required": false,
6183
- "hasDynamicHelp": false,
6184
- "multiple": false,
6185
- "type": "option"
6186
- },
6187
- "sanity-dataset": {
6188
- "dependsOn": [
6189
- "query"
6190
- ],
6191
- "description": "Sanity dataset for a dataset import",
6192
- "name": "sanity-dataset",
6193
- "required": false,
6194
- "hasDynamicHelp": false,
6195
- "helpValue": "<name>",
6196
- "multiple": false,
6197
- "type": "option"
6198
- },
6199
- "sanity-project": {
6200
- "dependsOn": [
6201
- "query"
6202
- ],
6203
- "description": "Sanity project ID for a dataset import",
6204
- "name": "sanity-project",
6205
- "required": false,
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",
6206
6161
  "hasDynamicHelp": false,
6207
6162
  "helpValue": "<id>",
6208
6163
  "multiple": false,
6209
6164
  "type": "option"
6210
- },
6211
- "text": {
6212
- "description": "Inline text content to import (requires --title)",
6213
- "exclusive": [
6214
- "file",
6215
- "url",
6216
- "query"
6217
- ],
6218
- "name": "text",
6219
- "required": false,
6220
- "hasDynamicHelp": false,
6221
- "multiple": false,
6222
- "type": "option"
6223
- },
6224
- "title": {
6225
- "dependsOn": [
6226
- "text"
6227
- ],
6228
- "description": "Title for an inline text import",
6229
- "name": "title",
6230
- "required": false,
6231
- "hasDynamicHelp": false,
6232
- "multiple": false,
6233
- "type": "option"
6234
- },
6235
- "url": {
6236
- "description": "Website URL to crawl",
6237
- "exclusive": [
6238
- "text",
6239
- "file",
6240
- "query"
6241
- ],
6242
- "name": "url",
6243
- "required": false,
6244
- "hasDynamicHelp": false,
6245
- "helpValue": "<url>",
6246
- "multiple": false,
6247
- "type": "option"
6248
6165
  }
6249
6166
  },
6250
6167
  "hasDynamicHelp": false,
6251
- "hiddenAliases": [],
6252
- "id": "context:imports:create",
6168
+ "hiddenAliases": [
6169
+ "dataset:alias:create"
6170
+ ],
6171
+ "id": "datasets:alias:create",
6253
6172
  "pluginAlias": "@sanity/cli",
6254
6173
  "pluginName": "@sanity/cli",
6255
6174
  "pluginType": "core",
6256
6175
  "strict": true,
6257
- "telemetry": {
6258
- "redactedFlags": [
6259
- {
6260
- "canonical": "--text",
6261
- "flags": [
6262
- "--text"
6263
- ]
6264
- },
6265
- {
6266
- "canonical": "--file",
6267
- "flags": [
6268
- "--file"
6269
- ]
6270
- },
6271
- {
6272
- "canonical": "--url",
6273
- "flags": [
6274
- "--url"
6275
- ]
6276
- },
6277
- {
6278
- "canonical": "--title",
6279
- "flags": [
6280
- "--title"
6281
- ]
6282
- },
6283
- {
6284
- "canonical": "--query",
6285
- "flags": [
6286
- "--query"
6287
- ]
6288
- }
6289
- ]
6290
- },
6291
6176
  "isESM": true,
6292
6177
  "relativePath": [
6293
6178
  "dist",
6294
6179
  "commands",
6295
- "context",
6296
- "imports",
6180
+ "datasets",
6181
+ "alias",
6297
6182
  "create.js"
6298
6183
  ]
6299
6184
  },
6300
- "context:imports:delete": {
6185
+ "datasets:alias:delete": {
6301
6186
  "aliases": [],
6302
6187
  "args": {
6303
- "knowledgeBaseId": {
6304
- "description": "Knowledge base ID",
6305
- "name": "knowledgeBaseId",
6306
- "required": true
6307
- },
6308
- "importId": {
6309
- "description": "Import ID",
6310
- "name": "importId",
6188
+ "aliasName": {
6189
+ "description": "Dataset alias name to delete",
6190
+ "name": "aliasName",
6311
6191
  "required": true
6312
6192
  }
6313
6193
  },
6314
- "description": "Delete an import from a knowledge base",
6194
+ "description": "Delete a dataset alias from the project",
6315
6195
  "examples": [
6316
6196
  {
6317
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6318
- "description": "Delete an import after confirmation"
6197
+ "command": "<%= config.bin %> <%= command.id %> conference",
6198
+ "description": "Delete alias named \"conference\" with confirmation prompt"
6319
6199
  },
6320
6200
  {
6321
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456 --yes",
6322
- "description": "Delete an import without confirmation prompt"
6201
+ "command": "<%= config.bin %> <%= command.id %> conference --force",
6202
+ "description": "Delete alias named \"conference\" without confirmation prompt"
6323
6203
  }
6324
6204
  ],
6325
6205
  "flags": {
6326
- "yes": {
6327
- "char": "y",
6328
- "description": "Skip confirmation prompt (unattended mode)",
6329
- "name": "yes",
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",
6330
6219
  "allowNo": false,
6331
6220
  "type": "boolean"
6332
6221
  }
6333
6222
  },
6334
6223
  "hasDynamicHelp": false,
6335
- "hiddenAliases": [],
6336
- "id": "context:imports:delete",
6224
+ "hiddenAliases": [
6225
+ "dataset:alias:delete"
6226
+ ],
6227
+ "id": "datasets:alias:delete",
6337
6228
  "pluginAlias": "@sanity/cli",
6338
6229
  "pluginName": "@sanity/cli",
6339
6230
  "pluginType": "core",
@@ -6342,43 +6233,68 @@
6342
6233
  "relativePath": [
6343
6234
  "dist",
6344
6235
  "commands",
6345
- "context",
6346
- "imports",
6236
+ "datasets",
6237
+ "alias",
6347
6238
  "delete.js"
6348
6239
  ]
6349
6240
  },
6350
- "context:imports:download": {
6241
+ "datasets:alias:link": {
6351
6242
  "aliases": [],
6352
6243
  "args": {
6353
- "knowledgeBaseId": {
6354
- "description": "Knowledge base ID",
6355
- "name": "knowledgeBaseId",
6356
- "required": true
6244
+ "aliasName": {
6245
+ "description": "Dataset alias name to link",
6246
+ "name": "aliasName",
6247
+ "required": false
6357
6248
  },
6358
- "importId": {
6359
- "description": "Import ID",
6360
- "name": "importId",
6361
- "required": true
6249
+ "targetDataset": {
6250
+ "description": "Target dataset name to link the alias to",
6251
+ "name": "targetDataset",
6252
+ "required": false
6362
6253
  }
6363
6254
  },
6364
- "description": "Get a short-lived signed URL for the original uploaded bytes of a file import",
6255
+ "description": "Link a dataset alias to a dataset in the project",
6365
6256
  "examples": [
6366
6257
  {
6367
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6368
- "description": "Get a download URL for an uploaded file"
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"
6268
+ },
6269
+ {
6270
+ "command": "<%= config.bin %> <%= command.id %> conference conf-2025 --force",
6271
+ "description": "Force link without confirmation (skip relink prompt)"
6369
6272
  }
6370
6273
  ],
6371
6274
  "flags": {
6372
- "json": {
6373
- "description": "Output the download URL in JSON format",
6374
- "name": "json",
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,
6375
6289
  "allowNo": false,
6376
6290
  "type": "boolean"
6377
6291
  }
6378
6292
  },
6379
6293
  "hasDynamicHelp": false,
6380
- "hiddenAliases": [],
6381
- "id": "context:imports:download",
6294
+ "hiddenAliases": [
6295
+ "dataset:alias:link"
6296
+ ],
6297
+ "id": "datasets:alias:link",
6382
6298
  "pluginAlias": "@sanity/cli",
6383
6299
  "pluginName": "@sanity/cli",
6384
6300
  "pluginType": "core",
@@ -6387,47 +6303,58 @@
6387
6303
  "relativePath": [
6388
6304
  "dist",
6389
6305
  "commands",
6390
- "context",
6391
- "imports",
6392
- "download.js"
6306
+ "datasets",
6307
+ "alias",
6308
+ "link.js"
6393
6309
  ]
6394
6310
  },
6395
- "context:imports:get": {
6311
+ "datasets:alias:unlink": {
6396
6312
  "aliases": [],
6397
6313
  "args": {
6398
- "knowledgeBaseId": {
6399
- "description": "Knowledge base ID",
6400
- "name": "knowledgeBaseId",
6401
- "required": true
6402
- },
6403
- "importId": {
6404
- "description": "Import ID",
6405
- "name": "importId",
6406
- "required": true
6314
+ "aliasName": {
6315
+ "description": "Dataset alias name to unlink",
6316
+ "name": "aliasName",
6317
+ "required": false
6407
6318
  }
6408
6319
  },
6409
- "description": "Get details of an import",
6320
+ "description": "Unlink a dataset alias from its dataset in the project",
6410
6321
  "examples": [
6411
6322
  {
6412
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6413
- "description": "Get details of a specific import"
6323
+ "command": "<%= config.bin %> <%= command.id %>",
6324
+ "description": "Unlink an alias with interactive selection"
6414
6325
  },
6415
6326
  {
6416
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456 --json",
6417
- "description": "Output the import as JSON"
6327
+ "command": "<%= config.bin %> <%= command.id %> conference",
6328
+ "description": "Unlink alias \"conference\" with confirmation prompt"
6329
+ },
6330
+ {
6331
+ "command": "<%= config.bin %> <%= command.id %> conference --force",
6332
+ "description": "Unlink alias \"conference\" without confirmation prompt"
6418
6333
  }
6419
6334
  ],
6420
6335
  "flags": {
6421
- "json": {
6422
- "description": "Output the import in JSON format",
6423
- "name": "json",
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"
6345
+ },
6346
+ "force": {
6347
+ "description": "Skip confirmation prompt and unlink immediately",
6348
+ "name": "force",
6424
6349
  "allowNo": false,
6425
6350
  "type": "boolean"
6426
6351
  }
6427
6352
  },
6428
6353
  "hasDynamicHelp": false,
6429
- "hiddenAliases": [],
6430
- "id": "context:imports:get",
6354
+ "hiddenAliases": [
6355
+ "dataset:alias:unlink"
6356
+ ],
6357
+ "id": "datasets:alias:unlink",
6431
6358
  "pluginAlias": "@sanity/cli",
6432
6359
  "pluginName": "@sanity/cli",
6433
6360
  "pluginType": "core",
@@ -6436,42 +6363,44 @@
6436
6363
  "relativePath": [
6437
6364
  "dist",
6438
6365
  "commands",
6439
- "context",
6440
- "imports",
6441
- "get.js"
6366
+ "datasets",
6367
+ "alias",
6368
+ "unlink.js"
6442
6369
  ]
6443
6370
  },
6444
- "context:imports:list": {
6371
+ "datasets:embeddings:disable": {
6445
6372
  "aliases": [],
6446
6373
  "args": {
6447
- "knowledgeBaseId": {
6448
- "description": "Knowledge base ID",
6449
- "name": "knowledgeBaseId",
6450
- "required": true
6374
+ "dataset": {
6375
+ "description": "Dataset name to disable embeddings for",
6376
+ "name": "dataset",
6377
+ "required": false
6451
6378
  }
6452
6379
  },
6453
- "description": "List imports for a knowledge base",
6380
+ "description": "Disable embeddings for a dataset",
6454
6381
  "examples": [
6455
6382
  {
6456
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
6457
- "description": "List all imports for a knowledge base"
6458
- },
6459
- {
6460
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
6461
- "description": "Output imports as JSON"
6383
+ "command": "<%= config.bin %> <%= command.id %> production",
6384
+ "description": "Disable embeddings for the production dataset"
6462
6385
  }
6463
6386
  ],
6464
6387
  "flags": {
6465
- "json": {
6466
- "description": "Output imports in JSON format",
6467
- "name": "json",
6468
- "allowNo": false,
6469
- "type": "boolean"
6388
+ "project-id": {
6389
+ "char": "p",
6390
+ "description": "Project ID to disable embeddings for (overrides CLI configuration)",
6391
+ "helpGroup": "OVERRIDE",
6392
+ "name": "project-id",
6393
+ "hasDynamicHelp": false,
6394
+ "helpValue": "<id>",
6395
+ "multiple": false,
6396
+ "type": "option"
6470
6397
  }
6471
6398
  },
6472
6399
  "hasDynamicHelp": false,
6473
- "hiddenAliases": [],
6474
- "id": "context:imports:list",
6400
+ "hiddenAliases": [
6401
+ "dataset:embeddings:disable"
6402
+ ],
6403
+ "id": "datasets:embeddings:disable",
6475
6404
  "pluginAlias": "@sanity/cli",
6476
6405
  "pluginName": "@sanity/cli",
6477
6406
  "pluginType": "core",
@@ -6480,53 +6409,66 @@
6480
6409
  "relativePath": [
6481
6410
  "dist",
6482
6411
  "commands",
6483
- "context",
6484
- "imports",
6485
- "list.js"
6412
+ "datasets",
6413
+ "embeddings",
6414
+ "disable.js"
6486
6415
  ]
6487
6416
  },
6488
- "context:jobs:get": {
6417
+ "datasets:embeddings:enable": {
6489
6418
  "aliases": [],
6490
6419
  "args": {
6491
- "knowledgeBaseId": {
6492
- "description": "Knowledge base ID",
6493
- "name": "knowledgeBaseId",
6494
- "required": true
6495
- },
6496
- "jobId": {
6497
- "description": "Job ID",
6498
- "name": "jobId",
6499
- "required": true
6420
+ "dataset": {
6421
+ "description": "Dataset name to enable embeddings for",
6422
+ "name": "dataset",
6423
+ "required": false
6500
6424
  }
6501
6425
  },
6502
- "description": "Get the status of a knowledge base job",
6426
+ "description": "Enable embeddings for a dataset",
6503
6427
  "examples": [
6504
6428
  {
6505
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456",
6506
- "description": "Get the current status of a job"
6429
+ "command": "<%= config.bin %> <%= command.id %> production",
6430
+ "description": "Enable embeddings for the production dataset"
6507
6431
  },
6508
6432
  {
6509
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456 --watch",
6510
- "description": "Wait for the job to finish (non-zero exit if it does not succeed)"
6433
+ "command": "<%= config.bin %> <%= command.id %> production --projection \"{ title, body }\"",
6434
+ "description": "Enable embeddings with a specific projection"
6435
+ },
6436
+ {
6437
+ "command": "<%= config.bin %> <%= command.id %> production --wait",
6438
+ "description": "Enable embeddings and wait for processing to complete"
6511
6439
  }
6512
6440
  ],
6513
6441
  "flags": {
6514
- "json": {
6515
- "description": "Output the job in JSON format",
6516
- "name": "json",
6517
- "allowNo": false,
6518
- "type": "boolean"
6442
+ "project-id": {
6443
+ "char": "p",
6444
+ "description": "Project ID to enable embeddings for (overrides CLI configuration)",
6445
+ "helpGroup": "OVERRIDE",
6446
+ "name": "project-id",
6447
+ "hasDynamicHelp": false,
6448
+ "helpValue": "<id>",
6449
+ "multiple": false,
6450
+ "type": "option"
6519
6451
  },
6520
- "watch": {
6521
- "description": "Poll until the job reaches a terminal state",
6522
- "name": "watch",
6452
+ "projection": {
6453
+ "description": "GROQ projection defining which fields to embed (e.g. \"{ title, body }\")",
6454
+ "name": "projection",
6455
+ "required": false,
6456
+ "hasDynamicHelp": false,
6457
+ "multiple": false,
6458
+ "type": "option"
6459
+ },
6460
+ "wait": {
6461
+ "description": "Wait for embeddings processing to complete before returning",
6462
+ "name": "wait",
6523
6463
  "allowNo": false,
6524
6464
  "type": "boolean"
6525
6465
  }
6526
6466
  },
6527
6467
  "hasDynamicHelp": false,
6528
- "hiddenAliases": [],
6529
- "id": "context:jobs:get",
6468
+ "hiddenAliases": [
6469
+ "dataset:embeddings:enable"
6470
+ ],
6471
+ "id": "datasets:embeddings:enable",
6530
6472
  "pluginAlias": "@sanity/cli",
6531
6473
  "pluginName": "@sanity/cli",
6532
6474
  "pluginType": "core",
@@ -6535,48 +6477,31 @@
6535
6477
  "relativePath": [
6536
6478
  "dist",
6537
6479
  "commands",
6538
- "context",
6539
- "jobs",
6540
- "get.js"
6480
+ "datasets",
6481
+ "embeddings",
6482
+ "enable.js"
6541
6483
  ]
6542
6484
  },
6543
- "datasets:alias:create": {
6485
+ "datasets:embeddings:status": {
6544
6486
  "aliases": [],
6545
6487
  "args": {
6546
- "aliasName": {
6547
- "description": "Dataset alias name to create",
6548
- "name": "aliasName",
6549
- "required": false
6550
- },
6551
- "targetDataset": {
6552
- "description": "Target dataset name to link the alias to",
6553
- "name": "targetDataset",
6488
+ "dataset": {
6489
+ "description": "The name of the dataset to check embeddings status for",
6490
+ "name": "dataset",
6554
6491
  "required": false
6555
6492
  }
6556
6493
  },
6557
- "description": "Create a dataset alias for the project",
6494
+ "description": "Show embeddings settings and status for a dataset",
6558
6495
  "examples": [
6559
6496
  {
6560
- "command": "<%= config.bin %> <%= command.id %> --project-id abc123 conference conf-2025",
6561
- "description": "Create alias in a specific project"
6562
- },
6563
- {
6564
- "command": "<%= config.bin %> <%= command.id %>",
6565
- "description": "Create an alias with interactive prompts"
6566
- },
6567
- {
6568
- "command": "<%= config.bin %> <%= command.id %> conference",
6569
- "description": "Create alias named \"conference\" with interactive dataset selection"
6570
- },
6571
- {
6572
- "command": "<%= config.bin %> <%= command.id %> conference conf-2025",
6573
- "description": "Create alias \"conference\" linked to \"conf-2025\" dataset"
6497
+ "command": "<%= config.bin %> <%= command.id %> production",
6498
+ "description": "Show embeddings status for the production dataset"
6574
6499
  }
6575
6500
  ],
6576
6501
  "flags": {
6577
6502
  "project-id": {
6578
6503
  "char": "p",
6579
- "description": "Project ID to create dataset alias in (overrides CLI configuration)",
6504
+ "description": "Project ID to check embeddings status for (overrides CLI configuration)",
6580
6505
  "helpGroup": "OVERRIDE",
6581
6506
  "name": "project-id",
6582
6507
  "hasDynamicHelp": false,
@@ -6587,9 +6512,9 @@
6587
6512
  },
6588
6513
  "hasDynamicHelp": false,
6589
6514
  "hiddenAliases": [
6590
- "dataset:alias:create"
6515
+ "dataset:embeddings:status"
6591
6516
  ],
6592
- "id": "datasets:alias:create",
6517
+ "id": "datasets:embeddings:status",
6593
6518
  "pluginAlias": "@sanity/cli",
6594
6519
  "pluginName": "@sanity/cli",
6595
6520
  "pluginType": "core",
@@ -6599,53 +6524,43 @@
6599
6524
  "dist",
6600
6525
  "commands",
6601
6526
  "datasets",
6602
- "alias",
6603
- "create.js"
6527
+ "embeddings",
6528
+ "status.js"
6604
6529
  ]
6605
6530
  },
6606
- "datasets:alias:delete": {
6531
+ "datasets:visibility:get": {
6607
6532
  "aliases": [],
6608
6533
  "args": {
6609
- "aliasName": {
6610
- "description": "Dataset alias name to delete",
6611
- "name": "aliasName",
6534
+ "dataset": {
6535
+ "description": "The name of the dataset to get visibility for",
6536
+ "name": "dataset",
6612
6537
  "required": true
6613
6538
  }
6614
6539
  },
6615
- "description": "Delete a dataset alias from the project",
6540
+ "description": "Get the visibility of a dataset",
6616
6541
  "examples": [
6617
6542
  {
6618
- "command": "<%= config.bin %> <%= command.id %> conference",
6619
- "description": "Delete alias named \"conference\" with confirmation prompt"
6620
- },
6621
- {
6622
- "command": "<%= config.bin %> <%= command.id %> conference --force",
6623
- "description": "Delete alias named \"conference\" without confirmation prompt"
6543
+ "command": "<%= config.bin %> <%= command.id %> my-dataset",
6544
+ "description": "Check the visibility of a dataset"
6624
6545
  }
6625
6546
  ],
6626
6547
  "flags": {
6627
6548
  "project-id": {
6628
6549
  "char": "p",
6629
- "description": "Project ID to delete dataset alias from (overrides CLI configuration)",
6550
+ "description": "Project ID to get dataset visibility for (overrides CLI configuration)",
6630
6551
  "helpGroup": "OVERRIDE",
6631
6552
  "name": "project-id",
6632
6553
  "hasDynamicHelp": false,
6633
6554
  "helpValue": "<id>",
6634
6555
  "multiple": false,
6635
6556
  "type": "option"
6636
- },
6637
- "force": {
6638
- "description": "Skip confirmation prompt and delete immediately",
6639
- "name": "force",
6640
- "allowNo": false,
6641
- "type": "boolean"
6642
6557
  }
6643
6558
  },
6644
6559
  "hasDynamicHelp": false,
6645
6560
  "hiddenAliases": [
6646
- "dataset:alias:delete"
6561
+ "dataset:visibility:get"
6647
6562
  ],
6648
- "id": "datasets:alias:delete",
6563
+ "id": "datasets:visibility:get",
6649
6564
  "pluginAlias": "@sanity/cli",
6650
6565
  "pluginName": "@sanity/cli",
6651
6566
  "pluginType": "core",
@@ -6655,67 +6570,56 @@
6655
6570
  "dist",
6656
6571
  "commands",
6657
6572
  "datasets",
6658
- "alias",
6659
- "delete.js"
6573
+ "visibility",
6574
+ "get.js"
6660
6575
  ]
6661
6576
  },
6662
- "datasets:alias:link": {
6577
+ "datasets:visibility:set": {
6663
6578
  "aliases": [],
6664
6579
  "args": {
6665
- "aliasName": {
6666
- "description": "Dataset alias name to link",
6667
- "name": "aliasName",
6668
- "required": false
6580
+ "dataset": {
6581
+ "description": "The name of the dataset to set visibility for",
6582
+ "name": "dataset",
6583
+ "required": true
6669
6584
  },
6670
- "targetDataset": {
6671
- "description": "Target dataset name to link the alias to",
6672
- "name": "targetDataset",
6673
- "required": false
6585
+ "mode": {
6586
+ "description": "The visibility mode to set",
6587
+ "name": "mode",
6588
+ "options": [
6589
+ "public",
6590
+ "private"
6591
+ ],
6592
+ "required": true
6674
6593
  }
6675
6594
  },
6676
- "description": "Link a dataset alias to a dataset in the project",
6595
+ "description": "Set the visibility of a dataset",
6677
6596
  "examples": [
6678
6597
  {
6679
- "command": "<%= config.bin %> <%= command.id %>",
6680
- "description": "Link an alias with interactive prompts"
6681
- },
6682
- {
6683
- "command": "<%= config.bin %> <%= command.id %> conference",
6684
- "description": "Link alias named \"conference\" with interactive dataset selection"
6685
- },
6686
- {
6687
- "command": "<%= config.bin %> <%= command.id %> conference conf-2025",
6688
- "description": "Link alias \"conference\" to \"conf-2025\" dataset"
6598
+ "command": "<%= config.bin %> <%= command.id %> my-dataset private",
6599
+ "description": "Make a dataset private"
6689
6600
  },
6690
6601
  {
6691
- "command": "<%= config.bin %> <%= command.id %> conference conf-2025 --force",
6692
- "description": "Force link without confirmation (skip relink prompt)"
6602
+ "command": "<%= config.bin %> <%= command.id %> my-dataset public",
6603
+ "description": "Make a dataset public"
6693
6604
  }
6694
6605
  ],
6695
6606
  "flags": {
6696
6607
  "project-id": {
6697
6608
  "char": "p",
6698
- "description": "Project ID to link dataset alias in (overrides CLI configuration)",
6609
+ "description": "Project ID to set dataset visibility for (overrides CLI configuration)",
6699
6610
  "helpGroup": "OVERRIDE",
6700
6611
  "name": "project-id",
6701
6612
  "hasDynamicHelp": false,
6702
6613
  "helpValue": "<id>",
6703
6614
  "multiple": false,
6704
6615
  "type": "option"
6705
- },
6706
- "force": {
6707
- "description": "Skip confirmation prompt when relinking existing alias",
6708
- "name": "force",
6709
- "required": false,
6710
- "allowNo": false,
6711
- "type": "boolean"
6712
6616
  }
6713
6617
  },
6714
6618
  "hasDynamicHelp": false,
6715
6619
  "hiddenAliases": [
6716
- "dataset:alias:link"
6620
+ "dataset:visibility:set"
6717
6621
  ],
6718
- "id": "datasets:alias:link",
6622
+ "id": "datasets:visibility:set",
6719
6623
  "pluginAlias": "@sanity/cli",
6720
6624
  "pluginName": "@sanity/cli",
6721
6625
  "pluginType": "core",
@@ -6725,103 +6629,225 @@
6725
6629
  "dist",
6726
6630
  "commands",
6727
6631
  "datasets",
6728
- "alias",
6729
- "link.js"
6632
+ "visibility",
6633
+ "set.js"
6730
6634
  ]
6731
6635
  },
6732
- "datasets:alias:unlink": {
6636
+ "context:imports:create": {
6733
6637
  "aliases": [],
6734
6638
  "args": {
6735
- "aliasName": {
6736
- "description": "Dataset alias name to unlink",
6737
- "name": "aliasName",
6738
- "required": false
6639
+ "knowledgeBaseId": {
6640
+ "description": "Knowledge base ID",
6641
+ "name": "knowledgeBaseId",
6642
+ "required": true
6739
6643
  }
6740
6644
  },
6741
- "description": "Unlink a dataset alias from its dataset in the project",
6645
+ "description": "Import content into a knowledge base",
6742
6646
  "examples": [
6743
6647
  {
6744
- "command": "<%= config.bin %> <%= command.id %>",
6745
- "description": "Unlink an alias with interactive selection"
6648
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --text \"Refunds are processed within 5 days\" --title \"Refund policy\"",
6649
+ "description": "Import inline text"
6746
6650
  },
6747
6651
  {
6748
- "command": "<%= config.bin %> <%= command.id %> conference",
6749
- "description": "Unlink alias \"conference\" with confirmation prompt"
6652
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --file ./handbook.pdf",
6653
+ "description": "Upload and import a local file"
6750
6654
  },
6751
6655
  {
6752
- "command": "<%= config.bin %> <%= command.id %> conference --force",
6753
- "description": "Unlink alias \"conference\" without confirmation prompt"
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"
6754
6662
  }
6755
6663
  ],
6756
6664
  "flags": {
6757
- "project-id": {
6758
- "char": "p",
6759
- "description": "Project ID to unlink dataset alias in (overrides CLI configuration)",
6760
- "helpGroup": "OVERRIDE",
6761
- "name": "project-id",
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,
6762
6720
  "hasDynamicHelp": false,
6763
6721
  "helpValue": "<id>",
6764
6722
  "multiple": false,
6765
6723
  "type": "option"
6766
6724
  },
6767
- "force": {
6768
- "description": "Skip confirmation prompt and unlink immediately",
6769
- "name": "force",
6770
- "allowNo": false,
6771
- "type": "boolean"
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"
6772
6762
  }
6773
6763
  },
6774
6764
  "hasDynamicHelp": false,
6775
- "hiddenAliases": [
6776
- "dataset:alias:unlink"
6777
- ],
6778
- "id": "datasets:alias:unlink",
6765
+ "hiddenAliases": [],
6766
+ "id": "context:imports:create",
6779
6767
  "pluginAlias": "@sanity/cli",
6780
6768
  "pluginName": "@sanity/cli",
6781
6769
  "pluginType": "core",
6782
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
+ },
6783
6805
  "isESM": true,
6784
6806
  "relativePath": [
6785
6807
  "dist",
6786
6808
  "commands",
6787
- "datasets",
6788
- "alias",
6789
- "unlink.js"
6809
+ "context",
6810
+ "imports",
6811
+ "create.js"
6790
6812
  ]
6791
6813
  },
6792
- "datasets:embeddings:disable": {
6814
+ "context:imports:delete": {
6793
6815
  "aliases": [],
6794
6816
  "args": {
6795
- "dataset": {
6796
- "description": "Dataset name to disable embeddings for",
6797
- "name": "dataset",
6798
- "required": false
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
6799
6826
  }
6800
6827
  },
6801
- "description": "Disable embeddings for a dataset",
6828
+ "description": "Delete an import from a knowledge base",
6802
6829
  "examples": [
6803
6830
  {
6804
- "command": "<%= config.bin %> <%= command.id %> production",
6805
- "description": "Disable embeddings for the production dataset"
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"
6806
6837
  }
6807
6838
  ],
6808
6839
  "flags": {
6809
- "project-id": {
6810
- "char": "p",
6811
- "description": "Project ID to disable embeddings for (overrides CLI configuration)",
6812
- "helpGroup": "OVERRIDE",
6813
- "name": "project-id",
6814
- "hasDynamicHelp": false,
6815
- "helpValue": "<id>",
6816
- "multiple": false,
6817
- "type": "option"
6840
+ "yes": {
6841
+ "char": "y",
6842
+ "description": "Skip confirmation prompt (unattended mode)",
6843
+ "name": "yes",
6844
+ "allowNo": false,
6845
+ "type": "boolean"
6818
6846
  }
6819
6847
  },
6820
6848
  "hasDynamicHelp": false,
6821
- "hiddenAliases": [
6822
- "dataset:embeddings:disable"
6823
- ],
6824
- "id": "datasets:embeddings:disable",
6849
+ "hiddenAliases": [],
6850
+ "id": "context:imports:delete",
6825
6851
  "pluginAlias": "@sanity/cli",
6826
6852
  "pluginName": "@sanity/cli",
6827
6853
  "pluginType": "core",
@@ -6830,66 +6856,43 @@
6830
6856
  "relativePath": [
6831
6857
  "dist",
6832
6858
  "commands",
6833
- "datasets",
6834
- "embeddings",
6835
- "disable.js"
6859
+ "context",
6860
+ "imports",
6861
+ "delete.js"
6836
6862
  ]
6837
6863
  },
6838
- "datasets:embeddings:enable": {
6864
+ "context:imports:download": {
6839
6865
  "aliases": [],
6840
6866
  "args": {
6841
- "dataset": {
6842
- "description": "Dataset name to enable embeddings for",
6843
- "name": "dataset",
6844
- "required": false
6867
+ "knowledgeBaseId": {
6868
+ "description": "Knowledge base ID",
6869
+ "name": "knowledgeBaseId",
6870
+ "required": true
6871
+ },
6872
+ "importId": {
6873
+ "description": "Import ID",
6874
+ "name": "importId",
6875
+ "required": true
6845
6876
  }
6846
6877
  },
6847
- "description": "Enable embeddings for a dataset",
6878
+ "description": "Get a short-lived signed URL for the original uploaded bytes of a file import",
6848
6879
  "examples": [
6849
6880
  {
6850
- "command": "<%= config.bin %> <%= command.id %> production",
6851
- "description": "Enable embeddings for the production dataset"
6852
- },
6853
- {
6854
- "command": "<%= config.bin %> <%= command.id %> production --projection \"{ title, body }\"",
6855
- "description": "Enable embeddings with a specific projection"
6856
- },
6857
- {
6858
- "command": "<%= config.bin %> <%= command.id %> production --wait",
6859
- "description": "Enable embeddings and wait for processing to complete"
6881
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6882
+ "description": "Get a download URL for an uploaded file"
6860
6883
  }
6861
6884
  ],
6862
6885
  "flags": {
6863
- "project-id": {
6864
- "char": "p",
6865
- "description": "Project ID to enable embeddings for (overrides CLI configuration)",
6866
- "helpGroup": "OVERRIDE",
6867
- "name": "project-id",
6868
- "hasDynamicHelp": false,
6869
- "helpValue": "<id>",
6870
- "multiple": false,
6871
- "type": "option"
6872
- },
6873
- "projection": {
6874
- "description": "GROQ projection defining which fields to embed (e.g. \"{ title, body }\")",
6875
- "name": "projection",
6876
- "required": false,
6877
- "hasDynamicHelp": false,
6878
- "multiple": false,
6879
- "type": "option"
6880
- },
6881
- "wait": {
6882
- "description": "Wait for embeddings processing to complete before returning",
6883
- "name": "wait",
6886
+ "json": {
6887
+ "description": "Output the download URL in JSON format",
6888
+ "name": "json",
6884
6889
  "allowNo": false,
6885
6890
  "type": "boolean"
6886
6891
  }
6887
6892
  },
6888
6893
  "hasDynamicHelp": false,
6889
- "hiddenAliases": [
6890
- "dataset:embeddings:enable"
6891
- ],
6892
- "id": "datasets:embeddings:enable",
6894
+ "hiddenAliases": [],
6895
+ "id": "context:imports:download",
6893
6896
  "pluginAlias": "@sanity/cli",
6894
6897
  "pluginName": "@sanity/cli",
6895
6898
  "pluginType": "core",
@@ -6898,44 +6901,47 @@
6898
6901
  "relativePath": [
6899
6902
  "dist",
6900
6903
  "commands",
6901
- "datasets",
6902
- "embeddings",
6903
- "enable.js"
6904
+ "context",
6905
+ "imports",
6906
+ "download.js"
6904
6907
  ]
6905
6908
  },
6906
- "datasets:embeddings:status": {
6909
+ "context:imports:get": {
6907
6910
  "aliases": [],
6908
6911
  "args": {
6909
- "dataset": {
6910
- "description": "The name of the dataset to check embeddings status for",
6911
- "name": "dataset",
6912
- "required": false
6912
+ "knowledgeBaseId": {
6913
+ "description": "Knowledge base ID",
6914
+ "name": "knowledgeBaseId",
6915
+ "required": true
6916
+ },
6917
+ "importId": {
6918
+ "description": "Import ID",
6919
+ "name": "importId",
6920
+ "required": true
6913
6921
  }
6914
6922
  },
6915
- "description": "Show embeddings settings and status for a dataset",
6923
+ "description": "Get details of an import",
6916
6924
  "examples": [
6917
6925
  {
6918
- "command": "<%= config.bin %> <%= command.id %> production",
6919
- "description": "Show embeddings status for the production dataset"
6926
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456",
6927
+ "description": "Get details of a specific import"
6928
+ },
6929
+ {
6930
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 import-def456 --json",
6931
+ "description": "Output the import as JSON"
6920
6932
  }
6921
6933
  ],
6922
6934
  "flags": {
6923
- "project-id": {
6924
- "char": "p",
6925
- "description": "Project ID to check embeddings status for (overrides CLI configuration)",
6926
- "helpGroup": "OVERRIDE",
6927
- "name": "project-id",
6928
- "hasDynamicHelp": false,
6929
- "helpValue": "<id>",
6930
- "multiple": false,
6931
- "type": "option"
6935
+ "json": {
6936
+ "description": "Output the import in JSON format",
6937
+ "name": "json",
6938
+ "allowNo": false,
6939
+ "type": "boolean"
6932
6940
  }
6933
6941
  },
6934
6942
  "hasDynamicHelp": false,
6935
- "hiddenAliases": [
6936
- "dataset:embeddings:status"
6937
- ],
6938
- "id": "datasets:embeddings:status",
6943
+ "hiddenAliases": [],
6944
+ "id": "context:imports:get",
6939
6945
  "pluginAlias": "@sanity/cli",
6940
6946
  "pluginName": "@sanity/cli",
6941
6947
  "pluginType": "core",
@@ -6944,44 +6950,42 @@
6944
6950
  "relativePath": [
6945
6951
  "dist",
6946
6952
  "commands",
6947
- "datasets",
6948
- "embeddings",
6949
- "status.js"
6953
+ "context",
6954
+ "imports",
6955
+ "get.js"
6950
6956
  ]
6951
6957
  },
6952
- "datasets:visibility:get": {
6958
+ "context:imports:list": {
6953
6959
  "aliases": [],
6954
6960
  "args": {
6955
- "dataset": {
6956
- "description": "The name of the dataset to get visibility for",
6957
- "name": "dataset",
6961
+ "knowledgeBaseId": {
6962
+ "description": "Knowledge base ID",
6963
+ "name": "knowledgeBaseId",
6958
6964
  "required": true
6959
6965
  }
6960
6966
  },
6961
- "description": "Get the visibility of a dataset",
6967
+ "description": "List imports for a knowledge base",
6962
6968
  "examples": [
6963
6969
  {
6964
- "command": "<%= config.bin %> <%= command.id %> my-dataset",
6965
- "description": "Check the visibility of a dataset"
6970
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
6971
+ "description": "List all imports for a knowledge base"
6972
+ },
6973
+ {
6974
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
6975
+ "description": "Output imports as JSON"
6966
6976
  }
6967
6977
  ],
6968
6978
  "flags": {
6969
- "project-id": {
6970
- "char": "p",
6971
- "description": "Project ID to get dataset visibility for (overrides CLI configuration)",
6972
- "helpGroup": "OVERRIDE",
6973
- "name": "project-id",
6974
- "hasDynamicHelp": false,
6975
- "helpValue": "<id>",
6976
- "multiple": false,
6977
- "type": "option"
6979
+ "json": {
6980
+ "description": "Output imports in JSON format",
6981
+ "name": "json",
6982
+ "allowNo": false,
6983
+ "type": "boolean"
6978
6984
  }
6979
6985
  },
6980
6986
  "hasDynamicHelp": false,
6981
- "hiddenAliases": [
6982
- "dataset:visibility:get"
6983
- ],
6984
- "id": "datasets:visibility:get",
6987
+ "hiddenAliases": [],
6988
+ "id": "context:imports:list",
6985
6989
  "pluginAlias": "@sanity/cli",
6986
6990
  "pluginName": "@sanity/cli",
6987
6991
  "pluginType": "core",
@@ -6990,57 +6994,53 @@
6990
6994
  "relativePath": [
6991
6995
  "dist",
6992
6996
  "commands",
6993
- "datasets",
6994
- "visibility",
6995
- "get.js"
6997
+ "context",
6998
+ "imports",
6999
+ "list.js"
6996
7000
  ]
6997
7001
  },
6998
- "datasets:visibility:set": {
7002
+ "context:jobs:get": {
6999
7003
  "aliases": [],
7000
7004
  "args": {
7001
- "dataset": {
7002
- "description": "The name of the dataset to set visibility for",
7003
- "name": "dataset",
7005
+ "knowledgeBaseId": {
7006
+ "description": "Knowledge base ID",
7007
+ "name": "knowledgeBaseId",
7004
7008
  "required": true
7005
7009
  },
7006
- "mode": {
7007
- "description": "The visibility mode to set",
7008
- "name": "mode",
7009
- "options": [
7010
- "public",
7011
- "private"
7012
- ],
7010
+ "jobId": {
7011
+ "description": "Job ID",
7012
+ "name": "jobId",
7013
7013
  "required": true
7014
7014
  }
7015
7015
  },
7016
- "description": "Set the visibility of a dataset",
7016
+ "description": "Get the status of a knowledge base job",
7017
7017
  "examples": [
7018
7018
  {
7019
- "command": "<%= config.bin %> <%= command.id %> my-dataset private",
7020
- "description": "Make a dataset private"
7019
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 job-def456",
7020
+ "description": "Get the current status of a job"
7021
7021
  },
7022
7022
  {
7023
- "command": "<%= config.bin %> <%= command.id %> my-dataset public",
7024
- "description": "Make a dataset public"
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)"
7025
7025
  }
7026
7026
  ],
7027
7027
  "flags": {
7028
- "project-id": {
7029
- "char": "p",
7030
- "description": "Project ID to set dataset visibility for (overrides CLI configuration)",
7031
- "helpGroup": "OVERRIDE",
7032
- "name": "project-id",
7033
- "hasDynamicHelp": false,
7034
- "helpValue": "<id>",
7035
- "multiple": false,
7036
- "type": "option"
7028
+ "json": {
7029
+ "description": "Output the job in JSON format",
7030
+ "name": "json",
7031
+ "allowNo": false,
7032
+ "type": "boolean"
7033
+ },
7034
+ "watch": {
7035
+ "description": "Poll until the job reaches a terminal state",
7036
+ "name": "watch",
7037
+ "allowNo": false,
7038
+ "type": "boolean"
7037
7039
  }
7038
7040
  },
7039
7041
  "hasDynamicHelp": false,
7040
- "hiddenAliases": [
7041
- "dataset:visibility:set"
7042
- ],
7043
- "id": "datasets:visibility:set",
7042
+ "hiddenAliases": [],
7043
+ "id": "context:jobs:get",
7044
7044
  "pluginAlias": "@sanity/cli",
7045
7045
  "pluginName": "@sanity/cli",
7046
7046
  "pluginType": "core",
@@ -7049,11 +7049,11 @@
7049
7049
  "relativePath": [
7050
7050
  "dist",
7051
7051
  "commands",
7052
- "datasets",
7053
- "visibility",
7054
- "set.js"
7052
+ "context",
7053
+ "jobs",
7054
+ "get.js"
7055
7055
  ]
7056
7056
  }
7057
7057
  },
7058
- "version": "8.14.0"
7058
+ "version": "8.15.0"
7059
7059
  }