@sanity/cli 6.3.1 → 6.4.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.
- package/README.md +311 -452
- package/dist/actions/build/decorateIndexWithStagingScript.js +16 -0
- package/dist/actions/build/decorateIndexWithStagingScript.js.map +1 -0
- package/dist/actions/build/writeSanityRuntime.js +3 -2
- package/dist/actions/build/writeSanityRuntime.js.map +1 -1
- package/dist/actions/dataset/create.js +4 -0
- package/dist/actions/dataset/create.js.map +1 -1
- package/dist/actions/deploy/findUserApplicationForApp.js +1 -0
- package/dist/actions/deploy/findUserApplicationForApp.js.map +1 -1
- package/dist/actions/deploy/types.js +1 -1
- package/dist/actions/deploy/types.js.map +1 -1
- package/dist/actions/init/bootstrapLocalTemplate.js +16 -1
- package/dist/actions/init/bootstrapLocalTemplate.js.map +1 -1
- package/dist/actions/init/initApp.js +72 -0
- package/dist/actions/init/initApp.js.map +1 -0
- package/dist/actions/init/initHelpers.js +37 -0
- package/dist/actions/init/initHelpers.js.map +1 -0
- package/dist/actions/init/initNextJs.js +246 -0
- package/dist/actions/init/initNextJs.js.map +1 -0
- package/dist/actions/init/initStudio.js +127 -0
- package/dist/actions/init/initStudio.js.map +1 -0
- package/dist/actions/init/scaffoldTemplate.js +114 -0
- package/dist/actions/init/scaffoldTemplate.js.map +1 -0
- package/dist/actions/init/templates/appQuickstart.js +2 -1
- package/dist/actions/init/templates/appQuickstart.js.map +1 -1
- package/dist/actions/init/templates/appSanityUi.js +2 -1
- package/dist/actions/init/templates/appSanityUi.js.map +1 -1
- package/dist/actions/init/templates/nextjs/index.js +1 -2
- package/dist/actions/init/templates/nextjs/index.js.map +1 -1
- package/dist/actions/init/templates/shopify.js +6 -6
- package/dist/actions/init/templates/shopify.js.map +1 -1
- package/dist/actions/init/templates/shopifyOnline.js +2 -2
- package/dist/actions/init/templates/shopifyOnline.js.map +1 -1
- package/dist/actions/manifest/types.js +1 -1
- package/dist/actions/manifest/types.js.map +1 -1
- package/dist/actions/mcp/detectAvailableEditors.js +16 -3
- package/dist/actions/mcp/detectAvailableEditors.js.map +1 -1
- package/dist/actions/mcp/editorConfigs.js +192 -132
- package/dist/actions/mcp/editorConfigs.js.map +1 -1
- package/dist/actions/mcp/setupMCP.js +4 -1
- package/dist/actions/mcp/setupMCP.js.map +1 -1
- package/dist/actions/mcp/writeMCPConfig.js +2 -2
- package/dist/actions/mcp/writeMCPConfig.js.map +1 -1
- package/dist/actions/schema/extractSchema.js +5 -7
- package/dist/actions/schema/extractSchema.js.map +1 -1
- package/dist/actions/schema/types.js +3 -3
- package/dist/actions/schema/types.js.map +1 -1
- package/dist/actions/users/validateEmail.js +2 -2
- package/dist/actions/users/validateEmail.js.map +1 -1
- package/dist/commands/backups/disable.js +1 -1
- package/dist/commands/backups/disable.js.map +1 -1
- package/dist/commands/backups/download.js +1 -1
- package/dist/commands/backups/download.js.map +1 -1
- package/dist/commands/backups/enable.js +1 -1
- package/dist/commands/backups/enable.js.map +1 -1
- package/dist/commands/backups/list.js +1 -1
- package/dist/commands/backups/list.js.map +1 -1
- package/dist/commands/build.js +1 -1
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/cors/add.js +1 -1
- package/dist/commands/cors/add.js.map +1 -1
- package/dist/commands/cors/delete.js +1 -1
- package/dist/commands/cors/delete.js.map +1 -1
- package/dist/commands/cors/list.js +2 -2
- package/dist/commands/cors/list.js.map +1 -1
- package/dist/commands/datasets/alias/create.js +1 -1
- package/dist/commands/datasets/alias/create.js.map +1 -1
- package/dist/commands/datasets/alias/delete.js +1 -1
- package/dist/commands/datasets/alias/delete.js.map +1 -1
- package/dist/commands/datasets/alias/link.js +1 -1
- package/dist/commands/datasets/alias/link.js.map +1 -1
- package/dist/commands/datasets/alias/unlink.js +1 -1
- package/dist/commands/datasets/alias/unlink.js.map +1 -1
- package/dist/commands/datasets/copy.js +15 -1
- package/dist/commands/datasets/copy.js.map +1 -1
- package/dist/commands/datasets/create.js +1 -1
- package/dist/commands/datasets/create.js.map +1 -1
- package/dist/commands/datasets/delete.js +1 -1
- package/dist/commands/datasets/delete.js.map +1 -1
- package/dist/commands/datasets/embeddings/enable.js +11 -0
- package/dist/commands/datasets/embeddings/enable.js.map +1 -1
- package/dist/commands/datasets/export.js +2 -2
- package/dist/commands/datasets/export.js.map +1 -1
- package/dist/commands/datasets/list.js +2 -2
- package/dist/commands/datasets/list.js.map +1 -1
- package/dist/commands/debug.js +1 -1
- package/dist/commands/debug.js.map +1 -1
- package/dist/commands/deploy.js +3 -3
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/dev.js +5 -5
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/docs/browse.js +1 -1
- package/dist/commands/docs/browse.js.map +1 -1
- package/dist/commands/documents/delete.js +1 -1
- package/dist/commands/documents/delete.js.map +1 -1
- package/dist/commands/exec.js +2 -2
- package/dist/commands/exec.js.map +1 -1
- package/dist/commands/graphql/deploy.js +2 -2
- package/dist/commands/graphql/deploy.js.map +1 -1
- package/dist/commands/graphql/list.js +2 -2
- package/dist/commands/graphql/list.js.map +1 -1
- package/dist/commands/hooks/create.js +2 -2
- package/dist/commands/hooks/create.js.map +1 -1
- package/dist/commands/hooks/delete.js +5 -5
- package/dist/commands/hooks/delete.js.map +1 -1
- package/dist/commands/hooks/list.js +3 -3
- package/dist/commands/hooks/list.js.map +1 -1
- package/dist/commands/hooks/logs.js +5 -5
- package/dist/commands/hooks/logs.js.map +1 -1
- package/dist/commands/init.js +175 -490
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.js +1 -1
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/learn.js +1 -1
- package/dist/commands/learn.js.map +1 -1
- package/dist/commands/login.js +1 -1
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logout.js +1 -1
- package/dist/commands/logout.js.map +1 -1
- package/dist/commands/manage.js +1 -1
- package/dist/commands/manage.js.map +1 -1
- package/dist/commands/manifest/extract.js +2 -2
- package/dist/commands/manifest/extract.js.map +1 -1
- package/dist/commands/mcp/configure.js +1 -1
- package/dist/commands/mcp/configure.js.map +1 -1
- package/dist/commands/media/delete-aspect.js +1 -1
- package/dist/commands/media/delete-aspect.js.map +1 -1
- package/dist/commands/media/export.js +1 -1
- package/dist/commands/media/export.js.map +1 -1
- package/dist/commands/preview.js +3 -3
- package/dist/commands/preview.js.map +1 -1
- package/dist/commands/projects/list.js +4 -2
- package/dist/commands/projects/list.js.map +1 -1
- package/dist/commands/schemas/deploy.js +3 -4
- package/dist/commands/schemas/deploy.js.map +1 -1
- package/dist/commands/schemas/extract.js +3 -3
- package/dist/commands/schemas/extract.js.map +1 -1
- package/dist/commands/schemas/list.js +4 -5
- package/dist/commands/schemas/list.js.map +1 -1
- package/dist/commands/telemetry/disable.js +2 -2
- package/dist/commands/telemetry/disable.js.map +1 -1
- package/dist/commands/telemetry/enable.js +2 -2
- package/dist/commands/telemetry/enable.js.map +1 -1
- package/dist/commands/telemetry/status.js +2 -2
- package/dist/commands/telemetry/status.js.map +1 -1
- package/dist/commands/tokens/add.js +1 -1
- package/dist/commands/tokens/add.js.map +1 -1
- package/dist/commands/tokens/delete.js +1 -1
- package/dist/commands/tokens/delete.js.map +1 -1
- package/dist/commands/tokens/list.js +2 -2
- package/dist/commands/tokens/list.js.map +1 -1
- package/dist/commands/users/list.js +1 -1
- package/dist/commands/users/list.js.map +1 -1
- package/dist/commands/versions.js +1 -1
- package/dist/commands/versions.js.map +1 -1
- package/dist/hooks/prerun/injectEnvVariables.js +3 -5
- package/dist/hooks/prerun/injectEnvVariables.js.map +1 -1
- package/dist/server/vite/plugin-sanity-build-entries.js +3 -2
- package/dist/server/vite/plugin-sanity-build-entries.js.map +1 -1
- package/dist/services/datasets.js +2 -1
- package/dist/services/datasets.js.map +1 -1
- package/dist/telemetry/init.telemetry.js.map +1 -1
- package/dist/util/packageManager/installationInfo/detectPackages.js +13 -7
- package/dist/util/packageManager/installationInfo/detectPackages.js.map +1 -1
- package/dist/util/telemetry/createTelemetryStore.js +27 -12
- package/dist/util/telemetry/createTelemetryStore.js.map +1 -1
- package/dist/util/update/fetchUpdateInfo.js +40 -0
- package/dist/util/update/fetchUpdateInfo.js.map +1 -0
- package/dist/util/update/fetchUpdateInfo.worker.js +19 -0
- package/dist/util/update/fetchUpdateInfo.worker.js.map +1 -0
- package/dist/util/update/getRunnerUpdateCommand.js +33 -0
- package/dist/util/update/getRunnerUpdateCommand.js.map +1 -0
- package/dist/util/update/getUpdateCommand.js +6 -7
- package/dist/util/update/getUpdateCommand.js.map +1 -1
- package/dist/util/update/packageRunner.js +10 -0
- package/dist/util/update/packageRunner.js.map +1 -0
- package/dist/util/update/resolveRunnerPackage.js +45 -0
- package/dist/util/update/resolveRunnerPackage.js.map +1 -0
- package/dist/util/update/resolveUpdateTarget.js +31 -0
- package/dist/util/update/resolveUpdateTarget.js.map +1 -0
- package/dist/util/update/showNotificationUpdate.js +8 -6
- package/dist/util/update/showNotificationUpdate.js.map +1 -1
- package/dist/util/update/updateChecker.js +73 -38
- package/dist/util/update/updateChecker.js.map +1 -1
- package/dist/util/validateProjection.js +121 -0
- package/dist/util/validateProjection.js.map +1 -0
- package/oclif.manifest.json +698 -681
- package/package.json +24 -23
- package/templates/app-quickstart/src/App.tsx +2 -2
- package/templates/app-sanity-ui/src/App.tsx +2 -2
- package/templates/shopify/schemaTypes/objects/hotspot/imageWithProductHotspotsType.ts +1 -1
- package/dist/util/update/fetchLatestVersion.js +0 -21
- package/dist/util/update/fetchLatestVersion.js.map +0 -1
package/README.md
CHANGED
|
@@ -115,7 +115,7 @@ Code for sanity cli
|
|
|
115
115
|
|
|
116
116
|
## `sanity backups disable [DATASET]`
|
|
117
117
|
|
|
118
|
-
Disable backup for a dataset
|
|
118
|
+
Disable backup for a dataset
|
|
119
119
|
|
|
120
120
|
```
|
|
121
121
|
USAGE
|
|
@@ -128,7 +128,7 @@ OVERRIDE FLAGS
|
|
|
128
128
|
-p, --project-id=<id> Project ID to disable backups for (overrides CLI configuration)
|
|
129
129
|
|
|
130
130
|
DESCRIPTION
|
|
131
|
-
Disable backup for a dataset
|
|
131
|
+
Disable backup for a dataset
|
|
132
132
|
|
|
133
133
|
EXAMPLES
|
|
134
134
|
Interactively disable backup for a dataset
|
|
@@ -140,11 +140,9 @@ EXAMPLES
|
|
|
140
140
|
$ sanity backups disable production
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
_See code: [src/commands/backups/disable.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/backups/disable.ts)_
|
|
144
|
-
|
|
145
143
|
## `sanity backups download [DATASET]`
|
|
146
144
|
|
|
147
|
-
Download a dataset backup to a local file
|
|
145
|
+
Download a dataset backup to a local file
|
|
148
146
|
|
|
149
147
|
```
|
|
150
148
|
USAGE
|
|
@@ -164,7 +162,7 @@ OVERRIDE FLAGS
|
|
|
164
162
|
-p, --project-id=<id> Project ID to download backup from (overrides CLI configuration)
|
|
165
163
|
|
|
166
164
|
DESCRIPTION
|
|
167
|
-
Download a dataset backup to a local file
|
|
165
|
+
Download a dataset backup to a local file
|
|
168
166
|
|
|
169
167
|
EXAMPLES
|
|
170
168
|
Interactively download a backup
|
|
@@ -184,11 +182,9 @@ EXAMPLES
|
|
|
184
182
|
$ sanity backups download production --backup-id 2024-01-01-backup-3 --out /path/to/file --overwrite
|
|
185
183
|
```
|
|
186
184
|
|
|
187
|
-
_See code: [src/commands/backups/download.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/backups/download.ts)_
|
|
188
|
-
|
|
189
185
|
## `sanity backups enable [DATASET]`
|
|
190
186
|
|
|
191
|
-
Enable backup for a dataset
|
|
187
|
+
Enable backup for a dataset
|
|
192
188
|
|
|
193
189
|
```
|
|
194
190
|
USAGE
|
|
@@ -201,7 +197,7 @@ OVERRIDE FLAGS
|
|
|
201
197
|
-p, --project-id=<id> Project ID to enable backups for (overrides CLI configuration)
|
|
202
198
|
|
|
203
199
|
DESCRIPTION
|
|
204
|
-
Enable backup for a dataset
|
|
200
|
+
Enable backup for a dataset
|
|
205
201
|
|
|
206
202
|
EXAMPLES
|
|
207
203
|
Interactively enable backup for a dataset
|
|
@@ -213,11 +209,9 @@ EXAMPLES
|
|
|
213
209
|
$ sanity backups enable production
|
|
214
210
|
```
|
|
215
211
|
|
|
216
|
-
_See code: [src/commands/backups/enable.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/backups/enable.ts)_
|
|
217
|
-
|
|
218
212
|
## `sanity backups list [DATASET]`
|
|
219
213
|
|
|
220
|
-
List available backups for a dataset
|
|
214
|
+
List available backups for a dataset
|
|
221
215
|
|
|
222
216
|
```
|
|
223
217
|
USAGE
|
|
@@ -235,7 +229,7 @@ OVERRIDE FLAGS
|
|
|
235
229
|
-p, --project-id=<id> Project ID to list backups for (overrides CLI configuration)
|
|
236
230
|
|
|
237
231
|
DESCRIPTION
|
|
238
|
-
List available backups for a dataset
|
|
232
|
+
List available backups for a dataset
|
|
239
233
|
|
|
240
234
|
EXAMPLES
|
|
241
235
|
List backups for a dataset interactively
|
|
@@ -255,37 +249,38 @@ EXAMPLES
|
|
|
255
249
|
$ sanity backups list production --after 2024-01-31 --limit 10
|
|
256
250
|
```
|
|
257
251
|
|
|
258
|
-
_See code: [src/commands/backups/list.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/backups/list.ts)_
|
|
259
|
-
|
|
260
252
|
## `sanity blueprints add TYPE`
|
|
261
253
|
|
|
262
254
|
Add a function resource to a Blueprint
|
|
263
255
|
|
|
264
256
|
```
|
|
265
257
|
USAGE
|
|
266
|
-
$ sanity blueprints add TYPE [--example <value> | -n <value> | --fn-type
|
|
267
|
-
document-publish|document-create|document-
|
|
268
|
-
te|media-library-asset-
|
|
269
|
-
--fn-installer skip|npm|pnpm|yarn] [-i | ]
|
|
258
|
+
$ sanity blueprints add TYPE [--json] [--validate-resources] [--example <value> | -n <value> | --fn-type
|
|
259
|
+
document-publish|document-create|document-delete|document-update|media-library-asset-create|media-library-asset-dele
|
|
260
|
+
te|media-library-asset-update|scheduled-function|sync-tag-invalidate... | --language ts|js | --javascript |
|
|
261
|
+
--fn-helpers | --fn-installer skip|npm|pnpm|yarn] [-i | ]
|
|
270
262
|
|
|
271
263
|
ARGUMENTS
|
|
272
264
|
TYPE (function) Type of resource to add (only "function" is supported)
|
|
273
265
|
|
|
274
266
|
FLAGS
|
|
275
|
-
-i, --install
|
|
276
|
-
-n, --name=<value>
|
|
277
|
-
--example=<value>
|
|
278
|
-
|
|
279
|
-
--[no-]fn-helpers
|
|
280
|
-
--fn-installer=<option>
|
|
281
|
-
|
|
282
|
-
--fn-type=<option>...
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
--
|
|
288
|
-
|
|
267
|
+
-i, --install Shortcut for --fn-installer npm
|
|
268
|
+
-n, --name=<value> Name of the resource to add
|
|
269
|
+
--example=<value> Example to use for the function resource. Discover examples at
|
|
270
|
+
https://www.sanity.io/exchange/type=recipes/by=sanity
|
|
271
|
+
--[no-]fn-helpers Add helpers to the new function
|
|
272
|
+
--fn-installer=<option> Which package manager to use when installing the @sanity/functions helpers
|
|
273
|
+
<options: skip|npm|pnpm|yarn>
|
|
274
|
+
--fn-type=<option>... Document change event(s) that should trigger the function; you can specify multiple
|
|
275
|
+
events by specifying this flag multiple times
|
|
276
|
+
<options: document-publish|document-create|document-delete|document-update|media-librar
|
|
277
|
+
y-asset-create|media-library-asset-delete|media-library-asset-update|scheduled-function
|
|
278
|
+
|sync-tag-invalidate>
|
|
279
|
+
--javascript Use JavaScript instead of TypeScript
|
|
280
|
+
--json Format output as json
|
|
281
|
+
--language=<option> [default: ts] Language of the new function
|
|
282
|
+
<options: ts|js>
|
|
283
|
+
--[no-]validate-resources Validate resources
|
|
289
284
|
|
|
290
285
|
DESCRIPTION
|
|
291
286
|
Add a function resource to a Blueprint
|
|
@@ -307,20 +302,22 @@ EXAMPLES
|
|
|
307
302
|
$ sanity blueprints add function --name my-function --fn-type document-create --fn-type document-update --lang js
|
|
308
303
|
```
|
|
309
304
|
|
|
310
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.7.2/src/commands/blueprints/add.ts)_
|
|
311
|
-
|
|
312
305
|
## `sanity blueprints config`
|
|
313
306
|
|
|
314
307
|
View or edit the local Blueprint configuration
|
|
315
308
|
|
|
316
309
|
```
|
|
317
310
|
USAGE
|
|
318
|
-
$ sanity blueprints config [--
|
|
311
|
+
$ sanity blueprints config [--json] [--validate-resources] [--stack <value> -e] [--project-id <value> ]
|
|
312
|
+
[--organization-id <value> ]
|
|
319
313
|
|
|
320
314
|
FLAGS
|
|
321
|
-
-e, --edit
|
|
322
|
-
--
|
|
323
|
-
--
|
|
315
|
+
-e, --edit Modify the configuration interactively, or directly when combined with ID flags.
|
|
316
|
+
--json Format output as json
|
|
317
|
+
--organization-id=<value> Sanity organization ID used to scope Blueprint and Stack
|
|
318
|
+
--project-id=<value> Sanity project ID used to scope Blueprint and Stack
|
|
319
|
+
--stack=<value> Stack name or ID to set in the configuration. Requires --edit flag
|
|
320
|
+
--[no-]validate-resources Validate resources
|
|
324
321
|
|
|
325
322
|
DESCRIPTION
|
|
326
323
|
View or edit the local Blueprint configuration
|
|
@@ -342,25 +339,26 @@ EXAMPLES
|
|
|
342
339
|
$ sanity blueprints config --edit --project-id <projectId> --stack <name-or-id>
|
|
343
340
|
```
|
|
344
341
|
|
|
345
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.7.2/src/commands/blueprints/config.ts)_
|
|
346
|
-
|
|
347
342
|
## `sanity blueprints deploy`
|
|
348
343
|
|
|
349
344
|
Deploy the local Blueprint to the remote Stack
|
|
350
345
|
|
|
351
346
|
```
|
|
352
347
|
USAGE
|
|
353
|
-
$ sanity blueprints deploy [--stack <value>] [--no-wait]
|
|
348
|
+
$ sanity blueprints deploy [--json] [--validate-resources] [--stack <value>] [-m <value>] [--no-wait]
|
|
354
349
|
|
|
355
350
|
FLAGS
|
|
356
|
-
|
|
357
|
-
|
|
351
|
+
-m, --message=<value> Message describing the deployment (e.g. reason for change)
|
|
352
|
+
--json Format output as json
|
|
353
|
+
--no-wait Do not wait for Stack deployment to complete
|
|
354
|
+
--stack=<value> Stack name or ID to use instead of the locally configured Stack
|
|
355
|
+
--[no-]validate-resources Validate resources
|
|
358
356
|
|
|
359
357
|
DESCRIPTION
|
|
360
358
|
Deploy the local Blueprint to the remote Stack
|
|
361
359
|
|
|
362
|
-
|
|
363
|
-
|
|
360
|
+
Applies your local Blueprint to the remote Stack, creating, updating, or removing resources as needed. This is the
|
|
361
|
+
primary command for applying infrastructure changes.
|
|
364
362
|
|
|
365
363
|
Before deploying, run 'blueprints plan' to preview changes. After deployment, use 'blueprints info' to verify Stack
|
|
366
364
|
status or 'blueprints logs' to monitor activity.
|
|
@@ -374,29 +372,33 @@ DESCRIPTION
|
|
|
374
372
|
EXAMPLES
|
|
375
373
|
$ sanity blueprints deploy
|
|
376
374
|
|
|
375
|
+
$ sanity blueprints deploy --message "Enable staging dataset"
|
|
376
|
+
|
|
377
377
|
$ sanity blueprints deploy --no-wait
|
|
378
378
|
|
|
379
379
|
$ sanity blueprints deploy --fn-installer npm
|
|
380
380
|
```
|
|
381
381
|
|
|
382
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.7.2/src/commands/blueprints/deploy.ts)_
|
|
383
|
-
|
|
384
382
|
## `sanity blueprints destroy`
|
|
385
383
|
|
|
386
|
-
Destroy
|
|
384
|
+
Destroy a remote Stack deployment and its resources
|
|
387
385
|
|
|
388
386
|
```
|
|
389
387
|
USAGE
|
|
390
|
-
$ sanity blueprints destroy [--project-id <value> --stack <value> --force]
|
|
388
|
+
$ sanity blueprints destroy [--json] [--validate-resources] [--project-id <value> --stack <value> --force]
|
|
389
|
+
[--organization-id <value> ] [--no-wait]
|
|
391
390
|
|
|
392
391
|
FLAGS
|
|
393
|
-
--force
|
|
394
|
-
--
|
|
395
|
-
--
|
|
396
|
-
--
|
|
392
|
+
--force Force Stack destruction (skip confirmation)
|
|
393
|
+
--json Format output as json
|
|
394
|
+
--no-wait Do not wait for Stack destruction to complete
|
|
395
|
+
--organization-id=<value> Sanity organization ID used to scope Blueprint and Stack
|
|
396
|
+
--project-id=<value> Sanity project ID used to scope Blueprint and Stack
|
|
397
|
+
--stack=<value> Stack name or ID to destroy (defaults to the locally configured Stack)
|
|
398
|
+
--[no-]validate-resources Validate resources
|
|
397
399
|
|
|
398
400
|
DESCRIPTION
|
|
399
|
-
Destroy
|
|
401
|
+
Destroy a remote Stack deployment and its resources
|
|
400
402
|
|
|
401
403
|
Permanently removes the remote Stack and all its provisioned resources. Your local Blueprint files remain untouched,
|
|
402
404
|
allowing you to redeploy later with 'blueprints init' + 'blueprints deploy'.
|
|
@@ -411,21 +413,20 @@ EXAMPLES
|
|
|
411
413
|
$ sanity blueprints destroy --stack <name-or-id> --project-id <projectId> --force --no-wait
|
|
412
414
|
```
|
|
413
415
|
|
|
414
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.7.2/src/commands/blueprints/destroy.ts)_
|
|
415
|
-
|
|
416
416
|
## `sanity blueprints doctor`
|
|
417
417
|
|
|
418
418
|
Diagnose potential issues with local Blueprint and remote Stack configuration
|
|
419
419
|
|
|
420
420
|
```
|
|
421
421
|
USAGE
|
|
422
|
-
$ sanity blueprints doctor [--json] [-p <value>] [--verbose] [--fix]
|
|
422
|
+
$ sanity blueprints doctor [--json] [-p <value>] [--validate-resources] [--verbose] [--fix]
|
|
423
423
|
|
|
424
424
|
FLAGS
|
|
425
|
-
-p, --path=<value>
|
|
426
|
-
--fix
|
|
427
|
-
--json
|
|
428
|
-
--[no-]
|
|
425
|
+
-p, --path=<value> [env: SANITY_BLUEPRINT_PATH] Path to a Blueprint file or directory containing one
|
|
426
|
+
--fix Interactively fix configuration issues
|
|
427
|
+
--json Format output as json
|
|
428
|
+
--[no-]validate-resources Validate resources
|
|
429
|
+
--[no-]verbose Verbose output; defaults to true
|
|
429
430
|
|
|
430
431
|
DESCRIPTION
|
|
431
432
|
Diagnose potential issues with local Blueprint and remote Stack configuration
|
|
@@ -435,23 +436,29 @@ DESCRIPTION
|
|
|
435
436
|
|
|
436
437
|
Run this command when encountering errors with other Blueprint commands. Use --fix to interactively resolve detected
|
|
437
438
|
issues.
|
|
438
|
-
```
|
|
439
439
|
|
|
440
|
-
|
|
440
|
+
EXAMPLES
|
|
441
|
+
$ sanity blueprints doctor
|
|
442
|
+
|
|
443
|
+
$ sanity blueprints doctor --fix
|
|
444
|
+
```
|
|
441
445
|
|
|
442
446
|
## `sanity blueprints info`
|
|
443
447
|
|
|
444
|
-
|
|
448
|
+
Display the status and resources of the remote Stack deployment
|
|
445
449
|
|
|
446
450
|
```
|
|
447
451
|
USAGE
|
|
448
|
-
$ sanity blueprints info [--stack <value>]
|
|
452
|
+
$ sanity blueprints info [--json] [--validate-resources] [--stack <value>] [--project-id <value>]
|
|
449
453
|
|
|
450
454
|
FLAGS
|
|
451
|
-
--
|
|
455
|
+
--json Format output as json
|
|
456
|
+
--project-id=<value> Sanity project ID used to scope Blueprint and Stack
|
|
457
|
+
--stack=<value> Stack name or ID
|
|
458
|
+
--[no-]validate-resources Validate resources
|
|
452
459
|
|
|
453
460
|
DESCRIPTION
|
|
454
|
-
|
|
461
|
+
Display the status and resources of the remote Stack deployment
|
|
455
462
|
|
|
456
463
|
Displays the current state and metadata of your remote Stack deployment, including deployed resources, status, and
|
|
457
464
|
configuration.
|
|
@@ -465,18 +472,19 @@ EXAMPLES
|
|
|
465
472
|
$ sanity blueprints info
|
|
466
473
|
|
|
467
474
|
$ sanity blueprints info --stack <name-or-id>
|
|
468
|
-
```
|
|
469
475
|
|
|
470
|
-
|
|
476
|
+
$ sanity blueprints info --project-id <id> --stack <name-or-id>
|
|
477
|
+
```
|
|
471
478
|
|
|
472
479
|
## `sanity blueprints init [DIR]`
|
|
473
480
|
|
|
474
|
-
Initialize a
|
|
481
|
+
Initialize a Blueprint and create a remote Stack
|
|
475
482
|
|
|
476
483
|
```
|
|
477
484
|
USAGE
|
|
478
|
-
$ sanity blueprints init [DIR] [--verbose] [--dir <value>] [--example <value> |
|
|
479
|
-
--stack-id <value> | --stack-name <value>] [--project-id <value>]
|
|
485
|
+
$ sanity blueprints init [DIR] [--json] [--validate-resources] [--verbose] [--dir <value>] [--example <value> |
|
|
486
|
+
--blueprint-type json|js|ts | --stack-id <value> | --stack-name <value>] [--project-id <value>] [--organization-id
|
|
487
|
+
<value>]
|
|
480
488
|
|
|
481
489
|
ARGUMENTS
|
|
482
490
|
[DIR] Directory to create the local Blueprint in
|
|
@@ -486,13 +494,16 @@ FLAGS
|
|
|
486
494
|
<options: json|js|ts>
|
|
487
495
|
--dir=<value> Directory to create the local Blueprint in
|
|
488
496
|
--example=<value> Example to use for the local Blueprint
|
|
489
|
-
--
|
|
497
|
+
--json Format output as json
|
|
498
|
+
--organization-id=<value> Sanity organization ID used to scope Blueprint and Stack
|
|
499
|
+
--project-id=<value> Sanity project ID used to scope Blueprint and Stack
|
|
490
500
|
--stack-id=<value> Existing Stack ID used to scope local Blueprint
|
|
491
501
|
--stack-name=<value> Name to use for a new Stack provisioned during initialization
|
|
502
|
+
--[no-]validate-resources Validate resources
|
|
492
503
|
--verbose Verbose output
|
|
493
504
|
|
|
494
505
|
DESCRIPTION
|
|
495
|
-
Initialize a
|
|
506
|
+
Initialize a Blueprint and create a remote Stack
|
|
496
507
|
|
|
497
508
|
A Blueprint is your local infrastructure-as-code configuration that defines Sanity resources (datasets, functions,
|
|
498
509
|
etc.). A Stack is the remote deployment target where your Blueprint is applied.
|
|
@@ -517,19 +528,19 @@ EXAMPLES
|
|
|
517
528
|
$ sanity blueprints init --blueprint-type <json|js|ts> --stack-name <stackName>
|
|
518
529
|
```
|
|
519
530
|
|
|
520
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.7.2/src/commands/blueprints/init.ts)_
|
|
521
|
-
|
|
522
531
|
## `sanity blueprints logs`
|
|
523
532
|
|
|
524
533
|
Display logs for the current Blueprint's Stack deployment
|
|
525
534
|
|
|
526
535
|
```
|
|
527
536
|
USAGE
|
|
528
|
-
$ sanity blueprints logs [--stack <value>] [-w]
|
|
537
|
+
$ sanity blueprints logs [--json] [--validate-resources] [--stack <value>] [-w]
|
|
529
538
|
|
|
530
539
|
FLAGS
|
|
531
|
-
-w, --watch
|
|
532
|
-
--
|
|
540
|
+
-w, --watch Watch for new Stack logs (streaming mode)
|
|
541
|
+
--json Format output as json
|
|
542
|
+
--stack=<value> Stack name or ID to use instead of the locally configured Stack
|
|
543
|
+
--[no-]validate-resources Validate resources
|
|
533
544
|
|
|
534
545
|
DESCRIPTION
|
|
535
546
|
Display logs for the current Blueprint's Stack deployment
|
|
@@ -546,21 +557,21 @@ EXAMPLES
|
|
|
546
557
|
$ sanity blueprints logs --watch
|
|
547
558
|
```
|
|
548
559
|
|
|
549
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.7.2/src/commands/blueprints/logs.ts)_
|
|
550
|
-
|
|
551
560
|
## `sanity blueprints plan`
|
|
552
561
|
|
|
553
|
-
|
|
562
|
+
Preview changes that will be applied to the remote Stack
|
|
554
563
|
|
|
555
564
|
```
|
|
556
565
|
USAGE
|
|
557
|
-
$ sanity blueprints plan [--stack <value>]
|
|
566
|
+
$ sanity blueprints plan [--json] [--validate-resources] [--stack <value>]
|
|
558
567
|
|
|
559
568
|
FLAGS
|
|
560
|
-
--
|
|
569
|
+
--json Format output as json
|
|
570
|
+
--stack=<value> Stack name or ID to use instead of the locally configured Stack
|
|
571
|
+
--[no-]validate-resources Validate resources
|
|
561
572
|
|
|
562
573
|
DESCRIPTION
|
|
563
|
-
|
|
574
|
+
Preview changes that will be applied to the remote Stack
|
|
564
575
|
|
|
565
576
|
Use this command to preview what changes will be applied to your remote Stack before deploying. This is a safe,
|
|
566
577
|
read-only operation—no resources are created, modified, or deleted.
|
|
@@ -572,21 +583,22 @@ EXAMPLES
|
|
|
572
583
|
$ sanity blueprints plan
|
|
573
584
|
```
|
|
574
585
|
|
|
575
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.7.2/src/commands/blueprints/plan.ts)_
|
|
576
|
-
|
|
577
586
|
## `sanity blueprints stacks`
|
|
578
587
|
|
|
579
|
-
List
|
|
588
|
+
List remote Stack deployments for your project or organization
|
|
580
589
|
|
|
581
590
|
```
|
|
582
591
|
USAGE
|
|
583
|
-
$ sanity blueprints stacks [--project-id <value> | ]
|
|
592
|
+
$ sanity blueprints stacks [--json] [--validate-resources] [--project-id <value> | --organization-id <value>]
|
|
584
593
|
|
|
585
594
|
FLAGS
|
|
586
|
-
--
|
|
595
|
+
--json Format output as json
|
|
596
|
+
--organization-id=<value> Sanity organization ID used to scope Blueprint and Stack
|
|
597
|
+
--project-id=<value> Sanity project ID used to scope Blueprint and Stack
|
|
598
|
+
--[no-]validate-resources Validate resources
|
|
587
599
|
|
|
588
600
|
DESCRIPTION
|
|
589
|
-
List
|
|
601
|
+
List remote Stack deployments for your project or organization
|
|
590
602
|
|
|
591
603
|
Shows all Stacks associated with a project or organization. By default, lists Stacks scoped to the local Blueprint.
|
|
592
604
|
|
|
@@ -601,11 +613,9 @@ EXAMPLES
|
|
|
601
613
|
$ sanity blueprints stacks --organization-id <organizationId>
|
|
602
614
|
```
|
|
603
615
|
|
|
604
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.7.2/src/commands/blueprints/stacks.ts)_
|
|
605
|
-
|
|
606
616
|
## `sanity build [OUTPUTDIR]`
|
|
607
617
|
|
|
608
|
-
|
|
618
|
+
Build Sanity Studio into a static bundle
|
|
609
619
|
|
|
610
620
|
```
|
|
611
621
|
USAGE
|
|
@@ -622,7 +632,7 @@ FLAGS
|
|
|
622
632
|
--stats Show stats about the built bundles
|
|
623
633
|
|
|
624
634
|
DESCRIPTION
|
|
625
|
-
|
|
635
|
+
Build Sanity Studio into a static bundle
|
|
626
636
|
|
|
627
637
|
EXAMPLES
|
|
628
638
|
$ sanity build
|
|
@@ -630,8 +640,6 @@ EXAMPLES
|
|
|
630
640
|
$ sanity build --no-minify --source-maps
|
|
631
641
|
```
|
|
632
642
|
|
|
633
|
-
_See code: [src/commands/build.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/build.ts)_
|
|
634
|
-
|
|
635
643
|
## `sanity codemod [CODEMODNAME]`
|
|
636
644
|
|
|
637
645
|
Updates Sanity Studio codebase with a code modification script
|
|
@@ -661,11 +669,9 @@ EXAMPLES
|
|
|
661
669
|
$ sanity codemod reactIconsV3 --dry
|
|
662
670
|
```
|
|
663
671
|
|
|
664
|
-
_See code: [src/commands/codemod.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/codemod.ts)_
|
|
665
|
-
|
|
666
672
|
## `sanity cors add ORIGIN`
|
|
667
673
|
|
|
668
|
-
|
|
674
|
+
Add a CORS origin to the project
|
|
669
675
|
|
|
670
676
|
```
|
|
671
677
|
USAGE
|
|
@@ -681,7 +687,7 @@ OVERRIDE FLAGS
|
|
|
681
687
|
-p, --project-id=<id> Project ID to add CORS origin to (overrides CLI configuration)
|
|
682
688
|
|
|
683
689
|
DESCRIPTION
|
|
684
|
-
|
|
690
|
+
Add a CORS origin to the project
|
|
685
691
|
|
|
686
692
|
EXAMPLES
|
|
687
693
|
Interactively add a CORS origin
|
|
@@ -701,11 +707,9 @@ EXAMPLES
|
|
|
701
707
|
$ sanity cors add https://myapp.com --project-id abc123
|
|
702
708
|
```
|
|
703
709
|
|
|
704
|
-
_See code: [src/commands/cors/add.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/cors/add.ts)_
|
|
705
|
-
|
|
706
710
|
## `sanity cors delete [ORIGIN]`
|
|
707
711
|
|
|
708
|
-
Delete
|
|
712
|
+
Delete a CORS origin from the project
|
|
709
713
|
|
|
710
714
|
```
|
|
711
715
|
USAGE
|
|
@@ -718,7 +722,7 @@ OVERRIDE FLAGS
|
|
|
718
722
|
-p, --project-id=<id> Project ID to delete CORS origin from (overrides CLI configuration)
|
|
719
723
|
|
|
720
724
|
DESCRIPTION
|
|
721
|
-
Delete
|
|
725
|
+
Delete a CORS origin from the project
|
|
722
726
|
|
|
723
727
|
EXAMPLES
|
|
724
728
|
Interactively select and delete a CORS origin
|
|
@@ -734,11 +738,9 @@ EXAMPLES
|
|
|
734
738
|
$ sanity cors delete --project-id abc123
|
|
735
739
|
```
|
|
736
740
|
|
|
737
|
-
_See code: [src/commands/cors/delete.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/cors/delete.ts)_
|
|
738
|
-
|
|
739
741
|
## `sanity cors list`
|
|
740
742
|
|
|
741
|
-
List
|
|
743
|
+
List CORS origins for the project
|
|
742
744
|
|
|
743
745
|
```
|
|
744
746
|
USAGE
|
|
@@ -748,10 +750,10 @@ OVERRIDE FLAGS
|
|
|
748
750
|
-p, --project-id=<id> Project ID to list CORS origins for (overrides CLI configuration)
|
|
749
751
|
|
|
750
752
|
DESCRIPTION
|
|
751
|
-
List
|
|
753
|
+
List CORS origins for the project
|
|
752
754
|
|
|
753
755
|
EXAMPLES
|
|
754
|
-
List CORS origins for the
|
|
756
|
+
List CORS origins for the project
|
|
755
757
|
|
|
756
758
|
$ sanity cors list
|
|
757
759
|
|
|
@@ -760,11 +762,9 @@ EXAMPLES
|
|
|
760
762
|
$ sanity cors list --project-id abc123
|
|
761
763
|
```
|
|
762
764
|
|
|
763
|
-
_See code: [src/commands/cors/list.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/cors/list.ts)_
|
|
764
|
-
|
|
765
765
|
## `sanity datasets alias create [ALIASNAME] [TARGETDATASET]`
|
|
766
766
|
|
|
767
|
-
Create a dataset alias
|
|
767
|
+
Create a dataset alias for the project
|
|
768
768
|
|
|
769
769
|
```
|
|
770
770
|
USAGE
|
|
@@ -778,7 +778,7 @@ OVERRIDE FLAGS
|
|
|
778
778
|
-p, --project-id=<id> Project ID to create dataset alias in (overrides CLI configuration)
|
|
779
779
|
|
|
780
780
|
DESCRIPTION
|
|
781
|
-
Create a dataset alias
|
|
781
|
+
Create a dataset alias for the project
|
|
782
782
|
|
|
783
783
|
EXAMPLES
|
|
784
784
|
Create alias in a specific project
|
|
@@ -798,11 +798,9 @@ EXAMPLES
|
|
|
798
798
|
$ sanity datasets alias create conference conf-2025
|
|
799
799
|
```
|
|
800
800
|
|
|
801
|
-
_See code: [src/commands/datasets/alias/create.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/datasets/alias/create.ts)_
|
|
802
|
-
|
|
803
801
|
## `sanity datasets alias delete ALIASNAME`
|
|
804
802
|
|
|
805
|
-
Delete a dataset alias
|
|
803
|
+
Delete a dataset alias from the project
|
|
806
804
|
|
|
807
805
|
```
|
|
808
806
|
USAGE
|
|
@@ -818,7 +816,7 @@ OVERRIDE FLAGS
|
|
|
818
816
|
-p, --project-id=<id> Project ID to delete dataset alias from (overrides CLI configuration)
|
|
819
817
|
|
|
820
818
|
DESCRIPTION
|
|
821
|
-
Delete a dataset alias
|
|
819
|
+
Delete a dataset alias from the project
|
|
822
820
|
|
|
823
821
|
EXAMPLES
|
|
824
822
|
Delete alias named "conference" with confirmation prompt
|
|
@@ -830,11 +828,9 @@ EXAMPLES
|
|
|
830
828
|
$ sanity datasets alias delete conference --force
|
|
831
829
|
```
|
|
832
830
|
|
|
833
|
-
_See code: [src/commands/datasets/alias/delete.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/datasets/alias/delete.ts)_
|
|
834
|
-
|
|
835
831
|
## `sanity datasets alias link [ALIASNAME] [TARGETDATASET]`
|
|
836
832
|
|
|
837
|
-
Link a dataset alias to a dataset
|
|
833
|
+
Link a dataset alias to a dataset in the project
|
|
838
834
|
|
|
839
835
|
```
|
|
840
836
|
USAGE
|
|
@@ -851,7 +847,7 @@ OVERRIDE FLAGS
|
|
|
851
847
|
-p, --project-id=<id> Project ID to link dataset alias in (overrides CLI configuration)
|
|
852
848
|
|
|
853
849
|
DESCRIPTION
|
|
854
|
-
Link a dataset alias to a dataset
|
|
850
|
+
Link a dataset alias to a dataset in the project
|
|
855
851
|
|
|
856
852
|
EXAMPLES
|
|
857
853
|
Link an alias with interactive prompts
|
|
@@ -871,11 +867,9 @@ EXAMPLES
|
|
|
871
867
|
$ sanity datasets alias link conference conf-2025 --force
|
|
872
868
|
```
|
|
873
869
|
|
|
874
|
-
_See code: [src/commands/datasets/alias/link.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/datasets/alias/link.ts)_
|
|
875
|
-
|
|
876
870
|
## `sanity datasets alias unlink [ALIASNAME]`
|
|
877
871
|
|
|
878
|
-
Unlink a dataset alias from its dataset
|
|
872
|
+
Unlink a dataset alias from its dataset in the project
|
|
879
873
|
|
|
880
874
|
```
|
|
881
875
|
USAGE
|
|
@@ -891,7 +885,7 @@ OVERRIDE FLAGS
|
|
|
891
885
|
-p, --project-id=<id> Project ID to unlink dataset alias in (overrides CLI configuration)
|
|
892
886
|
|
|
893
887
|
DESCRIPTION
|
|
894
|
-
Unlink a dataset alias from its dataset
|
|
888
|
+
Unlink a dataset alias from its dataset in the project
|
|
895
889
|
|
|
896
890
|
EXAMPLES
|
|
897
891
|
Unlink an alias with interactive selection
|
|
@@ -907,35 +901,33 @@ EXAMPLES
|
|
|
907
901
|
$ sanity datasets alias unlink conference --force
|
|
908
902
|
```
|
|
909
903
|
|
|
910
|
-
_See code: [src/commands/datasets/alias/unlink.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/datasets/alias/unlink.ts)_
|
|
911
|
-
|
|
912
904
|
## `sanity datasets copy [SOURCE] [TARGET]`
|
|
913
905
|
|
|
914
|
-
|
|
906
|
+
Copy a dataset or manage copy jobs
|
|
915
907
|
|
|
916
908
|
```
|
|
917
909
|
USAGE
|
|
918
|
-
$ sanity datasets copy [SOURCE] [TARGET] [-p <id>] [--
|
|
919
|
-
[--
|
|
910
|
+
$ sanity datasets copy [SOURCE] [TARGET] [-p <id>] [--limit <value> ] [--offset <value> ]
|
|
911
|
+
[--skip-content-releases | | [--attach <value> | --list | --detach | --skip-history]]
|
|
920
912
|
|
|
921
913
|
ARGUMENTS
|
|
922
914
|
[SOURCE] Name of the dataset to copy from
|
|
923
915
|
[TARGET] Name of the dataset to copy to
|
|
924
916
|
|
|
925
917
|
FLAGS
|
|
926
|
-
--attach=<value>
|
|
927
|
-
--detach
|
|
928
|
-
--limit=<value>
|
|
929
|
-
--list
|
|
930
|
-
--offset=<value>
|
|
931
|
-
--skip-
|
|
918
|
+
--attach=<value> Attach to the running copy process to show progress
|
|
919
|
+
--detach Start the copy without waiting for it to finish
|
|
920
|
+
--limit=<value> Maximum number of jobs returned (default 10, max 1000)
|
|
921
|
+
--list Lists all dataset copy jobs
|
|
922
|
+
--offset=<value> Start position in the list of jobs (default 0)
|
|
923
|
+
--skip-content-releases Don't copy content release documents to the target dataset
|
|
924
|
+
--skip-history Don't preserve document history on copy
|
|
932
925
|
|
|
933
926
|
OVERRIDE FLAGS
|
|
934
927
|
-p, --project-id=<id> Project ID to copy dataset in (overrides CLI configuration)
|
|
935
928
|
|
|
936
929
|
DESCRIPTION
|
|
937
|
-
|
|
938
|
-
copy job
|
|
930
|
+
Copy a dataset or manage copy jobs
|
|
939
931
|
|
|
940
932
|
EXAMPLES
|
|
941
933
|
Interactively copy a dataset
|
|
@@ -954,6 +946,10 @@ EXAMPLES
|
|
|
954
946
|
|
|
955
947
|
$ sanity datasets copy --skip-history source target
|
|
956
948
|
|
|
949
|
+
Copy without content release documents
|
|
950
|
+
|
|
951
|
+
$ sanity datasets copy --skip-content-releases source target
|
|
952
|
+
|
|
957
953
|
Start copy job without waiting for completion
|
|
958
954
|
|
|
959
955
|
$ sanity datasets copy --detach source target
|
|
@@ -971,11 +967,9 @@ EXAMPLES
|
|
|
971
967
|
$ sanity datasets copy --list --offset 2 --limit 10
|
|
972
968
|
```
|
|
973
969
|
|
|
974
|
-
_See code: [src/commands/datasets/copy.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/datasets/copy.ts)_
|
|
975
|
-
|
|
976
970
|
## `sanity datasets create [NAME]`
|
|
977
971
|
|
|
978
|
-
Create a new dataset
|
|
972
|
+
Create a new dataset for the project
|
|
979
973
|
|
|
980
974
|
```
|
|
981
975
|
USAGE
|
|
@@ -995,7 +989,7 @@ OVERRIDE FLAGS
|
|
|
995
989
|
-p, --project-id=<id> Project ID to create dataset in (overrides CLI configuration)
|
|
996
990
|
|
|
997
991
|
DESCRIPTION
|
|
998
|
-
Create a new dataset
|
|
992
|
+
Create a new dataset for the project
|
|
999
993
|
|
|
1000
994
|
EXAMPLES
|
|
1001
995
|
Interactively create a dataset
|
|
@@ -1011,11 +1005,9 @@ EXAMPLES
|
|
|
1011
1005
|
$ sanity datasets create my-dataset --visibility private
|
|
1012
1006
|
```
|
|
1013
1007
|
|
|
1014
|
-
_See code: [src/commands/datasets/create.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/datasets/create.ts)_
|
|
1015
|
-
|
|
1016
1008
|
## `sanity datasets delete DATASETNAME`
|
|
1017
1009
|
|
|
1018
|
-
Delete a dataset
|
|
1010
|
+
Delete a dataset from the project
|
|
1019
1011
|
|
|
1020
1012
|
```
|
|
1021
1013
|
USAGE
|
|
@@ -1031,7 +1023,7 @@ OVERRIDE FLAGS
|
|
|
1031
1023
|
-p, --project-id=<id> Project ID to delete dataset from (overrides CLI configuration)
|
|
1032
1024
|
|
|
1033
1025
|
DESCRIPTION
|
|
1034
|
-
Delete a dataset
|
|
1026
|
+
Delete a dataset from the project
|
|
1035
1027
|
|
|
1036
1028
|
EXAMPLES
|
|
1037
1029
|
Delete a specific dataset
|
|
@@ -1043,8 +1035,6 @@ EXAMPLES
|
|
|
1043
1035
|
$ sanity datasets delete my-dataset --force
|
|
1044
1036
|
```
|
|
1045
1037
|
|
|
1046
|
-
_See code: [src/commands/datasets/delete.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/datasets/delete.ts)_
|
|
1047
|
-
|
|
1048
1038
|
## `sanity datasets embeddings disable [DATASET]`
|
|
1049
1039
|
|
|
1050
1040
|
Disable embeddings for a dataset
|
|
@@ -1068,8 +1058,6 @@ EXAMPLES
|
|
|
1068
1058
|
$ sanity datasets embeddings disable production
|
|
1069
1059
|
```
|
|
1070
1060
|
|
|
1071
|
-
_See code: [src/commands/datasets/embeddings/disable.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/datasets/embeddings/disable.ts)_
|
|
1072
|
-
|
|
1073
1061
|
## `sanity datasets embeddings enable [DATASET]`
|
|
1074
1062
|
|
|
1075
1063
|
Enable embeddings for a dataset
|
|
@@ -1105,8 +1093,6 @@ EXAMPLES
|
|
|
1105
1093
|
$ sanity datasets embeddings enable production --wait
|
|
1106
1094
|
```
|
|
1107
1095
|
|
|
1108
|
-
_See code: [src/commands/datasets/embeddings/enable.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/datasets/embeddings/enable.ts)_
|
|
1109
|
-
|
|
1110
1096
|
## `sanity datasets embeddings status [DATASET]`
|
|
1111
1097
|
|
|
1112
1098
|
Show embeddings settings and status for a dataset
|
|
@@ -1130,11 +1116,9 @@ EXAMPLES
|
|
|
1130
1116
|
$ sanity datasets embeddings status production
|
|
1131
1117
|
```
|
|
1132
1118
|
|
|
1133
|
-
_See code: [src/commands/datasets/embeddings/status.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/datasets/embeddings/status.ts)_
|
|
1134
|
-
|
|
1135
1119
|
## `sanity datasets export [NAME] [DESTINATION]`
|
|
1136
1120
|
|
|
1137
|
-
Export dataset to local
|
|
1121
|
+
Export a dataset to a local gzipped tarball. Assets returning 401, 403, or 404 are excluded from the export.
|
|
1138
1122
|
|
|
1139
1123
|
```
|
|
1140
1124
|
USAGE
|
|
@@ -1147,9 +1131,8 @@ ARGUMENTS
|
|
|
1147
1131
|
|
|
1148
1132
|
FLAGS
|
|
1149
1133
|
--asset-concurrency=<value> [default: 8] Concurrent number of asset downloads
|
|
1150
|
-
--mode=<option> [default: stream]
|
|
1151
|
-
|
|
1152
|
-
export
|
|
1134
|
+
--mode=<option> [default: stream] Export mode ('cursor' is faster for large datasets but may miss
|
|
1135
|
+
concurrent changes)
|
|
1153
1136
|
<options: stream|cursor>
|
|
1154
1137
|
--no-assets Export only non-asset documents and remove references to image assets
|
|
1155
1138
|
--no-compress Skips compressing tarball entries (still generates a gzip file)
|
|
@@ -1162,8 +1145,7 @@ OVERRIDE FLAGS
|
|
|
1162
1145
|
-p, --project-id=<id> Project ID to export dataset from (overrides CLI configuration)
|
|
1163
1146
|
|
|
1164
1147
|
DESCRIPTION
|
|
1165
|
-
Export dataset to local
|
|
1166
|
-
download are ignored and excluded from export.
|
|
1148
|
+
Export a dataset to a local gzipped tarball. Assets returning 401, 403, or 404 are excluded from the export.
|
|
1167
1149
|
|
|
1168
1150
|
EXAMPLES
|
|
1169
1151
|
Export dataset "moviedb" to localPath.tar.gz
|
|
@@ -1183,8 +1165,6 @@ EXAMPLES
|
|
|
1183
1165
|
$ sanity datasets export staging staging.tar.gz --types products,shops
|
|
1184
1166
|
```
|
|
1185
1167
|
|
|
1186
|
-
_See code: [src/commands/datasets/export.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/datasets/export.ts)_
|
|
1187
|
-
|
|
1188
1168
|
## `sanity datasets import SOURCE [TARGETDATASET]`
|
|
1189
1169
|
|
|
1190
1170
|
Import documents to a Sanity dataset
|
|
@@ -1236,11 +1216,9 @@ EXAMPLES
|
|
|
1236
1216
|
$ sanity datasets import -d staging -t someSecretToken my-dataset.ndjson
|
|
1237
1217
|
```
|
|
1238
1218
|
|
|
1239
|
-
_See code: [src/commands/datasets/import.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/datasets/import.ts)_
|
|
1240
|
-
|
|
1241
1219
|
## `sanity datasets list`
|
|
1242
1220
|
|
|
1243
|
-
List datasets
|
|
1221
|
+
List datasets for the project
|
|
1244
1222
|
|
|
1245
1223
|
```
|
|
1246
1224
|
USAGE
|
|
@@ -1250,10 +1228,10 @@ OVERRIDE FLAGS
|
|
|
1250
1228
|
-p, --project-id=<id> Project ID to list datasets for (overrides CLI configuration)
|
|
1251
1229
|
|
|
1252
1230
|
DESCRIPTION
|
|
1253
|
-
List datasets
|
|
1231
|
+
List datasets for the project
|
|
1254
1232
|
|
|
1255
1233
|
EXAMPLES
|
|
1256
|
-
List datasets
|
|
1234
|
+
List datasets for the project
|
|
1257
1235
|
|
|
1258
1236
|
$ sanity datasets list
|
|
1259
1237
|
|
|
@@ -1262,8 +1240,6 @@ EXAMPLES
|
|
|
1262
1240
|
$ sanity datasets list --project-id abc123
|
|
1263
1241
|
```
|
|
1264
1242
|
|
|
1265
|
-
_See code: [src/commands/datasets/list.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/datasets/list.ts)_
|
|
1266
|
-
|
|
1267
1243
|
## `sanity datasets visibility get DATASET`
|
|
1268
1244
|
|
|
1269
1245
|
Get the visibility of a dataset
|
|
@@ -1287,8 +1263,6 @@ EXAMPLES
|
|
|
1287
1263
|
$ sanity datasets visibility get my-dataset
|
|
1288
1264
|
```
|
|
1289
1265
|
|
|
1290
|
-
_See code: [src/commands/datasets/visibility/get.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/datasets/visibility/get.ts)_
|
|
1291
|
-
|
|
1292
1266
|
## `sanity datasets visibility set DATASET MODE`
|
|
1293
1267
|
|
|
1294
1268
|
Set the visibility of a dataset
|
|
@@ -1317,11 +1291,9 @@ EXAMPLES
|
|
|
1317
1291
|
$ sanity datasets visibility set my-dataset public
|
|
1318
1292
|
```
|
|
1319
1293
|
|
|
1320
|
-
_See code: [src/commands/datasets/visibility/set.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/datasets/visibility/set.ts)_
|
|
1321
|
-
|
|
1322
1294
|
## `sanity debug`
|
|
1323
1295
|
|
|
1324
|
-
|
|
1296
|
+
Print diagnostic info for troubleshooting
|
|
1325
1297
|
|
|
1326
1298
|
```
|
|
1327
1299
|
USAGE
|
|
@@ -1332,7 +1304,7 @@ FLAGS
|
|
|
1332
1304
|
--verbose Show full error details including stack traces
|
|
1333
1305
|
|
|
1334
1306
|
DESCRIPTION
|
|
1335
|
-
|
|
1307
|
+
Print diagnostic info for troubleshooting
|
|
1336
1308
|
|
|
1337
1309
|
EXAMPLES
|
|
1338
1310
|
$ sanity debug
|
|
@@ -1340,8 +1312,6 @@ EXAMPLES
|
|
|
1340
1312
|
$ sanity debug --secrets
|
|
1341
1313
|
```
|
|
1342
1314
|
|
|
1343
|
-
_See code: [src/commands/debug.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/debug.ts)_
|
|
1344
|
-
|
|
1345
1315
|
## `sanity deploy [SOURCEDIR]`
|
|
1346
1316
|
|
|
1347
1317
|
Builds and deploys Sanity Studio or application to Sanity hosting
|
|
@@ -1357,10 +1327,10 @@ ARGUMENTS
|
|
|
1357
1327
|
FLAGS
|
|
1358
1328
|
-y, --yes Unattended mode, answers "yes" to any "yes/no" prompt and otherwise uses defaults
|
|
1359
1329
|
--[no-]auto-updates Automatically update the studio to the latest version
|
|
1360
|
-
--[no-]build
|
|
1330
|
+
--[no-]build Build the studio before deploying (use --no-build to deploy existing `dist/` output)
|
|
1361
1331
|
--external Register an externally hosted studio
|
|
1362
|
-
--[no-]minify
|
|
1363
|
-
--schema-required Fail
|
|
1332
|
+
--[no-]minify Minify built JavaScript (use --no-minify to skip for faster builds)
|
|
1333
|
+
--schema-required Fail if schema deployment fails
|
|
1364
1334
|
--source-maps Enable source maps for built bundles (increases size of bundle)
|
|
1365
1335
|
--url=<value> Studio URL for deployment. For external studios, the full URL. For hosted studios, the
|
|
1366
1336
|
hostname (e.g. "my-studio" or "my-studio.sanity.studio")
|
|
@@ -1387,24 +1357,22 @@ EXAMPLES
|
|
|
1387
1357
|
$ sanity deploy --external
|
|
1388
1358
|
```
|
|
1389
1359
|
|
|
1390
|
-
_See code: [src/commands/deploy.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/deploy.ts)_
|
|
1391
|
-
|
|
1392
1360
|
## `sanity dev`
|
|
1393
1361
|
|
|
1394
|
-
|
|
1362
|
+
Start a local development server with live reloading
|
|
1395
1363
|
|
|
1396
1364
|
```
|
|
1397
1365
|
USAGE
|
|
1398
1366
|
$ sanity dev [--auto-updates] [--host <value>] [--load-in-dashboard] [--port <value>]
|
|
1399
1367
|
|
|
1400
1368
|
FLAGS
|
|
1401
|
-
--[no-]auto-updates Automatically update Sanity Studio dependencies
|
|
1402
|
-
--host=<value>
|
|
1403
|
-
--[no-]load-in-dashboard Load the app/studio in the Sanity dashboard
|
|
1404
|
-
--port=<value>
|
|
1369
|
+
--[no-]auto-updates Automatically update Sanity Studio dependencies
|
|
1370
|
+
--host=<value> Local network interface to listen on (default: localhost)
|
|
1371
|
+
--[no-]load-in-dashboard Load the app/studio in the Sanity dashboard
|
|
1372
|
+
--port=<value> TCP port to start server on (default: 3333)
|
|
1405
1373
|
|
|
1406
1374
|
DESCRIPTION
|
|
1407
|
-
|
|
1375
|
+
Start a local development server with live reloading
|
|
1408
1376
|
|
|
1409
1377
|
EXAMPLES
|
|
1410
1378
|
$ sanity dev --host=0.0.0.0
|
|
@@ -1414,22 +1382,18 @@ EXAMPLES
|
|
|
1414
1382
|
$ sanity dev --load-in-dashboard
|
|
1415
1383
|
```
|
|
1416
1384
|
|
|
1417
|
-
_See code: [src/commands/dev.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/dev.ts)_
|
|
1418
|
-
|
|
1419
1385
|
## `sanity docs browse`
|
|
1420
1386
|
|
|
1421
|
-
Open Sanity docs in
|
|
1387
|
+
Open Sanity docs in your browser
|
|
1422
1388
|
|
|
1423
1389
|
```
|
|
1424
1390
|
USAGE
|
|
1425
1391
|
$ sanity docs browse
|
|
1426
1392
|
|
|
1427
1393
|
DESCRIPTION
|
|
1428
|
-
Open Sanity docs in
|
|
1394
|
+
Open Sanity docs in your browser
|
|
1429
1395
|
```
|
|
1430
1396
|
|
|
1431
|
-
_See code: [src/commands/docs/browse.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/docs/browse.ts)_
|
|
1432
|
-
|
|
1433
1397
|
## `sanity docs read PATH`
|
|
1434
1398
|
|
|
1435
1399
|
Read an article in terminal
|
|
@@ -1465,8 +1429,6 @@ EXAMPLES
|
|
|
1465
1429
|
$ sanity docs read https://www.sanity.io/docs/studio/installation -w
|
|
1466
1430
|
```
|
|
1467
1431
|
|
|
1468
|
-
_See code: [src/commands/docs/read.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/docs/read.ts)_
|
|
1469
|
-
|
|
1470
1432
|
## `sanity docs search QUERY`
|
|
1471
1433
|
|
|
1472
1434
|
Search Sanity docs
|
|
@@ -1498,8 +1460,6 @@ EXAMPLES
|
|
|
1498
1460
|
$ sanity docs search "deployment" --limit=5
|
|
1499
1461
|
```
|
|
1500
1462
|
|
|
1501
|
-
_See code: [src/commands/docs/search.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/docs/search.ts)_
|
|
1502
|
-
|
|
1503
1463
|
## `sanity doctor [CHECKS]`
|
|
1504
1464
|
|
|
1505
1465
|
Run diagnostics on your Sanity project
|
|
@@ -1529,8 +1489,6 @@ EXAMPLES
|
|
|
1529
1489
|
$ sanity doctor cli
|
|
1530
1490
|
```
|
|
1531
1491
|
|
|
1532
|
-
_See code: [src/commands/doctor.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/doctor.ts)_
|
|
1533
|
-
|
|
1534
1492
|
## `sanity documents create [FILE]`
|
|
1535
1493
|
|
|
1536
1494
|
Create one or more documents
|
|
@@ -1580,11 +1538,9 @@ EXAMPLES
|
|
|
1580
1538
|
$ sanity documents create myDocument.json --project-id abc123
|
|
1581
1539
|
```
|
|
1582
1540
|
|
|
1583
|
-
_See code: [src/commands/documents/create.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/documents/create.ts)_
|
|
1584
|
-
|
|
1585
1541
|
## `sanity documents delete ID [IDS]`
|
|
1586
1542
|
|
|
1587
|
-
Delete one or more documents from the
|
|
1543
|
+
Delete one or more documents from the project's configured dataset
|
|
1588
1544
|
|
|
1589
1545
|
```
|
|
1590
1546
|
USAGE
|
|
@@ -1599,7 +1555,7 @@ OVERRIDE FLAGS
|
|
|
1599
1555
|
-p, --project-id=<id> Project ID to delete from (overrides CLI configuration)
|
|
1600
1556
|
|
|
1601
1557
|
DESCRIPTION
|
|
1602
|
-
Delete one or more documents from the
|
|
1558
|
+
Delete one or more documents from the project's configured dataset
|
|
1603
1559
|
|
|
1604
1560
|
EXAMPLES
|
|
1605
1561
|
Delete the document with the ID "myDocId"
|
|
@@ -1623,8 +1579,6 @@ EXAMPLES
|
|
|
1623
1579
|
$ sanity documents delete myDocId --project-id abc123
|
|
1624
1580
|
```
|
|
1625
1581
|
|
|
1626
|
-
_See code: [src/commands/documents/delete.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/documents/delete.ts)_
|
|
1627
|
-
|
|
1628
1582
|
## `sanity documents get DOCUMENTID`
|
|
1629
1583
|
|
|
1630
1584
|
Get and print a document by ID
|
|
@@ -1664,8 +1618,6 @@ EXAMPLES
|
|
|
1664
1618
|
$ sanity documents get myDocId --project-id abc123
|
|
1665
1619
|
```
|
|
1666
1620
|
|
|
1667
|
-
_See code: [src/commands/documents/get.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/documents/get.ts)_
|
|
1668
|
-
|
|
1669
1621
|
## `sanity documents query QUERY`
|
|
1670
1622
|
|
|
1671
1623
|
Query for documents
|
|
@@ -1707,8 +1659,6 @@ EXAMPLES
|
|
|
1707
1659
|
$ sanity documents query '*[_type == "post"]' --project-id abc123 --dataset production
|
|
1708
1660
|
```
|
|
1709
1661
|
|
|
1710
|
-
_See code: [src/commands/documents/query.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/documents/query.ts)_
|
|
1711
|
-
|
|
1712
1662
|
## `sanity documents validate`
|
|
1713
1663
|
|
|
1714
1664
|
Validate documents in a dataset against the studio schema
|
|
@@ -1761,8 +1711,6 @@ EXAMPLES
|
|
|
1761
1711
|
$ sanity documents validate --project-id abc123 --dataset production
|
|
1762
1712
|
```
|
|
1763
1713
|
|
|
1764
|
-
_See code: [src/commands/documents/validate.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/documents/validate.ts)_
|
|
1765
|
-
|
|
1766
1714
|
## `sanity exec SCRIPT`
|
|
1767
1715
|
|
|
1768
1716
|
Executes a script within the Sanity Studio context
|
|
@@ -1775,8 +1723,8 @@ ARGUMENTS
|
|
|
1775
1723
|
SCRIPT... Path to the script to execute
|
|
1776
1724
|
|
|
1777
1725
|
FLAGS
|
|
1778
|
-
--mock-browser-env
|
|
1779
|
-
--with-user-token
|
|
1726
|
+
--mock-browser-env Mock a browser environment with jsdom
|
|
1727
|
+
--with-user-token Include your auth token in getCliClient()
|
|
1780
1728
|
|
|
1781
1729
|
DESCRIPTION
|
|
1782
1730
|
Executes a script within the Sanity Studio context
|
|
@@ -1802,40 +1750,42 @@ EXAMPLES
|
|
|
1802
1750
|
$ sanity exec --mock-browser-env myscript.js -- --dry-run positional-argument
|
|
1803
1751
|
```
|
|
1804
1752
|
|
|
1805
|
-
_See code: [src/commands/exec.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/exec.ts)_
|
|
1806
|
-
|
|
1807
1753
|
## `sanity functions add`
|
|
1808
1754
|
|
|
1809
1755
|
Add a Function to your Blueprint
|
|
1810
1756
|
|
|
1811
1757
|
```
|
|
1812
1758
|
USAGE
|
|
1813
|
-
$ sanity functions add [--example <value> | -n <value> | | --language ts|js |
|
|
1814
|
-
document-publish|document-create|document-
|
|
1815
|
-
|
|
1759
|
+
$ sanity functions add [--json] [--validate-resources] [--example <value> | -n <value> | | --language ts|js |
|
|
1760
|
+
--javascript | | ] [--type document-publish|document-create|document-delete|document-update|media-library-asset-cre
|
|
1761
|
+
ate|media-library-asset-delete|media-library-asset-update|scheduled-function|sync-tag-invalidate... ] [--helpers]
|
|
1762
|
+
[--installer skip|npm|pnpm|yarn] [-i | ]
|
|
1816
1763
|
|
|
1817
1764
|
FLAGS
|
|
1818
|
-
-i, --install
|
|
1819
|
-
-n, --name=<value>
|
|
1820
|
-
--example=<value>
|
|
1821
|
-
--[no-]helpers
|
|
1822
|
-
--installer=<option>
|
|
1823
|
-
|
|
1824
|
-
--javascript
|
|
1825
|
-
--
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1765
|
+
-i, --install Shortcut for --fn-installer npm
|
|
1766
|
+
-n, --name=<value> Name of the Function to add
|
|
1767
|
+
--example=<value> Example to use for the Function
|
|
1768
|
+
--[no-]helpers Add helpers to the new Function
|
|
1769
|
+
--installer=<option> How to install the @sanity/functions helpers
|
|
1770
|
+
<options: skip|npm|pnpm|yarn>
|
|
1771
|
+
--javascript Use JavaScript instead of TypeScript
|
|
1772
|
+
--json Format output as json
|
|
1773
|
+
--language=<option> [default: ts] Language of the new Function
|
|
1774
|
+
<options: ts|js>
|
|
1775
|
+
--type=<option>... Document change event(s) that should trigger the function; you can specify multiple
|
|
1776
|
+
events by specifying this flag multiple times
|
|
1777
|
+
<options: document-publish|document-create|document-delete|document-update|media-librar
|
|
1778
|
+
y-asset-create|media-library-asset-delete|media-library-asset-update|scheduled-function
|
|
1779
|
+
|sync-tag-invalidate>
|
|
1780
|
+
--[no-]validate-resources Validate resources
|
|
1831
1781
|
|
|
1832
1782
|
DESCRIPTION
|
|
1833
1783
|
Add a Function to your Blueprint
|
|
1834
1784
|
|
|
1835
1785
|
Scaffolds a new Function in the functions/ folder and templates a resource for your Blueprint manifest.
|
|
1836
1786
|
|
|
1837
|
-
Functions are serverless handlers triggered by document events (create, update, delete,
|
|
1838
|
-
|
|
1787
|
+
Functions are serverless handlers triggered by document, live content or media-library events (create, update, delete,
|
|
1788
|
+
publish).
|
|
1839
1789
|
|
|
1840
1790
|
After adding, use 'functions dev' to test locally, then 'blueprints deploy' to publish.
|
|
1841
1791
|
|
|
@@ -1851,21 +1801,21 @@ EXAMPLES
|
|
|
1851
1801
|
$ sanity functions add --name my-function --type document-create --type document-update --lang js
|
|
1852
1802
|
```
|
|
1853
1803
|
|
|
1854
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.7.2/src/commands/functions/add.ts)_
|
|
1855
|
-
|
|
1856
1804
|
## `sanity functions dev`
|
|
1857
1805
|
|
|
1858
1806
|
Start the Sanity Function emulator
|
|
1859
1807
|
|
|
1860
1808
|
```
|
|
1861
1809
|
USAGE
|
|
1862
|
-
$ sanity functions dev [-h <value>] [-p <value>] [-t <value>]
|
|
1810
|
+
$ sanity functions dev [--json] [--validate-resources] [-h <value>] [-p <value>] [-t <value>]
|
|
1863
1811
|
|
|
1864
1812
|
FLAGS
|
|
1865
|
-
-h, --host=<value>
|
|
1866
|
-
-p, --port=<value>
|
|
1867
|
-
-t, --timeout=<value>
|
|
1868
|
-
|
|
1813
|
+
-h, --host=<value> The local network interface at which to listen. [default: "localhost"]
|
|
1814
|
+
-p, --port=<value> TCP port to start emulator on. [default: 8080]
|
|
1815
|
+
-t, --timeout=<value> Maximum execution time for all functions, in seconds. Takes precedence over
|
|
1816
|
+
function-specific `timeout`
|
|
1817
|
+
--json Format output as json
|
|
1818
|
+
--[no-]validate-resources Validate resources
|
|
1869
1819
|
|
|
1870
1820
|
DESCRIPTION
|
|
1871
1821
|
Start the Sanity Function emulator
|
|
@@ -1885,21 +1835,23 @@ EXAMPLES
|
|
|
1885
1835
|
$ sanity functions dev --timeout 60
|
|
1886
1836
|
```
|
|
1887
1837
|
|
|
1888
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.7.2/src/commands/functions/dev.ts)_
|
|
1889
|
-
|
|
1890
1838
|
## `sanity functions env add NAME KEY VALUE`
|
|
1891
1839
|
|
|
1892
1840
|
Add or set an environment variable for a deployed function
|
|
1893
1841
|
|
|
1894
1842
|
```
|
|
1895
1843
|
USAGE
|
|
1896
|
-
$ sanity functions env add NAME KEY VALUE
|
|
1844
|
+
$ sanity functions env add NAME KEY VALUE [--json] [--validate-resources]
|
|
1897
1845
|
|
|
1898
1846
|
ARGUMENTS
|
|
1899
1847
|
NAME The name of the Sanity Function
|
|
1900
1848
|
KEY The name of the environment variable
|
|
1901
1849
|
VALUE The value of the environment variable
|
|
1902
1850
|
|
|
1851
|
+
FLAGS
|
|
1852
|
+
--json Format output as json
|
|
1853
|
+
--[no-]validate-resources Validate resources
|
|
1854
|
+
|
|
1903
1855
|
DESCRIPTION
|
|
1904
1856
|
Add or set an environment variable for a deployed function
|
|
1905
1857
|
|
|
@@ -1912,19 +1864,21 @@ EXAMPLES
|
|
|
1912
1864
|
$ sanity functions env add MyFunction API_URL https://api.example.com/
|
|
1913
1865
|
```
|
|
1914
1866
|
|
|
1915
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.7.2/src/commands/functions/env/add.ts)_
|
|
1916
|
-
|
|
1917
1867
|
## `sanity functions env list NAME`
|
|
1918
1868
|
|
|
1919
1869
|
List environment variables for a deployed function
|
|
1920
1870
|
|
|
1921
1871
|
```
|
|
1922
1872
|
USAGE
|
|
1923
|
-
$ sanity functions env list NAME
|
|
1873
|
+
$ sanity functions env list NAME [--json] [--validate-resources]
|
|
1924
1874
|
|
|
1925
1875
|
ARGUMENTS
|
|
1926
1876
|
NAME The name of the Sanity Function
|
|
1927
1877
|
|
|
1878
|
+
FLAGS
|
|
1879
|
+
--json Format output as json
|
|
1880
|
+
--[no-]validate-resources Validate resources
|
|
1881
|
+
|
|
1928
1882
|
DESCRIPTION
|
|
1929
1883
|
List environment variables for a deployed function
|
|
1930
1884
|
|
|
@@ -1936,20 +1890,22 @@ EXAMPLES
|
|
|
1936
1890
|
$ sanity functions env list MyFunction
|
|
1937
1891
|
```
|
|
1938
1892
|
|
|
1939
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.7.2/src/commands/functions/env/list.ts)_
|
|
1940
|
-
|
|
1941
1893
|
## `sanity functions env remove NAME KEY`
|
|
1942
1894
|
|
|
1943
1895
|
Remove an environment variable from a deployed function
|
|
1944
1896
|
|
|
1945
1897
|
```
|
|
1946
1898
|
USAGE
|
|
1947
|
-
$ sanity functions env remove NAME KEY
|
|
1899
|
+
$ sanity functions env remove NAME KEY [--json] [--validate-resources]
|
|
1948
1900
|
|
|
1949
1901
|
ARGUMENTS
|
|
1950
1902
|
NAME The name of the Sanity Function
|
|
1951
1903
|
KEY The name of the environment variable
|
|
1952
1904
|
|
|
1905
|
+
FLAGS
|
|
1906
|
+
--json Format output as json
|
|
1907
|
+
--[no-]validate-resources Validate resources
|
|
1908
|
+
|
|
1953
1909
|
DESCRIPTION
|
|
1954
1910
|
Remove an environment variable from a deployed function
|
|
1955
1911
|
|
|
@@ -1962,27 +1918,26 @@ EXAMPLES
|
|
|
1962
1918
|
$ sanity functions env remove MyFunction API_URL
|
|
1963
1919
|
```
|
|
1964
1920
|
|
|
1965
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.7.2/src/commands/functions/env/remove.ts)_
|
|
1966
|
-
|
|
1967
1921
|
## `sanity functions logs [NAME]`
|
|
1968
1922
|
|
|
1969
1923
|
Retrieve or delete logs for a Sanity Function
|
|
1970
1924
|
|
|
1971
1925
|
```
|
|
1972
1926
|
USAGE
|
|
1973
|
-
$ sanity functions logs [NAME] [--stack <value>] [-u] [-f [-d | -l <value> |
|
|
1927
|
+
$ sanity functions logs [NAME] [--validate-resources] [--stack <value>] [-u] [-f [-d | -l <value> | --json]] [-w]
|
|
1974
1928
|
|
|
1975
1929
|
ARGUMENTS
|
|
1976
1930
|
[NAME] The name of the Sanity Function
|
|
1977
1931
|
|
|
1978
1932
|
FLAGS
|
|
1979
|
-
-d, --delete
|
|
1980
|
-
-f, --force
|
|
1981
|
-
-
|
|
1982
|
-
-
|
|
1983
|
-
-
|
|
1984
|
-
|
|
1985
|
-
--stack=<value>
|
|
1933
|
+
-d, --delete Delete all logs for the function
|
|
1934
|
+
-f, --force Skip confirmation for deleting logs
|
|
1935
|
+
-l, --limit=<value> [default: 50] Total number of log entries to retrieve
|
|
1936
|
+
-u, --utc Show dates in UTC time zone
|
|
1937
|
+
-w, --watch Watch for new logs (streaming mode)
|
|
1938
|
+
--json Format output as json
|
|
1939
|
+
--stack=<value> Stack name or ID to use instead of the locally configured Stack
|
|
1940
|
+
--[no-]validate-resources Validate resources
|
|
1986
1941
|
|
|
1987
1942
|
DESCRIPTION
|
|
1988
1943
|
Retrieve or delete logs for a Sanity Function
|
|
@@ -2002,18 +1957,17 @@ EXAMPLES
|
|
|
2002
1957
|
$ sanity functions logs <name> --delete
|
|
2003
1958
|
```
|
|
2004
1959
|
|
|
2005
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.7.2/src/commands/functions/logs.ts)_
|
|
2006
|
-
|
|
2007
1960
|
## `sanity functions test [NAME]`
|
|
2008
1961
|
|
|
2009
1962
|
Invoke a local Sanity Function
|
|
2010
1963
|
|
|
2011
1964
|
```
|
|
2012
1965
|
USAGE
|
|
2013
|
-
$ sanity functions test [NAME] [--
|
|
2014
|
-
|
|
2015
|
-
[--data-after <value> | | | | | | | ] [-e
|
|
2016
|
-
[
|
|
1966
|
+
$ sanity functions test [NAME] [--json] [--validate-resources] [--organization-id <value>] [--data-before <value>
|
|
1967
|
+
| [-d <value> | -f <value> | --document-id <value>] | | | --file-before <value> | --file-after <value> |
|
|
1968
|
+
--document-id-before <value> | --document-id-after <value>] [--data-after <value> | | | | | | | ] [-e
|
|
1969
|
+
create|update|delete] [-t <value>] [-a <value>] [--with-user-token] [--media-library-id <value> | --project-id
|
|
1970
|
+
<value> | --dataset <value>]
|
|
2017
1971
|
|
|
2018
1972
|
ARGUMENTS
|
|
2019
1973
|
[NAME] The name of the Sanity Function
|
|
@@ -2033,8 +1987,11 @@ FLAGS
|
|
|
2033
1987
|
--document-id-before=<value> Original document
|
|
2034
1988
|
--file-after=<value> Current document
|
|
2035
1989
|
--file-before=<value> Original document
|
|
1990
|
+
--json Format output as json
|
|
2036
1991
|
--media-library-id=<value> Sanity Media Library ID to use
|
|
2037
|
-
--
|
|
1992
|
+
--organization-id=<value> Sanity organization ID used to scope Blueprint and Stack
|
|
1993
|
+
--project-id=<value> Sanity project ID used to scope Blueprint and Stack
|
|
1994
|
+
--[no-]validate-resources Validate resources
|
|
2038
1995
|
--with-user-token Prime access token from CLI config
|
|
2039
1996
|
|
|
2040
1997
|
DESCRIPTION
|
|
@@ -2056,8 +2013,6 @@ EXAMPLES
|
|
|
2056
2013
|
$ sanity functions test <name> --event update --data-before '{ "title": "before" }' --data-after '{ "title": "after" }'
|
|
2057
2014
|
```
|
|
2058
2015
|
|
|
2059
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.7.2/src/commands/functions/test.ts)_
|
|
2060
|
-
|
|
2061
2016
|
## `sanity graphql deploy`
|
|
2062
2017
|
|
|
2063
2018
|
Deploy a GraphQL API from the current Sanity schema
|
|
@@ -2069,7 +2024,7 @@ USAGE
|
|
|
2069
2024
|
|
|
2070
2025
|
FLAGS
|
|
2071
2026
|
-d, --dataset=<name> Deploy API for the given dataset
|
|
2072
|
-
--api=<value>... Only deploy API with this ID
|
|
2027
|
+
--api=<value>... Only deploy API with this ID (can be specified multiple times)
|
|
2073
2028
|
--dry-run Validate defined GraphQL APIs, check for breaking changes, skip deploy
|
|
2074
2029
|
--force Deploy API without confirming breaking changes
|
|
2075
2030
|
--generation=<option> API generation to deploy (defaults to "gen3")
|
|
@@ -2077,8 +2032,7 @@ FLAGS
|
|
|
2077
2032
|
--non-null-document-fields Use non-null document fields (_id, _type etc)
|
|
2078
2033
|
--[no-]playground Enable GraphQL playground for easier debugging
|
|
2079
2034
|
--tag=<value> Deploy API(s) to given tag (defaults to "default")
|
|
2080
|
-
--with-union-cache
|
|
2081
|
-
referencing types
|
|
2035
|
+
--with-union-cache Cache union types (faster for schemas with many self-references)
|
|
2082
2036
|
|
|
2083
2037
|
DESCRIPTION
|
|
2084
2038
|
Deploy a GraphQL API from the current Sanity schema
|
|
@@ -2101,11 +2055,9 @@ EXAMPLES
|
|
|
2101
2055
|
$ sanity graphql deploy --playground
|
|
2102
2056
|
```
|
|
2103
2057
|
|
|
2104
|
-
_See code: [src/commands/graphql/deploy.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/graphql/deploy.ts)_
|
|
2105
|
-
|
|
2106
2058
|
## `sanity graphql list`
|
|
2107
2059
|
|
|
2108
|
-
List
|
|
2060
|
+
List deployed GraphQL endpoints for the project
|
|
2109
2061
|
|
|
2110
2062
|
```
|
|
2111
2063
|
USAGE
|
|
@@ -2115,10 +2067,10 @@ OVERRIDE FLAGS
|
|
|
2115
2067
|
-p, --project-id=<id> Project ID to list GraphQL endpoints for (overrides CLI configuration)
|
|
2116
2068
|
|
|
2117
2069
|
DESCRIPTION
|
|
2118
|
-
List
|
|
2070
|
+
List deployed GraphQL endpoints for the project
|
|
2119
2071
|
|
|
2120
2072
|
EXAMPLES
|
|
2121
|
-
List GraphQL endpoints for the
|
|
2073
|
+
List GraphQL endpoints for the project
|
|
2122
2074
|
|
|
2123
2075
|
$ sanity graphql list
|
|
2124
2076
|
|
|
@@ -2127,8 +2079,6 @@ EXAMPLES
|
|
|
2127
2079
|
$ sanity graphql list --project-id abc123
|
|
2128
2080
|
```
|
|
2129
2081
|
|
|
2130
|
-
_See code: [src/commands/graphql/list.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/graphql/list.ts)_
|
|
2131
|
-
|
|
2132
2082
|
## `sanity graphql undeploy`
|
|
2133
2083
|
|
|
2134
2084
|
Remove a deployed GraphQL API
|
|
@@ -2175,8 +2125,6 @@ EXAMPLES
|
|
|
2175
2125
|
$ sanity graphql undeploy --project-id abc123 --dataset production
|
|
2176
2126
|
```
|
|
2177
2127
|
|
|
2178
|
-
_See code: [src/commands/graphql/undeploy.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/graphql/undeploy.ts)_
|
|
2179
|
-
|
|
2180
2128
|
## `sanity help [COMMAND]`
|
|
2181
2129
|
|
|
2182
2130
|
Display help for sanity.
|
|
@@ -2195,8 +2143,6 @@ DESCRIPTION
|
|
|
2195
2143
|
Display help for sanity.
|
|
2196
2144
|
```
|
|
2197
2145
|
|
|
2198
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.2.40/src/commands/help.ts)_
|
|
2199
|
-
|
|
2200
2146
|
## `sanity hooks attempt ATTEMPTID`
|
|
2201
2147
|
|
|
2202
2148
|
Print details of a given webhook delivery attempt
|
|
@@ -2224,11 +2170,9 @@ EXAMPLES
|
|
|
2224
2170
|
$ sanity hooks attempt abc123 --project-id projectId
|
|
2225
2171
|
```
|
|
2226
2172
|
|
|
2227
|
-
_See code: [src/commands/hooks/attempt.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/hooks/attempt.ts)_
|
|
2228
|
-
|
|
2229
2173
|
## `sanity hooks create`
|
|
2230
2174
|
|
|
2231
|
-
Create a new webhook for the
|
|
2175
|
+
Create a new webhook for the project
|
|
2232
2176
|
|
|
2233
2177
|
```
|
|
2234
2178
|
USAGE
|
|
@@ -2238,10 +2182,10 @@ OVERRIDE FLAGS
|
|
|
2238
2182
|
-p, --project-id=<id> Project ID to create webhook for (overrides CLI configuration)
|
|
2239
2183
|
|
|
2240
2184
|
DESCRIPTION
|
|
2241
|
-
Create a new webhook for the
|
|
2185
|
+
Create a new webhook for the project
|
|
2242
2186
|
|
|
2243
2187
|
EXAMPLES
|
|
2244
|
-
Create a new webhook for the
|
|
2188
|
+
Create a new webhook for the project
|
|
2245
2189
|
|
|
2246
2190
|
$ sanity hooks create
|
|
2247
2191
|
|
|
@@ -2250,44 +2194,40 @@ EXAMPLES
|
|
|
2250
2194
|
$ sanity hooks create --project-id abc123
|
|
2251
2195
|
```
|
|
2252
2196
|
|
|
2253
|
-
_See code: [src/commands/hooks/create.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/hooks/create.ts)_
|
|
2254
|
-
|
|
2255
2197
|
## `sanity hooks delete [NAME]`
|
|
2256
2198
|
|
|
2257
|
-
Delete a
|
|
2199
|
+
Delete a webhook from the project
|
|
2258
2200
|
|
|
2259
2201
|
```
|
|
2260
2202
|
USAGE
|
|
2261
2203
|
$ sanity hooks delete [NAME] [-p <id>]
|
|
2262
2204
|
|
|
2263
2205
|
ARGUMENTS
|
|
2264
|
-
[NAME] Name of
|
|
2206
|
+
[NAME] Name of webhook to delete (will prompt if not provided)
|
|
2265
2207
|
|
|
2266
2208
|
OVERRIDE FLAGS
|
|
2267
2209
|
-p, --project-id=<id> Project ID to delete webhook from (overrides CLI configuration)
|
|
2268
2210
|
|
|
2269
2211
|
DESCRIPTION
|
|
2270
|
-
Delete a
|
|
2212
|
+
Delete a webhook from the project
|
|
2271
2213
|
|
|
2272
2214
|
EXAMPLES
|
|
2273
|
-
Interactively select and delete a
|
|
2215
|
+
Interactively select and delete a webhook
|
|
2274
2216
|
|
|
2275
2217
|
$ sanity hooks delete
|
|
2276
2218
|
|
|
2277
|
-
Delete a specific
|
|
2219
|
+
Delete a specific webhook by name
|
|
2278
2220
|
|
|
2279
2221
|
$ sanity hooks delete my-hook
|
|
2280
2222
|
|
|
2281
|
-
Delete a
|
|
2223
|
+
Delete a webhook from a specific project
|
|
2282
2224
|
|
|
2283
2225
|
$ sanity hooks delete --project-id abc123
|
|
2284
2226
|
```
|
|
2285
2227
|
|
|
2286
|
-
_See code: [src/commands/hooks/delete.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/hooks/delete.ts)_
|
|
2287
|
-
|
|
2288
2228
|
## `sanity hooks list`
|
|
2289
2229
|
|
|
2290
|
-
List
|
|
2230
|
+
List webhooks for the project
|
|
2291
2231
|
|
|
2292
2232
|
```
|
|
2293
2233
|
USAGE
|
|
@@ -2297,30 +2237,28 @@ OVERRIDE FLAGS
|
|
|
2297
2237
|
-p, --project-id=<id> Project ID to list webhooks for (overrides CLI configuration)
|
|
2298
2238
|
|
|
2299
2239
|
DESCRIPTION
|
|
2300
|
-
List
|
|
2240
|
+
List webhooks for the project
|
|
2301
2241
|
|
|
2302
2242
|
EXAMPLES
|
|
2303
|
-
List
|
|
2243
|
+
List webhooks for the project
|
|
2304
2244
|
|
|
2305
2245
|
$ sanity hooks list
|
|
2306
2246
|
|
|
2307
|
-
List
|
|
2247
|
+
List webhooks for a specific project
|
|
2308
2248
|
|
|
2309
2249
|
$ sanity hooks list --project-id abc123
|
|
2310
2250
|
```
|
|
2311
2251
|
|
|
2312
|
-
_See code: [src/commands/hooks/list.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/hooks/list.ts)_
|
|
2313
|
-
|
|
2314
2252
|
## `sanity hooks logs [NAME]`
|
|
2315
2253
|
|
|
2316
|
-
|
|
2254
|
+
Show log entries for project webhooks
|
|
2317
2255
|
|
|
2318
2256
|
```
|
|
2319
2257
|
USAGE
|
|
2320
2258
|
$ sanity hooks logs [NAME] [-p <id>] [--detailed]
|
|
2321
2259
|
|
|
2322
2260
|
ARGUMENTS
|
|
2323
|
-
[NAME] Name of the
|
|
2261
|
+
[NAME] Name of the webhook to show logs for
|
|
2324
2262
|
|
|
2325
2263
|
FLAGS
|
|
2326
2264
|
--detailed Include detailed payload and attempts
|
|
@@ -2329,24 +2267,22 @@ OVERRIDE FLAGS
|
|
|
2329
2267
|
-p, --project-id=<id> Project ID to view webhook logs for (overrides CLI configuration)
|
|
2330
2268
|
|
|
2331
2269
|
DESCRIPTION
|
|
2332
|
-
|
|
2270
|
+
Show log entries for project webhooks
|
|
2333
2271
|
|
|
2334
2272
|
EXAMPLES
|
|
2335
|
-
|
|
2273
|
+
Show log entries for project webhooks
|
|
2336
2274
|
|
|
2337
2275
|
$ sanity hooks logs
|
|
2338
2276
|
|
|
2339
|
-
|
|
2277
|
+
Show log entries for a specific webhook by name
|
|
2340
2278
|
|
|
2341
2279
|
$ sanity hooks logs [NAME]
|
|
2342
2280
|
|
|
2343
|
-
|
|
2281
|
+
Show log entries for a specific project
|
|
2344
2282
|
|
|
2345
2283
|
$ sanity hooks logs --project-id abc123
|
|
2346
2284
|
```
|
|
2347
2285
|
|
|
2348
|
-
_See code: [src/commands/hooks/logs.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/hooks/logs.ts)_
|
|
2349
|
-
|
|
2350
2286
|
## `sanity init`
|
|
2351
2287
|
|
|
2352
2288
|
Initialize a new Sanity Studio, project and/or app
|
|
@@ -2415,11 +2351,9 @@ EXAMPLES
|
|
|
2415
2351
|
--output-path /Users/espenh/movies-unlimited
|
|
2416
2352
|
```
|
|
2417
2353
|
|
|
2418
|
-
_See code: [src/commands/init.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/init.ts)_
|
|
2419
|
-
|
|
2420
2354
|
## `sanity install [PACKAGES]`
|
|
2421
2355
|
|
|
2422
|
-
|
|
2356
|
+
Install dependencies for the Sanity Studio project
|
|
2423
2357
|
|
|
2424
2358
|
```
|
|
2425
2359
|
USAGE
|
|
@@ -2429,7 +2363,7 @@ ARGUMENTS
|
|
|
2429
2363
|
[PACKAGES...] Packages to install
|
|
2430
2364
|
|
|
2431
2365
|
DESCRIPTION
|
|
2432
|
-
|
|
2366
|
+
Install dependencies for the Sanity Studio project
|
|
2433
2367
|
|
|
2434
2368
|
EXAMPLES
|
|
2435
2369
|
$ sanity install
|
|
@@ -2439,25 +2373,21 @@ EXAMPLES
|
|
|
2439
2373
|
$ sanity install some-package another-package
|
|
2440
2374
|
```
|
|
2441
2375
|
|
|
2442
|
-
_See code: [src/commands/install.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/install.ts)_
|
|
2443
|
-
|
|
2444
2376
|
## `sanity learn`
|
|
2445
2377
|
|
|
2446
|
-
|
|
2378
|
+
Open Sanity Learn in your browser
|
|
2447
2379
|
|
|
2448
2380
|
```
|
|
2449
2381
|
USAGE
|
|
2450
2382
|
$ sanity learn
|
|
2451
2383
|
|
|
2452
2384
|
DESCRIPTION
|
|
2453
|
-
|
|
2385
|
+
Open Sanity Learn in your browser
|
|
2454
2386
|
```
|
|
2455
2387
|
|
|
2456
|
-
_See code: [src/commands/learn.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/learn.ts)_
|
|
2457
|
-
|
|
2458
2388
|
## `sanity login`
|
|
2459
2389
|
|
|
2460
|
-
|
|
2390
|
+
Log in to your Sanity account
|
|
2461
2391
|
|
|
2462
2392
|
```
|
|
2463
2393
|
USAGE
|
|
@@ -2470,7 +2400,7 @@ FLAGS
|
|
|
2470
2400
|
--sso-provider=<name> Select a specific SSO provider by name (use with --sso)
|
|
2471
2401
|
|
|
2472
2402
|
DESCRIPTION
|
|
2473
|
-
|
|
2403
|
+
Log in to your Sanity account
|
|
2474
2404
|
|
|
2475
2405
|
EXAMPLES
|
|
2476
2406
|
Log in using default settings
|
|
@@ -2490,39 +2420,33 @@ EXAMPLES
|
|
|
2490
2420
|
$ sanity login --sso my-organization --sso-provider "Okta SSO"
|
|
2491
2421
|
```
|
|
2492
2422
|
|
|
2493
|
-
_See code: [src/commands/login.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/login.ts)_
|
|
2494
|
-
|
|
2495
2423
|
## `sanity logout`
|
|
2496
2424
|
|
|
2497
|
-
|
|
2425
|
+
Log out of the current session
|
|
2498
2426
|
|
|
2499
2427
|
```
|
|
2500
2428
|
USAGE
|
|
2501
2429
|
$ sanity logout
|
|
2502
2430
|
|
|
2503
2431
|
DESCRIPTION
|
|
2504
|
-
|
|
2432
|
+
Log out of the current session
|
|
2505
2433
|
```
|
|
2506
2434
|
|
|
2507
|
-
_See code: [src/commands/logout.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/logout.ts)_
|
|
2508
|
-
|
|
2509
2435
|
## `sanity manage`
|
|
2510
2436
|
|
|
2511
|
-
|
|
2437
|
+
Open project settings in your browser
|
|
2512
2438
|
|
|
2513
2439
|
```
|
|
2514
2440
|
USAGE
|
|
2515
2441
|
$ sanity manage
|
|
2516
2442
|
|
|
2517
2443
|
DESCRIPTION
|
|
2518
|
-
|
|
2444
|
+
Open project settings in your browser
|
|
2519
2445
|
```
|
|
2520
2446
|
|
|
2521
|
-
_See code: [src/commands/manage.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/manage.ts)_
|
|
2522
|
-
|
|
2523
2447
|
## `sanity manifest extract`
|
|
2524
2448
|
|
|
2525
|
-
|
|
2449
|
+
Extract studio configuration as JSON manifest files.
|
|
2526
2450
|
|
|
2527
2451
|
```
|
|
2528
2452
|
USAGE
|
|
@@ -2532,9 +2456,9 @@ FLAGS
|
|
|
2532
2456
|
--path=<value> [default: dist/static] Optional path to specify destination directory of the manifest files
|
|
2533
2457
|
|
|
2534
2458
|
DESCRIPTION
|
|
2535
|
-
|
|
2459
|
+
Extract studio configuration as JSON manifest files.
|
|
2536
2460
|
|
|
2537
|
-
|
|
2461
|
+
Note: This command is experimental and subject to change. It is currently intended for use with Create only.
|
|
2538
2462
|
|
|
2539
2463
|
EXAMPLES
|
|
2540
2464
|
Extracts manifests
|
|
@@ -2546,18 +2470,17 @@ EXAMPLES
|
|
|
2546
2470
|
$ sanity manifest extract --path /public/static
|
|
2547
2471
|
```
|
|
2548
2472
|
|
|
2549
|
-
_See code: [src/commands/manifest/extract.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/manifest/extract.ts)_
|
|
2550
|
-
|
|
2551
2473
|
## `sanity mcp configure`
|
|
2552
2474
|
|
|
2553
|
-
Configure Sanity MCP server for AI editors (Claude Code, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, VS Code)
|
|
2475
|
+
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)
|
|
2554
2476
|
|
|
2555
2477
|
```
|
|
2556
2478
|
USAGE
|
|
2557
2479
|
$ sanity mcp configure
|
|
2558
2480
|
|
|
2559
2481
|
DESCRIPTION
|
|
2560
|
-
Configure Sanity MCP server for AI editors (Claude Code, Codex CLI, Cursor, Gemini CLI,
|
|
2482
|
+
Configure Sanity MCP server for AI editors (Antigravity, Claude Code, Cline, Cline CLI, Codex CLI, Cursor, Gemini CLI,
|
|
2483
|
+
GitHub Copilot CLI, MCPorter, OpenCode, VS Code, VS Code Insiders, Zed)
|
|
2561
2484
|
|
|
2562
2485
|
EXAMPLES
|
|
2563
2486
|
Configure Sanity MCP server for detected AI editors
|
|
@@ -2565,8 +2488,6 @@ EXAMPLES
|
|
|
2565
2488
|
$ sanity mcp configure
|
|
2566
2489
|
```
|
|
2567
2490
|
|
|
2568
|
-
_See code: [src/commands/mcp/configure.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/mcp/configure.ts)_
|
|
2569
|
-
|
|
2570
2491
|
## `sanity media create-aspect`
|
|
2571
2492
|
|
|
2572
2493
|
Create a new aspect definition file
|
|
@@ -2584,11 +2505,9 @@ EXAMPLES
|
|
|
2584
2505
|
$ sanity media create-aspect
|
|
2585
2506
|
```
|
|
2586
2507
|
|
|
2587
|
-
_See code: [src/commands/media/create-aspect.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/media/create-aspect.ts)_
|
|
2588
|
-
|
|
2589
2508
|
## `sanity media delete-aspect ASPECTNAME`
|
|
2590
2509
|
|
|
2591
|
-
|
|
2510
|
+
Delete an aspect definition
|
|
2592
2511
|
|
|
2593
2512
|
```
|
|
2594
2513
|
USAGE
|
|
@@ -2605,7 +2524,7 @@ OVERRIDE FLAGS
|
|
|
2605
2524
|
-p, --project-id=<id> Project ID to delete media aspect from (overrides CLI configuration)
|
|
2606
2525
|
|
|
2607
2526
|
DESCRIPTION
|
|
2608
|
-
|
|
2527
|
+
Delete an aspect definition
|
|
2609
2528
|
|
|
2610
2529
|
EXAMPLES
|
|
2611
2530
|
Delete the aspect named "someAspect"
|
|
@@ -2613,8 +2532,6 @@ EXAMPLES
|
|
|
2613
2532
|
$ sanity media delete-aspect someAspect
|
|
2614
2533
|
```
|
|
2615
2534
|
|
|
2616
|
-
_See code: [src/commands/media/delete-aspect.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/media/delete-aspect.ts)_
|
|
2617
|
-
|
|
2618
2535
|
## `sanity media deploy-aspect [ASPECTNAME]`
|
|
2619
2536
|
|
|
2620
2537
|
Deploy an aspect
|
|
@@ -2646,11 +2563,9 @@ EXAMPLES
|
|
|
2646
2563
|
$ sanity media deploy-aspect --all
|
|
2647
2564
|
```
|
|
2648
2565
|
|
|
2649
|
-
_See code: [src/commands/media/deploy-aspect.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/media/deploy-aspect.ts)_
|
|
2650
|
-
|
|
2651
2566
|
## `sanity media export [DESTINATION]`
|
|
2652
2567
|
|
|
2653
|
-
Export
|
|
2568
|
+
Export file and image assets from a media library (excludes video)
|
|
2654
2569
|
|
|
2655
2570
|
```
|
|
2656
2571
|
USAGE
|
|
@@ -2670,8 +2585,7 @@ OVERRIDE FLAGS
|
|
|
2670
2585
|
-p, --project-id=<id> Project ID to export media from (overrides CLI configuration)
|
|
2671
2586
|
|
|
2672
2587
|
DESCRIPTION
|
|
2673
|
-
Export
|
|
2674
|
-
are excluded from the export.
|
|
2588
|
+
Export file and image assets from a media library (excludes video)
|
|
2675
2589
|
|
|
2676
2590
|
EXAMPLES
|
|
2677
2591
|
Export media library interactively
|
|
@@ -2687,8 +2601,6 @@ EXAMPLES
|
|
|
2687
2601
|
$ sanity media export --media-library-id my-library-id
|
|
2688
2602
|
```
|
|
2689
2603
|
|
|
2690
|
-
_See code: [src/commands/media/export.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/media/export.ts)_
|
|
2691
|
-
|
|
2692
2604
|
## `sanity media import SOURCE`
|
|
2693
2605
|
|
|
2694
2606
|
Import a set of assets to the target media library.
|
|
@@ -2725,8 +2637,6 @@ EXAMPLES
|
|
|
2725
2637
|
$ sanity media import products --replace-aspects
|
|
2726
2638
|
```
|
|
2727
2639
|
|
|
2728
|
-
_See code: [src/commands/media/import.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/media/import.ts)_
|
|
2729
|
-
|
|
2730
2640
|
## `sanity migrations create [TITLE]`
|
|
2731
2641
|
|
|
2732
2642
|
Create a new migration within your project
|
|
@@ -2751,8 +2661,6 @@ EXAMPLES
|
|
|
2751
2661
|
$ sanity migrations create "Rename field from location to address"
|
|
2752
2662
|
```
|
|
2753
2663
|
|
|
2754
|
-
_See code: [@sanity/migrate](https://github.com/sanity-io/migrate/blob/v6.1.1/src/commands/migrations/create.ts)_
|
|
2755
|
-
|
|
2756
2664
|
## `sanity migrations list`
|
|
2757
2665
|
|
|
2758
2666
|
List available migrations
|
|
@@ -2770,8 +2678,6 @@ EXAMPLES
|
|
|
2770
2678
|
$ sanity migrations list
|
|
2771
2679
|
```
|
|
2772
2680
|
|
|
2773
|
-
_See code: [@sanity/migrate](https://github.com/sanity-io/migrate/blob/v6.1.1/src/commands/migrations/list.ts)_
|
|
2774
|
-
|
|
2775
2681
|
## `sanity migrations run [ID]`
|
|
2776
2682
|
|
|
2777
2683
|
Run a migration against a dataset
|
|
@@ -2814,8 +2720,6 @@ EXAMPLES
|
|
|
2814
2720
|
$ sanity migrations run <id> --from-export=production.tar.gz --no-dry-run --project xyz --dataset staging
|
|
2815
2721
|
```
|
|
2816
2722
|
|
|
2817
|
-
_See code: [@sanity/migrate](https://github.com/sanity-io/migrate/blob/v6.1.1/src/commands/migrations/run.ts)_
|
|
2818
|
-
|
|
2819
2723
|
## `sanity openapi get SLUG`
|
|
2820
2724
|
|
|
2821
2725
|
Get an OpenAPI specification by slug
|
|
@@ -2853,8 +2757,6 @@ EXAMPLES
|
|
|
2853
2757
|
$ sanity openapi get query > query-api.yaml
|
|
2854
2758
|
```
|
|
2855
2759
|
|
|
2856
|
-
_See code: [src/commands/openapi/get.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/openapi/get.ts)_
|
|
2857
|
-
|
|
2858
2760
|
## `sanity openapi list`
|
|
2859
2761
|
|
|
2860
2762
|
List all available OpenAPI specifications
|
|
@@ -2884,11 +2786,9 @@ EXAMPLES
|
|
|
2884
2786
|
$ sanity openapi list --web
|
|
2885
2787
|
```
|
|
2886
2788
|
|
|
2887
|
-
_See code: [src/commands/openapi/list.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/openapi/list.ts)_
|
|
2888
|
-
|
|
2889
2789
|
## `sanity preview [OUTPUTDIR]`
|
|
2890
2790
|
|
|
2891
|
-
|
|
2791
|
+
Start a local server to preview a production build
|
|
2892
2792
|
|
|
2893
2793
|
```
|
|
2894
2794
|
USAGE
|
|
@@ -2898,11 +2798,11 @@ ARGUMENTS
|
|
|
2898
2798
|
[OUTPUTDIR] Output directory
|
|
2899
2799
|
|
|
2900
2800
|
FLAGS
|
|
2901
|
-
--host=<value>
|
|
2902
|
-
--port=<value>
|
|
2801
|
+
--host=<value> Local network interface to listen on (default: localhost)
|
|
2802
|
+
--port=<value> TCP port to start server on (default: 3333)
|
|
2903
2803
|
|
|
2904
2804
|
DESCRIPTION
|
|
2905
|
-
|
|
2805
|
+
Start a local server to preview a production build
|
|
2906
2806
|
|
|
2907
2807
|
EXAMPLES
|
|
2908
2808
|
$ sanity preview --host=0.0.0.0
|
|
@@ -2912,8 +2812,6 @@ EXAMPLES
|
|
|
2912
2812
|
$ sanity preview some/build-output-dir
|
|
2913
2813
|
```
|
|
2914
2814
|
|
|
2915
|
-
_See code: [src/commands/preview.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/preview.ts)_
|
|
2916
|
-
|
|
2917
2815
|
## `sanity projects create [PROJECTNAME]`
|
|
2918
2816
|
|
|
2919
2817
|
Create a new Sanity project
|
|
@@ -2960,37 +2858,33 @@ EXAMPLES
|
|
|
2960
2858
|
$ sanity projects create "CI Project" --yes --json
|
|
2961
2859
|
```
|
|
2962
2860
|
|
|
2963
|
-
_See code: [src/commands/projects/create.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/projects/create.ts)_
|
|
2964
|
-
|
|
2965
2861
|
## `sanity projects list`
|
|
2966
2862
|
|
|
2967
|
-
|
|
2863
|
+
List your projects
|
|
2968
2864
|
|
|
2969
2865
|
```
|
|
2970
2866
|
USAGE
|
|
2971
2867
|
$ sanity projects list [--order asc|desc] [--sort id|members|name|url|created]
|
|
2972
2868
|
|
|
2973
2869
|
FLAGS
|
|
2974
|
-
--order=<option> [default: desc]
|
|
2870
|
+
--order=<option> [default: desc] Sort direction
|
|
2975
2871
|
<options: asc|desc>
|
|
2976
|
-
--sort=<option> [default: created]
|
|
2872
|
+
--sort=<option> [default: created] Sort field
|
|
2977
2873
|
<options: id|members|name|url|created>
|
|
2978
2874
|
|
|
2979
2875
|
DESCRIPTION
|
|
2980
|
-
|
|
2876
|
+
List your projects
|
|
2981
2877
|
|
|
2982
2878
|
EXAMPLES
|
|
2983
2879
|
List projects
|
|
2984
2880
|
|
|
2985
2881
|
$ sanity projects list
|
|
2986
2882
|
|
|
2987
|
-
List
|
|
2883
|
+
List projects sorted by member count, ascending
|
|
2988
2884
|
|
|
2989
2885
|
$ sanity projects list --sort=members --order=asc
|
|
2990
2886
|
```
|
|
2991
2887
|
|
|
2992
|
-
_See code: [src/commands/projects/list.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/projects/list.ts)_
|
|
2993
|
-
|
|
2994
2888
|
## `sanity schemas delete`
|
|
2995
2889
|
|
|
2996
2890
|
Delete schema documents by id
|
|
@@ -3021,8 +2915,6 @@ EXAMPLES
|
|
|
3021
2915
|
sanity.workspace.schema.workspaceName,prefix.sanity.workspace.schema.otherWorkspace
|
|
3022
2916
|
```
|
|
3023
2917
|
|
|
3024
|
-
_See code: [src/commands/schemas/delete.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/schemas/delete.ts)_
|
|
3025
|
-
|
|
3026
2918
|
## `sanity schemas deploy`
|
|
3027
2919
|
|
|
3028
2920
|
Deploy schema documents into workspace datasets.
|
|
@@ -3033,7 +2925,7 @@ USAGE
|
|
|
3033
2925
|
<name>]
|
|
3034
2926
|
|
|
3035
2927
|
FLAGS
|
|
3036
|
-
--[no-]extract-manifest
|
|
2928
|
+
--[no-]extract-manifest Regenerate manifest before deploying (use --no-extract-manifest to skip)
|
|
3037
2929
|
--manifest-dir=<directory> [default: ./dist/static] Directory containing manifest file
|
|
3038
2930
|
--tag=<tag> Add a tag suffix to the schema id
|
|
3039
2931
|
--verbose Print detailed information during deployment
|
|
@@ -3042,10 +2934,9 @@ FLAGS
|
|
|
3042
2934
|
DESCRIPTION
|
|
3043
2935
|
Deploy schema documents into workspace datasets.
|
|
3044
2936
|
|
|
3045
|
-
|
|
2937
|
+
Note: This command is experimental and subject to change.
|
|
3046
2938
|
|
|
3047
|
-
|
|
3048
|
-
To re-use an existing manifest file, use --no-extract-manifest.
|
|
2939
|
+
Regenerates a manifest file by default. To re-use an existing manifest, use --no-extract-manifest.
|
|
3049
2940
|
|
|
3050
2941
|
EXAMPLES
|
|
3051
2942
|
Deploy all workspace schemas
|
|
@@ -3057,11 +2948,9 @@ EXAMPLES
|
|
|
3057
2948
|
$ sanity schemas deploy --workspace default
|
|
3058
2949
|
```
|
|
3059
2950
|
|
|
3060
|
-
_See code: [src/commands/schemas/deploy.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/schemas/deploy.ts)_
|
|
3061
|
-
|
|
3062
2951
|
## `sanity schemas extract`
|
|
3063
2952
|
|
|
3064
|
-
|
|
2953
|
+
Extract a JSON representation of a Sanity schema within a Studio context.
|
|
3065
2954
|
|
|
3066
2955
|
```
|
|
3067
2956
|
USAGE
|
|
@@ -3070,17 +2959,16 @@ USAGE
|
|
|
3070
2959
|
|
|
3071
2960
|
FLAGS
|
|
3072
2961
|
--enforce-required-fields Makes the schema generated treat fields marked as required as non-optional
|
|
3073
|
-
--format=<format> [default: groq-type-nodes]
|
|
3074
|
-
the moment.
|
|
2962
|
+
--format=<format> [default: groq-type-nodes] Output format (currently only groq-type-nodes)
|
|
3075
2963
|
--path=<value> Optional path to specify destination of the schema file
|
|
3076
2964
|
--watch Enable watch mode to re-extract schema on file changes
|
|
3077
2965
|
--watch-patterns=<glob>... Additional glob pattern(s) to watch (can be specified multiple times)
|
|
3078
2966
|
--workspace=<name> The name of the workspace to generate a schema for
|
|
3079
2967
|
|
|
3080
2968
|
DESCRIPTION
|
|
3081
|
-
|
|
2969
|
+
Extract a JSON representation of a Sanity schema within a Studio context.
|
|
3082
2970
|
|
|
3083
|
-
|
|
2971
|
+
Note: This command is experimental and subject to change.
|
|
3084
2972
|
|
|
3085
2973
|
EXAMPLES
|
|
3086
2974
|
Extracts schema types in a Sanity project with more than one workspace
|
|
@@ -3096,11 +2984,9 @@ EXAMPLES
|
|
|
3096
2984
|
$ sanity schemas extract --watch --watch-patterns "lib/**/*.ts"
|
|
3097
2985
|
```
|
|
3098
2986
|
|
|
3099
|
-
_See code: [src/commands/schemas/extract.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/schemas/extract.ts)_
|
|
3100
|
-
|
|
3101
2987
|
## `sanity schemas list`
|
|
3102
2988
|
|
|
3103
|
-
|
|
2989
|
+
List all schemas in the current dataset.
|
|
3104
2990
|
|
|
3105
2991
|
```
|
|
3106
2992
|
USAGE
|
|
@@ -3111,12 +2997,11 @@ FLAGS
|
|
|
3111
2997
|
--json Get schema as json
|
|
3112
2998
|
|
|
3113
2999
|
DESCRIPTION
|
|
3114
|
-
|
|
3000
|
+
List all schemas in the current dataset.
|
|
3115
3001
|
|
|
3116
|
-
|
|
3002
|
+
Note: This command is experimental and subject to change.
|
|
3117
3003
|
|
|
3118
|
-
|
|
3119
|
-
To re-use an existing manifest file, use --no-extract-manifest.
|
|
3004
|
+
Regenerates a manifest file by default. To reuse an existing manifest, use --no-extract-manifest.
|
|
3120
3005
|
|
|
3121
3006
|
EXAMPLES
|
|
3122
3007
|
List all schemas found in any workspace dataset in a table
|
|
@@ -3136,8 +3021,6 @@ EXAMPLES
|
|
|
3136
3021
|
$ sanity schemas list --json --id _.schemas.workspaceName
|
|
3137
3022
|
```
|
|
3138
3023
|
|
|
3139
|
-
_See code: [src/commands/schemas/list.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/schemas/list.ts)_
|
|
3140
|
-
|
|
3141
3024
|
## `sanity schemas validate`
|
|
3142
3025
|
|
|
3143
3026
|
Validates all schema types specified in a workspace
|
|
@@ -3179,68 +3062,60 @@ EXAMPLES
|
|
|
3179
3062
|
$ sanity schemas validate --debug-metafile-path metafile.json
|
|
3180
3063
|
```
|
|
3181
3064
|
|
|
3182
|
-
_See code: [src/commands/schemas/validate.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/schemas/validate.ts)_
|
|
3183
|
-
|
|
3184
3065
|
## `sanity telemetry disable`
|
|
3185
3066
|
|
|
3186
|
-
Disable telemetry for your
|
|
3067
|
+
Disable telemetry for your account
|
|
3187
3068
|
|
|
3188
3069
|
```
|
|
3189
3070
|
USAGE
|
|
3190
3071
|
$ sanity telemetry disable
|
|
3191
3072
|
|
|
3192
3073
|
DESCRIPTION
|
|
3193
|
-
Disable telemetry for your
|
|
3074
|
+
Disable telemetry for your account
|
|
3194
3075
|
|
|
3195
3076
|
EXAMPLES
|
|
3196
|
-
Disable telemetry for your
|
|
3077
|
+
Disable telemetry for your account
|
|
3197
3078
|
|
|
3198
3079
|
$ sanity telemetry telemetry disable
|
|
3199
3080
|
```
|
|
3200
3081
|
|
|
3201
|
-
_See code: [src/commands/telemetry/disable.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/telemetry/disable.ts)_
|
|
3202
|
-
|
|
3203
3082
|
## `sanity telemetry enable`
|
|
3204
3083
|
|
|
3205
|
-
Enable telemetry for your
|
|
3084
|
+
Enable telemetry for your account
|
|
3206
3085
|
|
|
3207
3086
|
```
|
|
3208
3087
|
USAGE
|
|
3209
3088
|
$ sanity telemetry enable
|
|
3210
3089
|
|
|
3211
3090
|
DESCRIPTION
|
|
3212
|
-
Enable telemetry for your
|
|
3091
|
+
Enable telemetry for your account
|
|
3213
3092
|
|
|
3214
3093
|
EXAMPLES
|
|
3215
|
-
Enable telemetry for your
|
|
3094
|
+
Enable telemetry for your account
|
|
3216
3095
|
|
|
3217
3096
|
$ sanity telemetry telemetry enable
|
|
3218
3097
|
```
|
|
3219
3098
|
|
|
3220
|
-
_See code: [src/commands/telemetry/enable.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/telemetry/enable.ts)_
|
|
3221
|
-
|
|
3222
3099
|
## `sanity telemetry status`
|
|
3223
3100
|
|
|
3224
|
-
Check telemetry
|
|
3101
|
+
Check telemetry status for your account
|
|
3225
3102
|
|
|
3226
3103
|
```
|
|
3227
3104
|
USAGE
|
|
3228
3105
|
$ sanity telemetry status
|
|
3229
3106
|
|
|
3230
3107
|
DESCRIPTION
|
|
3231
|
-
Check telemetry
|
|
3108
|
+
Check telemetry status for your account
|
|
3232
3109
|
|
|
3233
3110
|
EXAMPLES
|
|
3234
|
-
Check telemetry
|
|
3111
|
+
Check telemetry status for your account
|
|
3235
3112
|
|
|
3236
3113
|
$ sanity telemetry telemetry status
|
|
3237
3114
|
```
|
|
3238
3115
|
|
|
3239
|
-
_See code: [src/commands/telemetry/status.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/telemetry/status.ts)_
|
|
3240
|
-
|
|
3241
3116
|
## `sanity tokens add [LABEL]`
|
|
3242
3117
|
|
|
3243
|
-
Create a new API token for
|
|
3118
|
+
Create a new API token for the project
|
|
3244
3119
|
|
|
3245
3120
|
```
|
|
3246
3121
|
USAGE
|
|
@@ -3258,7 +3133,7 @@ OVERRIDE FLAGS
|
|
|
3258
3133
|
-p, --project-id=<id> Project ID to add token to (overrides CLI configuration)
|
|
3259
3134
|
|
|
3260
3135
|
DESCRIPTION
|
|
3261
|
-
Create a new API token for
|
|
3136
|
+
Create a new API token for the project
|
|
3262
3137
|
|
|
3263
3138
|
EXAMPLES
|
|
3264
3139
|
Create a token with a label
|
|
@@ -3282,11 +3157,9 @@ EXAMPLES
|
|
|
3282
3157
|
$ sanity tokens add "My Token" --project-id abc123 --role=editor
|
|
3283
3158
|
```
|
|
3284
3159
|
|
|
3285
|
-
_See code: [src/commands/tokens/add.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/tokens/add.ts)_
|
|
3286
|
-
|
|
3287
3160
|
## `sanity tokens delete [TOKENID]`
|
|
3288
3161
|
|
|
3289
|
-
Delete an API token from
|
|
3162
|
+
Delete an API token from the project
|
|
3290
3163
|
|
|
3291
3164
|
```
|
|
3292
3165
|
USAGE
|
|
@@ -3302,7 +3175,7 @@ OVERRIDE FLAGS
|
|
|
3302
3175
|
-p, --project-id=<id> Project ID to delete token from (overrides CLI configuration)
|
|
3303
3176
|
|
|
3304
3177
|
DESCRIPTION
|
|
3305
|
-
Delete an API token from
|
|
3178
|
+
Delete an API token from the project
|
|
3306
3179
|
|
|
3307
3180
|
EXAMPLES
|
|
3308
3181
|
Interactively select and delete a token
|
|
@@ -3322,11 +3195,9 @@ EXAMPLES
|
|
|
3322
3195
|
$ sanity tokens delete --project-id abc123
|
|
3323
3196
|
```
|
|
3324
3197
|
|
|
3325
|
-
_See code: [src/commands/tokens/delete.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/tokens/delete.ts)_
|
|
3326
|
-
|
|
3327
3198
|
## `sanity tokens list`
|
|
3328
3199
|
|
|
3329
|
-
List API tokens for the
|
|
3200
|
+
List API tokens for the project
|
|
3330
3201
|
|
|
3331
3202
|
```
|
|
3332
3203
|
USAGE
|
|
@@ -3339,10 +3210,10 @@ OVERRIDE FLAGS
|
|
|
3339
3210
|
-p, --project-id=<id> Project ID to list tokens for (overrides CLI configuration)
|
|
3340
3211
|
|
|
3341
3212
|
DESCRIPTION
|
|
3342
|
-
List API tokens for the
|
|
3213
|
+
List API tokens for the project
|
|
3343
3214
|
|
|
3344
3215
|
EXAMPLES
|
|
3345
|
-
List tokens for the
|
|
3216
|
+
List tokens for the project
|
|
3346
3217
|
|
|
3347
3218
|
$ sanity tokens list
|
|
3348
3219
|
|
|
@@ -3355,8 +3226,6 @@ EXAMPLES
|
|
|
3355
3226
|
$ sanity tokens list --project-id abc123
|
|
3356
3227
|
```
|
|
3357
3228
|
|
|
3358
|
-
_See code: [src/commands/tokens/list.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/tokens/list.ts)_
|
|
3359
|
-
|
|
3360
3229
|
## `sanity typegen generate`
|
|
3361
3230
|
|
|
3362
3231
|
Sanity TypeGen
|
|
@@ -3401,8 +3270,6 @@ EXAMPLES
|
|
|
3401
3270
|
$ sanity typegen generate
|
|
3402
3271
|
```
|
|
3403
3272
|
|
|
3404
|
-
_See code: [@sanity/codegen](https://github.com/sanity-io/codegen/blob/v6.0.2/src/commands/typegen/generate.ts)_
|
|
3405
|
-
|
|
3406
3273
|
## `sanity undeploy`
|
|
3407
3274
|
|
|
3408
3275
|
Removes the deployed Sanity Studio/App from Sanity hosting
|
|
@@ -3418,8 +3285,6 @@ DESCRIPTION
|
|
|
3418
3285
|
Removes the deployed Sanity Studio/App from Sanity hosting
|
|
3419
3286
|
```
|
|
3420
3287
|
|
|
3421
|
-
_See code: [src/commands/undeploy.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/undeploy.ts)_
|
|
3422
|
-
|
|
3423
3288
|
## `sanity users invite [EMAIL]`
|
|
3424
3289
|
|
|
3425
3290
|
Invite a new user to the project
|
|
@@ -3458,11 +3323,9 @@ EXAMPLES
|
|
|
3458
3323
|
$ sanity users invite pippi@sanity.io --project-id abc123
|
|
3459
3324
|
```
|
|
3460
3325
|
|
|
3461
|
-
_See code: [src/commands/users/invite.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/users/invite.ts)_
|
|
3462
|
-
|
|
3463
3326
|
## `sanity users list`
|
|
3464
3327
|
|
|
3465
|
-
List
|
|
3328
|
+
List project members
|
|
3466
3329
|
|
|
3467
3330
|
```
|
|
3468
3331
|
USAGE
|
|
@@ -3480,7 +3343,7 @@ OVERRIDE FLAGS
|
|
|
3480
3343
|
-p, --project-id=<id> Project ID to list users for (overrides CLI configuration)
|
|
3481
3344
|
|
|
3482
3345
|
DESCRIPTION
|
|
3483
|
-
List
|
|
3346
|
+
List project members
|
|
3484
3347
|
|
|
3485
3348
|
EXAMPLES
|
|
3486
3349
|
List all users of the project
|
|
@@ -3500,23 +3363,19 @@ EXAMPLES
|
|
|
3500
3363
|
$ sanity users list --project-id abc123
|
|
3501
3364
|
```
|
|
3502
3365
|
|
|
3503
|
-
_See code: [src/commands/users/list.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/users/list.ts)_
|
|
3504
|
-
|
|
3505
3366
|
## `sanity versions`
|
|
3506
3367
|
|
|
3507
|
-
|
|
3368
|
+
Show installed package versions
|
|
3508
3369
|
|
|
3509
3370
|
```
|
|
3510
3371
|
USAGE
|
|
3511
3372
|
$ sanity versions
|
|
3512
3373
|
|
|
3513
3374
|
DESCRIPTION
|
|
3514
|
-
|
|
3375
|
+
Show installed package versions
|
|
3515
3376
|
|
|
3516
3377
|
EXAMPLES
|
|
3517
3378
|
$ sanity versions
|
|
3518
3379
|
```
|
|
3519
3380
|
|
|
3520
|
-
_See code: [src/commands/versions.ts](https://github.com/sanity-io/cli/blob/v6.3.0/src/commands/versions.ts)_
|
|
3521
|
-
|
|
3522
3381
|
<!-- commandsstop -->
|