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