@sanity/cli 6.0.0-alpha.17 → 6.0.0-alpha.18
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 +833 -912
- package/dist/SanityHelp.js +74 -21
- package/dist/SanityHelp.js.map +1 -1
- package/dist/actions/build/buildApp.js +42 -15
- package/dist/actions/build/buildApp.js.map +1 -1
- package/dist/actions/build/buildStudio.js +21 -9
- package/dist/actions/build/buildStudio.js.map +1 -1
- package/dist/actions/build/buildVendorDependencies.js +3 -16
- package/dist/actions/build/buildVendorDependencies.js.map +1 -1
- package/dist/actions/build/checkStudioDependencyVersions.js +7 -7
- package/dist/actions/build/checkStudioDependencyVersions.js.map +1 -1
- package/dist/actions/build/createExternalFromImportMap.js +1 -1
- package/dist/actions/build/createExternalFromImportMap.js.map +1 -1
- package/dist/actions/build/determineBasePath.js +5 -2
- package/dist/actions/build/determineBasePath.js.map +1 -1
- package/dist/actions/build/handlePrereleaseVersions.js +44 -0
- package/dist/actions/build/handlePrereleaseVersions.js.map +1 -0
- package/dist/actions/build/types.js.map +1 -1
- package/dist/actions/dataset/create.js +7 -1
- package/dist/actions/dataset/create.js.map +1 -1
- package/dist/actions/dataset/resolveDataset.js +26 -0
- package/dist/actions/dataset/resolveDataset.js.map +1 -0
- package/dist/actions/deploy/deployApp.js +1 -8
- package/dist/actions/deploy/deployApp.js.map +1 -1
- package/dist/actions/deploy/deployStudio.js +1 -0
- package/dist/actions/deploy/deployStudio.js.map +1 -1
- package/dist/actions/dev/getDevServerConfig.js +5 -2
- package/dist/actions/dev/getDevServerConfig.js.map +1 -1
- package/dist/actions/dev/startStudioDevServer.js +8 -3
- package/dist/actions/dev/startStudioDevServer.js.map +1 -1
- package/dist/actions/documents/types.js.map +1 -1
- package/dist/actions/documents/validate.js +11 -2
- package/dist/actions/documents/validate.js.map +1 -1
- package/dist/actions/documents/validateDocuments.worker.js +2 -2
- package/dist/actions/documents/validateDocuments.worker.js.map +1 -1
- package/dist/actions/documents/validation/reporters/jsonReporter.js +1 -1
- package/dist/actions/documents/validation/reporters/jsonReporter.js.map +1 -1
- package/dist/actions/documents/validation/reporters/ndjsonReporter.js +1 -1
- package/dist/actions/documents/validation/reporters/ndjsonReporter.js.map +1 -1
- package/dist/actions/graphql/SchemaError.js +1 -1
- package/dist/actions/graphql/SchemaError.js.map +1 -1
- package/dist/actions/graphql/__tests__/fixtures/many-self-refs.js +540 -0
- package/dist/actions/graphql/__tests__/fixtures/many-self-refs.js.map +1 -0
- package/dist/actions/graphql/__tests__/fixtures/test-studio.js +1143 -0
- package/dist/actions/graphql/__tests__/fixtures/test-studio.js.map +1 -0
- package/dist/actions/graphql/__tests__/fixtures/union-refs.js +591 -0
- package/dist/actions/graphql/__tests__/fixtures/union-refs.js.map +1 -0
- package/dist/actions/graphql/__tests__/helpers.js +23 -0
- package/dist/actions/graphql/__tests__/helpers.js.map +1 -0
- package/dist/actions/graphql/extractFromSanitySchema.js +2 -1
- package/dist/actions/graphql/extractFromSanitySchema.js.map +1 -1
- package/dist/actions/graphql/gen1/generateTypeFilters.js +1 -1
- package/dist/actions/graphql/gen1/generateTypeFilters.js.map +1 -1
- package/dist/actions/graphql/gen1/generateTypeQueries.js +2 -1
- package/dist/actions/graphql/gen1/generateTypeQueries.js.map +1 -1
- package/dist/actions/graphql/gen2/generateTypeQueries.js +1 -1
- package/dist/actions/graphql/gen2/generateTypeQueries.js.map +1 -1
- package/dist/actions/graphql/gen3/generateTypeQueries.js +1 -1
- package/dist/actions/graphql/gen3/generateTypeQueries.js.map +1 -1
- package/dist/actions/graphql/getGraphQLAPIs.js +2 -10
- package/dist/actions/graphql/getGraphQLAPIs.js.map +1 -1
- package/dist/actions/graphql/getGraphQLAPIs.worker.js +1 -1
- package/dist/actions/graphql/getGraphQLAPIs.worker.js.map +1 -1
- package/dist/actions/graphql/types.js.map +1 -1
- package/dist/actions/init/bootstrapLocalTemplate.js +1 -1
- package/dist/actions/init/bootstrapLocalTemplate.js.map +1 -1
- package/dist/actions/manifest/extractAppManifest.js.map +1 -1
- package/dist/actions/manifest/extractManifest.js +1 -22
- package/dist/actions/manifest/extractManifest.js.map +1 -1
- package/dist/actions/manifest/types.js.map +1 -1
- package/dist/actions/schema/deploySchemas.js +57 -80
- package/dist/actions/schema/deploySchemas.js.map +1 -1
- package/dist/actions/schema/extractSanityWorkspace.worker.js +24 -0
- package/dist/actions/schema/extractSanityWorkspace.worker.js.map +1 -0
- package/dist/actions/schema/extractSchemaWatcher.js +1 -1
- package/dist/actions/schema/extractSchemaWatcher.js.map +1 -1
- package/dist/actions/schema/types.js +4 -0
- package/dist/actions/schema/types.js.map +1 -1
- package/dist/actions/schema/utils/schemaStoreValidation.js +1 -7
- package/dist/actions/schema/utils/schemaStoreValidation.js.map +1 -1
- package/dist/actions/schema/utils/uniqByProjectIdDataset.js +1 -1
- package/dist/actions/schema/utils/uniqByProjectIdDataset.js.map +1 -1
- package/dist/actions/schema/watchExtractSchema.js +2 -1
- package/dist/actions/schema/watchExtractSchema.js.map +1 -1
- package/dist/actions/versions/getFormatters.js +1 -1
- package/dist/actions/versions/getFormatters.js.map +1 -1
- package/dist/commands/backup/list.js +4 -1
- package/dist/commands/backup/list.js.map +1 -1
- package/dist/commands/dataset/copy.js +3 -1
- package/dist/commands/dataset/copy.js.map +1 -1
- package/dist/commands/dataset/create.js +12 -0
- package/dist/commands/dataset/create.js.map +1 -1
- package/dist/commands/dataset/embeddings/disable.js +62 -0
- package/dist/commands/dataset/embeddings/disable.js.map +1 -0
- package/dist/commands/dataset/embeddings/enable.js +128 -0
- package/dist/commands/dataset/embeddings/enable.js.map +1 -0
- package/dist/commands/dataset/embeddings/status.js +61 -0
- package/dist/commands/dataset/embeddings/status.js.map +1 -0
- package/dist/commands/debug.js +2 -1
- package/dist/commands/debug.js.map +1 -1
- package/dist/commands/documents/create.js +2 -1
- package/dist/commands/documents/create.js.map +1 -1
- package/dist/commands/graphql/deploy.js +1 -1
- package/dist/commands/graphql/deploy.js.map +1 -1
- package/dist/commands/hook/logs.js +1 -1
- package/dist/commands/hook/logs.js.map +1 -1
- package/dist/commands/init.js +13 -7
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/manage.js +0 -1
- package/dist/commands/manage.js.map +1 -1
- package/dist/commands/media/create-aspect.js +1 -1
- package/dist/commands/media/create-aspect.js.map +1 -1
- package/dist/commands/projects/list.js +2 -1
- package/dist/commands/projects/list.js.map +1 -1
- package/dist/commands/schema/deploy.js +11 -27
- package/dist/commands/schema/deploy.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/exports/index.d.ts +62 -2
- package/dist/exports/index.js.map +1 -1
- package/dist/prompts/selectMediaLibrary.js +1 -1
- package/dist/prompts/selectMediaLibrary.js.map +1 -1
- package/dist/services/datasets.js +7 -5
- package/dist/services/datasets.js.map +1 -1
- package/dist/services/embeddings.js +25 -0
- package/dist/services/embeddings.js.map +1 -0
- package/dist/services/graphql.js.map +1 -1
- package/dist/services/schemas.js +1 -1
- package/dist/services/schemas.js.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/util/compareDependencyVersions.js +28 -7
- package/dist/util/compareDependencyVersions.js.map +1 -1
- package/dist/util/errorMessages.js +0 -1
- package/dist/util/errorMessages.js.map +1 -1
- package/dist/util/packageManager/getPeerDependencies.js +44 -0
- package/dist/util/packageManager/getPeerDependencies.js.map +1 -0
- package/oclif.manifest.json +283 -149
- package/package.json +12 -13
- package/dist/actions/schema/schemaStoreTypes.js +0 -19
- package/dist/actions/schema/schemaStoreTypes.js.map +0 -1
- package/dist/actions/schema/utils/manifestExtractor.js +0 -29
- package/dist/actions/schema/utils/manifestExtractor.js.map +0 -1
- package/dist/actions/schema/utils/manifestReader.js +0 -71
- package/dist/actions/schema/utils/manifestReader.js.map +0 -1
- package/dist/util/workerChannels.js +0 -172
- package/dist/util/workerChannels.js.map +0 -1
package/README.md
CHANGED
|
@@ -38,6 +38,9 @@ Code for sanity cli
|
|
|
38
38
|
- [`sanity dataset copy [SOURCE] [TARGET]`](#sanity-dataset-copy-source-target)
|
|
39
39
|
- [`sanity dataset create [NAME]`](#sanity-dataset-create-name)
|
|
40
40
|
- [`sanity dataset delete DATASETNAME`](#sanity-dataset-delete-datasetname)
|
|
41
|
+
- [`sanity dataset embeddings disable [DATASET]`](#sanity-dataset-embeddings-disable-dataset)
|
|
42
|
+
- [`sanity dataset embeddings enable [DATASET]`](#sanity-dataset-embeddings-enable-dataset)
|
|
43
|
+
- [`sanity dataset embeddings status [DATASET]`](#sanity-dataset-embeddings-status-dataset)
|
|
41
44
|
- [`sanity dataset export [NAME] [DESTINATION]`](#sanity-dataset-export-name-destination)
|
|
42
45
|
- [`sanity dataset import SOURCE`](#sanity-dataset-import-source)
|
|
43
46
|
- [`sanity dataset list`](#sanity-dataset-list)
|
|
@@ -116,7 +119,7 @@ Disable backup for a dataset.
|
|
|
116
119
|
|
|
117
120
|
```
|
|
118
121
|
USAGE
|
|
119
|
-
$ sanity backup disable [DATASET]
|
|
122
|
+
$ pnpm exec sanity backup disable [DATASET]
|
|
120
123
|
|
|
121
124
|
ARGUMENTS
|
|
122
125
|
[DATASET] Dataset name to disable backup for
|
|
@@ -127,14 +130,14 @@ DESCRIPTION
|
|
|
127
130
|
EXAMPLES
|
|
128
131
|
Interactively disable backup for a dataset
|
|
129
132
|
|
|
130
|
-
$ sanity backup disable
|
|
133
|
+
$ pnpm exec sanity backup disable
|
|
131
134
|
|
|
132
135
|
Disable backup for the production dataset
|
|
133
136
|
|
|
134
|
-
$ sanity backup disable production
|
|
137
|
+
$ pnpm exec sanity backup disable production
|
|
135
138
|
```
|
|
136
139
|
|
|
137
|
-
_See code: [src/commands/backup/disable.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
140
|
+
_See code: [src/commands/backup/disable.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/backup/disable.ts)_
|
|
138
141
|
|
|
139
142
|
## `sanity backup download [DATASET]`
|
|
140
143
|
|
|
@@ -142,16 +145,14 @@ Download a dataset backup to a local file.
|
|
|
142
145
|
|
|
143
146
|
```
|
|
144
147
|
USAGE
|
|
145
|
-
$ sanity backup download [DATASET] [--backup-id <value>] [--concurrency
|
|
146
|
-
<value>] [--out <value>] [--overwrite]
|
|
148
|
+
$ pnpm exec sanity backup download [DATASET] [--backup-id <value>] [--concurrency <value>] [--out <value>] [--overwrite]
|
|
147
149
|
|
|
148
150
|
ARGUMENTS
|
|
149
151
|
[DATASET] Dataset name to download backup from
|
|
150
152
|
|
|
151
153
|
FLAGS
|
|
152
154
|
--backup-id=<value> The backup ID to download
|
|
153
|
-
--concurrency=<value> [default: 10] Concurrent number of backup item downloads
|
|
154
|
-
(max: 24)
|
|
155
|
+
--concurrency=<value> [default: 10] Concurrent number of backup item downloads (max: 24)
|
|
155
156
|
--out=<value> The file or directory path the backup should download to
|
|
156
157
|
--overwrite Allows overwriting of existing backup file
|
|
157
158
|
|
|
@@ -161,24 +162,22 @@ DESCRIPTION
|
|
|
161
162
|
EXAMPLES
|
|
162
163
|
Interactively download a backup
|
|
163
164
|
|
|
164
|
-
$ sanity backup download
|
|
165
|
+
$ pnpm exec sanity backup download
|
|
165
166
|
|
|
166
167
|
Download a specific backup for the production dataset
|
|
167
168
|
|
|
168
|
-
$ sanity backup download production --backup-id 2024-01-01-backup-1
|
|
169
|
+
$ pnpm exec sanity backup download production --backup-id 2024-01-01-backup-1
|
|
169
170
|
|
|
170
171
|
Download backup to a specific file
|
|
171
172
|
|
|
172
|
-
$ sanity backup download production --backup-id 2024-01-01-backup-2 --out
|
|
173
|
-
/path/to/file
|
|
173
|
+
$ pnpm exec sanity backup download production --backup-id 2024-01-01-backup-2 --out /path/to/file
|
|
174
174
|
|
|
175
175
|
Download backup and overwrite existing file
|
|
176
176
|
|
|
177
|
-
$ sanity backup download production --backup-id 2024-01-01-backup-3 --out
|
|
178
|
-
/path/to/file --overwrite
|
|
177
|
+
$ pnpm exec sanity backup download production --backup-id 2024-01-01-backup-3 --out /path/to/file --overwrite
|
|
179
178
|
```
|
|
180
179
|
|
|
181
|
-
_See code: [src/commands/backup/download.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
180
|
+
_See code: [src/commands/backup/download.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/backup/download.ts)_
|
|
182
181
|
|
|
183
182
|
## `sanity backup enable [DATASET]`
|
|
184
183
|
|
|
@@ -186,7 +185,7 @@ Enable backup for a dataset.
|
|
|
186
185
|
|
|
187
186
|
```
|
|
188
187
|
USAGE
|
|
189
|
-
$ sanity backup enable [DATASET]
|
|
188
|
+
$ pnpm exec sanity backup enable [DATASET]
|
|
190
189
|
|
|
191
190
|
ARGUMENTS
|
|
192
191
|
[DATASET] Dataset name to enable backup for
|
|
@@ -197,14 +196,14 @@ DESCRIPTION
|
|
|
197
196
|
EXAMPLES
|
|
198
197
|
Interactively enable backup for a dataset
|
|
199
198
|
|
|
200
|
-
$ sanity backup enable
|
|
199
|
+
$ pnpm exec sanity backup enable
|
|
201
200
|
|
|
202
201
|
Enable backup for the production dataset
|
|
203
202
|
|
|
204
|
-
$ sanity backup enable production
|
|
203
|
+
$ pnpm exec sanity backup enable production
|
|
205
204
|
```
|
|
206
205
|
|
|
207
|
-
_See code: [src/commands/backup/enable.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
206
|
+
_See code: [src/commands/backup/enable.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/backup/enable.ts)_
|
|
208
207
|
|
|
209
208
|
## `sanity backup list [DATASET]`
|
|
210
209
|
|
|
@@ -212,18 +211,15 @@ List available backups for a dataset.
|
|
|
212
211
|
|
|
213
212
|
```
|
|
214
213
|
USAGE
|
|
215
|
-
$ sanity backup list [DATASET] [--after <value>] [--before <value>] [-l
|
|
216
|
-
<value>]
|
|
214
|
+
$ pnpm exec sanity backup list [DATASET] [--after <value>] [--before <value>] [-l <value>]
|
|
217
215
|
|
|
218
216
|
ARGUMENTS
|
|
219
217
|
[DATASET] Dataset name to list backups for
|
|
220
218
|
|
|
221
219
|
FLAGS
|
|
222
220
|
-l, --limit=<value> [default: 30] Maximum number of backups returned
|
|
223
|
-
--after=<value> Only return backups after this date (inclusive,
|
|
224
|
-
|
|
225
|
-
--before=<value> Only return backups before this date (exclusive,
|
|
226
|
-
YYYY-MM-DD format)
|
|
221
|
+
--after=<value> Only return backups after this date (inclusive, YYYY-MM-DD format)
|
|
222
|
+
--before=<value> Only return backups before this date (exclusive, YYYY-MM-DD format)
|
|
227
223
|
|
|
228
224
|
DESCRIPTION
|
|
229
225
|
List available backups for a dataset.
|
|
@@ -231,22 +227,22 @@ DESCRIPTION
|
|
|
231
227
|
EXAMPLES
|
|
232
228
|
List backups for a dataset interactively
|
|
233
229
|
|
|
234
|
-
$ sanity backup list
|
|
230
|
+
$ pnpm exec sanity backup list
|
|
235
231
|
|
|
236
232
|
List backups for the production dataset
|
|
237
233
|
|
|
238
|
-
$ sanity backup list production
|
|
234
|
+
$ pnpm exec sanity backup list production
|
|
239
235
|
|
|
240
236
|
List up to 50 backups for the production dataset
|
|
241
237
|
|
|
242
|
-
$ sanity backup list production --limit 50
|
|
238
|
+
$ pnpm exec sanity backup list production --limit 50
|
|
243
239
|
|
|
244
240
|
List up to 10 backups created after 2024-01-31
|
|
245
241
|
|
|
246
|
-
$ sanity backup list production --after 2024-01-31 --limit 10
|
|
242
|
+
$ pnpm exec sanity backup list production --after 2024-01-31 --limit 10
|
|
247
243
|
```
|
|
248
244
|
|
|
249
|
-
_See code: [src/commands/backup/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
245
|
+
_See code: [src/commands/backup/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/backup/list.ts)_
|
|
250
246
|
|
|
251
247
|
## `sanity blueprints add TYPE`
|
|
252
248
|
|
|
@@ -254,70 +250,51 @@ Add a function resource to a Blueprint
|
|
|
254
250
|
|
|
255
251
|
```
|
|
256
252
|
USAGE
|
|
257
|
-
$ sanity blueprints add TYPE [--example <value> | -n <value> | --fn-type
|
|
258
|
-
document-create|document-delete|document-update|document-publish|media-
|
|
259
|
-
|
|
260
|
-
--language ts|js | --javascript | --fn-helpers | --fn-installer
|
|
253
|
+
$ pnpm exec sanity blueprints add TYPE [--example <value> | -n <value> | --fn-type
|
|
254
|
+
document-create|document-delete|document-update|document-publish|media-library-asset-create|media-library-asset-upda
|
|
255
|
+
te|media-library-asset-delete... | --language ts|js | --javascript | --fn-helpers | --fn-installer
|
|
261
256
|
skip|npm|pnpm|yarn] [-i | ]
|
|
262
257
|
|
|
263
258
|
ARGUMENTS
|
|
264
259
|
TYPE (function) Type of resource to add (only "function" is supported)
|
|
265
260
|
|
|
266
261
|
FLAGS
|
|
267
|
-
-i, --install
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
Which package manager to use when installing the @sanity/functions helpers
|
|
282
|
-
<options: skip|npm|pnpm|yarn>
|
|
283
|
-
|
|
284
|
-
--fn-type=<option>...
|
|
285
|
-
Document change event(s) that should trigger the function; you can specify
|
|
286
|
-
multiple events by specifying this flag multiple times
|
|
287
|
-
<options:
|
|
288
|
-
document-create|document-delete|document-update|document-publish|media-librar
|
|
289
|
-
y-asset-create|media-library-asset-update|media-library-asset-delete>
|
|
290
|
-
|
|
291
|
-
--javascript
|
|
292
|
-
Use JavaScript instead of TypeScript
|
|
293
|
-
|
|
294
|
-
--language=<option>
|
|
295
|
-
[default: ts] Language of the new function
|
|
296
|
-
<options: ts|js>
|
|
262
|
+
-i, --install Shortcut for --fn-installer npm
|
|
263
|
+
-n, --name=<value> Name of the resource to add
|
|
264
|
+
--example=<value> Example to use for the function resource. Discover examples at
|
|
265
|
+
https://www.sanity.io/exchange/type=recipes/by=sanity
|
|
266
|
+
--[no-]fn-helpers Add helpers to the new function
|
|
267
|
+
--fn-installer=<option> Which package manager to use when installing the @sanity/functions helpers
|
|
268
|
+
<options: skip|npm|pnpm|yarn>
|
|
269
|
+
--fn-type=<option>... Document change event(s) that should trigger the function; you can specify multiple
|
|
270
|
+
events by specifying this flag multiple times
|
|
271
|
+
<options: document-create|document-delete|document-update|document-publish|media-library-
|
|
272
|
+
asset-create|media-library-asset-update|media-library-asset-delete>
|
|
273
|
+
--javascript Use JavaScript instead of TypeScript
|
|
274
|
+
--language=<option> [default: ts] Language of the new function
|
|
275
|
+
<options: ts|js>
|
|
297
276
|
|
|
298
277
|
DESCRIPTION
|
|
299
278
|
Add a function resource to a Blueprint
|
|
300
279
|
|
|
301
|
-
Scaffolds a new Sanity Function in your Blueprint. Functions are serverless
|
|
302
|
-
|
|
303
|
-
media library events.
|
|
280
|
+
Scaffolds a new Sanity Function in your Blueprint. Functions are serverless handlers triggered by document events
|
|
281
|
+
(create, update, delete, publish) or media library events.
|
|
304
282
|
|
|
305
|
-
After adding a function, use 'functions dev' to test locally, then 'blueprints
|
|
306
|
-
deploy' to publish it.
|
|
283
|
+
After adding a function, use 'functions dev' to test locally, then 'blueprints deploy' to publish it.
|
|
307
284
|
|
|
308
285
|
EXAMPLES
|
|
309
|
-
$ sanity blueprints add function
|
|
286
|
+
$ pnpm exec sanity blueprints add function
|
|
310
287
|
|
|
311
|
-
$ sanity blueprints add function --helpers
|
|
288
|
+
$ pnpm exec sanity blueprints add function --helpers
|
|
312
289
|
|
|
313
|
-
$ sanity blueprints add function --name my-function
|
|
290
|
+
$ pnpm exec sanity blueprints add function --name my-function
|
|
314
291
|
|
|
315
|
-
$ sanity blueprints add function --name my-function --fn-type document-create
|
|
292
|
+
$ pnpm exec sanity blueprints add function --name my-function --fn-type document-create
|
|
316
293
|
|
|
317
|
-
$ sanity blueprints add function --name my-function --fn-type document-create --fn-type document-update --lang js
|
|
294
|
+
$ pnpm exec sanity blueprints add function --name my-function --fn-type document-create --fn-type document-update --lang js
|
|
318
295
|
```
|
|
319
296
|
|
|
320
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
297
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.1.0/src/commands/blueprints/add.ts)_
|
|
321
298
|
|
|
322
299
|
## `sanity blueprints config`
|
|
323
300
|
|
|
@@ -325,40 +302,34 @@ View or edit the local Blueprint configuration
|
|
|
325
302
|
|
|
326
303
|
```
|
|
327
304
|
USAGE
|
|
328
|
-
$ sanity blueprints config [--project-id <value> -e] [--stack
|
|
305
|
+
$ pnpm exec sanity blueprints config [--project-id <value> -e] [--stack <value> ]
|
|
329
306
|
|
|
330
307
|
FLAGS
|
|
331
|
-
-e, --edit Modify the configuration interactively, or directly
|
|
332
|
-
|
|
333
|
-
--
|
|
334
|
-
Requires --edit flag
|
|
335
|
-
--stack-id=<value> Directly set the Stack ID in the configuration.
|
|
336
|
-
Requires --edit flag
|
|
308
|
+
-e, --edit Modify the configuration interactively, or directly when combined with ID flags.
|
|
309
|
+
--project-id=<value> Directly set the project ID in the configuration. Requires --edit flag
|
|
310
|
+
--stack=<value> Stack name or ID to set in the configuration. Requires --edit flag
|
|
337
311
|
|
|
338
312
|
DESCRIPTION
|
|
339
313
|
View or edit the local Blueprint configuration
|
|
340
314
|
|
|
341
|
-
Manages the local Blueprint configuration, which links your Blueprint to a
|
|
342
|
-
Sanity project and Stack.
|
|
315
|
+
Manages the local Blueprint configuration, which links your Blueprint to a Sanity project and Stack.
|
|
343
316
|
|
|
344
|
-
Without flags, displays the current configuration. Use --edit to interactively
|
|
345
|
-
|
|
346
|
-
(useful for scripting and automation).
|
|
317
|
+
Without flags, displays the current configuration. Use --edit to interactively modify settings, or combine --edit with
|
|
318
|
+
ID flags to update values directly (useful for scripting and automation).
|
|
347
319
|
|
|
348
|
-
If you need to switch your Blueprint to a different Stack, use --edit
|
|
349
|
-
--stack-id.
|
|
320
|
+
If you need to switch your Blueprint to a different Stack, use --edit --stack.
|
|
350
321
|
|
|
351
322
|
EXAMPLES
|
|
352
|
-
$ sanity blueprints config
|
|
323
|
+
$ pnpm exec sanity blueprints config
|
|
353
324
|
|
|
354
|
-
$ sanity blueprints config --edit
|
|
325
|
+
$ pnpm exec sanity blueprints config --edit
|
|
355
326
|
|
|
356
|
-
$ sanity blueprints config --edit --project-id <projectId>
|
|
327
|
+
$ pnpm exec sanity blueprints config --edit --project-id <projectId>
|
|
357
328
|
|
|
358
|
-
$ sanity blueprints config --edit --project-id <projectId> --stack-id
|
|
329
|
+
$ pnpm exec sanity blueprints config --edit --project-id <projectId> --stack <name-or-id>
|
|
359
330
|
```
|
|
360
331
|
|
|
361
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
332
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.1.0/src/commands/blueprints/config.ts)_
|
|
362
333
|
|
|
363
334
|
## `sanity blueprints deploy`
|
|
364
335
|
|
|
@@ -366,32 +337,32 @@ Deploy the local Blueprint to the remote Stack
|
|
|
366
337
|
|
|
367
338
|
```
|
|
368
339
|
USAGE
|
|
369
|
-
$ sanity blueprints deploy [--no-wait]
|
|
340
|
+
$ pnpm exec sanity blueprints deploy [--stack <value>] [--no-wait]
|
|
370
341
|
|
|
371
342
|
FLAGS
|
|
372
|
-
--no-wait
|
|
343
|
+
--no-wait Do not wait for Stack deployment to complete
|
|
344
|
+
--stack=<value> Stack name or ID to use instead of the locally configured Stack
|
|
373
345
|
|
|
374
346
|
DESCRIPTION
|
|
375
347
|
Deploy the local Blueprint to the remote Stack
|
|
376
348
|
|
|
377
|
-
Pushes your local Blueprint configuration to the remote Stack; provisioning,
|
|
378
|
-
|
|
379
|
-
|
|
349
|
+
Pushes your local Blueprint configuration to the remote Stack; provisioning, updating, or destroying resources as
|
|
350
|
+
needed. This is the primary command for applying infrastructure changes.
|
|
351
|
+
|
|
352
|
+
Before deploying, run 'blueprints plan' to preview changes. After deployment, use 'blueprints info' to verify Stack
|
|
353
|
+
status or 'blueprints logs' to monitor activity.
|
|
380
354
|
|
|
381
|
-
|
|
382
|
-
use 'blueprints info' to verify Stack status or 'blueprints logs' to monitor
|
|
383
|
-
activity.
|
|
355
|
+
Use --no-wait to queue the deployment and return immediately without waiting for completion.
|
|
384
356
|
|
|
385
|
-
|
|
386
|
-
for completion.
|
|
357
|
+
Set SANITY_ASSET_TIMEOUT (seconds) to override the 60-second timeout for processing resource assets.
|
|
387
358
|
|
|
388
359
|
EXAMPLES
|
|
389
|
-
$ sanity blueprints deploy
|
|
360
|
+
$ pnpm exec sanity blueprints deploy
|
|
390
361
|
|
|
391
|
-
$ sanity blueprints deploy --no-wait
|
|
362
|
+
$ pnpm exec sanity blueprints deploy --no-wait
|
|
392
363
|
```
|
|
393
364
|
|
|
394
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
365
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.1.0/src/commands/blueprints/deploy.ts)_
|
|
395
366
|
|
|
396
367
|
## `sanity blueprints destroy`
|
|
397
368
|
|
|
@@ -399,36 +370,31 @@ Destroy the remote Stack deployment and its resources (will not delete local fil
|
|
|
399
370
|
|
|
400
371
|
```
|
|
401
372
|
USAGE
|
|
402
|
-
$ sanity blueprints destroy [--project-id <value> --stack
|
|
403
|
-
[--no-wait]
|
|
373
|
+
$ pnpm exec sanity blueprints destroy [--project-id <value> --stack <value> --force] [--no-wait]
|
|
404
374
|
|
|
405
375
|
FLAGS
|
|
406
376
|
--force Force Stack destruction (skip confirmation)
|
|
407
377
|
--no-wait Do not wait for Stack destruction to complete
|
|
408
378
|
--project-id=<value> Project associated with the Stack
|
|
409
|
-
--stack
|
|
379
|
+
--stack=<value> Stack name or ID to destroy (defaults to the locally configured Stack)
|
|
410
380
|
|
|
411
381
|
DESCRIPTION
|
|
412
|
-
Destroy the remote Stack deployment and its resources (will not delete local
|
|
413
|
-
files)
|
|
382
|
+
Destroy the remote Stack deployment and its resources (will not delete local files)
|
|
414
383
|
|
|
415
|
-
Permanently removes the remote Stack and all its provisioned resources. Your
|
|
416
|
-
|
|
417
|
-
'blueprints init' + 'blueprints deploy'.
|
|
384
|
+
Permanently removes the remote Stack and all its provisioned resources. Your local Blueprint files remain untouched,
|
|
385
|
+
allowing you to redeploy later with 'blueprints init' + 'blueprints deploy'.
|
|
418
386
|
|
|
419
|
-
This is a destructive operation. You will be prompted to confirm unless --force
|
|
420
|
-
is specified.
|
|
387
|
+
This is a destructive operation. You will be prompted to confirm unless --force is specified.
|
|
421
388
|
|
|
422
|
-
Use this to clean up test environments or decommission a Stack you no longer
|
|
423
|
-
need.
|
|
389
|
+
Use this to clean up test environments or decommission a Stack you no longer need.
|
|
424
390
|
|
|
425
391
|
EXAMPLES
|
|
426
|
-
$ sanity blueprints destroy
|
|
392
|
+
$ pnpm exec sanity blueprints destroy
|
|
427
393
|
|
|
428
|
-
$ sanity blueprints destroy --stack-id
|
|
394
|
+
$ pnpm exec sanity blueprints destroy --stack <name-or-id> --project-id <projectId> --force --no-wait
|
|
429
395
|
```
|
|
430
396
|
|
|
431
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
397
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.1.0/src/commands/blueprints/destroy.ts)_
|
|
432
398
|
|
|
433
399
|
## `sanity blueprints doctor`
|
|
434
400
|
|
|
@@ -436,27 +402,25 @@ Diagnose potential issues with local Blueprint and remote Stack configuration
|
|
|
436
402
|
|
|
437
403
|
```
|
|
438
404
|
USAGE
|
|
439
|
-
$ sanity blueprints doctor [--json] [-p <value>] [--verbose] [--fix]
|
|
405
|
+
$ pnpm exec sanity blueprints doctor [--json] [-p <value>] [--verbose] [--fix]
|
|
440
406
|
|
|
441
407
|
FLAGS
|
|
442
|
-
-p, --path=<value> [env: SANITY_BLUEPRINT_PATH] Path to a Blueprint file or
|
|
443
|
-
directory containing one
|
|
408
|
+
-p, --path=<value> [env: SANITY_BLUEPRINT_PATH] Path to a Blueprint file or directory containing one
|
|
444
409
|
--fix Interactively fix configuration issues
|
|
445
410
|
--json Format output as json.
|
|
446
|
-
--verbose
|
|
411
|
+
--[no-]verbose Verbose output; defaults to true
|
|
447
412
|
|
|
448
413
|
DESCRIPTION
|
|
449
414
|
Diagnose potential issues with local Blueprint and remote Stack configuration
|
|
450
415
|
|
|
451
|
-
Analyzes your local Blueprint and remote Stack configuration for common issues,
|
|
452
|
-
|
|
453
|
-
resources.
|
|
416
|
+
Analyzes your local Blueprint and remote Stack configuration for common issues, such as missing authentication,
|
|
417
|
+
invalid project references, or misconfigured resources.
|
|
454
418
|
|
|
455
|
-
Run this command when encountering errors with other Blueprint commands. Use
|
|
456
|
-
|
|
419
|
+
Run this command when encountering errors with other Blueprint commands. Use --fix to interactively resolve detected
|
|
420
|
+
issues.
|
|
457
421
|
```
|
|
458
422
|
|
|
459
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
423
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.1.0/src/commands/blueprints/doctor.ts)_
|
|
460
424
|
|
|
461
425
|
## `sanity blueprints info`
|
|
462
426
|
|
|
@@ -464,30 +428,29 @@ Show information about the local Blueprint's remote Stack deployment
|
|
|
464
428
|
|
|
465
429
|
```
|
|
466
430
|
USAGE
|
|
467
|
-
$ sanity blueprints info [--
|
|
431
|
+
$ pnpm exec sanity blueprints info [--stack <value>]
|
|
468
432
|
|
|
469
433
|
FLAGS
|
|
470
|
-
--
|
|
434
|
+
--stack=<value> Stack name or ID to use instead of the locally configured Stack
|
|
471
435
|
|
|
472
436
|
DESCRIPTION
|
|
473
437
|
Show information about the local Blueprint's remote Stack deployment
|
|
474
438
|
|
|
475
|
-
Displays the current state and metadata of your remote Stack deployment,
|
|
476
|
-
|
|
439
|
+
Displays the current state and metadata of your remote Stack deployment, including deployed resources, status, and
|
|
440
|
+
configuration.
|
|
477
441
|
|
|
478
|
-
Use this command to verify a deployment succeeded, check what resources are
|
|
479
|
-
|
|
442
|
+
Use this command to verify a deployment succeeded, check what resources are live, or confirm which Stack your local
|
|
443
|
+
Blueprint is connected to.
|
|
480
444
|
|
|
481
|
-
Run 'blueprints stacks' to see all available Stacks in your project or
|
|
482
|
-
organization.
|
|
445
|
+
Run 'blueprints stacks' to see all available Stacks in your project or organization.
|
|
483
446
|
|
|
484
447
|
EXAMPLES
|
|
485
|
-
$ sanity blueprints info
|
|
448
|
+
$ pnpm exec sanity blueprints info
|
|
486
449
|
|
|
487
|
-
$ sanity blueprints info --
|
|
450
|
+
$ pnpm exec sanity blueprints info --stack <name-or-id>
|
|
488
451
|
```
|
|
489
452
|
|
|
490
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
453
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.1.0/src/commands/blueprints/info.ts)_
|
|
491
454
|
|
|
492
455
|
## `sanity blueprints init [DIR]`
|
|
493
456
|
|
|
@@ -495,56 +458,49 @@ Initialize a local Blueprint and optionally provision a remote Stack deployment
|
|
|
495
458
|
|
|
496
459
|
```
|
|
497
460
|
USAGE
|
|
498
|
-
$ sanity blueprints init [DIR] [--verbose] [--dir <value>] [--example
|
|
499
|
-
<value> | --
|
|
500
|
-
<value>] [--project-id <value>]
|
|
461
|
+
$ pnpm exec sanity blueprints init [DIR] [--verbose] [--dir <value>] [--example <value> | --blueprint-type json|js|ts |
|
|
462
|
+
--stack-id <value> | --stack-name <value>] [--project-id <value>]
|
|
501
463
|
|
|
502
464
|
ARGUMENTS
|
|
503
465
|
[DIR] Directory to create the local Blueprint in
|
|
504
466
|
|
|
505
467
|
FLAGS
|
|
506
|
-
--blueprint-type=<option> Blueprint manifest type to use for the local
|
|
507
|
-
Blueprint
|
|
468
|
+
--blueprint-type=<option> Blueprint manifest type to use for the local Blueprint
|
|
508
469
|
<options: json|js|ts>
|
|
509
470
|
--dir=<value> Directory to create the local Blueprint in
|
|
510
471
|
--example=<value> Example to use for the local Blueprint
|
|
511
|
-
--project-id=<value> Sanity project ID used to scope local Blueprint and
|
|
512
|
-
remote Stack
|
|
472
|
+
--project-id=<value> Sanity project ID used to scope local Blueprint and remote Stack
|
|
513
473
|
--stack-id=<value> Existing Stack ID used to scope local Blueprint
|
|
514
|
-
--stack-name=<value> Name to use for a new Stack provisioned during
|
|
515
|
-
initialization
|
|
474
|
+
--stack-name=<value> Name to use for a new Stack provisioned during initialization
|
|
516
475
|
--verbose Verbose output
|
|
517
476
|
|
|
518
477
|
DESCRIPTION
|
|
519
478
|
Initialize a local Blueprint and optionally provision a remote Stack deployment
|
|
520
479
|
|
|
521
|
-
A Blueprint is your local infrastructure-as-code configuration that defines
|
|
522
|
-
|
|
523
|
-
target where your Blueprint is applied.
|
|
480
|
+
A Blueprint is your local infrastructure-as-code configuration that defines Sanity resources (datasets, functions,
|
|
481
|
+
etc.). A Stack is the remote deployment target where your Blueprint is applied.
|
|
524
482
|
[NOTE: Currently, accounts are limited to three (3) Stacks per project scope.]
|
|
525
483
|
|
|
526
|
-
This is typically the first command you run in a new project. It creates a
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
the scope and Stack IDs. This is .gitignored by default.
|
|
484
|
+
This is typically the first command you run in a new project. It creates a local Blueprint manifest file
|
|
485
|
+
(sanity.blueprint.ts, .js, or .json) and provisions a new remote Stack.
|
|
486
|
+
Additionally, a Blueprint configuration file is created in .sanity/ containing the scope and Stack IDs. This is
|
|
487
|
+
.gitignored by default.
|
|
531
488
|
|
|
532
|
-
After initialization, use 'blueprints plan' to preview changes, then
|
|
533
|
-
'blueprints deploy' to apply them.
|
|
489
|
+
After initialization, use 'blueprints plan' to preview changes, then 'blueprints deploy' to apply them.
|
|
534
490
|
|
|
535
491
|
EXAMPLES
|
|
536
|
-
$ sanity blueprints init
|
|
492
|
+
$ pnpm exec sanity blueprints init
|
|
537
493
|
|
|
538
|
-
$ sanity blueprints init [directory]
|
|
494
|
+
$ pnpm exec sanity blueprints init [directory]
|
|
539
495
|
|
|
540
|
-
$ sanity blueprints init --blueprint-type <json|js|ts>
|
|
496
|
+
$ pnpm exec sanity blueprints init --blueprint-type <json|js|ts>
|
|
541
497
|
|
|
542
|
-
$ sanity blueprints init --blueprint-type <json|js|ts> --project-id <projectId> --stack-id <stackId>
|
|
498
|
+
$ pnpm exec sanity blueprints init --blueprint-type <json|js|ts> --project-id <projectId> --stack-id <stackId>
|
|
543
499
|
|
|
544
|
-
$ sanity blueprints init --blueprint-type <json|js|ts> --stack-name <stackName>
|
|
500
|
+
$ pnpm exec sanity blueprints init --blueprint-type <json|js|ts> --stack-name <stackName>
|
|
545
501
|
```
|
|
546
502
|
|
|
547
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
503
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.1.0/src/commands/blueprints/init.ts)_
|
|
548
504
|
|
|
549
505
|
## `sanity blueprints logs`
|
|
550
506
|
|
|
@@ -552,29 +508,28 @@ Display logs for the current Blueprint's Stack deployment
|
|
|
552
508
|
|
|
553
509
|
```
|
|
554
510
|
USAGE
|
|
555
|
-
$ sanity blueprints logs [-w]
|
|
511
|
+
$ pnpm exec sanity blueprints logs [--stack <value>] [-w]
|
|
556
512
|
|
|
557
513
|
FLAGS
|
|
558
|
-
-w, --watch
|
|
514
|
+
-w, --watch Watch for new Stack logs (streaming mode)
|
|
515
|
+
--stack=<value> Stack name or ID to use instead of the locally configured Stack
|
|
559
516
|
|
|
560
517
|
DESCRIPTION
|
|
561
518
|
Display logs for the current Blueprint's Stack deployment
|
|
562
519
|
|
|
563
|
-
Retrieves Stack deployment logs, useful for debugging and monitoring deployment
|
|
564
|
-
activity.
|
|
520
|
+
Retrieves Stack deployment logs, useful for debugging and monitoring deployment activity.
|
|
565
521
|
|
|
566
522
|
Use --watch (-w) to stream logs in real-time.
|
|
567
523
|
|
|
568
|
-
If you're not seeing expected logs, verify your Stack is deployed with
|
|
569
|
-
'blueprints info'.
|
|
524
|
+
If you're not seeing expected logs, verify your Stack is deployed with 'blueprints info'.
|
|
570
525
|
|
|
571
526
|
EXAMPLES
|
|
572
|
-
$ sanity blueprints logs
|
|
527
|
+
$ pnpm exec sanity blueprints logs
|
|
573
528
|
|
|
574
|
-
$ sanity blueprints logs --watch
|
|
529
|
+
$ pnpm exec sanity blueprints logs --watch
|
|
575
530
|
```
|
|
576
531
|
|
|
577
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
532
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.1.0/src/commands/blueprints/logs.ts)_
|
|
578
533
|
|
|
579
534
|
## `sanity blueprints plan`
|
|
580
535
|
|
|
@@ -582,24 +537,25 @@ Enumerate resources to be deployed to the remote Stack - will not modify any res
|
|
|
582
537
|
|
|
583
538
|
```
|
|
584
539
|
USAGE
|
|
585
|
-
$ sanity blueprints plan
|
|
540
|
+
$ pnpm exec sanity blueprints plan [--stack <value>]
|
|
541
|
+
|
|
542
|
+
FLAGS
|
|
543
|
+
--stack=<value> Stack name or ID to use instead of the locally configured Stack
|
|
586
544
|
|
|
587
545
|
DESCRIPTION
|
|
588
|
-
Enumerate resources to be deployed to the remote Stack - will not modify any
|
|
589
|
-
resources
|
|
546
|
+
Enumerate resources to be deployed to the remote Stack - will not modify any resources
|
|
590
547
|
|
|
591
|
-
Use this command to preview what changes will be applied to your remote Stack
|
|
592
|
-
|
|
593
|
-
modified, or deleted.
|
|
548
|
+
Use this command to preview what changes will be applied to your remote Stack before deploying. This is a safe,
|
|
549
|
+
read-only operation—no resources are created, modified, or deleted.
|
|
594
550
|
|
|
595
|
-
Run 'blueprints plan' after making local changes to your Blueprint manifest to
|
|
596
|
-
|
|
551
|
+
Run 'blueprints plan' after making local changes to your Blueprint manifest to verify the expected diff. When ready,
|
|
552
|
+
run 'blueprints deploy' to apply changes.
|
|
597
553
|
|
|
598
554
|
EXAMPLES
|
|
599
|
-
$ sanity blueprints plan
|
|
555
|
+
$ pnpm exec sanity blueprints plan
|
|
600
556
|
```
|
|
601
557
|
|
|
602
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
558
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.1.0/src/commands/blueprints/plan.ts)_
|
|
603
559
|
|
|
604
560
|
## `sanity blueprints stacks`
|
|
605
561
|
|
|
@@ -607,30 +563,28 @@ List all remote Stack deployments (defaults to the current Blueprint's project s
|
|
|
607
563
|
|
|
608
564
|
```
|
|
609
565
|
USAGE
|
|
610
|
-
$ sanity blueprints stacks [--project-id <value> | ]
|
|
566
|
+
$ pnpm exec sanity blueprints stacks [--project-id <value> | ]
|
|
611
567
|
|
|
612
568
|
FLAGS
|
|
613
569
|
--project-id=<value> Project ID to show Stack deployments for
|
|
614
570
|
|
|
615
571
|
DESCRIPTION
|
|
616
|
-
List all remote Stack deployments (defaults to the current Blueprint's project
|
|
617
|
-
scope)
|
|
572
|
+
List all remote Stack deployments (defaults to the current Blueprint's project scope)
|
|
618
573
|
|
|
619
|
-
Shows all Stacks associated with a project or organization. By default, lists
|
|
620
|
-
Stacks scoped to the local Blueprint.
|
|
574
|
+
Shows all Stacks associated with a project or organization. By default, lists Stacks scoped to the local Blueprint.
|
|
621
575
|
|
|
622
|
-
Use this to discover existing Stacks you can scope a local Blueprint to (using
|
|
623
|
-
|
|
576
|
+
Use this to discover existing Stacks you can scope a local Blueprint to (using 'blueprints config --edit'), or to
|
|
577
|
+
audit what's deployed across your project.
|
|
624
578
|
|
|
625
579
|
EXAMPLES
|
|
626
|
-
$ sanity blueprints stacks
|
|
580
|
+
$ pnpm exec sanity blueprints stacks
|
|
627
581
|
|
|
628
|
-
$ sanity blueprints stacks --project-id <projectId>
|
|
582
|
+
$ pnpm exec sanity blueprints stacks --project-id <projectId>
|
|
629
583
|
|
|
630
|
-
$ sanity blueprints stacks --organization-id <organizationId>
|
|
584
|
+
$ pnpm exec sanity blueprints stacks --organization-id <organizationId>
|
|
631
585
|
```
|
|
632
586
|
|
|
633
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
587
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.1.0/src/commands/blueprints/stacks.ts)_
|
|
634
588
|
|
|
635
589
|
## `sanity build [OUTPUTDIR]`
|
|
636
590
|
|
|
@@ -638,31 +592,28 @@ Builds the Sanity Studio configuration into a static bundle
|
|
|
638
592
|
|
|
639
593
|
```
|
|
640
594
|
USAGE
|
|
641
|
-
$ sanity build [OUTPUTDIR] [--auto-updates] [--minify]
|
|
642
|
-
[--source-maps] [--stats] [-y]
|
|
595
|
+
$ pnpm exec sanity build [OUTPUTDIR] [--auto-updates] [--minify] [--source-maps] [--stats] [-y]
|
|
643
596
|
|
|
644
597
|
ARGUMENTS
|
|
645
598
|
[OUTPUTDIR] Output directory
|
|
646
599
|
|
|
647
600
|
FLAGS
|
|
648
|
-
-y, --yes Unattended mode, answers "yes" to any "yes/no" prompt
|
|
649
|
-
and otherwise uses defaults
|
|
601
|
+
-y, --yes Unattended mode, answers "yes" to any "yes/no" prompt and otherwise uses defaults
|
|
650
602
|
--[no-]auto-updates Enable/disable auto updates of studio versions
|
|
651
603
|
--[no-]minify Enable/disable minifying of built bundles
|
|
652
|
-
--[no-]source-maps Enable source maps for built bundles (increases size
|
|
653
|
-
of bundle)
|
|
604
|
+
--[no-]source-maps Enable source maps for built bundles (increases size of bundle)
|
|
654
605
|
--stats Show stats about the built bundles
|
|
655
606
|
|
|
656
607
|
DESCRIPTION
|
|
657
608
|
Builds the Sanity Studio configuration into a static bundle
|
|
658
609
|
|
|
659
610
|
EXAMPLES
|
|
660
|
-
$ sanity build
|
|
611
|
+
$ pnpm exec sanity build
|
|
661
612
|
|
|
662
|
-
$ sanity build --no-minify --source-maps
|
|
613
|
+
$ pnpm exec sanity build --no-minify --source-maps
|
|
663
614
|
```
|
|
664
615
|
|
|
665
|
-
_See code: [src/commands/build.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
616
|
+
_See code: [src/commands/build.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/build.ts)_
|
|
666
617
|
|
|
667
618
|
## `sanity codemod [CODEMODNAME]`
|
|
668
619
|
|
|
@@ -670,16 +621,14 @@ Updates Sanity Studio codebase with a code modification script
|
|
|
670
621
|
|
|
671
622
|
```
|
|
672
623
|
USAGE
|
|
673
|
-
$ sanity codemod [CODEMODNAME] [--dry] [--extensions <value>]
|
|
674
|
-
[--no-verify]
|
|
624
|
+
$ pnpm exec sanity codemod [CODEMODNAME] [--dry] [--extensions <value>] [--no-verify]
|
|
675
625
|
|
|
676
626
|
ARGUMENTS
|
|
677
627
|
[CODEMODNAME] Name of the codemod to run
|
|
678
628
|
|
|
679
629
|
FLAGS
|
|
680
630
|
--dry Dry run (no changes are made to files)
|
|
681
|
-
--extensions=<value> [default: js,ts,tsx] Transform files with these file
|
|
682
|
-
extensions (comma separated)
|
|
631
|
+
--extensions=<value> [default: js,ts,tsx] Transform files with these file extensions (comma separated)
|
|
683
632
|
--no-verify Skip verification steps before running codemod
|
|
684
633
|
|
|
685
634
|
DESCRIPTION
|
|
@@ -688,14 +637,14 @@ DESCRIPTION
|
|
|
688
637
|
EXAMPLES
|
|
689
638
|
Show available code mods
|
|
690
639
|
|
|
691
|
-
$ sanity codemod
|
|
640
|
+
$ pnpm exec sanity codemod
|
|
692
641
|
|
|
693
642
|
Run codemod to transform react-icons imports (dry run)
|
|
694
643
|
|
|
695
|
-
$ sanity codemod reactIconsV3 --dry
|
|
644
|
+
$ pnpm exec sanity codemod reactIconsV3 --dry
|
|
696
645
|
```
|
|
697
646
|
|
|
698
|
-
_See code: [src/commands/codemod.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
647
|
+
_See code: [src/commands/codemod.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/codemod.ts)_
|
|
699
648
|
|
|
700
649
|
## `sanity cors add ORIGIN`
|
|
701
650
|
|
|
@@ -703,14 +652,13 @@ Allow a new origin to use your project API through CORS
|
|
|
703
652
|
|
|
704
653
|
```
|
|
705
654
|
USAGE
|
|
706
|
-
$ sanity cors add ORIGIN [--credentials]
|
|
655
|
+
$ pnpm exec sanity cors add ORIGIN [--credentials]
|
|
707
656
|
|
|
708
657
|
ARGUMENTS
|
|
709
658
|
ORIGIN Origin to allow (e.g., https://example.com)
|
|
710
659
|
|
|
711
660
|
FLAGS
|
|
712
|
-
--[no-]credentials Allow credentials (token/cookie) to be sent from this
|
|
713
|
-
origin
|
|
661
|
+
--[no-]credentials Allow credentials (token/cookie) to be sent from this origin
|
|
714
662
|
|
|
715
663
|
DESCRIPTION
|
|
716
664
|
Allow a new origin to use your project API through CORS
|
|
@@ -718,18 +666,18 @@ DESCRIPTION
|
|
|
718
666
|
EXAMPLES
|
|
719
667
|
Interactively add a CORS origin
|
|
720
668
|
|
|
721
|
-
$ sanity cors add
|
|
669
|
+
$ pnpm exec sanity cors add
|
|
722
670
|
|
|
723
671
|
Add a localhost origin without credentials
|
|
724
672
|
|
|
725
|
-
$ sanity cors add http://localhost:3000 --no-credentials
|
|
673
|
+
$ pnpm exec sanity cors add http://localhost:3000 --no-credentials
|
|
726
674
|
|
|
727
675
|
Add a production origin with credentials allowed
|
|
728
676
|
|
|
729
|
-
$ sanity cors add https://myapp.com --credentials
|
|
677
|
+
$ pnpm exec sanity cors add https://myapp.com --credentials
|
|
730
678
|
```
|
|
731
679
|
|
|
732
|
-
_See code: [src/commands/cors/add.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
680
|
+
_See code: [src/commands/cors/add.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/cors/add.ts)_
|
|
733
681
|
|
|
734
682
|
## `sanity cors delete [ORIGIN]`
|
|
735
683
|
|
|
@@ -737,7 +685,7 @@ Delete an existing CORS origin from your project
|
|
|
737
685
|
|
|
738
686
|
```
|
|
739
687
|
USAGE
|
|
740
|
-
$ sanity cors delete [ORIGIN]
|
|
688
|
+
$ pnpm exec sanity cors delete [ORIGIN]
|
|
741
689
|
|
|
742
690
|
ARGUMENTS
|
|
743
691
|
[ORIGIN] Origin to delete (will prompt if not provided)
|
|
@@ -748,14 +696,14 @@ DESCRIPTION
|
|
|
748
696
|
EXAMPLES
|
|
749
697
|
Interactively select and delete a CORS origin
|
|
750
698
|
|
|
751
|
-
$ sanity cors delete
|
|
699
|
+
$ pnpm exec sanity cors delete
|
|
752
700
|
|
|
753
701
|
Delete a specific CORS origin
|
|
754
702
|
|
|
755
|
-
$ sanity cors delete https://example.com
|
|
703
|
+
$ pnpm exec sanity cors delete https://example.com
|
|
756
704
|
```
|
|
757
705
|
|
|
758
|
-
_See code: [src/commands/cors/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
706
|
+
_See code: [src/commands/cors/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/cors/delete.ts)_
|
|
759
707
|
|
|
760
708
|
## `sanity cors list`
|
|
761
709
|
|
|
@@ -763,7 +711,7 @@ List all origins allowed to access the API for this project
|
|
|
763
711
|
|
|
764
712
|
```
|
|
765
713
|
USAGE
|
|
766
|
-
$ sanity cors list
|
|
714
|
+
$ pnpm exec sanity cors list
|
|
767
715
|
|
|
768
716
|
DESCRIPTION
|
|
769
717
|
List all origins allowed to access the API for this project
|
|
@@ -771,10 +719,10 @@ DESCRIPTION
|
|
|
771
719
|
EXAMPLES
|
|
772
720
|
List CORS origins for the current project
|
|
773
721
|
|
|
774
|
-
$ sanity cors list
|
|
722
|
+
$ pnpm exec sanity cors list
|
|
775
723
|
```
|
|
776
724
|
|
|
777
|
-
_See code: [src/commands/cors/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
725
|
+
_See code: [src/commands/cors/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/cors/list.ts)_
|
|
778
726
|
|
|
779
727
|
## `sanity dataset alias create [ALIASNAME] [TARGETDATASET]`
|
|
780
728
|
|
|
@@ -782,34 +730,41 @@ Create a dataset alias within your project
|
|
|
782
730
|
|
|
783
731
|
```
|
|
784
732
|
USAGE
|
|
785
|
-
$ sanity dataset alias create [ALIASNAME] [TARGETDATASET]
|
|
733
|
+
$ pnpm exec sanity dataset alias create [ALIASNAME] [TARGETDATASET] [-p <value>]
|
|
786
734
|
|
|
787
735
|
ARGUMENTS
|
|
788
736
|
[ALIASNAME] Dataset alias name to create
|
|
789
737
|
[TARGETDATASET] Target dataset name to link the alias to
|
|
790
738
|
|
|
739
|
+
FLAGS
|
|
740
|
+
-p, --project-id=<value> Project ID to use. Overrides the project ID from the Sanity config.
|
|
741
|
+
|
|
791
742
|
DESCRIPTION
|
|
792
743
|
Create a dataset alias within your project
|
|
793
744
|
|
|
794
745
|
EXAMPLES
|
|
746
|
+
Create alias in a specific project
|
|
747
|
+
|
|
748
|
+
$ pnpm exec sanity dataset alias create --project-id abc123 conference conf-2025
|
|
749
|
+
|
|
795
750
|
Create an alias with interactive prompts
|
|
796
751
|
|
|
797
|
-
$ sanity dataset alias create
|
|
752
|
+
$ pnpm exec sanity dataset alias create
|
|
798
753
|
|
|
799
754
|
Create alias named "conference" with interactive dataset selection
|
|
800
755
|
|
|
801
|
-
$ sanity dataset alias create conference
|
|
756
|
+
$ pnpm exec sanity dataset alias create conference
|
|
802
757
|
|
|
803
758
|
Create alias "conference" linked to "conf-2025" dataset
|
|
804
759
|
|
|
805
|
-
$ sanity dataset alias create conference conf-2025
|
|
760
|
+
$ pnpm exec sanity dataset alias create conference conf-2025
|
|
806
761
|
|
|
807
762
|
Create alias with explicit ~ prefix
|
|
808
763
|
|
|
809
|
-
$ sanity dataset alias create ~conference conf-2025
|
|
764
|
+
$ pnpm exec sanity dataset alias create ~conference conf-2025
|
|
810
765
|
```
|
|
811
766
|
|
|
812
|
-
_See code: [src/commands/dataset/alias/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
767
|
+
_See code: [src/commands/dataset/alias/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/dataset/alias/create.ts)_
|
|
813
768
|
|
|
814
769
|
## `sanity dataset alias delete ALIASNAME`
|
|
815
770
|
|
|
@@ -817,13 +772,14 @@ Delete a dataset alias within your project
|
|
|
817
772
|
|
|
818
773
|
```
|
|
819
774
|
USAGE
|
|
820
|
-
$ sanity dataset alias delete ALIASNAME [--force]
|
|
775
|
+
$ pnpm exec sanity dataset alias delete ALIASNAME [-p <value>] [--force]
|
|
821
776
|
|
|
822
777
|
ARGUMENTS
|
|
823
778
|
ALIASNAME Dataset alias name to delete
|
|
824
779
|
|
|
825
780
|
FLAGS
|
|
826
|
-
--
|
|
781
|
+
-p, --project-id=<value> Project ID to use. Overrides the project ID from the Sanity config.
|
|
782
|
+
--force Skip confirmation prompt and delete immediately
|
|
827
783
|
|
|
828
784
|
DESCRIPTION
|
|
829
785
|
Delete a dataset alias within your project
|
|
@@ -831,18 +787,18 @@ DESCRIPTION
|
|
|
831
787
|
EXAMPLES
|
|
832
788
|
Delete alias named "conference" with confirmation prompt
|
|
833
789
|
|
|
834
|
-
$ sanity dataset alias delete conference
|
|
790
|
+
$ pnpm exec sanity dataset alias delete conference
|
|
835
791
|
|
|
836
792
|
Delete alias with explicit ~ prefix
|
|
837
793
|
|
|
838
|
-
$ sanity dataset alias delete ~conference
|
|
794
|
+
$ pnpm exec sanity dataset alias delete ~conference
|
|
839
795
|
|
|
840
796
|
Delete alias named "conference" without confirmation prompt
|
|
841
797
|
|
|
842
|
-
$ sanity dataset alias delete conference --force
|
|
798
|
+
$ pnpm exec sanity dataset alias delete conference --force
|
|
843
799
|
```
|
|
844
800
|
|
|
845
|
-
_See code: [src/commands/dataset/alias/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
801
|
+
_See code: [src/commands/dataset/alias/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/dataset/alias/delete.ts)_
|
|
846
802
|
|
|
847
803
|
## `sanity dataset alias link [ALIASNAME] [TARGETDATASET]`
|
|
848
804
|
|
|
@@ -850,14 +806,15 @@ Link a dataset alias to a dataset within your project
|
|
|
850
806
|
|
|
851
807
|
```
|
|
852
808
|
USAGE
|
|
853
|
-
$ sanity dataset alias link [ALIASNAME] [TARGETDATASET] [--force]
|
|
809
|
+
$ pnpm exec sanity dataset alias link [ALIASNAME] [TARGETDATASET] [-p <value>] [--force]
|
|
854
810
|
|
|
855
811
|
ARGUMENTS
|
|
856
812
|
[ALIASNAME] Dataset alias name to link
|
|
857
813
|
[TARGETDATASET] Target dataset name to link the alias to
|
|
858
814
|
|
|
859
815
|
FLAGS
|
|
860
|
-
--
|
|
816
|
+
-p, --project-id=<value> Project ID to use. Overrides the project ID from the Sanity config.
|
|
817
|
+
--force Skip confirmation prompt when relinking existing alias
|
|
861
818
|
|
|
862
819
|
DESCRIPTION
|
|
863
820
|
Link a dataset alias to a dataset within your project
|
|
@@ -865,26 +822,26 @@ DESCRIPTION
|
|
|
865
822
|
EXAMPLES
|
|
866
823
|
Link an alias with interactive prompts
|
|
867
824
|
|
|
868
|
-
$ sanity dataset alias link
|
|
825
|
+
$ pnpm exec sanity dataset alias link
|
|
869
826
|
|
|
870
827
|
Link alias named "conference" with interactive dataset selection
|
|
871
828
|
|
|
872
|
-
$ sanity dataset alias link conference
|
|
829
|
+
$ pnpm exec sanity dataset alias link conference
|
|
873
830
|
|
|
874
831
|
Link alias "conference" to "conf-2025" dataset
|
|
875
832
|
|
|
876
|
-
$ sanity dataset alias link conference conf-2025
|
|
833
|
+
$ pnpm exec sanity dataset alias link conference conf-2025
|
|
877
834
|
|
|
878
835
|
Link alias with explicit ~ prefix
|
|
879
836
|
|
|
880
|
-
$ sanity dataset alias link ~conference conf-2025
|
|
837
|
+
$ pnpm exec sanity dataset alias link ~conference conf-2025
|
|
881
838
|
|
|
882
839
|
Force link without confirmation (skip relink prompt)
|
|
883
840
|
|
|
884
|
-
$ sanity dataset alias link conference conf-2025 --force
|
|
841
|
+
$ pnpm exec sanity dataset alias link conference conf-2025 --force
|
|
885
842
|
```
|
|
886
843
|
|
|
887
|
-
_See code: [src/commands/dataset/alias/link.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
844
|
+
_See code: [src/commands/dataset/alias/link.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/dataset/alias/link.ts)_
|
|
888
845
|
|
|
889
846
|
## `sanity dataset alias unlink [ALIASNAME]`
|
|
890
847
|
|
|
@@ -892,13 +849,14 @@ Unlink a dataset alias from its dataset within your project
|
|
|
892
849
|
|
|
893
850
|
```
|
|
894
851
|
USAGE
|
|
895
|
-
$ sanity dataset alias unlink [ALIASNAME] [--force]
|
|
852
|
+
$ pnpm exec sanity dataset alias unlink [ALIASNAME] [-p <value>] [--force]
|
|
896
853
|
|
|
897
854
|
ARGUMENTS
|
|
898
855
|
[ALIASNAME] Dataset alias name to unlink
|
|
899
856
|
|
|
900
857
|
FLAGS
|
|
901
|
-
--
|
|
858
|
+
-p, --project-id=<value> Project ID to use. Overrides the project ID from the Sanity config.
|
|
859
|
+
--force Skip confirmation prompt and unlink immediately
|
|
902
860
|
|
|
903
861
|
DESCRIPTION
|
|
904
862
|
Unlink a dataset alias from its dataset within your project
|
|
@@ -906,22 +864,22 @@ DESCRIPTION
|
|
|
906
864
|
EXAMPLES
|
|
907
865
|
Unlink an alias with interactive selection
|
|
908
866
|
|
|
909
|
-
$ sanity dataset alias unlink
|
|
867
|
+
$ pnpm exec sanity dataset alias unlink
|
|
910
868
|
|
|
911
869
|
Unlink alias "conference" with confirmation prompt
|
|
912
870
|
|
|
913
|
-
$ sanity dataset alias unlink conference
|
|
871
|
+
$ pnpm exec sanity dataset alias unlink conference
|
|
914
872
|
|
|
915
873
|
Unlink alias with explicit ~ prefix
|
|
916
874
|
|
|
917
|
-
$ sanity dataset alias unlink ~conference
|
|
875
|
+
$ pnpm exec sanity dataset alias unlink ~conference
|
|
918
876
|
|
|
919
877
|
Unlink alias "conference" without confirmation prompt
|
|
920
878
|
|
|
921
|
-
$ sanity dataset alias unlink conference --force
|
|
879
|
+
$ pnpm exec sanity dataset alias unlink conference --force
|
|
922
880
|
```
|
|
923
881
|
|
|
924
|
-
_See code: [src/commands/dataset/alias/unlink.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
882
|
+
_See code: [src/commands/dataset/alias/unlink.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/dataset/alias/unlink.ts)_
|
|
925
883
|
|
|
926
884
|
## `sanity dataset copy [SOURCE] [TARGET]`
|
|
927
885
|
|
|
@@ -929,60 +887,61 @@ Manages dataset copying, including starting a new copy job, listing copy jobs an
|
|
|
929
887
|
|
|
930
888
|
```
|
|
931
889
|
USAGE
|
|
932
|
-
$ sanity dataset copy [SOURCE] [TARGET] [--attach <value> | --list |
|
|
933
|
-
|
|
890
|
+
$ pnpm exec sanity dataset copy [SOURCE] [TARGET] [-p <value>] [--attach <value> | --list | --detach | --skip-history]
|
|
891
|
+
[--limit <value> ] [--offset <value> ]
|
|
934
892
|
|
|
935
893
|
ARGUMENTS
|
|
936
894
|
[SOURCE] Name of the dataset to copy from
|
|
937
895
|
[TARGET] Name of the dataset to copy to
|
|
938
896
|
|
|
939
897
|
FLAGS
|
|
940
|
-
--
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
898
|
+
-p, --project-id=<value> Project ID to use. Overrides the project ID from the Sanity config.
|
|
899
|
+
--attach=<value> Attach to the running copy process to show progress
|
|
900
|
+
--detach Start the copy without waiting for it to finish
|
|
901
|
+
--limit=<value> Maximum number of jobs returned (default 10, max 1000)
|
|
902
|
+
--list Lists all dataset copy jobs
|
|
903
|
+
--offset=<value> Start position in the list of jobs (default 0)
|
|
904
|
+
--skip-history Don't preserve document history on copy
|
|
946
905
|
|
|
947
906
|
DESCRIPTION
|
|
948
|
-
Manages dataset copying, including starting a new copy job, listing copy jobs
|
|
949
|
-
|
|
907
|
+
Manages dataset copying, including starting a new copy job, listing copy jobs and following the progress of a running
|
|
908
|
+
copy job
|
|
950
909
|
|
|
951
910
|
EXAMPLES
|
|
952
911
|
Interactively copy a dataset
|
|
953
912
|
|
|
954
|
-
$ sanity dataset copy
|
|
913
|
+
$ pnpm exec sanity dataset copy
|
|
955
914
|
|
|
956
915
|
Copy from source-dataset (prompts for target)
|
|
957
916
|
|
|
958
|
-
$ sanity dataset copy source-dataset
|
|
917
|
+
$ pnpm exec sanity dataset copy source-dataset
|
|
959
918
|
|
|
960
919
|
Copy from source-dataset to target-dataset
|
|
961
920
|
|
|
962
|
-
$ sanity dataset copy source-dataset target-dataset
|
|
921
|
+
$ pnpm exec sanity dataset copy source-dataset target-dataset
|
|
963
922
|
|
|
964
923
|
Copy without preserving document history (faster for large datasets)
|
|
965
924
|
|
|
966
|
-
$ sanity dataset copy --skip-history source target
|
|
925
|
+
$ pnpm exec sanity dataset copy --skip-history source target
|
|
967
926
|
|
|
968
927
|
Start copy job without waiting for completion
|
|
969
928
|
|
|
970
|
-
$ sanity dataset copy --detach source target
|
|
929
|
+
$ pnpm exec sanity dataset copy --detach source target
|
|
971
930
|
|
|
972
931
|
Attach to a running copy job to follow progress
|
|
973
932
|
|
|
974
|
-
$ sanity dataset copy --attach <job-id>
|
|
933
|
+
$ pnpm exec sanity dataset copy --attach <job-id>
|
|
975
934
|
|
|
976
935
|
List all dataset copy jobs
|
|
977
936
|
|
|
978
|
-
$ sanity dataset copy --list
|
|
937
|
+
$ pnpm exec sanity dataset copy --list
|
|
979
938
|
|
|
980
939
|
List copy jobs with pagination
|
|
981
940
|
|
|
982
|
-
$ sanity dataset copy --list --offset 2 --limit 10
|
|
941
|
+
$ pnpm exec sanity dataset copy --list --offset 2 --limit 10
|
|
983
942
|
```
|
|
984
943
|
|
|
985
|
-
_See code: [src/commands/dataset/copy.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
944
|
+
_See code: [src/commands/dataset/copy.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/dataset/copy.ts)_
|
|
986
945
|
|
|
987
946
|
## `sanity dataset create [NAME]`
|
|
988
947
|
|
|
@@ -990,14 +949,18 @@ Create a new dataset within your project
|
|
|
990
949
|
|
|
991
950
|
```
|
|
992
951
|
USAGE
|
|
993
|
-
$ sanity dataset create [NAME] [--
|
|
952
|
+
$ pnpm exec sanity dataset create [NAME] [-p <value>] [--embeddings-projection <value> --embeddings] [--visibility
|
|
953
|
+
custom|private|public]
|
|
994
954
|
|
|
995
955
|
ARGUMENTS
|
|
996
956
|
[NAME] Name of the dataset to create
|
|
997
957
|
|
|
998
958
|
FLAGS
|
|
999
|
-
--
|
|
1000
|
-
|
|
959
|
+
-p, --project-id=<value> Project ID to use. Overrides the project ID from the Sanity config.
|
|
960
|
+
--embeddings Enable embeddings for this dataset
|
|
961
|
+
--embeddings-projection=<value> GROQ projection for embeddings indexing (e.g. "{ title, body }")
|
|
962
|
+
--visibility=<option> Set visibility for this dataset (custom/private/public)
|
|
963
|
+
<options: custom|private|public>
|
|
1001
964
|
|
|
1002
965
|
DESCRIPTION
|
|
1003
966
|
Create a new dataset within your project
|
|
@@ -1005,18 +968,18 @@ DESCRIPTION
|
|
|
1005
968
|
EXAMPLES
|
|
1006
969
|
Interactively create a dataset
|
|
1007
970
|
|
|
1008
|
-
$ sanity dataset create
|
|
971
|
+
$ pnpm exec sanity dataset create
|
|
1009
972
|
|
|
1010
973
|
Create a dataset named "my-dataset"
|
|
1011
974
|
|
|
1012
|
-
$ sanity dataset create my-dataset
|
|
975
|
+
$ pnpm exec sanity dataset create my-dataset
|
|
1013
976
|
|
|
1014
977
|
Create a private dataset named "my-dataset"
|
|
1015
978
|
|
|
1016
|
-
$ sanity dataset create my-dataset --visibility private
|
|
979
|
+
$ pnpm exec sanity dataset create my-dataset --visibility private
|
|
1017
980
|
```
|
|
1018
981
|
|
|
1019
|
-
_See code: [src/commands/dataset/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
982
|
+
_See code: [src/commands/dataset/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/dataset/create.ts)_
|
|
1020
983
|
|
|
1021
984
|
## `sanity dataset delete DATASETNAME`
|
|
1022
985
|
|
|
@@ -1024,13 +987,14 @@ Delete a dataset within your project
|
|
|
1024
987
|
|
|
1025
988
|
```
|
|
1026
989
|
USAGE
|
|
1027
|
-
$ sanity dataset delete DATASETNAME [--force]
|
|
990
|
+
$ pnpm exec sanity dataset delete DATASETNAME [-p <value>] [--force]
|
|
1028
991
|
|
|
1029
992
|
ARGUMENTS
|
|
1030
993
|
DATASETNAME Dataset name to delete
|
|
1031
994
|
|
|
1032
995
|
FLAGS
|
|
1033
|
-
--
|
|
996
|
+
-p, --project-id=<value> Project ID to use. Overrides the project ID from the Sanity config.
|
|
997
|
+
--force Do not prompt for delete confirmation - forcefully delete
|
|
1034
998
|
|
|
1035
999
|
DESCRIPTION
|
|
1036
1000
|
Delete a dataset within your project
|
|
@@ -1038,14 +1002,99 @@ DESCRIPTION
|
|
|
1038
1002
|
EXAMPLES
|
|
1039
1003
|
Delete a specific dataset
|
|
1040
1004
|
|
|
1041
|
-
$ sanity dataset delete my-dataset
|
|
1005
|
+
$ pnpm exec sanity dataset delete my-dataset
|
|
1042
1006
|
|
|
1043
1007
|
Delete a specific dataset without confirmation
|
|
1044
1008
|
|
|
1045
|
-
$ sanity dataset delete my-dataset --force
|
|
1009
|
+
$ pnpm exec sanity dataset delete my-dataset --force
|
|
1010
|
+
```
|
|
1011
|
+
|
|
1012
|
+
_See code: [src/commands/dataset/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/dataset/delete.ts)_
|
|
1013
|
+
|
|
1014
|
+
## `sanity dataset embeddings disable [DATASET]`
|
|
1015
|
+
|
|
1016
|
+
Disable embeddings for a dataset
|
|
1017
|
+
|
|
1018
|
+
```
|
|
1019
|
+
USAGE
|
|
1020
|
+
$ pnpm exec sanity dataset embeddings disable [DATASET] [-p <value>]
|
|
1021
|
+
|
|
1022
|
+
ARGUMENTS
|
|
1023
|
+
[DATASET] Dataset name to disable embeddings for
|
|
1024
|
+
|
|
1025
|
+
FLAGS
|
|
1026
|
+
-p, --project-id=<value> Project ID to use. Overrides the project ID from the Sanity config.
|
|
1027
|
+
|
|
1028
|
+
DESCRIPTION
|
|
1029
|
+
Disable embeddings for a dataset
|
|
1030
|
+
|
|
1031
|
+
EXAMPLES
|
|
1032
|
+
Disable embeddings for the production dataset
|
|
1033
|
+
|
|
1034
|
+
$ pnpm exec sanity dataset embeddings disable production
|
|
1035
|
+
```
|
|
1036
|
+
|
|
1037
|
+
_See code: [src/commands/dataset/embeddings/disable.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/dataset/embeddings/disable.ts)_
|
|
1038
|
+
|
|
1039
|
+
## `sanity dataset embeddings enable [DATASET]`
|
|
1040
|
+
|
|
1041
|
+
Enable embeddings for a dataset
|
|
1042
|
+
|
|
1046
1043
|
```
|
|
1044
|
+
USAGE
|
|
1045
|
+
$ pnpm exec sanity dataset embeddings enable [DATASET] [-p <value>] [--projection <value>] [--wait]
|
|
1046
|
+
|
|
1047
|
+
ARGUMENTS
|
|
1048
|
+
[DATASET] Dataset name to enable embeddings for
|
|
1049
|
+
|
|
1050
|
+
FLAGS
|
|
1051
|
+
-p, --project-id=<value> Project ID to use. Overrides the project ID from the Sanity config.
|
|
1052
|
+
--projection=<value> GROQ projection defining which fields to embed (e.g. "{ title, body }")
|
|
1053
|
+
--wait Wait for embeddings processing to complete before returning
|
|
1054
|
+
|
|
1055
|
+
DESCRIPTION
|
|
1056
|
+
Enable embeddings for a dataset
|
|
1057
|
+
|
|
1058
|
+
EXAMPLES
|
|
1059
|
+
Enable embeddings for the production dataset
|
|
1047
1060
|
|
|
1048
|
-
|
|
1061
|
+
$ pnpm exec sanity dataset embeddings enable production
|
|
1062
|
+
|
|
1063
|
+
Enable embeddings with a specific projection
|
|
1064
|
+
|
|
1065
|
+
$ pnpm exec sanity dataset embeddings enable production --projection "{ title, body }"
|
|
1066
|
+
|
|
1067
|
+
Enable embeddings and wait for processing to complete
|
|
1068
|
+
|
|
1069
|
+
$ pnpm exec sanity dataset embeddings enable production --wait
|
|
1070
|
+
```
|
|
1071
|
+
|
|
1072
|
+
_See code: [src/commands/dataset/embeddings/enable.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/dataset/embeddings/enable.ts)_
|
|
1073
|
+
|
|
1074
|
+
## `sanity dataset embeddings status [DATASET]`
|
|
1075
|
+
|
|
1076
|
+
Show embeddings settings and status for a dataset
|
|
1077
|
+
|
|
1078
|
+
```
|
|
1079
|
+
USAGE
|
|
1080
|
+
$ pnpm exec sanity dataset embeddings status [DATASET] [-p <value>]
|
|
1081
|
+
|
|
1082
|
+
ARGUMENTS
|
|
1083
|
+
[DATASET] The name of the dataset to check embeddings status for
|
|
1084
|
+
|
|
1085
|
+
FLAGS
|
|
1086
|
+
-p, --project-id=<value> Project ID to use. Overrides the project ID from the Sanity config.
|
|
1087
|
+
|
|
1088
|
+
DESCRIPTION
|
|
1089
|
+
Show embeddings settings and status for a dataset
|
|
1090
|
+
|
|
1091
|
+
EXAMPLES
|
|
1092
|
+
Show embeddings status for the production dataset
|
|
1093
|
+
|
|
1094
|
+
$ pnpm exec sanity dataset embeddings status production
|
|
1095
|
+
```
|
|
1096
|
+
|
|
1097
|
+
_See code: [src/commands/dataset/embeddings/status.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/dataset/embeddings/status.ts)_
|
|
1049
1098
|
|
|
1050
1099
|
## `sanity dataset export [NAME] [DESTINATION]`
|
|
1051
1100
|
|
|
@@ -1053,56 +1102,50 @@ Export dataset to local filesystem as a gzipped tarball. Assets failing with HTT
|
|
|
1053
1102
|
|
|
1054
1103
|
```
|
|
1055
1104
|
USAGE
|
|
1056
|
-
$ sanity dataset export [NAME] [DESTINATION] [--asset-concurrency <value>]
|
|
1057
|
-
[--
|
|
1058
|
-
[--overwrite] [--raw] [--types <value>]
|
|
1105
|
+
$ pnpm exec sanity dataset export [NAME] [DESTINATION] [-p <value>] [--asset-concurrency <value>] [--mode stream|cursor]
|
|
1106
|
+
[--no-assets] [--no-compress] [--no-drafts] [--overwrite] [--raw] [--types <value>]
|
|
1059
1107
|
|
|
1060
1108
|
ARGUMENTS
|
|
1061
1109
|
[NAME] Name of the dataset to export
|
|
1062
1110
|
[DESTINATION] Output destination file path
|
|
1063
1111
|
|
|
1064
1112
|
FLAGS
|
|
1065
|
-
--
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
--raw Extract only documents, without rewriting asset
|
|
1078
|
-
references
|
|
1079
|
-
--types=<value> Defines which document types to export
|
|
1080
|
-
(comma-separated)
|
|
1113
|
+
-p, --project-id=<value> Project ID to use. Overrides the project ID from the Sanity config.
|
|
1114
|
+
--asset-concurrency=<value> [default: 8] Concurrent number of asset downloads
|
|
1115
|
+
--mode=<option> [default: stream] Mode to export documents with `cursor` might be more performant for
|
|
1116
|
+
larger datasets, but might not be as accurate if the dataset is being modified during
|
|
1117
|
+
export
|
|
1118
|
+
<options: stream|cursor>
|
|
1119
|
+
--no-assets Export only non-asset documents and remove references to image assets
|
|
1120
|
+
--no-compress Skips compressing tarball entries (still generates a gzip file)
|
|
1121
|
+
--no-drafts Export only published versions of documents
|
|
1122
|
+
--overwrite Overwrite any file with the same name
|
|
1123
|
+
--raw Extract only documents, without rewriting asset references
|
|
1124
|
+
--types=<value> Defines which document types to export (comma-separated)
|
|
1081
1125
|
|
|
1082
1126
|
DESCRIPTION
|
|
1083
|
-
Export dataset to local filesystem as a gzipped tarball. Assets failing with
|
|
1084
|
-
|
|
1085
|
-
export.
|
|
1127
|
+
Export dataset to local filesystem as a gzipped tarball. Assets failing with HTTP status codes 401, 403 and 404 upon
|
|
1128
|
+
download are ignored and excluded from export.
|
|
1086
1129
|
|
|
1087
1130
|
EXAMPLES
|
|
1088
1131
|
Export dataset "moviedb" to localPath.tar.gz
|
|
1089
1132
|
|
|
1090
|
-
$ sanity dataset export moviedb localPath.tar.gz
|
|
1133
|
+
$ pnpm exec sanity dataset export moviedb localPath.tar.gz
|
|
1091
1134
|
|
|
1092
1135
|
Export dataset without assets
|
|
1093
1136
|
|
|
1094
|
-
$ sanity dataset export moviedb assetless.tar.gz --no-assets
|
|
1137
|
+
$ pnpm exec sanity dataset export moviedb assetless.tar.gz --no-assets
|
|
1095
1138
|
|
|
1096
1139
|
Export raw documents without asset reference rewriting
|
|
1097
1140
|
|
|
1098
|
-
$ sanity dataset export staging staging.tar.gz --raw
|
|
1141
|
+
$ pnpm exec sanity dataset export staging staging.tar.gz --raw
|
|
1099
1142
|
|
|
1100
1143
|
Export specific document types
|
|
1101
1144
|
|
|
1102
|
-
$ sanity dataset export staging staging.tar.gz --types products,shops
|
|
1145
|
+
$ pnpm exec sanity dataset export staging staging.tar.gz --types products,shops
|
|
1103
1146
|
```
|
|
1104
1147
|
|
|
1105
|
-
_See code: [src/commands/dataset/export.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
1148
|
+
_See code: [src/commands/dataset/export.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/dataset/export.ts)_
|
|
1106
1149
|
|
|
1107
1150
|
## `sanity dataset import SOURCE`
|
|
1108
1151
|
|
|
@@ -1110,11 +1153,9 @@ Import documents to a Sanity dataset
|
|
|
1110
1153
|
|
|
1111
1154
|
```
|
|
1112
1155
|
USAGE
|
|
1113
|
-
$ sanity dataset import SOURCE -p <value> -d <value> [-t <value>]
|
|
1114
|
-
[--
|
|
1115
|
-
[--allow-
|
|
1116
|
-
[--skip-cross-dataset-references] [--allow-replacement-characters]
|
|
1117
|
-
[--allow-system-documents] [--asset-concurrency <value>]
|
|
1156
|
+
$ pnpm exec sanity dataset import SOURCE -p <value> -d <value> [-t <value>] [--replace | --missing] [--allow-failing-assets]
|
|
1157
|
+
[--allow-assets-in-different-dataset] [--replace-assets] [--skip-cross-dataset-references]
|
|
1158
|
+
[--allow-replacement-characters] [--allow-system-documents] [--asset-concurrency <value>]
|
|
1118
1159
|
|
|
1119
1160
|
ARGUMENTS
|
|
1120
1161
|
SOURCE Source file (use "-" for stdin)
|
|
@@ -1122,14 +1163,10 @@ ARGUMENTS
|
|
|
1122
1163
|
FLAGS
|
|
1123
1164
|
-d, --dataset=<value> (required) Dataset to import to
|
|
1124
1165
|
-p, --project=<value> (required) Project ID to import to
|
|
1125
|
-
-t, --token=<value> [env: SANITY_IMPORT_TOKEN] Token to
|
|
1126
|
-
|
|
1127
|
-
--allow-assets
|
|
1128
|
-
|
|
1129
|
-
--allow-failing-assets Skip assets that cannot be
|
|
1130
|
-
fetched/uploaded
|
|
1131
|
-
--allow-replacement-characters Allow unicode replacement characters
|
|
1132
|
-
in imported documents
|
|
1166
|
+
-t, --token=<value> [env: SANITY_IMPORT_TOKEN] Token to authenticate with
|
|
1167
|
+
--allow-assets-in-different-dataset Allow asset documents to reference different project/dataset
|
|
1168
|
+
--allow-failing-assets Skip assets that cannot be fetched/uploaded
|
|
1169
|
+
--allow-replacement-characters Allow unicode replacement characters in imported documents
|
|
1133
1170
|
--allow-system-documents Imports system documents
|
|
1134
1171
|
--asset-concurrency=<value> Number of parallel asset imports
|
|
1135
1172
|
--missing Skip documents that already exist
|
|
@@ -1143,15 +1180,14 @@ DESCRIPTION
|
|
|
1143
1180
|
EXAMPLES
|
|
1144
1181
|
Import "./my-dataset.ndjson" into dataset "staging"
|
|
1145
1182
|
|
|
1146
|
-
$ sanity dataset import -p myPrOj -d staging -t someSecretToken
|
|
1147
|
-
my-dataset.ndjson
|
|
1183
|
+
$ pnpm exec sanity dataset import -p myPrOj -d staging -t someSecretToken my-dataset.ndjson
|
|
1148
1184
|
|
|
1149
1185
|
Import into dataset "test" from stdin, read token from env var
|
|
1150
1186
|
|
|
1151
1187
|
cat my-dataset.ndjson | sanity dataset import -p myPrOj -d test -
|
|
1152
1188
|
```
|
|
1153
1189
|
|
|
1154
|
-
_See code: [src/commands/dataset/import.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
1190
|
+
_See code: [src/commands/dataset/import.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/dataset/import.ts)_
|
|
1155
1191
|
|
|
1156
1192
|
## `sanity dataset list`
|
|
1157
1193
|
|
|
@@ -1159,7 +1195,10 @@ List datasets of your project
|
|
|
1159
1195
|
|
|
1160
1196
|
```
|
|
1161
1197
|
USAGE
|
|
1162
|
-
$ sanity dataset list
|
|
1198
|
+
$ pnpm exec sanity dataset list [-p <value>]
|
|
1199
|
+
|
|
1200
|
+
FLAGS
|
|
1201
|
+
-p, --project-id=<value> Project ID to use. Overrides the project ID from the Sanity config.
|
|
1163
1202
|
|
|
1164
1203
|
DESCRIPTION
|
|
1165
1204
|
List datasets of your project
|
|
@@ -1167,10 +1206,14 @@ DESCRIPTION
|
|
|
1167
1206
|
EXAMPLES
|
|
1168
1207
|
List datasets of your project
|
|
1169
1208
|
|
|
1170
|
-
$ sanity dataset list
|
|
1209
|
+
$ pnpm exec sanity dataset list
|
|
1210
|
+
|
|
1211
|
+
List datasets for a specific project
|
|
1212
|
+
|
|
1213
|
+
$ pnpm exec sanity dataset list --project-id abc123
|
|
1171
1214
|
```
|
|
1172
1215
|
|
|
1173
|
-
_See code: [src/commands/dataset/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
1216
|
+
_See code: [src/commands/dataset/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/dataset/list.ts)_
|
|
1174
1217
|
|
|
1175
1218
|
## `sanity dataset visibility get DATASET`
|
|
1176
1219
|
|
|
@@ -1178,21 +1221,24 @@ Get the visibility of a dataset
|
|
|
1178
1221
|
|
|
1179
1222
|
```
|
|
1180
1223
|
USAGE
|
|
1181
|
-
$ sanity dataset visibility get DATASET
|
|
1224
|
+
$ pnpm exec sanity dataset visibility get DATASET [-p <value>]
|
|
1182
1225
|
|
|
1183
1226
|
ARGUMENTS
|
|
1184
1227
|
DATASET The name of the dataset to get visibility for
|
|
1185
1228
|
|
|
1229
|
+
FLAGS
|
|
1230
|
+
-p, --project-id=<value> Project ID to use. Overrides the project ID from the Sanity config.
|
|
1231
|
+
|
|
1186
1232
|
DESCRIPTION
|
|
1187
1233
|
Get the visibility of a dataset
|
|
1188
1234
|
|
|
1189
1235
|
EXAMPLES
|
|
1190
1236
|
Check the visibility of a dataset
|
|
1191
1237
|
|
|
1192
|
-
$ sanity dataset visibility get my-dataset
|
|
1238
|
+
$ pnpm exec sanity dataset visibility get my-dataset
|
|
1193
1239
|
```
|
|
1194
1240
|
|
|
1195
|
-
_See code: [src/commands/dataset/visibility/get.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
1241
|
+
_See code: [src/commands/dataset/visibility/get.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/dataset/visibility/get.ts)_
|
|
1196
1242
|
|
|
1197
1243
|
## `sanity dataset visibility set DATASET MODE`
|
|
1198
1244
|
|
|
@@ -1200,26 +1246,29 @@ Set the visibility of a dataset
|
|
|
1200
1246
|
|
|
1201
1247
|
```
|
|
1202
1248
|
USAGE
|
|
1203
|
-
$ sanity dataset visibility set DATASET MODE
|
|
1249
|
+
$ pnpm exec sanity dataset visibility set DATASET MODE [-p <value>]
|
|
1204
1250
|
|
|
1205
1251
|
ARGUMENTS
|
|
1206
1252
|
DATASET The name of the dataset to set visibility for
|
|
1207
1253
|
MODE (public|private) The visibility mode to set
|
|
1208
1254
|
|
|
1255
|
+
FLAGS
|
|
1256
|
+
-p, --project-id=<value> Project ID to use. Overrides the project ID from the Sanity config.
|
|
1257
|
+
|
|
1209
1258
|
DESCRIPTION
|
|
1210
1259
|
Set the visibility of a dataset
|
|
1211
1260
|
|
|
1212
1261
|
EXAMPLES
|
|
1213
1262
|
Make a dataset private
|
|
1214
1263
|
|
|
1215
|
-
$ sanity dataset visibility set my-dataset private
|
|
1264
|
+
$ pnpm exec sanity dataset visibility set my-dataset private
|
|
1216
1265
|
|
|
1217
1266
|
Make a dataset public
|
|
1218
1267
|
|
|
1219
|
-
$ sanity dataset visibility set my-dataset public
|
|
1268
|
+
$ pnpm exec sanity dataset visibility set my-dataset public
|
|
1220
1269
|
```
|
|
1221
1270
|
|
|
1222
|
-
_See code: [src/commands/dataset/visibility/set.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
1271
|
+
_See code: [src/commands/dataset/visibility/set.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/dataset/visibility/set.ts)_
|
|
1223
1272
|
|
|
1224
1273
|
## `sanity debug`
|
|
1225
1274
|
|
|
@@ -1227,7 +1276,7 @@ Provides diagnostic info for Sanity Studio troubleshooting
|
|
|
1227
1276
|
|
|
1228
1277
|
```
|
|
1229
1278
|
USAGE
|
|
1230
|
-
$ sanity debug [--secrets]
|
|
1279
|
+
$ pnpm exec sanity debug [--secrets]
|
|
1231
1280
|
|
|
1232
1281
|
FLAGS
|
|
1233
1282
|
--secrets Include API keys in output
|
|
@@ -1236,12 +1285,12 @@ DESCRIPTION
|
|
|
1236
1285
|
Provides diagnostic info for Sanity Studio troubleshooting
|
|
1237
1286
|
|
|
1238
1287
|
EXAMPLES
|
|
1239
|
-
$ sanity debug
|
|
1288
|
+
$ pnpm exec sanity debug
|
|
1240
1289
|
|
|
1241
|
-
$ sanity debug --secrets
|
|
1290
|
+
$ pnpm exec sanity debug --secrets
|
|
1242
1291
|
```
|
|
1243
1292
|
|
|
1244
|
-
_See code: [src/commands/debug.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
1293
|
+
_See code: [src/commands/debug.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/debug.ts)_
|
|
1245
1294
|
|
|
1246
1295
|
## `sanity deploy [SOURCEDIR]`
|
|
1247
1296
|
|
|
@@ -1249,23 +1298,19 @@ Builds and deploys Sanity Studio or application to Sanity hosting
|
|
|
1249
1298
|
|
|
1250
1299
|
```
|
|
1251
1300
|
USAGE
|
|
1252
|
-
$ sanity deploy [SOURCEDIR] [--auto-updates] [--build] [--minify]
|
|
1253
|
-
[--
|
|
1301
|
+
$ pnpm exec sanity deploy [SOURCEDIR] [--auto-updates] [--build] [--minify] [--schema-required] [--source-maps]
|
|
1302
|
+
[--verbose] [-y]
|
|
1254
1303
|
|
|
1255
1304
|
ARGUMENTS
|
|
1256
1305
|
[SOURCEDIR] Source directory
|
|
1257
1306
|
|
|
1258
1307
|
FLAGS
|
|
1259
|
-
-y, --yes Unattended mode, answers "yes" to any "yes/no" prompt
|
|
1260
|
-
and otherwise uses defaults
|
|
1308
|
+
-y, --yes Unattended mode, answers "yes" to any "yes/no" prompt and otherwise uses defaults
|
|
1261
1309
|
--[no-]auto-updates Automatically update the studio to the latest version
|
|
1262
|
-
--[no-]build Don't build the studio prior to deploy, instead
|
|
1263
|
-
|
|
1264
|
-
--[no-]minify Skip minifying built JavaScript (speeds up build,
|
|
1265
|
-
increases size of bundle)
|
|
1310
|
+
--[no-]build Don't build the studio prior to deploy, instead deploying the version currently in `dist/`
|
|
1311
|
+
--[no-]minify Skip minifying built JavaScript (speeds up build, increases size of bundle)
|
|
1266
1312
|
--schema-required Fail-fast deployment if schema store fails
|
|
1267
|
-
--source-maps Enable source maps for built bundles (increases size
|
|
1268
|
-
of bundle)
|
|
1313
|
+
--source-maps Enable source maps for built bundles (increases size of bundle)
|
|
1269
1314
|
--verbose Enable verbose logging
|
|
1270
1315
|
|
|
1271
1316
|
DESCRIPTION
|
|
@@ -1274,19 +1319,18 @@ DESCRIPTION
|
|
|
1274
1319
|
EXAMPLES
|
|
1275
1320
|
Build and deploy the studio to Sanity hosting
|
|
1276
1321
|
|
|
1277
|
-
$ sanity deploy
|
|
1322
|
+
$ pnpm exec sanity deploy
|
|
1278
1323
|
|
|
1279
1324
|
Deploys non-minified build with source maps
|
|
1280
1325
|
|
|
1281
|
-
$ sanity deploy --no-minify --source-maps
|
|
1326
|
+
$ pnpm exec sanity deploy --no-minify --source-maps
|
|
1282
1327
|
|
|
1283
|
-
Fail fast on schema store fails - for when other services rely on the stored
|
|
1284
|
-
schema
|
|
1328
|
+
Fail fast on schema store fails - for when other services rely on the stored schema
|
|
1285
1329
|
|
|
1286
|
-
$ sanity deploy --schema-required
|
|
1330
|
+
$ pnpm exec sanity deploy --schema-required
|
|
1287
1331
|
```
|
|
1288
1332
|
|
|
1289
|
-
_See code: [src/commands/deploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
1333
|
+
_See code: [src/commands/deploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/deploy.ts)_
|
|
1290
1334
|
|
|
1291
1335
|
## `sanity dev`
|
|
1292
1336
|
|
|
@@ -1294,13 +1338,11 @@ Starts a local development server for Sanity Studio with live reloading
|
|
|
1294
1338
|
|
|
1295
1339
|
```
|
|
1296
1340
|
USAGE
|
|
1297
|
-
$ sanity dev [--auto-updates] [--host <value>]
|
|
1298
|
-
[--load-in-dashboard] [--port <value>]
|
|
1341
|
+
$ pnpm exec sanity dev [--auto-updates] [--host <value>] [--load-in-dashboard] [--port <value>]
|
|
1299
1342
|
|
|
1300
1343
|
FLAGS
|
|
1301
1344
|
--[no-]auto-updates Automatically update Sanity Studio dependencies.
|
|
1302
|
-
--host=<value> [default: localhost] The local network interface at
|
|
1303
|
-
which to listen.
|
|
1345
|
+
--host=<value> [default: localhost] The local network interface at which to listen.
|
|
1304
1346
|
--[no-]load-in-dashboard Load the app/studio in the Sanity dashboard.
|
|
1305
1347
|
--port=<value> [default: 3333] TCP port to start server on.
|
|
1306
1348
|
|
|
@@ -1308,14 +1350,14 @@ DESCRIPTION
|
|
|
1308
1350
|
Starts a local development server for Sanity Studio with live reloading
|
|
1309
1351
|
|
|
1310
1352
|
EXAMPLES
|
|
1311
|
-
$ sanity dev --host=0.0.0.0
|
|
1353
|
+
$ pnpm exec sanity dev --host=0.0.0.0
|
|
1312
1354
|
|
|
1313
|
-
$ sanity dev --port=1942
|
|
1355
|
+
$ pnpm exec sanity dev --port=1942
|
|
1314
1356
|
|
|
1315
|
-
$ sanity dev --load-in-dashboard
|
|
1357
|
+
$ pnpm exec sanity dev --load-in-dashboard
|
|
1316
1358
|
```
|
|
1317
1359
|
|
|
1318
|
-
_See code: [src/commands/dev.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
1360
|
+
_See code: [src/commands/dev.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/dev.ts)_
|
|
1319
1361
|
|
|
1320
1362
|
## `sanity docs browse`
|
|
1321
1363
|
|
|
@@ -1323,13 +1365,13 @@ Open Sanity docs in a web browser
|
|
|
1323
1365
|
|
|
1324
1366
|
```
|
|
1325
1367
|
USAGE
|
|
1326
|
-
$ sanity docs browse
|
|
1368
|
+
$ pnpm exec sanity docs browse
|
|
1327
1369
|
|
|
1328
1370
|
DESCRIPTION
|
|
1329
1371
|
Open Sanity docs in a web browser
|
|
1330
1372
|
```
|
|
1331
1373
|
|
|
1332
|
-
_See code: [src/commands/docs/browse.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
1374
|
+
_See code: [src/commands/docs/browse.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/docs/browse.ts)_
|
|
1333
1375
|
|
|
1334
1376
|
## `sanity docs read PATH`
|
|
1335
1377
|
|
|
@@ -1337,7 +1379,7 @@ Read an article in terminal
|
|
|
1337
1379
|
|
|
1338
1380
|
```
|
|
1339
1381
|
USAGE
|
|
1340
|
-
$ sanity docs read PATH [--web]
|
|
1382
|
+
$ pnpm exec sanity docs read PATH [--web]
|
|
1341
1383
|
|
|
1342
1384
|
ARGUMENTS
|
|
1343
1385
|
PATH Path or URL to article, found in search results and docs content as links
|
|
@@ -1351,22 +1393,22 @@ DESCRIPTION
|
|
|
1351
1393
|
EXAMPLES
|
|
1352
1394
|
Read as markdown in terminal
|
|
1353
1395
|
|
|
1354
|
-
$ sanity docs read /docs/studio/installation
|
|
1396
|
+
$ pnpm exec sanity docs read /docs/studio/installation
|
|
1355
1397
|
|
|
1356
1398
|
Read using full URL
|
|
1357
1399
|
|
|
1358
|
-
$ sanity docs read https://www.sanity.io/docs/studio/installation
|
|
1400
|
+
$ pnpm exec sanity docs read https://www.sanity.io/docs/studio/installation
|
|
1359
1401
|
|
|
1360
1402
|
Open in web browser
|
|
1361
1403
|
|
|
1362
|
-
$ sanity docs read /docs/studio/installation --web
|
|
1404
|
+
$ pnpm exec sanity docs read /docs/studio/installation --web
|
|
1363
1405
|
|
|
1364
1406
|
Open using full URL in web browser
|
|
1365
1407
|
|
|
1366
|
-
$ sanity docs read https://www.sanity.io/docs/studio/installation -w
|
|
1408
|
+
$ pnpm exec sanity docs read https://www.sanity.io/docs/studio/installation -w
|
|
1367
1409
|
```
|
|
1368
1410
|
|
|
1369
|
-
_See code: [src/commands/docs/read.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
1411
|
+
_See code: [src/commands/docs/read.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/docs/read.ts)_
|
|
1370
1412
|
|
|
1371
1413
|
## `sanity docs search QUERY`
|
|
1372
1414
|
|
|
@@ -1374,7 +1416,7 @@ Search Sanity docs
|
|
|
1374
1416
|
|
|
1375
1417
|
```
|
|
1376
1418
|
USAGE
|
|
1377
|
-
$ sanity docs search QUERY [--limit <value>]
|
|
1419
|
+
$ pnpm exec sanity docs search QUERY [--limit <value>]
|
|
1378
1420
|
|
|
1379
1421
|
ARGUMENTS
|
|
1380
1422
|
QUERY Search query for documentation
|
|
@@ -1388,18 +1430,18 @@ DESCRIPTION
|
|
|
1388
1430
|
EXAMPLES
|
|
1389
1431
|
Search for documentation about schemas
|
|
1390
1432
|
|
|
1391
|
-
$ sanity docs search schema
|
|
1433
|
+
$ pnpm exec sanity docs search schema
|
|
1392
1434
|
|
|
1393
1435
|
Search with phrase
|
|
1394
1436
|
|
|
1395
|
-
$ sanity docs search "groq functions"
|
|
1437
|
+
$ pnpm exec sanity docs search "groq functions"
|
|
1396
1438
|
|
|
1397
1439
|
Limit search results
|
|
1398
1440
|
|
|
1399
|
-
$ sanity docs search "deployment" --limit=5
|
|
1441
|
+
$ pnpm exec sanity docs search "deployment" --limit=5
|
|
1400
1442
|
```
|
|
1401
1443
|
|
|
1402
|
-
_See code: [src/commands/docs/search.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
1444
|
+
_See code: [src/commands/docs/search.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/docs/search.ts)_
|
|
1403
1445
|
|
|
1404
1446
|
## `sanity documents create [FILE]`
|
|
1405
1447
|
|
|
@@ -1407,24 +1449,18 @@ Create one or more documents
|
|
|
1407
1449
|
|
|
1408
1450
|
```
|
|
1409
1451
|
USAGE
|
|
1410
|
-
$ sanity documents create [FILE] [-d <value>] [--id <value>] [--json5]
|
|
1411
|
-
[--missing] [--replace] [--watch]
|
|
1452
|
+
$ pnpm exec sanity documents create [FILE] [-d <value>] [--id <value>] [--json5] [--missing] [--replace] [--watch]
|
|
1412
1453
|
|
|
1413
1454
|
ARGUMENTS
|
|
1414
1455
|
[FILE] JSON file to create document(s) from
|
|
1415
1456
|
|
|
1416
1457
|
FLAGS
|
|
1417
1458
|
-d, --dataset=<value> Dataset to create document(s) in (overrides config)
|
|
1418
|
-
--id=<value> Specify a document ID to use. Will fetch remote document
|
|
1419
|
-
|
|
1420
|
-
--
|
|
1421
|
-
|
|
1422
|
-
--
|
|
1423
|
-
document(s)
|
|
1424
|
-
--replace On duplicate document IDs, replace existing document
|
|
1425
|
-
with specified document(s)
|
|
1426
|
-
--watch Write the documents whenever the target file or buffer
|
|
1427
|
-
changes
|
|
1459
|
+
--id=<value> Specify a document ID to use. Will fetch remote document ID and populate editor.
|
|
1460
|
+
--json5 Use JSON5 file type to allow a "simplified" version of JSON
|
|
1461
|
+
--missing On duplicate document IDs, don't modify the target document(s)
|
|
1462
|
+
--replace On duplicate document IDs, replace existing document with specified document(s)
|
|
1463
|
+
--watch Write the documents whenever the target file or buffer changes
|
|
1428
1464
|
|
|
1429
1465
|
DESCRIPTION
|
|
1430
1466
|
Create one or more documents
|
|
@@ -1432,25 +1468,24 @@ DESCRIPTION
|
|
|
1432
1468
|
EXAMPLES
|
|
1433
1469
|
Create the document specified in "myDocument.json"
|
|
1434
1470
|
|
|
1435
|
-
$ sanity documents create myDocument.json
|
|
1471
|
+
$ pnpm exec sanity documents create myDocument.json
|
|
1436
1472
|
|
|
1437
1473
|
Open configured $EDITOR and create the specified document(s)
|
|
1438
1474
|
|
|
1439
|
-
$ sanity documents create
|
|
1475
|
+
$ pnpm exec sanity documents create
|
|
1440
1476
|
|
|
1441
|
-
Fetch document with the ID "myDocId" and open configured $EDITOR with the
|
|
1442
|
-
|
|
1443
|
-
when the editor closes
|
|
1477
|
+
Fetch document with the ID "myDocId" and open configured $EDITOR with the current document content (if any). Replace
|
|
1478
|
+
document with the edited version when the editor closes
|
|
1444
1479
|
|
|
1445
|
-
$ sanity documents create --id myDocId --replace
|
|
1480
|
+
$ pnpm exec sanity documents create --id myDocId --replace
|
|
1446
1481
|
|
|
1447
|
-
Open configured $EDITOR and replace the document with the given content on
|
|
1448
|
-
|
|
1482
|
+
Open configured $EDITOR and replace the document with the given content on each save. Use JSON5 file extension and
|
|
1483
|
+
parser for simplified syntax.
|
|
1449
1484
|
|
|
1450
|
-
$ sanity documents create --id myDocId --watch --replace --json5
|
|
1485
|
+
$ pnpm exec sanity documents create --id myDocId --watch --replace --json5
|
|
1451
1486
|
```
|
|
1452
1487
|
|
|
1453
|
-
_See code: [src/commands/documents/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
1488
|
+
_See code: [src/commands/documents/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/documents/create.ts)_
|
|
1454
1489
|
|
|
1455
1490
|
## `sanity documents delete ID [IDS]`
|
|
1456
1491
|
|
|
@@ -1458,7 +1493,7 @@ Delete one or more documents from the projects configured dataset
|
|
|
1458
1493
|
|
|
1459
1494
|
```
|
|
1460
1495
|
USAGE
|
|
1461
|
-
$ sanity documents delete ID... [IDS...] [--dataset <value>]
|
|
1496
|
+
$ pnpm exec sanity documents delete ID... [IDS...] [--dataset <value>]
|
|
1462
1497
|
|
|
1463
1498
|
ARGUMENTS
|
|
1464
1499
|
ID... Document ID to delete
|
|
@@ -1473,22 +1508,22 @@ DESCRIPTION
|
|
|
1473
1508
|
EXAMPLES
|
|
1474
1509
|
Delete the document with the ID "myDocId"
|
|
1475
1510
|
|
|
1476
|
-
$ sanity documents delete myDocId
|
|
1511
|
+
$ pnpm exec sanity documents delete myDocId
|
|
1477
1512
|
|
|
1478
1513
|
ID wrapped in double or single quote works equally well
|
|
1479
1514
|
|
|
1480
|
-
$ sanity documents delete 'myDocId'
|
|
1515
|
+
$ pnpm exec sanity documents delete 'myDocId'
|
|
1481
1516
|
|
|
1482
1517
|
Delete document with ID "someDocId" from dataset "blog"
|
|
1483
1518
|
|
|
1484
|
-
$ sanity documents delete --dataset=blog someDocId
|
|
1519
|
+
$ pnpm exec sanity documents delete --dataset=blog someDocId
|
|
1485
1520
|
|
|
1486
1521
|
Delete the document with ID "doc1" and "doc2"
|
|
1487
1522
|
|
|
1488
|
-
$ sanity documents delete doc1 doc2
|
|
1523
|
+
$ pnpm exec sanity documents delete doc1 doc2
|
|
1489
1524
|
```
|
|
1490
1525
|
|
|
1491
|
-
_See code: [src/commands/documents/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
1526
|
+
_See code: [src/commands/documents/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/documents/delete.ts)_
|
|
1492
1527
|
|
|
1493
1528
|
## `sanity documents get DOCUMENTID`
|
|
1494
1529
|
|
|
@@ -1496,7 +1531,7 @@ Get and print a document by ID
|
|
|
1496
1531
|
|
|
1497
1532
|
```
|
|
1498
1533
|
USAGE
|
|
1499
|
-
$ sanity documents get DOCUMENTID [-d <value>] [--pretty]
|
|
1534
|
+
$ pnpm exec sanity documents get DOCUMENTID [-d <value>] [--pretty]
|
|
1500
1535
|
|
|
1501
1536
|
ARGUMENTS
|
|
1502
1537
|
DOCUMENTID Document ID to retrieve
|
|
@@ -1511,18 +1546,18 @@ DESCRIPTION
|
|
|
1511
1546
|
EXAMPLES
|
|
1512
1547
|
Get the document with ID "myDocId"
|
|
1513
1548
|
|
|
1514
|
-
$ sanity documents get myDocId
|
|
1549
|
+
$ pnpm exec sanity documents get myDocId
|
|
1515
1550
|
|
|
1516
1551
|
Get document with colorized JSON output
|
|
1517
1552
|
|
|
1518
|
-
$ sanity documents get myDocId --pretty
|
|
1553
|
+
$ pnpm exec sanity documents get myDocId --pretty
|
|
1519
1554
|
|
|
1520
1555
|
Get document from a specific dataset
|
|
1521
1556
|
|
|
1522
|
-
$ sanity documents get myDocId --dataset production
|
|
1557
|
+
$ pnpm exec sanity documents get myDocId --dataset production
|
|
1523
1558
|
```
|
|
1524
1559
|
|
|
1525
|
-
_See code: [src/commands/documents/get.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
1560
|
+
_See code: [src/commands/documents/get.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/documents/get.ts)_
|
|
1526
1561
|
|
|
1527
1562
|
## `sanity documents query QUERY`
|
|
1528
1563
|
|
|
@@ -1530,8 +1565,7 @@ Query for documents
|
|
|
1530
1565
|
|
|
1531
1566
|
```
|
|
1532
1567
|
USAGE
|
|
1533
|
-
$ sanity documents query QUERY [--anonymous] [--api-version <value>] [-d
|
|
1534
|
-
<value>] [--pretty] [-p <value>]
|
|
1568
|
+
$ pnpm exec sanity documents query QUERY [--anonymous] [--api-version <value>] [-d <value>] [--pretty] [-p <value>]
|
|
1535
1569
|
|
|
1536
1570
|
ARGUMENTS
|
|
1537
1571
|
QUERY GROQ query to run against the dataset
|
|
@@ -1540,8 +1574,7 @@ FLAGS
|
|
|
1540
1574
|
-d, --dataset=<value> Dataset to query (overrides config)
|
|
1541
1575
|
-p, --project=<value> Project ID to query (overrides config)
|
|
1542
1576
|
--anonymous Send the query without any authorization token
|
|
1543
|
-
--api-version=<value> [env: SANITY_CLI_QUERY_API_VERSION] API version to
|
|
1544
|
-
use (defaults to 2025-08-15)
|
|
1577
|
+
--api-version=<value> [env: SANITY_CLI_QUERY_API_VERSION] API version to use (defaults to 2025-08-15)
|
|
1545
1578
|
--pretty Colorize JSON output
|
|
1546
1579
|
|
|
1547
1580
|
DESCRIPTION
|
|
@@ -1550,20 +1583,18 @@ DESCRIPTION
|
|
|
1550
1583
|
EXAMPLES
|
|
1551
1584
|
Fetch 5 documents of type "movie"
|
|
1552
1585
|
|
|
1553
|
-
$ sanity documents query '*[_type == "movie"][0..4]'
|
|
1586
|
+
$ pnpm exec sanity documents query '*[_type == "movie"][0..4]'
|
|
1554
1587
|
|
|
1555
1588
|
Fetch title of the oldest movie in the dataset named "staging"
|
|
1556
1589
|
|
|
1557
|
-
$ sanity documents query '*[_type == "movie"]|order(releaseDate
|
|
1558
|
-
asc)[0]{title}' --dataset staging
|
|
1590
|
+
$ pnpm exec sanity documents query '*[_type == "movie"]|order(releaseDate asc)[0]{title}' --dataset staging
|
|
1559
1591
|
|
|
1560
1592
|
Use API version v2021-06-07 and do a query
|
|
1561
1593
|
|
|
1562
|
-
$ sanity documents query '*[_id == "header"] { "headerText":
|
|
1563
|
-
pt::text(body) }' --api-version v2021-06-07
|
|
1594
|
+
$ pnpm exec sanity documents query '*[_id == "header"] { "headerText": pt::text(body) }' --api-version v2021-06-07
|
|
1564
1595
|
```
|
|
1565
1596
|
|
|
1566
|
-
_See code: [src/commands/documents/query.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
1597
|
+
_See code: [src/commands/documents/query.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/documents/query.ts)_
|
|
1567
1598
|
|
|
1568
1599
|
## `sanity documents validate`
|
|
1569
1600
|
|
|
@@ -1571,35 +1602,25 @@ Validate documents in a dataset against the studio schema
|
|
|
1571
1602
|
|
|
1572
1603
|
```
|
|
1573
1604
|
USAGE
|
|
1574
|
-
$ sanity documents validate [-d <value>] [--file <value>] [--format <value>]
|
|
1575
|
-
[--
|
|
1576
|
-
[--max-fetch-concurrency <value>] [--workspace <value>] [-y]
|
|
1605
|
+
$ pnpm exec sanity documents validate [-d <value>] [--file <value>] [--format <value>] [--level error|warning|info]
|
|
1606
|
+
[--max-custom-validation-concurrency <value>] [--max-fetch-concurrency <value>] [--workspace <value>] [-y]
|
|
1577
1607
|
|
|
1578
1608
|
FLAGS
|
|
1579
|
-
-d, --dataset=<value> Override the dataset used. By
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
--
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
print the found validation
|
|
1589
|
-
markers and report progress
|
|
1590
|
-
--level=<option> [default: warning] The minimum
|
|
1591
|
-
level reported out. Defaults
|
|
1592
|
-
to warning
|
|
1609
|
+
-d, --dataset=<value> Override the dataset used. By default, this is derived from the given
|
|
1610
|
+
workspace
|
|
1611
|
+
-y, --yes Skips the first confirmation prompt
|
|
1612
|
+
--file=<value> Provide a path to either an .ndjson file or a tarball containing an
|
|
1613
|
+
.ndjson file
|
|
1614
|
+
--format=<value> The output format used to print the found validation markers and
|
|
1615
|
+
report progress
|
|
1616
|
+
--level=<option> [default: warning] The minimum level reported out. Defaults to
|
|
1617
|
+
warning
|
|
1593
1618
|
<options: error|warning|info>
|
|
1594
|
-
--max-custom-validation-concurrency=<value> [default: 5] Specify how many
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
--
|
|
1598
|
-
|
|
1599
|
-
allow concurrency at once
|
|
1600
|
-
--workspace=<value> The name of the workspace to
|
|
1601
|
-
use when downloading and
|
|
1602
|
-
validating all documents
|
|
1619
|
+
--max-custom-validation-concurrency=<value> [default: 5] Specify how many custom validators can run concurrently
|
|
1620
|
+
--max-fetch-concurrency=<value> [default: 25] Specify how many `client.fetch` requests are allow
|
|
1621
|
+
concurrency at once
|
|
1622
|
+
--workspace=<value> The name of the workspace to use when downloading and validating all
|
|
1623
|
+
documents
|
|
1603
1624
|
|
|
1604
1625
|
DESCRIPTION
|
|
1605
1626
|
Validate documents in a dataset against the studio schema
|
|
@@ -1607,22 +1628,22 @@ DESCRIPTION
|
|
|
1607
1628
|
EXAMPLES
|
|
1608
1629
|
Validates all documents in a Sanity project with more than one workspace
|
|
1609
1630
|
|
|
1610
|
-
$ sanity documents validate --workspace default
|
|
1631
|
+
$ pnpm exec sanity documents validate --workspace default
|
|
1611
1632
|
|
|
1612
1633
|
Override the dataset specified in the workspace
|
|
1613
1634
|
|
|
1614
|
-
$ sanity documents validate --workspace default --dataset staging
|
|
1635
|
+
$ pnpm exec sanity documents validate --workspace default --dataset staging
|
|
1615
1636
|
|
|
1616
1637
|
Save the results of the report into a file
|
|
1617
1638
|
|
|
1618
|
-
$ sanity documents validate --yes > report.txt
|
|
1639
|
+
$ pnpm exec sanity documents validate --yes > report.txt
|
|
1619
1640
|
|
|
1620
1641
|
Report out info level validation markers too
|
|
1621
1642
|
|
|
1622
|
-
$ sanity documents validate --level info
|
|
1643
|
+
$ pnpm exec sanity documents validate --level info
|
|
1623
1644
|
```
|
|
1624
1645
|
|
|
1625
|
-
_See code: [src/commands/documents/validate.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
1646
|
+
_See code: [src/commands/documents/validate.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/documents/validate.ts)_
|
|
1626
1647
|
|
|
1627
1648
|
## `sanity exec SCRIPT`
|
|
1628
1649
|
|
|
@@ -1630,7 +1651,7 @@ Executes a script within the Sanity Studio context
|
|
|
1630
1651
|
|
|
1631
1652
|
```
|
|
1632
1653
|
USAGE
|
|
1633
|
-
$ sanity exec SCRIPT... [--mock-browser-env] [--with-user-token]
|
|
1654
|
+
$ pnpm exec sanity exec SCRIPT... [--mock-browser-env] [--with-user-token]
|
|
1634
1655
|
|
|
1635
1656
|
ARGUMENTS
|
|
1636
1657
|
SCRIPT... Path to the script to execute
|
|
@@ -1645,27 +1666,25 @@ DESCRIPTION
|
|
|
1645
1666
|
EXAMPLES
|
|
1646
1667
|
Run the script at some/script.js in Sanity context
|
|
1647
1668
|
|
|
1648
|
-
$ sanity exec some/script.js
|
|
1669
|
+
$ pnpm exec sanity exec some/script.js
|
|
1649
1670
|
|
|
1650
|
-
Run the script at migrations/fullname.ts and configure `getCliClient()` from
|
|
1651
|
-
|
|
1671
|
+
Run the script at migrations/fullname.ts and configure `getCliClient()` from `sanity/cli` to include the current
|
|
1672
|
+
user's token
|
|
1652
1673
|
|
|
1653
|
-
$ sanity exec migrations/fullname.ts --with-user-token
|
|
1674
|
+
$ pnpm exec sanity exec migrations/fullname.ts --with-user-token
|
|
1654
1675
|
|
|
1655
1676
|
Run the script at scripts/browserScript.js in a mock browser environment
|
|
1656
1677
|
|
|
1657
|
-
$ sanity exec scripts/browserScript.js --mock-browser-env
|
|
1678
|
+
$ pnpm exec sanity exec scripts/browserScript.js --mock-browser-env
|
|
1658
1679
|
|
|
1659
|
-
Pass arbitrary arguments to scripts by separating them with a `--`. Arguments
|
|
1660
|
-
|
|
1661
|
-
following command would yield a `process.argv` of: `['/path/to/node',
|
|
1680
|
+
Pass arbitrary arguments to scripts by separating them with a `--`. Arguments are available in `process.argv` as
|
|
1681
|
+
they would in regular node scripts (eg the following command would yield a `process.argv` of: `['/path/to/node',
|
|
1662
1682
|
'/path/to/myscript.js', '--dry-run', 'positional-argument']`)
|
|
1663
1683
|
|
|
1664
|
-
$ sanity exec --mock-browser-env myscript.js -- --dry-run
|
|
1665
|
-
positional-argument
|
|
1684
|
+
$ pnpm exec sanity exec --mock-browser-env myscript.js -- --dry-run positional-argument
|
|
1666
1685
|
```
|
|
1667
1686
|
|
|
1668
|
-
_See code: [src/commands/exec.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
1687
|
+
_See code: [src/commands/exec.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/exec.ts)_
|
|
1669
1688
|
|
|
1670
1689
|
## `sanity functions add`
|
|
1671
1690
|
|
|
@@ -1673,68 +1692,48 @@ Add a Function to your Blueprint
|
|
|
1673
1692
|
|
|
1674
1693
|
```
|
|
1675
1694
|
USAGE
|
|
1676
|
-
$ sanity functions add [--example <value> | -n <value> | | --language
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
y-asset-create|media-library-asset-update|media-library-asset-delete... ]
|
|
1680
|
-
[--helpers] [--installer skip|npm|pnpm|yarn] [-i | ]
|
|
1695
|
+
$ pnpm exec sanity functions add [--example <value> | -n <value> | | --language ts|js | --javascript | | ] [--type
|
|
1696
|
+
document-create|document-delete|document-update|document-publish|media-library-asset-create|media-library-asset-upda
|
|
1697
|
+
te|media-library-asset-delete... ] [--helpers] [--installer skip|npm|pnpm|yarn] [-i | ]
|
|
1681
1698
|
|
|
1682
1699
|
FLAGS
|
|
1683
|
-
-i, --install
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
How to install the @sanity/functions helpers
|
|
1697
|
-
<options: skip|npm|pnpm|yarn>
|
|
1698
|
-
|
|
1699
|
-
--javascript
|
|
1700
|
-
Use JavaScript instead of TypeScript
|
|
1701
|
-
|
|
1702
|
-
--language=<option>
|
|
1703
|
-
[default: ts] Language of the new Function
|
|
1704
|
-
<options: ts|js>
|
|
1705
|
-
|
|
1706
|
-
--type=<option>...
|
|
1707
|
-
Document change event(s) that should trigger the function; you can specify
|
|
1708
|
-
multiple events by specifying this flag multiple times
|
|
1709
|
-
<options:
|
|
1710
|
-
document-create|document-delete|document-update|document-publish|media-librar
|
|
1711
|
-
y-asset-create|media-library-asset-update|media-library-asset-delete>
|
|
1700
|
+
-i, --install Shortcut for --fn-installer npm
|
|
1701
|
+
-n, --name=<value> Name of the Function to add
|
|
1702
|
+
--example=<value> Example to use for the Function
|
|
1703
|
+
--[no-]helpers Add helpers to the new Function
|
|
1704
|
+
--installer=<option> How to install the @sanity/functions helpers
|
|
1705
|
+
<options: skip|npm|pnpm|yarn>
|
|
1706
|
+
--javascript Use JavaScript instead of TypeScript
|
|
1707
|
+
--language=<option> [default: ts] Language of the new Function
|
|
1708
|
+
<options: ts|js>
|
|
1709
|
+
--type=<option>... Document change event(s) that should trigger the function; you can specify multiple events
|
|
1710
|
+
by specifying this flag multiple times
|
|
1711
|
+
<options: document-create|document-delete|document-update|document-publish|media-library-ass
|
|
1712
|
+
et-create|media-library-asset-update|media-library-asset-delete>
|
|
1712
1713
|
|
|
1713
1714
|
DESCRIPTION
|
|
1714
1715
|
Add a Function to your Blueprint
|
|
1715
1716
|
|
|
1716
|
-
Scaffolds a new Function in the functions/ folder and templates a resource for
|
|
1717
|
-
your Blueprint manifest.
|
|
1717
|
+
Scaffolds a new Function in the functions/ folder and templates a resource for your Blueprint manifest.
|
|
1718
1718
|
|
|
1719
|
-
Functions are serverless handlers triggered by document events (create, update,
|
|
1720
|
-
|
|
1719
|
+
Functions are serverless handlers triggered by document events (create, update, delete, publish) or media library
|
|
1720
|
+
events.
|
|
1721
1721
|
|
|
1722
|
-
After adding, use 'functions dev' to test locally, then 'blueprints deploy' to
|
|
1723
|
-
publish.
|
|
1722
|
+
After adding, use 'functions dev' to test locally, then 'blueprints deploy' to publish.
|
|
1724
1723
|
|
|
1725
1724
|
EXAMPLES
|
|
1726
|
-
$ sanity functions add
|
|
1725
|
+
$ pnpm exec sanity functions add
|
|
1727
1726
|
|
|
1728
|
-
$ sanity functions add --helpers
|
|
1727
|
+
$ pnpm exec sanity functions add --helpers
|
|
1729
1728
|
|
|
1730
|
-
$ sanity functions add --name my-function
|
|
1729
|
+
$ pnpm exec sanity functions add --name my-function
|
|
1731
1730
|
|
|
1732
|
-
$ sanity functions add --name my-function --type document-create
|
|
1731
|
+
$ pnpm exec sanity functions add --name my-function --type document-create
|
|
1733
1732
|
|
|
1734
|
-
$ sanity functions add --name my-function --type document-create --type document-update --lang js
|
|
1733
|
+
$ pnpm exec sanity functions add --name my-function --type document-create --type document-update --lang js
|
|
1735
1734
|
```
|
|
1736
1735
|
|
|
1737
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
1736
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.1.0/src/commands/functions/add.ts)_
|
|
1738
1737
|
|
|
1739
1738
|
## `sanity functions dev`
|
|
1740
1739
|
|
|
@@ -1742,36 +1741,33 @@ Start the Sanity Function emulator
|
|
|
1742
1741
|
|
|
1743
1742
|
```
|
|
1744
1743
|
USAGE
|
|
1745
|
-
$ sanity functions dev [-h <value>] [-p <value>] [-t <value>]
|
|
1744
|
+
$ pnpm exec sanity functions dev [-h <value>] [-p <value>] [-t <value>]
|
|
1746
1745
|
|
|
1747
1746
|
FLAGS
|
|
1748
|
-
-h, --host=<value> The local network interface at which to listen.
|
|
1749
|
-
[default: "localhost"]
|
|
1747
|
+
-h, --host=<value> The local network interface at which to listen. [default: "localhost"]
|
|
1750
1748
|
-p, --port=<value> TCP port to start emulator on. [default: 8080]
|
|
1751
|
-
-t, --timeout=<value> Maximum execution time for all functions, in seconds.
|
|
1752
|
-
|
|
1749
|
+
-t, --timeout=<value> Maximum execution time for all functions, in seconds. Takes precedence over function-specific
|
|
1750
|
+
`timeout`
|
|
1753
1751
|
|
|
1754
1752
|
DESCRIPTION
|
|
1755
1753
|
Start the Sanity Function emulator
|
|
1756
1754
|
|
|
1757
|
-
Runs a local, web-based development server to test your functions before
|
|
1758
|
-
deploying.
|
|
1755
|
+
Runs a local, web-based development server to test your functions before deploying.
|
|
1759
1756
|
|
|
1760
|
-
Open the emulator in your browser to interactively test your functions with the
|
|
1761
|
-
payload editor.
|
|
1757
|
+
Open the emulator in your browser to interactively test your functions with the payload editor.
|
|
1762
1758
|
|
|
1763
|
-
Optionally, set the host and port with the --host and --port flags. Function
|
|
1764
|
-
|
|
1759
|
+
Optionally, set the host and port with the --host and --port flags. Function timeout can be configured with the
|
|
1760
|
+
--timeout flag.
|
|
1765
1761
|
|
|
1766
1762
|
To invoke a function with the CLI, use 'functions test'.
|
|
1767
1763
|
|
|
1768
1764
|
EXAMPLES
|
|
1769
|
-
$ sanity functions dev --host 127.0.0.1 --port 8974
|
|
1765
|
+
$ pnpm exec sanity functions dev --host 127.0.0.1 --port 8974
|
|
1770
1766
|
|
|
1771
|
-
$ sanity functions dev --timeout 60
|
|
1767
|
+
$ pnpm exec sanity functions dev --timeout 60
|
|
1772
1768
|
```
|
|
1773
1769
|
|
|
1774
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
1770
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.1.0/src/commands/functions/dev.ts)_
|
|
1775
1771
|
|
|
1776
1772
|
## `sanity functions env add NAME KEY VALUE`
|
|
1777
1773
|
|
|
@@ -1779,7 +1775,7 @@ Add or set an environment variable for a deployed function
|
|
|
1779
1775
|
|
|
1780
1776
|
```
|
|
1781
1777
|
USAGE
|
|
1782
|
-
$ sanity functions env add NAME KEY VALUE
|
|
1778
|
+
$ pnpm exec sanity functions env add NAME KEY VALUE
|
|
1783
1779
|
|
|
1784
1780
|
ARGUMENTS
|
|
1785
1781
|
NAME The name of the Sanity Function
|
|
@@ -1789,18 +1785,16 @@ ARGUMENTS
|
|
|
1789
1785
|
DESCRIPTION
|
|
1790
1786
|
Add or set an environment variable for a deployed function
|
|
1791
1787
|
|
|
1792
|
-
Sets an environment variable in a deployed Sanity Function. If the variable
|
|
1793
|
-
already exists, its value is updated.
|
|
1788
|
+
Sets an environment variable in a deployed Sanity Function. If the variable already exists, its value is updated.
|
|
1794
1789
|
|
|
1795
|
-
Environment variables are useful for API keys, configuration values, and other
|
|
1796
|
-
|
|
1797
|
-
invocation.
|
|
1790
|
+
Environment variables are useful for API keys, configuration values, and other secrets that shouldn't be hardcoded.
|
|
1791
|
+
Changes take effect on the next function invocation.
|
|
1798
1792
|
|
|
1799
1793
|
EXAMPLES
|
|
1800
|
-
$ sanity functions env add MyFunction API_URL https://api.example.com/
|
|
1794
|
+
$ pnpm exec sanity functions env add MyFunction API_URL https://api.example.com/
|
|
1801
1795
|
```
|
|
1802
1796
|
|
|
1803
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
1797
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.1.0/src/commands/functions/env/add.ts)_
|
|
1804
1798
|
|
|
1805
1799
|
## `sanity functions env list NAME`
|
|
1806
1800
|
|
|
@@ -1808,7 +1802,7 @@ List environment variables for a deployed function
|
|
|
1808
1802
|
|
|
1809
1803
|
```
|
|
1810
1804
|
USAGE
|
|
1811
|
-
$ sanity functions env list NAME
|
|
1805
|
+
$ pnpm exec sanity functions env list NAME
|
|
1812
1806
|
|
|
1813
1807
|
ARGUMENTS
|
|
1814
1808
|
NAME The name of the Sanity Function
|
|
@@ -1816,17 +1810,15 @@ ARGUMENTS
|
|
|
1816
1810
|
DESCRIPTION
|
|
1817
1811
|
List environment variables for a deployed function
|
|
1818
1812
|
|
|
1819
|
-
Displays all environment variables (keys only) configured in a deployed Sanity
|
|
1820
|
-
Function.
|
|
1813
|
+
Displays all environment variables (keys only) configured in a deployed Sanity Function.
|
|
1821
1814
|
|
|
1822
|
-
Use 'functions env add' to set variables or 'functions env remove' to delete
|
|
1823
|
-
them.
|
|
1815
|
+
Use 'functions env add' to set variables or 'functions env remove' to delete them.
|
|
1824
1816
|
|
|
1825
1817
|
EXAMPLES
|
|
1826
|
-
$ sanity functions env list MyFunction
|
|
1818
|
+
$ pnpm exec sanity functions env list MyFunction
|
|
1827
1819
|
```
|
|
1828
1820
|
|
|
1829
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
1821
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.1.0/src/commands/functions/env/list.ts)_
|
|
1830
1822
|
|
|
1831
1823
|
## `sanity functions env remove NAME KEY`
|
|
1832
1824
|
|
|
@@ -1834,7 +1826,7 @@ Remove an environment variable from a deployed function
|
|
|
1834
1826
|
|
|
1835
1827
|
```
|
|
1836
1828
|
USAGE
|
|
1837
|
-
$ sanity functions env remove NAME KEY
|
|
1829
|
+
$ pnpm exec sanity functions env remove NAME KEY
|
|
1838
1830
|
|
|
1839
1831
|
ARGUMENTS
|
|
1840
1832
|
NAME The name of the Sanity Function
|
|
@@ -1843,16 +1835,16 @@ ARGUMENTS
|
|
|
1843
1835
|
DESCRIPTION
|
|
1844
1836
|
Remove an environment variable from a deployed function
|
|
1845
1837
|
|
|
1846
|
-
Deletes an environment variable from a deployed Sanity Function. The change
|
|
1847
|
-
|
|
1838
|
+
Deletes an environment variable from a deployed Sanity Function. The change takes effect on the next function
|
|
1839
|
+
invocation.
|
|
1848
1840
|
|
|
1849
1841
|
Use 'functions env list' to see current variables before removing.
|
|
1850
1842
|
|
|
1851
1843
|
EXAMPLES
|
|
1852
|
-
$ sanity functions env remove MyFunction API_URL
|
|
1844
|
+
$ pnpm exec sanity functions env remove MyFunction API_URL
|
|
1853
1845
|
```
|
|
1854
1846
|
|
|
1855
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
1847
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.1.0/src/commands/functions/env/remove.ts)_
|
|
1856
1848
|
|
|
1857
1849
|
## `sanity functions logs [NAME]`
|
|
1858
1850
|
|
|
@@ -1860,7 +1852,7 @@ Retrieve or delete logs for a Sanity Function
|
|
|
1860
1852
|
|
|
1861
1853
|
```
|
|
1862
1854
|
USAGE
|
|
1863
|
-
$ sanity functions logs [NAME] [-u] [-f [-d | -l <value> | -j]] [-w]
|
|
1855
|
+
$ pnpm exec sanity functions logs [NAME] [--stack <value>] [-u] [-f [-d | -l <value> | -j]] [-w]
|
|
1864
1856
|
|
|
1865
1857
|
ARGUMENTS
|
|
1866
1858
|
[NAME] The name of the Sanity Function
|
|
@@ -1872,27 +1864,27 @@ FLAGS
|
|
|
1872
1864
|
-l, --limit=<value> [default: 50] Total number of log entries to retrieve
|
|
1873
1865
|
-u, --utc Show dates in UTC time zone
|
|
1874
1866
|
-w, --watch Watch for new logs (streaming mode)
|
|
1867
|
+
--stack=<value> Stack name or ID to use instead of the locally configured Stack
|
|
1875
1868
|
|
|
1876
1869
|
DESCRIPTION
|
|
1877
1870
|
Retrieve or delete logs for a Sanity Function
|
|
1878
1871
|
|
|
1879
|
-
Fetches execution logs from a deployed function, useful for debugging
|
|
1880
|
-
production issues or monitoring activity.
|
|
1872
|
+
Fetches execution logs from a deployed function, useful for debugging production issues or monitoring activity.
|
|
1881
1873
|
|
|
1882
|
-
Use --watch (-w) to stream logs in real-time. Use --delete to clear all logs
|
|
1883
|
-
|
|
1874
|
+
Use --watch (-w) to stream logs in real-time. Use --delete to clear all logs for a function (requires confirmation
|
|
1875
|
+
unless --force is specified).
|
|
1884
1876
|
|
|
1885
1877
|
EXAMPLES
|
|
1886
|
-
$ sanity functions logs <name>
|
|
1878
|
+
$ pnpm exec sanity functions logs <name>
|
|
1887
1879
|
|
|
1888
|
-
$ sanity functions logs <name> --json
|
|
1880
|
+
$ pnpm exec sanity functions logs <name> --json
|
|
1889
1881
|
|
|
1890
|
-
$ sanity functions logs <name> --limit 100
|
|
1882
|
+
$ pnpm exec sanity functions logs <name> --limit 100
|
|
1891
1883
|
|
|
1892
|
-
$ sanity functions logs <name> --delete
|
|
1884
|
+
$ pnpm exec sanity functions logs <name> --delete
|
|
1893
1885
|
```
|
|
1894
1886
|
|
|
1895
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
1887
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.1.0/src/commands/functions/logs.ts)_
|
|
1896
1888
|
|
|
1897
1889
|
## `sanity functions test [NAME]`
|
|
1898
1890
|
|
|
@@ -1900,12 +1892,10 @@ Invoke a local Sanity Function
|
|
|
1900
1892
|
|
|
1901
1893
|
```
|
|
1902
1894
|
USAGE
|
|
1903
|
-
$ sanity functions test [NAME] [--data-before <value> | [-d <value> | -f
|
|
1904
|
-
<value> | --
|
|
1905
|
-
<value> |
|
|
1906
|
-
[--
|
|
1907
|
-
<value>] [-a <value>] [--with-user-token] [--media-library-id <value> |
|
|
1908
|
-
--project-id <value> | --dataset <value>]
|
|
1895
|
+
$ pnpm exec sanity functions test [NAME] [--data-before <value> | [-d <value> | -f <value> | --document-id <value>] | | |
|
|
1896
|
+
--file-before <value> | --file-after <value> | --document-id-before <value> | --document-id-after <value>]
|
|
1897
|
+
[--data-after <value> | | | | | | | ] [-e create|update|delete] [-t <value>] [-a <value>] [--with-user-token]
|
|
1898
|
+
[--media-library-id <value> | --project-id <value> | --dataset <value>]
|
|
1909
1899
|
|
|
1910
1900
|
ARGUMENTS
|
|
1911
1901
|
[NAME] The name of the Sanity Function
|
|
@@ -1932,24 +1922,23 @@ FLAGS
|
|
|
1932
1922
|
DESCRIPTION
|
|
1933
1923
|
Invoke a local Sanity Function
|
|
1934
1924
|
|
|
1935
|
-
Executes a function locally with the provided payload, simulating how it would
|
|
1936
|
-
|
|
1925
|
+
Executes a function locally with the provided payload, simulating how it would run when deployed. Use this to test
|
|
1926
|
+
your function logic before deploying.
|
|
1937
1927
|
|
|
1938
|
-
Provide test data via --data (inline JSON), --file (JSON file), or
|
|
1939
|
-
|
|
1940
|
-
pairs to simulate document changes.
|
|
1928
|
+
Provide test data via --data (inline JSON), --file (JSON file), or --document-id (fetch from Sanity). For update
|
|
1929
|
+
events, use the before/after flag pairs to simulate document changes.
|
|
1941
1930
|
|
|
1942
1931
|
EXAMPLES
|
|
1943
|
-
$ sanity functions test <name> --data '{ "id": 1 }'
|
|
1932
|
+
$ pnpm exec sanity functions test <name> --data '{ "id": 1 }'
|
|
1944
1933
|
|
|
1945
|
-
$ sanity functions test <name> --file 'payload.json'
|
|
1934
|
+
$ pnpm exec sanity functions test <name> --file 'payload.json'
|
|
1946
1935
|
|
|
1947
|
-
$ sanity functions test <name> --data '{ "id": 1 }' --timeout 60
|
|
1936
|
+
$ pnpm exec sanity functions test <name> --data '{ "id": 1 }' --timeout 60
|
|
1948
1937
|
|
|
1949
|
-
$ sanity functions test <name> --event update --data-before '{ "title": "before" }' --data-after '{ "title": "after" }'
|
|
1938
|
+
$ pnpm exec sanity functions test <name> --event update --data-before '{ "title": "before" }' --data-after '{ "title": "after" }'
|
|
1950
1939
|
```
|
|
1951
1940
|
|
|
1952
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
1941
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.1.0/src/commands/functions/test.ts)_
|
|
1953
1942
|
|
|
1954
1943
|
## `sanity graphql deploy`
|
|
1955
1944
|
|
|
@@ -1957,24 +1946,21 @@ Deploy a GraphQL API from the current Sanity schema
|
|
|
1957
1946
|
|
|
1958
1947
|
```
|
|
1959
1948
|
USAGE
|
|
1960
|
-
$ sanity graphql deploy [--api <value>...] [--dataset <value>] [--dry-run]
|
|
1961
|
-
[--
|
|
1962
|
-
[--playground] [--tag <value>] [--with-union-cache]
|
|
1949
|
+
$ pnpm exec sanity graphql deploy [--api <value>...] [--dataset <value>] [--dry-run] [--force] [--generation gen1|gen2|gen3]
|
|
1950
|
+
[--non-null-document-fields] [--playground] [--tag <value>] [--with-union-cache]
|
|
1963
1951
|
|
|
1964
1952
|
FLAGS
|
|
1965
|
-
--api=<value>... Only deploy API with this ID. Can be specified
|
|
1966
|
-
multiple times.
|
|
1953
|
+
--api=<value>... Only deploy API with this ID. Can be specified multiple times.
|
|
1967
1954
|
--dataset=<value> Deploy API for the given dataset
|
|
1968
|
-
--dry-run Validate defined GraphQL APIs, check for breaking
|
|
1969
|
-
changes, skip deploy
|
|
1955
|
+
--dry-run Validate defined GraphQL APIs, check for breaking changes, skip deploy
|
|
1970
1956
|
--force Deploy API without confirming breaking changes
|
|
1971
1957
|
--generation=<option> API generation to deploy (defaults to "gen3")
|
|
1972
1958
|
<options: gen1|gen2|gen3>
|
|
1973
1959
|
--non-null-document-fields Use non-null document fields (_id, _type etc)
|
|
1974
1960
|
--[no-]playground Enable GraphQL playground for easier debugging
|
|
1975
1961
|
--tag=<value> Deploy API(s) to given tag (defaults to "default")
|
|
1976
|
-
--with-union-cache Enable union cache that optimizes schema generation
|
|
1977
|
-
|
|
1962
|
+
--with-union-cache Enable union cache that optimizes schema generation for schemas with many self referencing
|
|
1963
|
+
types
|
|
1978
1964
|
|
|
1979
1965
|
DESCRIPTION
|
|
1980
1966
|
Deploy a GraphQL API from the current Sanity schema
|
|
@@ -1982,22 +1968,22 @@ DESCRIPTION
|
|
|
1982
1968
|
EXAMPLES
|
|
1983
1969
|
Deploy all defined GraphQL APIs
|
|
1984
1970
|
|
|
1985
|
-
$ sanity graphql deploy
|
|
1971
|
+
$ pnpm exec sanity graphql deploy
|
|
1986
1972
|
|
|
1987
1973
|
Validate defined GraphQL APIs, check for breaking changes, skip deploy
|
|
1988
1974
|
|
|
1989
|
-
$ sanity graphql deploy --dry-run
|
|
1975
|
+
$ pnpm exec sanity graphql deploy --dry-run
|
|
1990
1976
|
|
|
1991
1977
|
Deploy only the GraphQL APIs with the IDs "staging" and "ios"
|
|
1992
1978
|
|
|
1993
|
-
$ sanity graphql deploy --api staging --api ios
|
|
1979
|
+
$ pnpm exec sanity graphql deploy --api staging --api ios
|
|
1994
1980
|
|
|
1995
1981
|
Deploy all defined GraphQL APIs, overriding any playground setting
|
|
1996
1982
|
|
|
1997
|
-
$ sanity graphql deploy --playground
|
|
1983
|
+
$ pnpm exec sanity graphql deploy --playground
|
|
1998
1984
|
```
|
|
1999
1985
|
|
|
2000
|
-
_See code: [src/commands/graphql/deploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
1986
|
+
_See code: [src/commands/graphql/deploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/graphql/deploy.ts)_
|
|
2001
1987
|
|
|
2002
1988
|
## `sanity graphql list`
|
|
2003
1989
|
|
|
@@ -2005,7 +1991,7 @@ List all GraphQL endpoints deployed for this project
|
|
|
2005
1991
|
|
|
2006
1992
|
```
|
|
2007
1993
|
USAGE
|
|
2008
|
-
$ sanity graphql list
|
|
1994
|
+
$ pnpm exec sanity graphql list
|
|
2009
1995
|
|
|
2010
1996
|
DESCRIPTION
|
|
2011
1997
|
List all GraphQL endpoints deployed for this project
|
|
@@ -2013,10 +1999,10 @@ DESCRIPTION
|
|
|
2013
1999
|
EXAMPLES
|
|
2014
2000
|
List GraphQL endpoints for the current project
|
|
2015
2001
|
|
|
2016
|
-
$ sanity graphql list
|
|
2002
|
+
$ pnpm exec sanity graphql list
|
|
2017
2003
|
```
|
|
2018
2004
|
|
|
2019
|
-
_See code: [src/commands/graphql/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2005
|
+
_See code: [src/commands/graphql/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/graphql/list.ts)_
|
|
2020
2006
|
|
|
2021
2007
|
## `sanity graphql undeploy`
|
|
2022
2008
|
|
|
@@ -2024,12 +2010,10 @@ Remove a deployed GraphQL API
|
|
|
2024
2010
|
|
|
2025
2011
|
```
|
|
2026
2012
|
USAGE
|
|
2027
|
-
$ sanity graphql undeploy [--api <value>] [--dataset <value>] [--force]
|
|
2028
|
-
[--project <value>] [--tag <value>]
|
|
2013
|
+
$ pnpm exec sanity graphql undeploy [--api <value>] [--dataset <value>] [--force] [--project <value>] [--tag <value>]
|
|
2029
2014
|
|
|
2030
2015
|
FLAGS
|
|
2031
|
-
--api=<value> Undeploy API with this ID (project, dataset and tag flags
|
|
2032
|
-
take precedence)
|
|
2016
|
+
--api=<value> Undeploy API with this ID (project, dataset and tag flags take precedence)
|
|
2033
2017
|
--dataset=<value> Dataset to undeploy GraphQL API from
|
|
2034
2018
|
--force Skip confirmation prompt
|
|
2035
2019
|
--project=<value> Project ID to delete GraphQL API for
|
|
@@ -2041,26 +2025,26 @@ DESCRIPTION
|
|
|
2041
2025
|
EXAMPLES
|
|
2042
2026
|
Undeploy GraphQL API for current project and dataset
|
|
2043
2027
|
|
|
2044
|
-
$ sanity graphql undeploy
|
|
2028
|
+
$ pnpm exec sanity graphql undeploy
|
|
2045
2029
|
|
|
2046
2030
|
Undeploy API with ID "ios"
|
|
2047
2031
|
|
|
2048
|
-
$ sanity graphql undeploy --api ios
|
|
2032
|
+
$ pnpm exec sanity graphql undeploy --api ios
|
|
2049
2033
|
|
|
2050
2034
|
Undeploy GraphQL API for staging dataset
|
|
2051
2035
|
|
|
2052
|
-
$ sanity graphql undeploy --dataset staging
|
|
2036
|
+
$ pnpm exec sanity graphql undeploy --dataset staging
|
|
2053
2037
|
|
|
2054
2038
|
Undeploy GraphQL API for staging dataset with "next" tag
|
|
2055
2039
|
|
|
2056
|
-
$ sanity graphql undeploy --dataset staging --tag next
|
|
2040
|
+
$ pnpm exec sanity graphql undeploy --dataset staging --tag next
|
|
2057
2041
|
|
|
2058
2042
|
Undeploy GraphQL API without confirmation prompt
|
|
2059
2043
|
|
|
2060
|
-
$ sanity graphql undeploy --force
|
|
2044
|
+
$ pnpm exec sanity graphql undeploy --force
|
|
2061
2045
|
```
|
|
2062
2046
|
|
|
2063
|
-
_See code: [src/commands/graphql/undeploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2047
|
+
_See code: [src/commands/graphql/undeploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/graphql/undeploy.ts)_
|
|
2064
2048
|
|
|
2065
2049
|
## `sanity help [COMMAND]`
|
|
2066
2050
|
|
|
@@ -2068,7 +2052,7 @@ Display help for sanity.
|
|
|
2068
2052
|
|
|
2069
2053
|
```
|
|
2070
2054
|
USAGE
|
|
2071
|
-
$ sanity help [COMMAND...] [-n]
|
|
2055
|
+
$ pnpm exec sanity help [COMMAND...] [-n]
|
|
2072
2056
|
|
|
2073
2057
|
ARGUMENTS
|
|
2074
2058
|
[COMMAND...] Command to show help for.
|
|
@@ -2088,7 +2072,7 @@ Print details of a given webhook delivery attempt
|
|
|
2088
2072
|
|
|
2089
2073
|
```
|
|
2090
2074
|
USAGE
|
|
2091
|
-
$ sanity hook attempt ATTEMPTID
|
|
2075
|
+
$ pnpm exec sanity hook attempt ATTEMPTID
|
|
2092
2076
|
|
|
2093
2077
|
ARGUMENTS
|
|
2094
2078
|
ATTEMPTID The delivery attempt ID to get details for
|
|
@@ -2099,10 +2083,10 @@ DESCRIPTION
|
|
|
2099
2083
|
EXAMPLES
|
|
2100
2084
|
Print details of webhook delivery attempt with ID abc123
|
|
2101
2085
|
|
|
2102
|
-
$ sanity hook attempt abc123
|
|
2086
|
+
$ pnpm exec sanity hook attempt abc123
|
|
2103
2087
|
```
|
|
2104
2088
|
|
|
2105
|
-
_See code: [src/commands/hook/attempt.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2089
|
+
_See code: [src/commands/hook/attempt.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/hook/attempt.ts)_
|
|
2106
2090
|
|
|
2107
2091
|
## `sanity hook create`
|
|
2108
2092
|
|
|
@@ -2110,7 +2094,7 @@ Create a new webhook for the current project
|
|
|
2110
2094
|
|
|
2111
2095
|
```
|
|
2112
2096
|
USAGE
|
|
2113
|
-
$ sanity hook create
|
|
2097
|
+
$ pnpm exec sanity hook create
|
|
2114
2098
|
|
|
2115
2099
|
DESCRIPTION
|
|
2116
2100
|
Create a new webhook for the current project
|
|
@@ -2118,10 +2102,10 @@ DESCRIPTION
|
|
|
2118
2102
|
EXAMPLES
|
|
2119
2103
|
Create a new webhook for the current project
|
|
2120
2104
|
|
|
2121
|
-
$ sanity hook create
|
|
2105
|
+
$ pnpm exec sanity hook create
|
|
2122
2106
|
```
|
|
2123
2107
|
|
|
2124
|
-
_See code: [src/commands/hook/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2108
|
+
_See code: [src/commands/hook/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/hook/create.ts)_
|
|
2125
2109
|
|
|
2126
2110
|
## `sanity hook delete [NAME]`
|
|
2127
2111
|
|
|
@@ -2129,7 +2113,7 @@ Delete a hook within your project
|
|
|
2129
2113
|
|
|
2130
2114
|
```
|
|
2131
2115
|
USAGE
|
|
2132
|
-
$ sanity hook delete [NAME]
|
|
2116
|
+
$ pnpm exec sanity hook delete [NAME]
|
|
2133
2117
|
|
|
2134
2118
|
ARGUMENTS
|
|
2135
2119
|
[NAME] Name of hook to delete (will prompt if not provided)
|
|
@@ -2140,14 +2124,14 @@ DESCRIPTION
|
|
|
2140
2124
|
EXAMPLES
|
|
2141
2125
|
Interactively select and delete a hook
|
|
2142
2126
|
|
|
2143
|
-
$ sanity hook delete
|
|
2127
|
+
$ pnpm exec sanity hook delete
|
|
2144
2128
|
|
|
2145
2129
|
Delete a specific hook by name
|
|
2146
2130
|
|
|
2147
|
-
$ sanity hook delete my-hook
|
|
2131
|
+
$ pnpm exec sanity hook delete my-hook
|
|
2148
2132
|
```
|
|
2149
2133
|
|
|
2150
|
-
_See code: [src/commands/hook/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2134
|
+
_See code: [src/commands/hook/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/hook/delete.ts)_
|
|
2151
2135
|
|
|
2152
2136
|
## `sanity hook list`
|
|
2153
2137
|
|
|
@@ -2155,7 +2139,7 @@ List hooks for a given project
|
|
|
2155
2139
|
|
|
2156
2140
|
```
|
|
2157
2141
|
USAGE
|
|
2158
|
-
$ sanity hook list
|
|
2142
|
+
$ pnpm exec sanity hook list
|
|
2159
2143
|
|
|
2160
2144
|
DESCRIPTION
|
|
2161
2145
|
List hooks for a given project
|
|
@@ -2163,10 +2147,10 @@ DESCRIPTION
|
|
|
2163
2147
|
EXAMPLES
|
|
2164
2148
|
List hooks for a given project
|
|
2165
2149
|
|
|
2166
|
-
$ sanity hook list
|
|
2150
|
+
$ pnpm exec sanity hook list
|
|
2167
2151
|
```
|
|
2168
2152
|
|
|
2169
|
-
_See code: [src/commands/hook/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2153
|
+
_See code: [src/commands/hook/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/hook/list.ts)_
|
|
2170
2154
|
|
|
2171
2155
|
## `sanity hook logs [NAME]`
|
|
2172
2156
|
|
|
@@ -2174,7 +2158,7 @@ List latest log entries for a given hook
|
|
|
2174
2158
|
|
|
2175
2159
|
```
|
|
2176
2160
|
USAGE
|
|
2177
|
-
$ sanity hook logs [NAME] [--detailed]
|
|
2161
|
+
$ pnpm exec sanity hook logs [NAME] [--detailed]
|
|
2178
2162
|
|
|
2179
2163
|
ARGUMENTS
|
|
2180
2164
|
[NAME] Name of the hook to show logs for
|
|
@@ -2188,14 +2172,14 @@ DESCRIPTION
|
|
|
2188
2172
|
EXAMPLES
|
|
2189
2173
|
List latest log entries for a given hook
|
|
2190
2174
|
|
|
2191
|
-
$ sanity hook logs
|
|
2175
|
+
$ pnpm exec sanity hook logs
|
|
2192
2176
|
|
|
2193
2177
|
List latest log entries for a specific hook by name
|
|
2194
2178
|
|
|
2195
|
-
$ sanity hook logs [NAME]
|
|
2179
|
+
$ pnpm exec sanity hook logs [NAME]
|
|
2196
2180
|
```
|
|
2197
2181
|
|
|
2198
|
-
_See code: [src/commands/hook/logs.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2182
|
+
_See code: [src/commands/hook/logs.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/hook/logs.ts)_
|
|
2199
2183
|
|
|
2200
2184
|
## `sanity init`
|
|
2201
2185
|
|
|
@@ -2203,36 +2187,28 @@ Initialize a new Sanity Studio, project and/or app
|
|
|
2203
2187
|
|
|
2204
2188
|
```
|
|
2205
2189
|
USAGE
|
|
2206
|
-
$ sanity init [--json] [--auto-updates | --bare] [--coupon <code>
|
|
2207
|
-
| --
|
|
2208
|
-
<
|
|
2209
|
-
[--
|
|
2210
|
-
|
|
2211
|
-
] [--project <id> | --create-project <name>] [--provider <provider>]
|
|
2212
|
-
[--template <template> | ] [--typescript | ] [--visibility <mode>] [-y]
|
|
2190
|
+
$ pnpm exec sanity init [--json] [--auto-updates | --bare] [--coupon <code> | --project-plan <name>] [--dataset
|
|
2191
|
+
<name> | --dataset-default] [--env <filename> | ] [--git <message> | ] [--mcp] [--nextjs-add-config-files]
|
|
2192
|
+
[--nextjs-append-env] [--nextjs-embed-studio] [--organization <id>] [--output-path <path> | ] [--overwrite-files]
|
|
2193
|
+
[--package-manager <manager> | ] [--project <id> | --create-project <name>] [--provider <provider>] [--template
|
|
2194
|
+
<template> | ] [--typescript | ] [--visibility <mode>] [-y]
|
|
2213
2195
|
|
|
2214
2196
|
FLAGS
|
|
2215
|
-
-y, --yes Unattended mode, answers "yes" to any "yes/no"
|
|
2216
|
-
prompt and otherwise uses defaults
|
|
2197
|
+
-y, --yes Unattended mode, answers "yes" to any "yes/no" prompt and otherwise uses defaults
|
|
2217
2198
|
--[no-]auto-updates Enable auto updates of studio versions
|
|
2218
|
-
--bare Skip the Studio initialization and only print
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
--coupon=<code> Optionally select a coupon for a new project
|
|
2222
|
-
(cannot be used with --project-plan)
|
|
2199
|
+
--bare Skip the Studio initialization and only print the selected project ID and dataset
|
|
2200
|
+
name to stdout
|
|
2201
|
+
--coupon=<code> Optionally select a coupon for a new project (cannot be used with --project-plan)
|
|
2223
2202
|
--create-project=<name> Create a new project with the given name
|
|
2224
2203
|
--dataset=<name> Dataset name for the studio
|
|
2225
|
-
--dataset-default Set up a project with a public dataset named
|
|
2226
|
-
"production"
|
|
2204
|
+
--dataset-default Set up a project with a public dataset named "production"
|
|
2227
2205
|
--env=<filename> Write environment variables to file
|
|
2228
|
-
--[no-]git=<message> Specify a commit message for initial commit,
|
|
2229
|
-
or disable git init
|
|
2206
|
+
--[no-]git=<message> Specify a commit message for initial commit, or disable git init
|
|
2230
2207
|
--[no-]mcp Enable AI editor integration (MCP) setup
|
|
2231
2208
|
--organization=<id> Organization ID to use for the project
|
|
2232
2209
|
--output-path=<path> Path to write studio project to
|
|
2233
2210
|
--[no-]overwrite-files Overwrite existing files
|
|
2234
|
-
--package-manager=<manager> Specify which package manager to use [allowed:
|
|
2235
|
-
npm, yarn, pnpm]
|
|
2211
|
+
--package-manager=<manager> Specify which package manager to use [allowed: npm, yarn, pnpm]
|
|
2236
2212
|
--project=<id> Project ID to use for the studio
|
|
2237
2213
|
--project-plan=<name> Optionally select a plan for a new project
|
|
2238
2214
|
--provider=<provider> Login provider to use
|
|
@@ -2252,31 +2228,27 @@ DESCRIPTION
|
|
|
2252
2228
|
Initialize a new Sanity Studio, project and/or app
|
|
2253
2229
|
|
|
2254
2230
|
EXAMPLES
|
|
2255
|
-
$ sanity init
|
|
2231
|
+
$ pnpm exec sanity init
|
|
2256
2232
|
|
|
2257
2233
|
Initialize a new project with a public dataset named "production"
|
|
2258
2234
|
|
|
2259
|
-
$ sanity init --dataset-default
|
|
2235
|
+
$ pnpm exec sanity init --dataset-default
|
|
2260
2236
|
|
|
2261
2237
|
Initialize a project with the given project ID and dataset to the given path
|
|
2262
2238
|
|
|
2263
|
-
$ sanity init -y --project abc123 --dataset production --output-path
|
|
2264
|
-
~/myproj
|
|
2239
|
+
$ pnpm exec sanity init -y --project abc123 --dataset production --output-path ~/myproj
|
|
2265
2240
|
|
|
2266
|
-
Initialize a project with the given project ID and dataset using the moviedb
|
|
2267
|
-
template to the given path
|
|
2241
|
+
Initialize a project with the given project ID and dataset using the moviedb template to the given path
|
|
2268
2242
|
|
|
2269
|
-
$ sanity init -y --project abc123 --dataset staging --template moviedb
|
|
2270
|
-
--output-path .
|
|
2243
|
+
$ pnpm exec sanity init -y --project abc123 --dataset staging --template moviedb --output-path .
|
|
2271
2244
|
|
|
2272
2245
|
Create a brand new project with name "Movies Unlimited"
|
|
2273
2246
|
|
|
2274
|
-
$ sanity init -y --create-project "Movies Unlimited" --dataset moviedb \
|
|
2275
|
-
--
|
|
2276
|
-
/Users/espenh/movies-unlimited
|
|
2247
|
+
$ pnpm exec sanity init -y --create-project "Movies Unlimited" --dataset moviedb --visibility private --template moviedb \
|
|
2248
|
+
--output-path /Users/espenh/movies-unlimited
|
|
2277
2249
|
```
|
|
2278
2250
|
|
|
2279
|
-
_See code: [src/commands/init.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2251
|
+
_See code: [src/commands/init.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/init.ts)_
|
|
2280
2252
|
|
|
2281
2253
|
## `sanity install [PACKAGES]`
|
|
2282
2254
|
|
|
@@ -2284,7 +2256,7 @@ Installs dependencies for Sanity Studio project
|
|
|
2284
2256
|
|
|
2285
2257
|
```
|
|
2286
2258
|
USAGE
|
|
2287
|
-
$ sanity install [PACKAGES...]
|
|
2259
|
+
$ pnpm exec sanity install [PACKAGES...]
|
|
2288
2260
|
|
|
2289
2261
|
ARGUMENTS
|
|
2290
2262
|
[PACKAGES...] Packages to install
|
|
@@ -2293,14 +2265,14 @@ DESCRIPTION
|
|
|
2293
2265
|
Installs dependencies for Sanity Studio project
|
|
2294
2266
|
|
|
2295
2267
|
EXAMPLES
|
|
2296
|
-
$ sanity install
|
|
2268
|
+
$ pnpm exec sanity install
|
|
2297
2269
|
|
|
2298
|
-
$ sanity install @sanity/vision
|
|
2270
|
+
$ pnpm exec sanity install @sanity/vision
|
|
2299
2271
|
|
|
2300
|
-
$ sanity install some-package another-package
|
|
2272
|
+
$ pnpm exec sanity install some-package another-package
|
|
2301
2273
|
```
|
|
2302
2274
|
|
|
2303
|
-
_See code: [src/commands/install.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2275
|
+
_See code: [src/commands/install.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/install.ts)_
|
|
2304
2276
|
|
|
2305
2277
|
## `sanity learn`
|
|
2306
2278
|
|
|
@@ -2308,13 +2280,13 @@ Opens Sanity Learn in your web browser
|
|
|
2308
2280
|
|
|
2309
2281
|
```
|
|
2310
2282
|
USAGE
|
|
2311
|
-
$ sanity learn
|
|
2283
|
+
$ pnpm exec sanity learn
|
|
2312
2284
|
|
|
2313
2285
|
DESCRIPTION
|
|
2314
2286
|
Opens Sanity Learn in your web browser
|
|
2315
2287
|
```
|
|
2316
2288
|
|
|
2317
|
-
_See code: [src/commands/learn.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2289
|
+
_See code: [src/commands/learn.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/learn.ts)_
|
|
2318
2290
|
|
|
2319
2291
|
## `sanity login`
|
|
2320
2292
|
|
|
@@ -2322,14 +2294,12 @@ Authenticates the CLI for access to Sanity projects
|
|
|
2322
2294
|
|
|
2323
2295
|
```
|
|
2324
2296
|
USAGE
|
|
2325
|
-
$ sanity login [--open] [--provider <providerId>] [--sso <slug>]
|
|
2297
|
+
$ pnpm exec sanity login [--open] [--provider <providerId>] [--sso <slug>]
|
|
2326
2298
|
|
|
2327
2299
|
FLAGS
|
|
2328
|
-
--[no-]open Open a browser window to log in (`--no-open` only
|
|
2329
|
-
prints URL)
|
|
2300
|
+
--[no-]open Open a browser window to log in (`--no-open` only prints URL)
|
|
2330
2301
|
--provider=<providerId> Log in using the given provider
|
|
2331
|
-
--sso=<slug> Log in using Single Sign-On, using the given
|
|
2332
|
-
organization slug
|
|
2302
|
+
--sso=<slug> Log in using Single Sign-On, using the given organization slug
|
|
2333
2303
|
|
|
2334
2304
|
DESCRIPTION
|
|
2335
2305
|
Authenticates the CLI for access to Sanity projects
|
|
@@ -2337,18 +2307,18 @@ DESCRIPTION
|
|
|
2337
2307
|
EXAMPLES
|
|
2338
2308
|
Log in using default settings
|
|
2339
2309
|
|
|
2340
|
-
$ sanity login
|
|
2310
|
+
$ pnpm exec sanity login
|
|
2341
2311
|
|
|
2342
2312
|
Log in using Single Sign-On with the "my-organization" slug
|
|
2343
2313
|
|
|
2344
|
-
$ sanity login --sso my-organization
|
|
2314
|
+
$ pnpm exec sanity login --sso my-organization
|
|
2345
2315
|
|
|
2346
2316
|
Login with GitHub provider, but do not open a browser window automatically
|
|
2347
2317
|
|
|
2348
|
-
$ sanity login --provider github --no-open
|
|
2318
|
+
$ pnpm exec sanity login --provider github --no-open
|
|
2349
2319
|
```
|
|
2350
2320
|
|
|
2351
|
-
_See code: [src/commands/login.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2321
|
+
_See code: [src/commands/login.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/login.ts)_
|
|
2352
2322
|
|
|
2353
2323
|
## `sanity logout`
|
|
2354
2324
|
|
|
@@ -2356,13 +2326,13 @@ Logs out the CLI from the current user session
|
|
|
2356
2326
|
|
|
2357
2327
|
```
|
|
2358
2328
|
USAGE
|
|
2359
|
-
$ sanity logout
|
|
2329
|
+
$ pnpm exec sanity logout
|
|
2360
2330
|
|
|
2361
2331
|
DESCRIPTION
|
|
2362
2332
|
Logs out the CLI from the current user session
|
|
2363
2333
|
```
|
|
2364
2334
|
|
|
2365
|
-
_See code: [src/commands/logout.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2335
|
+
_See code: [src/commands/logout.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/logout.ts)_
|
|
2366
2336
|
|
|
2367
2337
|
## `sanity manage`
|
|
2368
2338
|
|
|
@@ -2370,13 +2340,13 @@ Opens project management interface in your web browser
|
|
|
2370
2340
|
|
|
2371
2341
|
```
|
|
2372
2342
|
USAGE
|
|
2373
|
-
$ sanity manage
|
|
2343
|
+
$ pnpm exec sanity manage
|
|
2374
2344
|
|
|
2375
2345
|
DESCRIPTION
|
|
2376
2346
|
Opens project management interface in your web browser
|
|
2377
2347
|
```
|
|
2378
2348
|
|
|
2379
|
-
_See code: [src/commands/manage.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2349
|
+
_See code: [src/commands/manage.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/manage.ts)_
|
|
2380
2350
|
|
|
2381
2351
|
## `sanity manifest extract`
|
|
2382
2352
|
|
|
@@ -2384,29 +2354,27 @@ Extracts the studio configuration as one or more JSON manifest files.
|
|
|
2384
2354
|
|
|
2385
2355
|
```
|
|
2386
2356
|
USAGE
|
|
2387
|
-
$ sanity manifest extract [--path <value>]
|
|
2357
|
+
$ pnpm exec sanity manifest extract [--path <value>]
|
|
2388
2358
|
|
|
2389
2359
|
FLAGS
|
|
2390
|
-
--path=<value> [default: /dist/static] Optional path to specify destination
|
|
2391
|
-
directory of the manifest files
|
|
2360
|
+
--path=<value> [default: /dist/static] Optional path to specify destination directory of the manifest files
|
|
2392
2361
|
|
|
2393
2362
|
DESCRIPTION
|
|
2394
2363
|
Extracts the studio configuration as one or more JSON manifest files.
|
|
2395
2364
|
|
|
2396
|
-
**Note**: This command is experimental and subject to change. It is currently
|
|
2397
|
-
intended for use with Create only.
|
|
2365
|
+
**Note**: This command is experimental and subject to change. It is currently intended for use with Create only.
|
|
2398
2366
|
|
|
2399
2367
|
EXAMPLES
|
|
2400
2368
|
Extracts manifests
|
|
2401
2369
|
|
|
2402
|
-
$ sanity manifest extract
|
|
2370
|
+
$ pnpm exec sanity manifest extract
|
|
2403
2371
|
|
|
2404
2372
|
Extracts manifests into /public/static
|
|
2405
2373
|
|
|
2406
|
-
$ sanity manifest extract --path /public/static
|
|
2374
|
+
$ pnpm exec sanity manifest extract --path /public/static
|
|
2407
2375
|
```
|
|
2408
2376
|
|
|
2409
|
-
_See code: [src/commands/manifest/extract.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2377
|
+
_See code: [src/commands/manifest/extract.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/manifest/extract.ts)_
|
|
2410
2378
|
|
|
2411
2379
|
## `sanity mcp configure`
|
|
2412
2380
|
|
|
@@ -2414,19 +2382,18 @@ Configure Sanity MCP server for AI editors (Claude Code, Codex CLI, Cursor, Gemi
|
|
|
2414
2382
|
|
|
2415
2383
|
```
|
|
2416
2384
|
USAGE
|
|
2417
|
-
$ sanity mcp configure
|
|
2385
|
+
$ pnpm exec sanity mcp configure
|
|
2418
2386
|
|
|
2419
2387
|
DESCRIPTION
|
|
2420
|
-
Configure Sanity MCP server for AI editors (Claude Code, Codex CLI, Cursor,
|
|
2421
|
-
Gemini CLI, GitHub Copilot CLI, VS Code)
|
|
2388
|
+
Configure Sanity MCP server for AI editors (Claude Code, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, VS Code)
|
|
2422
2389
|
|
|
2423
2390
|
EXAMPLES
|
|
2424
2391
|
Configure Sanity MCP server for detected AI editors
|
|
2425
2392
|
|
|
2426
|
-
$ sanity mcp configure
|
|
2393
|
+
$ pnpm exec sanity mcp configure
|
|
2427
2394
|
```
|
|
2428
2395
|
|
|
2429
|
-
_See code: [src/commands/mcp/configure.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2396
|
+
_See code: [src/commands/mcp/configure.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/mcp/configure.ts)_
|
|
2430
2397
|
|
|
2431
2398
|
## `sanity media create-aspect`
|
|
2432
2399
|
|
|
@@ -2434,7 +2401,7 @@ Create a new aspect definition file
|
|
|
2434
2401
|
|
|
2435
2402
|
```
|
|
2436
2403
|
USAGE
|
|
2437
|
-
$ sanity media create-aspect
|
|
2404
|
+
$ pnpm exec sanity media create-aspect
|
|
2438
2405
|
|
|
2439
2406
|
DESCRIPTION
|
|
2440
2407
|
Create a new aspect definition file
|
|
@@ -2442,10 +2409,10 @@ DESCRIPTION
|
|
|
2442
2409
|
EXAMPLES
|
|
2443
2410
|
Create a new aspect definition file
|
|
2444
2411
|
|
|
2445
|
-
$ sanity media create-aspect
|
|
2412
|
+
$ pnpm exec sanity media create-aspect
|
|
2446
2413
|
```
|
|
2447
2414
|
|
|
2448
|
-
_See code: [src/commands/media/create-aspect.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2415
|
+
_See code: [src/commands/media/create-aspect.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/media/create-aspect.ts)_
|
|
2449
2416
|
|
|
2450
2417
|
## `sanity media delete-aspect ASPECTNAME`
|
|
2451
2418
|
|
|
@@ -2453,7 +2420,7 @@ Undeploy an aspect
|
|
|
2453
2420
|
|
|
2454
2421
|
```
|
|
2455
2422
|
USAGE
|
|
2456
|
-
$ sanity media delete-aspect ASPECTNAME [--media-library-id <value>] [--yes]
|
|
2423
|
+
$ pnpm exec sanity media delete-aspect ASPECTNAME [--media-library-id <value>] [--yes]
|
|
2457
2424
|
|
|
2458
2425
|
ARGUMENTS
|
|
2459
2426
|
ASPECTNAME Name of the aspect to delete
|
|
@@ -2468,10 +2435,10 @@ DESCRIPTION
|
|
|
2468
2435
|
EXAMPLES
|
|
2469
2436
|
Delete the aspect named "someAspect"
|
|
2470
2437
|
|
|
2471
|
-
$ sanity media delete-aspect someAspect
|
|
2438
|
+
$ pnpm exec sanity media delete-aspect someAspect
|
|
2472
2439
|
```
|
|
2473
2440
|
|
|
2474
|
-
_See code: [src/commands/media/delete-aspect.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2441
|
+
_See code: [src/commands/media/delete-aspect.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/media/delete-aspect.ts)_
|
|
2475
2442
|
|
|
2476
2443
|
## `sanity media deploy-aspect [ASPECTNAME]`
|
|
2477
2444
|
|
|
@@ -2479,7 +2446,7 @@ Deploy an aspect
|
|
|
2479
2446
|
|
|
2480
2447
|
```
|
|
2481
2448
|
USAGE
|
|
2482
|
-
$ sanity media deploy-aspect [ASPECTNAME] [--all] [--media-library-id <value>]
|
|
2449
|
+
$ pnpm exec sanity media deploy-aspect [ASPECTNAME] [--all] [--media-library-id <value>]
|
|
2483
2450
|
|
|
2484
2451
|
ARGUMENTS
|
|
2485
2452
|
[ASPECTNAME] Name of the aspect to deploy
|
|
@@ -2494,14 +2461,14 @@ DESCRIPTION
|
|
|
2494
2461
|
EXAMPLES
|
|
2495
2462
|
Deploy the aspect named "someAspect"
|
|
2496
2463
|
|
|
2497
|
-
$ sanity media deploy-aspect someAspect
|
|
2464
|
+
$ pnpm exec sanity media deploy-aspect someAspect
|
|
2498
2465
|
|
|
2499
2466
|
Deploy all aspects
|
|
2500
2467
|
|
|
2501
|
-
$ sanity media deploy-aspect --all
|
|
2468
|
+
$ pnpm exec sanity media deploy-aspect --all
|
|
2502
2469
|
```
|
|
2503
2470
|
|
|
2504
|
-
_See code: [src/commands/media/deploy-aspect.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2471
|
+
_See code: [src/commands/media/deploy-aspect.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/media/deploy-aspect.ts)_
|
|
2505
2472
|
|
|
2506
2473
|
## `sanity media export [DESTINATION]`
|
|
2507
2474
|
|
|
@@ -2509,8 +2476,8 @@ Export an archive of all file and image assets including their aspect data from
|
|
|
2509
2476
|
|
|
2510
2477
|
```
|
|
2511
2478
|
USAGE
|
|
2512
|
-
$ sanity media export [DESTINATION] [--asset-concurrency <value>]
|
|
2513
|
-
[--
|
|
2479
|
+
$ pnpm exec sanity media export [DESTINATION] [--asset-concurrency <value>] [--media-library-id <value>] [--no-compress]
|
|
2480
|
+
[--overwrite]
|
|
2514
2481
|
|
|
2515
2482
|
ARGUMENTS
|
|
2516
2483
|
[DESTINATION] Output destination file path
|
|
@@ -2518,29 +2485,28 @@ ARGUMENTS
|
|
|
2518
2485
|
FLAGS
|
|
2519
2486
|
--asset-concurrency=<value> [default: 8] Concurrent number of asset downloads
|
|
2520
2487
|
--media-library-id=<value> The id of the target media library
|
|
2521
|
-
--no-compress Skips compressing tarball entries (still generates
|
|
2522
|
-
a gzip file)
|
|
2488
|
+
--no-compress Skips compressing tarball entries (still generates a gzip file)
|
|
2523
2489
|
--overwrite Overwrite any file with the same name
|
|
2524
2490
|
|
|
2525
2491
|
DESCRIPTION
|
|
2526
|
-
Export an archive of all file and image assets including their aspect data from
|
|
2527
|
-
|
|
2492
|
+
Export an archive of all file and image assets including their aspect data from the target media library. Video assets
|
|
2493
|
+
are excluded from the export.
|
|
2528
2494
|
|
|
2529
2495
|
EXAMPLES
|
|
2530
2496
|
Export media library interactively
|
|
2531
2497
|
|
|
2532
|
-
$ sanity media export
|
|
2498
|
+
$ pnpm exec sanity media export
|
|
2533
2499
|
|
|
2534
2500
|
Export media library to output.tar.gz
|
|
2535
2501
|
|
|
2536
|
-
$ sanity media export output.tar.gz
|
|
2502
|
+
$ pnpm exec sanity media export output.tar.gz
|
|
2537
2503
|
|
|
2538
2504
|
Export specific media library
|
|
2539
2505
|
|
|
2540
|
-
$ sanity media export --media-library-id my-library-id
|
|
2506
|
+
$ pnpm exec sanity media export --media-library-id my-library-id
|
|
2541
2507
|
```
|
|
2542
2508
|
|
|
2543
|
-
_See code: [src/commands/media/export.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2509
|
+
_See code: [src/commands/media/export.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/media/export.ts)_
|
|
2544
2510
|
|
|
2545
2511
|
## `sanity media import SOURCE`
|
|
2546
2512
|
|
|
@@ -2548,16 +2514,15 @@ Import a set of assets to the target media library.
|
|
|
2548
2514
|
|
|
2549
2515
|
```
|
|
2550
2516
|
USAGE
|
|
2551
|
-
$ sanity media import SOURCE [--media-library-id <value>]
|
|
2552
|
-
[--replace-aspects]
|
|
2517
|
+
$ pnpm exec sanity media import SOURCE [--media-library-id <value>] [--replace-aspects]
|
|
2553
2518
|
|
|
2554
2519
|
ARGUMENTS
|
|
2555
2520
|
SOURCE Image file or folder to import from
|
|
2556
2521
|
|
|
2557
2522
|
FLAGS
|
|
2558
2523
|
--media-library-id=<value> The id of the target media library
|
|
2559
|
-
--replace-aspects Replace existing aspect data. All versions will be
|
|
2560
|
-
|
|
2524
|
+
--replace-aspects Replace existing aspect data. All versions will be replaced (e.g. published and draft
|
|
2525
|
+
aspect data)
|
|
2561
2526
|
|
|
2562
2527
|
DESCRIPTION
|
|
2563
2528
|
Import a set of assets to the target media library.
|
|
@@ -2565,18 +2530,18 @@ DESCRIPTION
|
|
|
2565
2530
|
EXAMPLES
|
|
2566
2531
|
Import all assets from the "products" directory
|
|
2567
2532
|
|
|
2568
|
-
$ sanity media import products
|
|
2533
|
+
$ pnpm exec sanity media import products
|
|
2569
2534
|
|
|
2570
2535
|
Import all assets from "gallery" archive
|
|
2571
2536
|
|
|
2572
|
-
$ sanity media import gallery.tar.gz
|
|
2537
|
+
$ pnpm exec sanity media import gallery.tar.gz
|
|
2573
2538
|
|
|
2574
2539
|
Import all assets from the "products" directory and replace aspects
|
|
2575
2540
|
|
|
2576
|
-
$ sanity media import products --replace-aspects
|
|
2541
|
+
$ pnpm exec sanity media import products --replace-aspects
|
|
2577
2542
|
```
|
|
2578
2543
|
|
|
2579
|
-
_See code: [src/commands/media/import.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2544
|
+
_See code: [src/commands/media/import.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/media/import.ts)_
|
|
2580
2545
|
|
|
2581
2546
|
## `sanity migration create [TITLE]`
|
|
2582
2547
|
|
|
@@ -2584,7 +2549,7 @@ Create a new migration within your project
|
|
|
2584
2549
|
|
|
2585
2550
|
```
|
|
2586
2551
|
USAGE
|
|
2587
|
-
$ sanity migration create [TITLE]
|
|
2552
|
+
$ pnpm exec sanity migration create [TITLE]
|
|
2588
2553
|
|
|
2589
2554
|
ARGUMENTS
|
|
2590
2555
|
[TITLE] Title of migration
|
|
@@ -2595,11 +2560,11 @@ DESCRIPTION
|
|
|
2595
2560
|
EXAMPLES
|
|
2596
2561
|
Create a new migration, prompting for title and options
|
|
2597
2562
|
|
|
2598
|
-
$ sanity migration create
|
|
2563
|
+
$ pnpm exec sanity migration create
|
|
2599
2564
|
|
|
2600
2565
|
Create a new migration with the provided title, prompting for options
|
|
2601
2566
|
|
|
2602
|
-
$ sanity migration create "Rename field from location to address"
|
|
2567
|
+
$ pnpm exec sanity migration create "Rename field from location to address"
|
|
2603
2568
|
```
|
|
2604
2569
|
|
|
2605
2570
|
_See code: [@sanity/migrate](https://github.com/sanity-io/migrate/blob/v5.2.5/src/commands/migration/create.ts)_
|
|
@@ -2610,7 +2575,7 @@ List available migrations
|
|
|
2610
2575
|
|
|
2611
2576
|
```
|
|
2612
2577
|
USAGE
|
|
2613
|
-
$ sanity migration list
|
|
2578
|
+
$ pnpm exec sanity migration list
|
|
2614
2579
|
|
|
2615
2580
|
DESCRIPTION
|
|
2616
2581
|
List available migrations
|
|
@@ -2618,7 +2583,7 @@ DESCRIPTION
|
|
|
2618
2583
|
EXAMPLES
|
|
2619
2584
|
List all available migrations in the project
|
|
2620
2585
|
|
|
2621
|
-
$ sanity migration list
|
|
2586
|
+
$ pnpm exec sanity migration list
|
|
2622
2587
|
```
|
|
2623
2588
|
|
|
2624
2589
|
_See code: [@sanity/migrate](https://github.com/sanity-io/migrate/blob/v5.2.5/src/commands/migration/list.ts)_
|
|
@@ -2629,31 +2594,24 @@ Run a migration against a dataset
|
|
|
2629
2594
|
|
|
2630
2595
|
```
|
|
2631
2596
|
USAGE
|
|
2632
|
-
$ sanity migration run [ID] [--api-version <value>] [--concurrency
|
|
2633
|
-
|
|
2634
|
-
[--progress] [--project <value>]
|
|
2597
|
+
$ pnpm exec sanity migration run [ID] [--api-version <value>] [--concurrency <value>] [--confirm] [--dataset <value>]
|
|
2598
|
+
[--dry-run] [--from-export <value>] [--progress] [--project <value>]
|
|
2635
2599
|
|
|
2636
2600
|
ARGUMENTS
|
|
2637
2601
|
[ID] ID
|
|
2638
2602
|
|
|
2639
2603
|
FLAGS
|
|
2640
|
-
--api-version=<value> API version to use when migrating. Defaults to
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
--
|
|
2645
|
-
|
|
2646
|
-
--
|
|
2647
|
-
|
|
2648
|
-
--[no-]
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
instead of calling the Sanity API. Note: this is only
|
|
2652
|
-
supported for dry runs.
|
|
2653
|
-
--[no-]progress Display progress during migration (default: true). Use
|
|
2654
|
-
--no-progress to hide output.
|
|
2655
|
-
--project=<value> Project ID of the dataset to migrate. Defaults to the
|
|
2656
|
-
projectId configured in your Sanity CLI config.
|
|
2604
|
+
--api-version=<value> API version to use when migrating. Defaults to v2024-01-29.
|
|
2605
|
+
--concurrency=<value> [default: 6] How many mutation requests to run in parallel. Must be between 1 and 10. Default:
|
|
2606
|
+
6.
|
|
2607
|
+
--[no-]confirm Prompt for confirmation before running the migration (default: true). Use --no-confirm to skip.
|
|
2608
|
+
--dataset=<value> Dataset to migrate. Defaults to the dataset configured in your Sanity CLI config.
|
|
2609
|
+
--[no-]dry-run By default the migration runs in dry mode. Use --no-dry-run to migrate dataset.
|
|
2610
|
+
--from-export=<value> Use a local dataset export as source for migration instead of calling the Sanity API. Note:
|
|
2611
|
+
this is only supported for dry runs.
|
|
2612
|
+
--[no-]progress Display progress during migration (default: true). Use --no-progress to hide output.
|
|
2613
|
+
--project=<value> Project ID of the dataset to migrate. Defaults to the projectId configured in your Sanity CLI
|
|
2614
|
+
config.
|
|
2657
2615
|
|
|
2658
2616
|
DESCRIPTION
|
|
2659
2617
|
Run a migration against a dataset
|
|
@@ -2661,16 +2619,15 @@ DESCRIPTION
|
|
|
2661
2619
|
EXAMPLES
|
|
2662
2620
|
dry run the migration
|
|
2663
2621
|
|
|
2664
|
-
$ sanity migration run <id>
|
|
2622
|
+
$ pnpm exec sanity migration run <id>
|
|
2665
2623
|
|
|
2666
2624
|
execute the migration against a dataset
|
|
2667
2625
|
|
|
2668
|
-
$ sanity migration run <id> --no-dry-run --project xyz --dataset staging
|
|
2626
|
+
$ pnpm exec sanity migration run <id> --no-dry-run --project xyz --dataset staging
|
|
2669
2627
|
|
|
2670
2628
|
execute the migration using a dataset export as the source
|
|
2671
2629
|
|
|
2672
|
-
$ sanity migration run <id> --from-export=production.tar.gz --no-dry-run
|
|
2673
|
-
--project xyz --dataset staging
|
|
2630
|
+
$ pnpm exec sanity migration run <id> --from-export=production.tar.gz --no-dry-run --project xyz --dataset staging
|
|
2674
2631
|
```
|
|
2675
2632
|
|
|
2676
2633
|
_See code: [@sanity/migrate](https://github.com/sanity-io/migrate/blob/v5.2.5/src/commands/migration/run.ts)_
|
|
@@ -2681,7 +2638,7 @@ Get an OpenAPI specification by slug
|
|
|
2681
2638
|
|
|
2682
2639
|
```
|
|
2683
2640
|
USAGE
|
|
2684
|
-
$ sanity openapi get SLUG [--format yaml|json] [-w]
|
|
2641
|
+
$ pnpm exec sanity openapi get SLUG [--format yaml|json] [-w]
|
|
2685
2642
|
|
|
2686
2643
|
ARGUMENTS
|
|
2687
2644
|
SLUG Slug of the OpenAPI specification to retrieve
|
|
@@ -2697,22 +2654,22 @@ DESCRIPTION
|
|
|
2697
2654
|
EXAMPLES
|
|
2698
2655
|
Get a specification (YAML format, default)
|
|
2699
2656
|
|
|
2700
|
-
$ sanity openapi get query
|
|
2657
|
+
$ pnpm exec sanity openapi get query
|
|
2701
2658
|
|
|
2702
2659
|
Get specification in JSON format
|
|
2703
2660
|
|
|
2704
|
-
$ sanity openapi get query --format=json
|
|
2661
|
+
$ pnpm exec sanity openapi get query --format=json
|
|
2705
2662
|
|
|
2706
2663
|
Open specification in browser
|
|
2707
2664
|
|
|
2708
|
-
$ sanity openapi get query --web
|
|
2665
|
+
$ pnpm exec sanity openapi get query --web
|
|
2709
2666
|
|
|
2710
2667
|
Pipe to file
|
|
2711
2668
|
|
|
2712
|
-
$ sanity openapi get query > query-api.yaml
|
|
2669
|
+
$ pnpm exec sanity openapi get query > query-api.yaml
|
|
2713
2670
|
```
|
|
2714
2671
|
|
|
2715
|
-
_See code: [src/commands/openapi/get.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2672
|
+
_See code: [src/commands/openapi/get.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/openapi/get.ts)_
|
|
2716
2673
|
|
|
2717
2674
|
## `sanity openapi list`
|
|
2718
2675
|
|
|
@@ -2720,7 +2677,7 @@ List all available OpenAPI specifications
|
|
|
2720
2677
|
|
|
2721
2678
|
```
|
|
2722
2679
|
USAGE
|
|
2723
|
-
$ sanity openapi list [--json] [-w]
|
|
2680
|
+
$ pnpm exec sanity openapi list [--json] [-w]
|
|
2724
2681
|
|
|
2725
2682
|
FLAGS
|
|
2726
2683
|
-w, --web Open HTTP Reference in web browser
|
|
@@ -2732,18 +2689,18 @@ DESCRIPTION
|
|
|
2732
2689
|
EXAMPLES
|
|
2733
2690
|
List all available OpenAPI specs
|
|
2734
2691
|
|
|
2735
|
-
$ sanity openapi list
|
|
2692
|
+
$ pnpm exec sanity openapi list
|
|
2736
2693
|
|
|
2737
2694
|
List with JSON output
|
|
2738
2695
|
|
|
2739
|
-
$ sanity openapi list --json
|
|
2696
|
+
$ pnpm exec sanity openapi list --json
|
|
2740
2697
|
|
|
2741
2698
|
Open HTTP Reference in browser
|
|
2742
2699
|
|
|
2743
|
-
$ sanity openapi list --web
|
|
2700
|
+
$ pnpm exec sanity openapi list --web
|
|
2744
2701
|
```
|
|
2745
2702
|
|
|
2746
|
-
_See code: [src/commands/openapi/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2703
|
+
_See code: [src/commands/openapi/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/openapi/list.ts)_
|
|
2747
2704
|
|
|
2748
2705
|
## `sanity preview [OUTPUTDIR]`
|
|
2749
2706
|
|
|
@@ -2751,31 +2708,30 @@ Starts a server to preview a production build
|
|
|
2751
2708
|
|
|
2752
2709
|
```
|
|
2753
2710
|
USAGE
|
|
2754
|
-
$ sanity preview [OUTPUTDIR] [--host <value>] [--port <value>]
|
|
2711
|
+
$ pnpm exec sanity preview [OUTPUTDIR] [--host <value>] [--port <value>]
|
|
2755
2712
|
|
|
2756
2713
|
ARGUMENTS
|
|
2757
2714
|
[OUTPUTDIR] Output directory
|
|
2758
2715
|
|
|
2759
2716
|
FLAGS
|
|
2760
|
-
--host=<value> [default: localhost] The local network interface at which to
|
|
2761
|
-
listen.
|
|
2717
|
+
--host=<value> [default: localhost] The local network interface at which to listen.
|
|
2762
2718
|
--port=<value> [default: 3333] TCP port to start server on.
|
|
2763
2719
|
|
|
2764
2720
|
DESCRIPTION
|
|
2765
2721
|
Starts a server to preview a production build
|
|
2766
2722
|
|
|
2767
2723
|
ALIASES
|
|
2768
|
-
$ sanity start
|
|
2724
|
+
$ pnpm exec sanity start
|
|
2769
2725
|
|
|
2770
2726
|
EXAMPLES
|
|
2771
|
-
$ sanity preview --host=0.0.0.0
|
|
2727
|
+
$ pnpm exec sanity preview --host=0.0.0.0
|
|
2772
2728
|
|
|
2773
|
-
$ sanity preview --port=1942
|
|
2729
|
+
$ pnpm exec sanity preview --port=1942
|
|
2774
2730
|
|
|
2775
|
-
$ sanity preview some/build-output-dir
|
|
2731
|
+
$ pnpm exec sanity preview some/build-output-dir
|
|
2776
2732
|
```
|
|
2777
2733
|
|
|
2778
|
-
_See code: [src/commands/preview.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2734
|
+
_See code: [src/commands/preview.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/preview.ts)_
|
|
2779
2735
|
|
|
2780
2736
|
## `sanity projects create [PROJECTNAME]`
|
|
2781
2737
|
|
|
@@ -2783,19 +2739,16 @@ Create a new Sanity project
|
|
|
2783
2739
|
|
|
2784
2740
|
```
|
|
2785
2741
|
USAGE
|
|
2786
|
-
$ sanity projects create [PROJECTNAME] [--dataset <value>]
|
|
2787
|
-
[--
|
|
2788
|
-
[-y]
|
|
2742
|
+
$ pnpm exec sanity projects create [PROJECTNAME] [--dataset <value>] [--dataset-visibility private|public] [--json]
|
|
2743
|
+
[--organization <slug|id>] [-y]
|
|
2789
2744
|
|
|
2790
2745
|
ARGUMENTS
|
|
2791
2746
|
[PROJECTNAME] Name of the project to create
|
|
2792
2747
|
|
|
2793
2748
|
FLAGS
|
|
2794
|
-
-y, --yes Skip prompts and use defaults (project: "My
|
|
2795
|
-
Sanity Project", dataset: production,
|
|
2749
|
+
-y, --yes Skip prompts and use defaults (project: "My Sanity Project", dataset: production,
|
|
2796
2750
|
visibility: public)
|
|
2797
|
-
--dataset=<value> Create a dataset. Prompts for visibility
|
|
2798
|
-
unless specified or --yes used
|
|
2751
|
+
--dataset=<value> Create a dataset. Prompts for visibility unless specified or --yes used
|
|
2799
2752
|
--dataset-visibility=<option> Dataset visibility: public or private
|
|
2800
2753
|
<options: private|public>
|
|
2801
2754
|
--json Output in JSON format
|
|
@@ -2807,27 +2760,26 @@ DESCRIPTION
|
|
|
2807
2760
|
EXAMPLES
|
|
2808
2761
|
Interactively create a project
|
|
2809
2762
|
|
|
2810
|
-
$ sanity projects create
|
|
2763
|
+
$ pnpm exec sanity projects create
|
|
2811
2764
|
|
|
2812
2765
|
Create a project named "My New Project"
|
|
2813
2766
|
|
|
2814
|
-
$ sanity projects create "My New Project"
|
|
2767
|
+
$ pnpm exec sanity projects create "My New Project"
|
|
2815
2768
|
|
|
2816
2769
|
Create a project in a specific organization
|
|
2817
2770
|
|
|
2818
|
-
$ sanity projects create "My Project" --organization=my-org
|
|
2771
|
+
$ pnpm exec sanity projects create "My Project" --organization=my-org
|
|
2819
2772
|
|
|
2820
2773
|
Create a project with a private dataset named "staging"
|
|
2821
2774
|
|
|
2822
|
-
$ sanity projects create "My Project" --dataset=staging
|
|
2823
|
-
--dataset-visibility=private
|
|
2775
|
+
$ pnpm exec sanity projects create "My Project" --dataset=staging --dataset-visibility=private
|
|
2824
2776
|
|
|
2825
2777
|
Create a project non-interactively with JSON output
|
|
2826
2778
|
|
|
2827
|
-
$ sanity projects create "CI Project" --yes --json
|
|
2779
|
+
$ pnpm exec sanity projects create "CI Project" --yes --json
|
|
2828
2780
|
```
|
|
2829
2781
|
|
|
2830
|
-
_See code: [src/commands/projects/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2782
|
+
_See code: [src/commands/projects/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/projects/create.ts)_
|
|
2831
2783
|
|
|
2832
2784
|
## `sanity projects list`
|
|
2833
2785
|
|
|
@@ -2835,8 +2787,7 @@ Lists projects connected to your user
|
|
|
2835
2787
|
|
|
2836
2788
|
```
|
|
2837
2789
|
USAGE
|
|
2838
|
-
$ sanity projects list [--order asc|desc] [--sort
|
|
2839
|
-
id|members|name|url|created]
|
|
2790
|
+
$ pnpm exec sanity projects list [--order asc|desc] [--sort id|members|name|url|created]
|
|
2840
2791
|
|
|
2841
2792
|
FLAGS
|
|
2842
2793
|
--order=<option> [default: desc]
|
|
@@ -2850,14 +2801,14 @@ DESCRIPTION
|
|
|
2850
2801
|
EXAMPLES
|
|
2851
2802
|
List projects
|
|
2852
2803
|
|
|
2853
|
-
$ sanity projects list
|
|
2804
|
+
$ pnpm exec sanity projects list
|
|
2854
2805
|
|
|
2855
2806
|
List all users of the project, but exclude pending invitations and robots
|
|
2856
2807
|
|
|
2857
|
-
$ sanity projects list --sort=members --order=asc
|
|
2808
|
+
$ pnpm exec sanity projects list --sort=members --order=asc
|
|
2858
2809
|
```
|
|
2859
2810
|
|
|
2860
|
-
_See code: [src/commands/projects/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2811
|
+
_See code: [src/commands/projects/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/projects/list.ts)_
|
|
2861
2812
|
|
|
2862
2813
|
## `sanity schema delete`
|
|
2863
2814
|
|
|
@@ -2865,7 +2816,7 @@ Delete schema documents by id
|
|
|
2865
2816
|
|
|
2866
2817
|
```
|
|
2867
2818
|
USAGE
|
|
2868
|
-
$ sanity schema delete --ids <value> [--dataset <value>] [--verbose]
|
|
2819
|
+
$ pnpm exec sanity schema delete --ids <value> [--dataset <value>] [--verbose]
|
|
2869
2820
|
|
|
2870
2821
|
FLAGS
|
|
2871
2822
|
--dataset=<value> Delete schemas from a specific dataset
|
|
@@ -2878,15 +2829,14 @@ DESCRIPTION
|
|
|
2878
2829
|
EXAMPLES
|
|
2879
2830
|
Delete a single schema
|
|
2880
2831
|
|
|
2881
|
-
$ sanity schema delete --ids sanity.workspace.schema.workspaceName
|
|
2832
|
+
$ pnpm exec sanity schema delete --ids sanity.workspace.schema.workspaceName
|
|
2882
2833
|
|
|
2883
2834
|
Delete multiple schemas
|
|
2884
2835
|
|
|
2885
|
-
$ sanity schema delete --ids sanity.workspace.schema.workspaceName,prefix
|
|
2886
|
-
.sanity.workspace.schema.otherWorkspace
|
|
2836
|
+
$ pnpm exec sanity schema delete --ids sanity.workspace.schema.workspaceName,prefix.sanity.workspace.schema.otherWorkspace
|
|
2887
2837
|
```
|
|
2888
2838
|
|
|
2889
|
-
_See code: [src/commands/schema/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2839
|
+
_See code: [src/commands/schema/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/schema/delete.ts)_
|
|
2890
2840
|
|
|
2891
2841
|
## `sanity schema deploy`
|
|
2892
2842
|
|
|
@@ -2894,14 +2844,12 @@ Deploy schema documents into workspace datasets.
|
|
|
2894
2844
|
|
|
2895
2845
|
```
|
|
2896
2846
|
USAGE
|
|
2897
|
-
$ sanity schema deploy [--extract-manifest] [--manifest-dir <directory>]
|
|
2898
|
-
|
|
2847
|
+
$ pnpm exec sanity schema deploy [--extract-manifest] [--manifest-dir <directory>] [--tag <tag>] [--verbose] [--workspace
|
|
2848
|
+
<name>]
|
|
2899
2849
|
|
|
2900
2850
|
FLAGS
|
|
2901
|
-
--[no-]extract-manifest Disables manifest generation - the command will
|
|
2902
|
-
|
|
2903
|
-
--manifest-dir=<directory> [default: ./dist/static] Directory containing
|
|
2904
|
-
manifest file
|
|
2851
|
+
--[no-]extract-manifest Disables manifest generation - the command will fail if no manifest exists
|
|
2852
|
+
--manifest-dir=<directory> [default: ./dist/static] Directory containing manifest file
|
|
2905
2853
|
--tag=<tag> Add a tag suffix to the schema id
|
|
2906
2854
|
--verbose Print detailed information during deployment
|
|
2907
2855
|
--workspace=<name> The name of the workspace to deploy a schema for
|
|
@@ -2911,26 +2859,20 @@ DESCRIPTION
|
|
|
2911
2859
|
|
|
2912
2860
|
**Note**: This command is experimental and subject to change.
|
|
2913
2861
|
|
|
2914
|
-
This operation (re-)generates a manifest file describing the sanity config
|
|
2915
|
-
workspace by default.
|
|
2862
|
+
This operation (re-)generates a manifest file describing the sanity config workspace by default.
|
|
2916
2863
|
To re-use an existing manifest file, use --no-extract-manifest.
|
|
2917
2864
|
|
|
2918
2865
|
EXAMPLES
|
|
2919
2866
|
Deploy all workspace schemas
|
|
2920
2867
|
|
|
2921
|
-
$ sanity schema deploy
|
|
2868
|
+
$ pnpm exec sanity schema deploy
|
|
2922
2869
|
|
|
2923
2870
|
Deploy the schema for only the workspace "default"
|
|
2924
2871
|
|
|
2925
|
-
$ sanity schema deploy --workspace default
|
|
2926
|
-
|
|
2927
|
-
Runs using a pre-existing manifest file. Config changes in sanity.config will
|
|
2928
|
-
not be picked up in this case.
|
|
2929
|
-
|
|
2930
|
-
$ sanity schema deploy --no-extract-manifest
|
|
2872
|
+
$ pnpm exec sanity schema deploy --workspace default
|
|
2931
2873
|
```
|
|
2932
2874
|
|
|
2933
|
-
_See code: [src/commands/schema/deploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2875
|
+
_See code: [src/commands/schema/deploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/schema/deploy.ts)_
|
|
2934
2876
|
|
|
2935
2877
|
## `sanity schema extract`
|
|
2936
2878
|
|
|
@@ -2938,21 +2880,16 @@ Extracts a JSON representation of a Sanity schema within a Studio context.
|
|
|
2938
2880
|
|
|
2939
2881
|
```
|
|
2940
2882
|
USAGE
|
|
2941
|
-
$ sanity schema extract [--enforce-required-fields] [--format <format>]
|
|
2942
|
-
[--
|
|
2883
|
+
$ pnpm exec sanity schema extract [--enforce-required-fields] [--format <format>] [--path <value>] [--watch]
|
|
2884
|
+
[--watch-patterns <glob>...] [--workspace <name>]
|
|
2943
2885
|
|
|
2944
2886
|
FLAGS
|
|
2945
|
-
--enforce-required-fields Makes the schema generated treat fields marked as
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
--
|
|
2951
|
-
file
|
|
2952
|
-
--watch Enable watch mode to re-extract schema on file
|
|
2953
|
-
changes
|
|
2954
|
-
--watch-patterns=<glob>... Additional glob pattern(s) to watch (can be
|
|
2955
|
-
specified multiple times)
|
|
2887
|
+
--enforce-required-fields Makes the schema generated treat fields marked as required as non-optional
|
|
2888
|
+
--format=<format> [default: groq-type-nodes] Format the schema as GROQ type nodes. Only available format at
|
|
2889
|
+
the moment.
|
|
2890
|
+
--path=<value> Optional path to specify destination of the schema file
|
|
2891
|
+
--watch Enable watch mode to re-extract schema on file changes
|
|
2892
|
+
--watch-patterns=<glob>... Additional glob pattern(s) to watch (can be specified multiple times)
|
|
2956
2893
|
--workspace=<name> The name of the workspace to generate a schema for
|
|
2957
2894
|
|
|
2958
2895
|
DESCRIPTION
|
|
@@ -2963,18 +2900,18 @@ DESCRIPTION
|
|
|
2963
2900
|
EXAMPLES
|
|
2964
2901
|
Extracts schema types in a Sanity project with more than one workspace
|
|
2965
2902
|
|
|
2966
|
-
$ sanity schema extract --workspace default
|
|
2903
|
+
$ pnpm exec sanity schema extract --workspace default
|
|
2967
2904
|
|
|
2968
2905
|
Watch mode - re-extract on changes
|
|
2969
2906
|
|
|
2970
|
-
$ sanity schema extract --watch
|
|
2907
|
+
$ pnpm exec sanity schema extract --watch
|
|
2971
2908
|
|
|
2972
2909
|
Watch with custom glob patterns
|
|
2973
2910
|
|
|
2974
|
-
$ sanity schema extract --watch --watch-patterns "lib/**/*.ts"
|
|
2911
|
+
$ pnpm exec sanity schema extract --watch --watch-patterns "lib/**/*.ts"
|
|
2975
2912
|
```
|
|
2976
2913
|
|
|
2977
|
-
_See code: [src/commands/schema/extract.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2914
|
+
_See code: [src/commands/schema/extract.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/schema/extract.ts)_
|
|
2978
2915
|
|
|
2979
2916
|
## `sanity schema list`
|
|
2980
2917
|
|
|
@@ -2982,7 +2919,7 @@ Lists all schemas in the current dataset.
|
|
|
2982
2919
|
|
|
2983
2920
|
```
|
|
2984
2921
|
USAGE
|
|
2985
|
-
$ sanity schema list [--id <schema_id>] [--json]
|
|
2922
|
+
$ pnpm exec sanity schema list [--id <schema_id>] [--json]
|
|
2986
2923
|
|
|
2987
2924
|
FLAGS
|
|
2988
2925
|
--id=<schema_id> Fetch a single schema by id
|
|
@@ -2993,29 +2930,28 @@ DESCRIPTION
|
|
|
2993
2930
|
|
|
2994
2931
|
**Note**: This command is experimental and subject to change.
|
|
2995
2932
|
|
|
2996
|
-
This operation (re-)generates a manifest file describing the sanity config
|
|
2997
|
-
workspace by default.
|
|
2933
|
+
This operation (re-)generates a manifest file describing the sanity config workspace by default.
|
|
2998
2934
|
To re-use an existing manifest file, use --no-extract-manifest.
|
|
2999
2935
|
|
|
3000
2936
|
EXAMPLES
|
|
3001
2937
|
List all schemas found in any workspace dataset in a table
|
|
3002
2938
|
|
|
3003
|
-
$ sanity schema list
|
|
2939
|
+
$ pnpm exec sanity schema list
|
|
3004
2940
|
|
|
3005
2941
|
Get a schema for a given id
|
|
3006
2942
|
|
|
3007
|
-
$ sanity schema list --id _.schemas.workspaceName
|
|
2943
|
+
$ pnpm exec sanity schema list --id _.schemas.workspaceName
|
|
3008
2944
|
|
|
3009
2945
|
Get stored schemas as pretty-printed json-array
|
|
3010
2946
|
|
|
3011
|
-
$ sanity schema list --json
|
|
2947
|
+
$ pnpm exec sanity schema list --json
|
|
3012
2948
|
|
|
3013
2949
|
Get singular stored schema as pretty-printed json-object
|
|
3014
2950
|
|
|
3015
|
-
$ sanity schema list --json --id _.schemas.workspaceName
|
|
2951
|
+
$ pnpm exec sanity schema list --json --id _.schemas.workspaceName
|
|
3016
2952
|
```
|
|
3017
2953
|
|
|
3018
|
-
_See code: [src/commands/schema/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2954
|
+
_See code: [src/commands/schema/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/schema/list.ts)_
|
|
3019
2955
|
|
|
3020
2956
|
## `sanity schema validate`
|
|
3021
2957
|
|
|
@@ -3023,23 +2959,19 @@ Validates all schema types specified in a workspace
|
|
|
3023
2959
|
|
|
3024
2960
|
```
|
|
3025
2961
|
USAGE
|
|
3026
|
-
$ sanity schema validate [--debug-metafile-path <value>] [--format
|
|
3027
|
-
|
|
2962
|
+
$ pnpm exec sanity schema validate [--debug-metafile-path <value>] [--format pretty|ndjson|json] [--level error|warning]
|
|
2963
|
+
[--workspace <value>]
|
|
3028
2964
|
|
|
3029
2965
|
FLAGS
|
|
3030
|
-
--format=<option> [default: pretty] The output format used to print schema
|
|
3031
|
-
errors and warnings
|
|
2966
|
+
--format=<option> [default: pretty] The output format used to print schema errors and warnings
|
|
3032
2967
|
<options: pretty|ndjson|json>
|
|
3033
2968
|
--level=<option> [default: warning] The minimum level reported out
|
|
3034
2969
|
<options: error|warning>
|
|
3035
|
-
--workspace=<value> The name of the workspace to use when validating all
|
|
3036
|
-
schema types
|
|
2970
|
+
--workspace=<value> The name of the workspace to use when validating all schema types
|
|
3037
2971
|
|
|
3038
2972
|
DEBUG FLAGS
|
|
3039
|
-
--debug-metafile-path=<value> Optional path where a metafile will be written
|
|
3040
|
-
|
|
3041
|
-
validation. Can be analyzed at
|
|
3042
|
-
https://esbuild.github.io/analyze/
|
|
2973
|
+
--debug-metafile-path=<value> Optional path where a metafile will be written for build analysis. Only written on
|
|
2974
|
+
successful validation. Can be analyzed at https://esbuild.github.io/analyze/
|
|
3043
2975
|
|
|
3044
2976
|
DESCRIPTION
|
|
3045
2977
|
Validates all schema types specified in a workspace
|
|
@@ -3047,23 +2979,22 @@ DESCRIPTION
|
|
|
3047
2979
|
EXAMPLES
|
|
3048
2980
|
Validates all schema types in a Sanity project with more than one workspace
|
|
3049
2981
|
|
|
3050
|
-
$ sanity schema validate --workspace default
|
|
2982
|
+
$ pnpm exec sanity schema validate --workspace default
|
|
3051
2983
|
|
|
3052
2984
|
Save the results of the report into a file
|
|
3053
2985
|
|
|
3054
|
-
$ sanity schema validate > report.txt
|
|
2986
|
+
$ pnpm exec sanity schema validate > report.txt
|
|
3055
2987
|
|
|
3056
2988
|
Report out only errors
|
|
3057
2989
|
|
|
3058
|
-
$ sanity schema validate --level error
|
|
2990
|
+
$ pnpm exec sanity schema validate --level error
|
|
3059
2991
|
|
|
3060
|
-
Generate a report which can be analyzed with
|
|
3061
|
-
https://esbuild.github.io/analyze/
|
|
2992
|
+
Generate a report which can be analyzed with https://esbuild.github.io/analyze/
|
|
3062
2993
|
|
|
3063
|
-
$ sanity schema validate --debug-metafile-path metafile.json
|
|
2994
|
+
$ pnpm exec sanity schema validate --debug-metafile-path metafile.json
|
|
3064
2995
|
```
|
|
3065
2996
|
|
|
3066
|
-
_See code: [src/commands/schema/validate.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
2997
|
+
_See code: [src/commands/schema/validate.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/schema/validate.ts)_
|
|
3067
2998
|
|
|
3068
2999
|
## `sanity start [OUTPUTDIR]`
|
|
3069
3000
|
|
|
@@ -3071,28 +3002,27 @@ Starts a server to preview a production build
|
|
|
3071
3002
|
|
|
3072
3003
|
```
|
|
3073
3004
|
USAGE
|
|
3074
|
-
$ sanity start [OUTPUTDIR] [--host <value>] [--port <value>]
|
|
3005
|
+
$ pnpm exec sanity start [OUTPUTDIR] [--host <value>] [--port <value>]
|
|
3075
3006
|
|
|
3076
3007
|
ARGUMENTS
|
|
3077
3008
|
[OUTPUTDIR] Output directory
|
|
3078
3009
|
|
|
3079
3010
|
FLAGS
|
|
3080
|
-
--host=<value> [default: localhost] The local network interface at which to
|
|
3081
|
-
listen.
|
|
3011
|
+
--host=<value> [default: localhost] The local network interface at which to listen.
|
|
3082
3012
|
--port=<value> [default: 3333] TCP port to start server on.
|
|
3083
3013
|
|
|
3084
3014
|
DESCRIPTION
|
|
3085
3015
|
Starts a server to preview a production build
|
|
3086
3016
|
|
|
3087
3017
|
ALIASES
|
|
3088
|
-
$ sanity start
|
|
3018
|
+
$ pnpm exec sanity start
|
|
3089
3019
|
|
|
3090
3020
|
EXAMPLES
|
|
3091
|
-
$ sanity start --host=0.0.0.0
|
|
3021
|
+
$ pnpm exec sanity start --host=0.0.0.0
|
|
3092
3022
|
|
|
3093
|
-
$ sanity start --port=1942
|
|
3023
|
+
$ pnpm exec sanity start --port=1942
|
|
3094
3024
|
|
|
3095
|
-
$ sanity start some/build-output-dir
|
|
3025
|
+
$ pnpm exec sanity start some/build-output-dir
|
|
3096
3026
|
```
|
|
3097
3027
|
|
|
3098
3028
|
## `sanity telemetry disable`
|
|
@@ -3101,7 +3031,7 @@ Disable telemetry for your logged in user
|
|
|
3101
3031
|
|
|
3102
3032
|
```
|
|
3103
3033
|
USAGE
|
|
3104
|
-
$ sanity telemetry disable
|
|
3034
|
+
$ pnpm exec sanity telemetry disable
|
|
3105
3035
|
|
|
3106
3036
|
DESCRIPTION
|
|
3107
3037
|
Disable telemetry for your logged in user
|
|
@@ -3109,10 +3039,10 @@ DESCRIPTION
|
|
|
3109
3039
|
EXAMPLES
|
|
3110
3040
|
Disable telemetry for your logged in user
|
|
3111
3041
|
|
|
3112
|
-
$ sanity telemetry telemetry disable
|
|
3042
|
+
$ pnpm exec sanity telemetry telemetry disable
|
|
3113
3043
|
```
|
|
3114
3044
|
|
|
3115
|
-
_See code: [src/commands/telemetry/disable.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
3045
|
+
_See code: [src/commands/telemetry/disable.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/telemetry/disable.ts)_
|
|
3116
3046
|
|
|
3117
3047
|
## `sanity telemetry enable`
|
|
3118
3048
|
|
|
@@ -3120,7 +3050,7 @@ Enable telemetry for your logged in user
|
|
|
3120
3050
|
|
|
3121
3051
|
```
|
|
3122
3052
|
USAGE
|
|
3123
|
-
$ sanity telemetry enable
|
|
3053
|
+
$ pnpm exec sanity telemetry enable
|
|
3124
3054
|
|
|
3125
3055
|
DESCRIPTION
|
|
3126
3056
|
Enable telemetry for your logged in user
|
|
@@ -3128,10 +3058,10 @@ DESCRIPTION
|
|
|
3128
3058
|
EXAMPLES
|
|
3129
3059
|
Enable telemetry for your logged in user
|
|
3130
3060
|
|
|
3131
|
-
$ sanity telemetry telemetry enable
|
|
3061
|
+
$ pnpm exec sanity telemetry telemetry enable
|
|
3132
3062
|
```
|
|
3133
3063
|
|
|
3134
|
-
_See code: [src/commands/telemetry/enable.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
3064
|
+
_See code: [src/commands/telemetry/enable.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/telemetry/enable.ts)_
|
|
3135
3065
|
|
|
3136
3066
|
## `sanity telemetry status`
|
|
3137
3067
|
|
|
@@ -3139,7 +3069,7 @@ Check telemetry consent status for your logged in user
|
|
|
3139
3069
|
|
|
3140
3070
|
```
|
|
3141
3071
|
USAGE
|
|
3142
|
-
$ sanity telemetry status
|
|
3072
|
+
$ pnpm exec sanity telemetry status
|
|
3143
3073
|
|
|
3144
3074
|
DESCRIPTION
|
|
3145
3075
|
Check telemetry consent status for your logged in user
|
|
@@ -3147,10 +3077,10 @@ DESCRIPTION
|
|
|
3147
3077
|
EXAMPLES
|
|
3148
3078
|
Check telemetry consent status for your logged in user
|
|
3149
3079
|
|
|
3150
|
-
$ sanity telemetry telemetry status
|
|
3080
|
+
$ pnpm exec sanity telemetry telemetry status
|
|
3151
3081
|
```
|
|
3152
3082
|
|
|
3153
|
-
_See code: [src/commands/telemetry/status.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
3083
|
+
_See code: [src/commands/telemetry/status.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/telemetry/status.ts)_
|
|
3154
3084
|
|
|
3155
3085
|
## `sanity tokens add [LABEL]`
|
|
3156
3086
|
|
|
@@ -3158,7 +3088,7 @@ Create a new API token for this project
|
|
|
3158
3088
|
|
|
3159
3089
|
```
|
|
3160
3090
|
USAGE
|
|
3161
|
-
$ sanity tokens add [LABEL] [--json] [--role viewer] [-y]
|
|
3091
|
+
$ pnpm exec sanity tokens add [LABEL] [--json] [--role viewer] [-y]
|
|
3162
3092
|
|
|
3163
3093
|
ARGUMENTS
|
|
3164
3094
|
[LABEL] Label for the new token
|
|
@@ -3174,22 +3104,22 @@ DESCRIPTION
|
|
|
3174
3104
|
EXAMPLES
|
|
3175
3105
|
Create a token with a label
|
|
3176
3106
|
|
|
3177
|
-
$ sanity tokens add "My API Token"
|
|
3107
|
+
$ pnpm exec sanity tokens add "My API Token"
|
|
3178
3108
|
|
|
3179
3109
|
Create a token with editor role
|
|
3180
3110
|
|
|
3181
|
-
$ sanity tokens add "My API Token" --role=editor
|
|
3111
|
+
$ pnpm exec sanity tokens add "My API Token" --role=editor
|
|
3182
3112
|
|
|
3183
3113
|
Create a token in unattended mode
|
|
3184
3114
|
|
|
3185
|
-
$ sanity tokens add "CI Token" --role=editor --yes
|
|
3115
|
+
$ pnpm exec sanity tokens add "CI Token" --role=editor --yes
|
|
3186
3116
|
|
|
3187
3117
|
Output token information as JSON
|
|
3188
3118
|
|
|
3189
|
-
$ sanity tokens add "API Token" --json
|
|
3119
|
+
$ pnpm exec sanity tokens add "API Token" --json
|
|
3190
3120
|
```
|
|
3191
3121
|
|
|
3192
|
-
_See code: [src/commands/tokens/add.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
3122
|
+
_See code: [src/commands/tokens/add.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/tokens/add.ts)_
|
|
3193
3123
|
|
|
3194
3124
|
## `sanity tokens delete [TOKENID]`
|
|
3195
3125
|
|
|
@@ -3197,7 +3127,7 @@ Delete an API token from this project
|
|
|
3197
3127
|
|
|
3198
3128
|
```
|
|
3199
3129
|
USAGE
|
|
3200
|
-
$ sanity tokens delete [TOKENID] [--yes]
|
|
3130
|
+
$ pnpm exec sanity tokens delete [TOKENID] [--yes]
|
|
3201
3131
|
|
|
3202
3132
|
ARGUMENTS
|
|
3203
3133
|
[TOKENID] Token ID to delete (will prompt if not provided)
|
|
@@ -3211,18 +3141,18 @@ DESCRIPTION
|
|
|
3211
3141
|
EXAMPLES
|
|
3212
3142
|
Interactively select and delete a token
|
|
3213
3143
|
|
|
3214
|
-
$ sanity tokens delete
|
|
3144
|
+
$ pnpm exec sanity tokens delete
|
|
3215
3145
|
|
|
3216
3146
|
Delete a specific token by ID
|
|
3217
3147
|
|
|
3218
|
-
$ sanity tokens delete silJ2lFmK6dONB
|
|
3148
|
+
$ pnpm exec sanity tokens delete silJ2lFmK6dONB
|
|
3219
3149
|
|
|
3220
3150
|
Delete a specific token without confirmation prompt
|
|
3221
3151
|
|
|
3222
|
-
$ sanity tokens delete silJ2lFmK6dONB --yes
|
|
3152
|
+
$ pnpm exec sanity tokens delete silJ2lFmK6dONB --yes
|
|
3223
3153
|
```
|
|
3224
3154
|
|
|
3225
|
-
_See code: [src/commands/tokens/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
3155
|
+
_See code: [src/commands/tokens/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/tokens/delete.ts)_
|
|
3226
3156
|
|
|
3227
3157
|
## `sanity tokens list`
|
|
3228
3158
|
|
|
@@ -3230,7 +3160,7 @@ List API tokens for the current project
|
|
|
3230
3160
|
|
|
3231
3161
|
```
|
|
3232
3162
|
USAGE
|
|
3233
|
-
$ sanity tokens list [--json]
|
|
3163
|
+
$ pnpm exec sanity tokens list [--json]
|
|
3234
3164
|
|
|
3235
3165
|
FLAGS
|
|
3236
3166
|
--json Output tokens in JSON format
|
|
@@ -3241,14 +3171,14 @@ DESCRIPTION
|
|
|
3241
3171
|
EXAMPLES
|
|
3242
3172
|
List tokens for the current project
|
|
3243
3173
|
|
|
3244
|
-
$ sanity tokens list
|
|
3174
|
+
$ pnpm exec sanity tokens list
|
|
3245
3175
|
|
|
3246
3176
|
List tokens in JSON format
|
|
3247
3177
|
|
|
3248
|
-
$ sanity tokens list --json
|
|
3178
|
+
$ pnpm exec sanity tokens list --json
|
|
3249
3179
|
```
|
|
3250
3180
|
|
|
3251
|
-
_See code: [src/commands/tokens/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
3181
|
+
_See code: [src/commands/tokens/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/tokens/list.ts)_
|
|
3252
3182
|
|
|
3253
3183
|
## `sanity typegen generate`
|
|
3254
3184
|
|
|
@@ -3256,52 +3186,45 @@ Sanity TypeGen
|
|
|
3256
3186
|
|
|
3257
3187
|
```
|
|
3258
3188
|
USAGE
|
|
3259
|
-
$ sanity typegen generate [--config-path <value>] [--watch]
|
|
3189
|
+
$ pnpm exec sanity typegen generate [--config-path <value>] [--watch]
|
|
3260
3190
|
|
|
3261
3191
|
FLAGS
|
|
3262
|
-
--config-path=<value> [Default: sanity-typegen.json] Specifies the path to the
|
|
3263
|
-
|
|
3264
|
-
file that contains settings for the type generation
|
|
3265
|
-
process.
|
|
3192
|
+
--config-path=<value> [Default: sanity-typegen.json] Specifies the path to the typegen configuration file. This file
|
|
3193
|
+
should be a JSON file that contains settings for the type generation process.
|
|
3266
3194
|
--watch [Default: false] Run the typegen in watch mode
|
|
3267
3195
|
|
|
3268
3196
|
DESCRIPTION
|
|
3269
3197
|
Sanity TypeGen
|
|
3270
3198
|
|
|
3271
3199
|
Configuration:
|
|
3272
|
-
This command can utilize configuration settings defined in a
|
|
3273
|
-
`sanity-typegen.json` file. These settings include:
|
|
3200
|
+
This command can utilize configuration settings defined in a `sanity-typegen.json` file. These settings include:
|
|
3274
3201
|
|
|
3275
|
-
- "path": Specifies a glob pattern to locate your TypeScript or JavaScript
|
|
3276
|
-
files.
|
|
3202
|
+
- "path": Specifies a glob pattern to locate your TypeScript or JavaScript files.
|
|
3277
3203
|
Default: "./src/**/*.{ts,tsx,js,jsx}"
|
|
3278
3204
|
|
|
3279
|
-
- "schema": Defines the path to your Sanity schema file. This file should be
|
|
3280
|
-
|
|
3205
|
+
- "schema": Defines the path to your Sanity schema file. This file should be generated using the `sanity schema
|
|
3206
|
+
extract` command.
|
|
3281
3207
|
Default: "schema.json"
|
|
3282
3208
|
|
|
3283
|
-
- "generates": Indicates the path where the generated TypeScript type
|
|
3284
|
-
definitions will be saved.
|
|
3209
|
+
- "generates": Indicates the path where the generated TypeScript type definitions will be saved.
|
|
3285
3210
|
Default: "./sanity.types.ts"
|
|
3286
3211
|
|
|
3287
|
-
The default configuration values listed above are used if not overridden in
|
|
3288
|
-
|
|
3289
|
-
type generation, adjust these properties in the configuration file according to
|
|
3212
|
+
The default configuration values listed above are used if not overridden in your `sanity-typegen.json` configuration
|
|
3213
|
+
file. To customize the behavior of the type generation, adjust these properties in the configuration file according to
|
|
3290
3214
|
your project's needs.
|
|
3291
3215
|
|
|
3292
3216
|
Note:
|
|
3293
|
-
- The `sanity schema extract` command is a prerequisite for extracting your
|
|
3294
|
-
|
|
3295
|
-
`sanity typegen generate` command to generate type definitions.
|
|
3217
|
+
- The `sanity schema extract` command is a prerequisite for extracting your Sanity Studio schema into a `schema.json`
|
|
3218
|
+
file, which is then used by the `sanity typegen generate` command to generate type definitions.
|
|
3296
3219
|
|
|
3297
3220
|
EXAMPLES
|
|
3298
|
-
Generate TypeScript type definitions from a Sanity Studio schema extracted
|
|
3299
|
-
|
|
3221
|
+
Generate TypeScript type definitions from a Sanity Studio schema extracted using the `sanity schema extract`
|
|
3222
|
+
command.
|
|
3300
3223
|
|
|
3301
|
-
$ sanity typegen generate
|
|
3224
|
+
$ pnpm exec sanity typegen generate
|
|
3302
3225
|
```
|
|
3303
3226
|
|
|
3304
|
-
_See code: [@sanity/codegen](https://github.com/sanity-io/codegen/blob/v5.
|
|
3227
|
+
_See code: [@sanity/codegen](https://github.com/sanity-io/codegen/blob/v5.10.1/src/commands/typegen/generate.ts)_
|
|
3305
3228
|
|
|
3306
3229
|
## `sanity undeploy`
|
|
3307
3230
|
|
|
@@ -3309,17 +3232,16 @@ Removes the deployed Sanity Studio/App from Sanity hosting
|
|
|
3309
3232
|
|
|
3310
3233
|
```
|
|
3311
3234
|
USAGE
|
|
3312
|
-
$ sanity undeploy [-y]
|
|
3235
|
+
$ pnpm exec sanity undeploy [-y]
|
|
3313
3236
|
|
|
3314
3237
|
FLAGS
|
|
3315
|
-
-y, --yes Unattended mode, answers "yes" to any "yes/no" prompt and otherwise
|
|
3316
|
-
uses defaults
|
|
3238
|
+
-y, --yes Unattended mode, answers "yes" to any "yes/no" prompt and otherwise uses defaults
|
|
3317
3239
|
|
|
3318
3240
|
DESCRIPTION
|
|
3319
3241
|
Removes the deployed Sanity Studio/App from Sanity hosting
|
|
3320
3242
|
```
|
|
3321
3243
|
|
|
3322
|
-
_See code: [src/commands/undeploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
3244
|
+
_See code: [src/commands/undeploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/undeploy.ts)_
|
|
3323
3245
|
|
|
3324
3246
|
## `sanity users invite [EMAIL]`
|
|
3325
3247
|
|
|
@@ -3327,7 +3249,7 @@ Invite a new user to the project
|
|
|
3327
3249
|
|
|
3328
3250
|
```
|
|
3329
3251
|
USAGE
|
|
3330
|
-
$ sanity users invite [EMAIL] [--role <value>]
|
|
3252
|
+
$ pnpm exec sanity users invite [EMAIL] [--role <value>]
|
|
3331
3253
|
|
|
3332
3254
|
ARGUMENTS
|
|
3333
3255
|
[EMAIL] Email address to invite
|
|
@@ -3341,18 +3263,18 @@ DESCRIPTION
|
|
|
3341
3263
|
EXAMPLES
|
|
3342
3264
|
Invite a new user to the project (prompt for details)
|
|
3343
3265
|
|
|
3344
|
-
$ sanity users invite
|
|
3266
|
+
$ pnpm exec sanity users invite
|
|
3345
3267
|
|
|
3346
3268
|
Send a new user invite to the email "pippi@sanity.io", prompt for role
|
|
3347
3269
|
|
|
3348
|
-
$ sanity users invite pippi@sanity.io
|
|
3270
|
+
$ pnpm exec sanity users invite pippi@sanity.io
|
|
3349
3271
|
|
|
3350
3272
|
Send a new user invite to the email "pippi@sanity.io", as administrator
|
|
3351
3273
|
|
|
3352
|
-
$ sanity users invite pippi@sanity.io --role administrator
|
|
3274
|
+
$ pnpm exec sanity users invite pippi@sanity.io --role administrator
|
|
3353
3275
|
```
|
|
3354
3276
|
|
|
3355
|
-
_See code: [src/commands/users/invite.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
3277
|
+
_See code: [src/commands/users/invite.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/users/invite.ts)_
|
|
3356
3278
|
|
|
3357
3279
|
## `sanity users list`
|
|
3358
3280
|
|
|
@@ -3360,8 +3282,7 @@ List all users of the project
|
|
|
3360
3282
|
|
|
3361
3283
|
```
|
|
3362
3284
|
USAGE
|
|
3363
|
-
$ sanity users list [--invitations] [--order asc|desc] [--robots]
|
|
3364
|
-
[--sort id|name|role|date]
|
|
3285
|
+
$ pnpm exec sanity users list [--invitations] [--order asc|desc] [--robots] [--sort id|name|role|date]
|
|
3365
3286
|
|
|
3366
3287
|
FLAGS
|
|
3367
3288
|
--[no-]invitations Includes or excludes pending invitations
|
|
@@ -3377,18 +3298,18 @@ DESCRIPTION
|
|
|
3377
3298
|
EXAMPLES
|
|
3378
3299
|
List all users of the project
|
|
3379
3300
|
|
|
3380
|
-
$ sanity users list
|
|
3301
|
+
$ pnpm exec sanity users list
|
|
3381
3302
|
|
|
3382
3303
|
List all users of the project, but exclude pending invitations and robots
|
|
3383
3304
|
|
|
3384
|
-
$ sanity users list --no-invitations --no-robots
|
|
3305
|
+
$ pnpm exec sanity users list --no-invitations --no-robots
|
|
3385
3306
|
|
|
3386
3307
|
List all users, sorted by role
|
|
3387
3308
|
|
|
3388
|
-
$ sanity users list --sort role
|
|
3309
|
+
$ pnpm exec sanity users list --sort role
|
|
3389
3310
|
```
|
|
3390
3311
|
|
|
3391
|
-
_See code: [src/commands/users/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
3312
|
+
_See code: [src/commands/users/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/users/list.ts)_
|
|
3392
3313
|
|
|
3393
3314
|
## `sanity versions`
|
|
3394
3315
|
|
|
@@ -3396,15 +3317,15 @@ Shows installed versions of Sanity Studio and components
|
|
|
3396
3317
|
|
|
3397
3318
|
```
|
|
3398
3319
|
USAGE
|
|
3399
|
-
$ sanity versions
|
|
3320
|
+
$ pnpm exec sanity versions
|
|
3400
3321
|
|
|
3401
3322
|
DESCRIPTION
|
|
3402
3323
|
Shows installed versions of Sanity Studio and components
|
|
3403
3324
|
|
|
3404
3325
|
EXAMPLES
|
|
3405
|
-
$ sanity versions
|
|
3326
|
+
$ pnpm exec sanity versions
|
|
3406
3327
|
```
|
|
3407
3328
|
|
|
3408
|
-
_See code: [src/commands/versions.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.
|
|
3329
|
+
_See code: [src/commands/versions.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.17/src/commands/versions.ts)_
|
|
3409
3330
|
|
|
3410
3331
|
<!-- commandsstop -->
|