@sanity/cli 6.0.0-alpha.9 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +602 -291
- package/bin/run.js +2 -0
- package/dist/SanityHelp.js +51 -23
- package/dist/SanityHelp.js.map +1 -1
- package/dist/actions/auth/authServer.js +28 -22
- package/dist/actions/auth/authServer.js.map +1 -1
- package/dist/actions/auth/login/getProvider.js +49 -38
- 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/backup/downloadAsset.js +9 -9
- package/dist/actions/backup/downloadAsset.js.map +1 -1
- package/dist/actions/backup/downloadDocument.js +8 -8
- package/dist/actions/backup/downloadDocument.js.map +1 -1
- package/dist/actions/build/buildApp.js +55 -18
- package/dist/actions/build/buildApp.js.map +1 -1
- package/dist/actions/build/buildStaticFiles.js +3 -2
- package/dist/actions/build/buildStaticFiles.js.map +1 -1
- package/dist/actions/build/buildStudio.js +72 -44
- package/dist/actions/build/buildStudio.js.map +1 -1
- package/dist/actions/build/buildVendorDependencies.js +18 -52
- package/dist/actions/build/buildVendorDependencies.js.map +1 -1
- package/dist/actions/build/checkRequiredDependencies.js +13 -8
- package/dist/actions/build/checkRequiredDependencies.js.map +1 -1
- package/dist/actions/build/checkStudioDependencyVersions.js +19 -17
- package/dist/actions/build/checkStudioDependencyVersions.js.map +1 -1
- package/dist/actions/build/createExternalFromImportMap.js +1 -1
- package/dist/actions/build/createExternalFromImportMap.js.map +1 -1
- package/dist/actions/build/determineBasePath.js +5 -2
- package/dist/actions/build/determineBasePath.js.map +1 -1
- package/dist/actions/build/getViteConfig.js +47 -4
- package/dist/actions/build/getViteConfig.js.map +1 -1
- package/dist/actions/build/handlePrereleaseVersions.js +44 -0
- package/dist/actions/build/handlePrereleaseVersions.js.map +1 -0
- package/dist/actions/build/renderDocument.js +6 -10
- package/dist/actions/build/renderDocument.js.map +1 -1
- package/dist/actions/build/renderDocumentWorker/components/BasicDocument.js +4 -4
- package/dist/actions/build/renderDocumentWorker/components/BasicDocument.js.map +1 -1
- package/dist/actions/build/renderDocumentWorker/components/DefaultDocument.js +3 -3
- package/dist/actions/build/renderDocumentWorker/components/DefaultDocument.js.map +1 -1
- package/dist/actions/build/renderDocumentWorker/components/GlobalErrorHandler.js +1 -0
- package/dist/actions/build/renderDocumentWorker/components/GlobalErrorHandler.js.map +1 -1
- package/dist/actions/build/renderDocumentWorker/getDocumentComponent.js +2 -2
- package/dist/actions/build/renderDocumentWorker/getDocumentComponent.js.map +1 -1
- package/dist/actions/build/renderDocumentWorker/renderDocumentWorker.js +1 -1
- package/dist/actions/build/renderDocumentWorker/renderDocumentWorker.js.map +1 -1
- package/dist/actions/build/shouldAutoUpdate.js +2 -0
- package/dist/actions/build/shouldAutoUpdate.js.map +1 -1
- package/dist/actions/build/types.js.map +1 -1
- package/dist/actions/build/writeFavicons.js +3 -5
- package/dist/actions/build/writeFavicons.js.map +1 -1
- package/dist/actions/build/writeSanityRuntime.js +4 -3
- package/dist/actions/build/writeSanityRuntime.js.map +1 -1
- package/dist/actions/codemods/reactIconsV3.js +2 -2
- package/dist/actions/codemods/reactIconsV3.js.map +1 -1
- package/dist/actions/dataset/create.js +7 -1
- package/dist/actions/dataset/create.js.map +1 -1
- package/dist/actions/dataset/determineDatasetAclMode.js.map +1 -1
- package/dist/actions/dataset/resolveDataset.js +26 -0
- package/dist/actions/dataset/resolveDataset.js.map +1 -0
- package/dist/actions/debug/formatters.js +22 -0
- package/dist/actions/debug/formatters.js.map +1 -0
- package/dist/actions/deploy/createStudioUserApplication.js +17 -4
- package/dist/actions/deploy/createStudioUserApplication.js.map +1 -1
- package/dist/actions/deploy/deployApp.js +41 -15
- package/dist/actions/deploy/deployApp.js.map +1 -1
- package/dist/actions/deploy/deployStudio.js +92 -44
- package/dist/actions/deploy/deployStudio.js.map +1 -1
- package/dist/actions/deploy/deployStudioSchemasAndManifests.js +55 -0
- package/dist/actions/deploy/deployStudioSchemasAndManifests.js.map +1 -0
- package/dist/actions/deploy/deployStudioSchemasAndManifests.worker.js +120 -0
- package/dist/actions/deploy/deployStudioSchemasAndManifests.worker.js.map +1 -0
- package/dist/actions/deploy/findUserApplicationForStudio.js +35 -12
- package/dist/actions/deploy/findUserApplicationForStudio.js.map +1 -1
- package/dist/actions/deploy/types.js +10 -1
- package/dist/actions/deploy/types.js.map +1 -1
- package/dist/actions/deploy/urlUtils.js +21 -0
- package/dist/actions/deploy/urlUtils.js.map +1 -0
- package/dist/actions/dev/getDashboardAppUrl.js +48 -0
- package/dist/actions/dev/getDashboardAppUrl.js.map +1 -0
- package/dist/actions/dev/getDevServerConfig.js +7 -3
- package/dist/actions/dev/getDevServerConfig.js.map +1 -1
- package/dist/actions/dev/startAppDevServer.js +3 -3
- package/dist/actions/dev/startAppDevServer.js.map +1 -1
- package/dist/actions/dev/startStudioDevServer.js +14 -14
- package/dist/actions/dev/startStudioDevServer.js.map +1 -1
- package/dist/actions/doctor/checks/cliInstallation.js +56 -0
- package/dist/actions/doctor/checks/cliInstallation.js.map +1 -0
- package/dist/actions/doctor/checks/index.js +16 -0
- package/dist/actions/doctor/checks/index.js.map +1 -0
- package/dist/actions/doctor/runDoctorChecks.js +56 -0
- package/dist/actions/doctor/runDoctorChecks.js.map +1 -0
- package/dist/actions/doctor/types.js +3 -0
- package/dist/actions/doctor/types.js.map +1 -0
- package/dist/actions/documents/types.js.map +1 -1
- package/dist/actions/documents/validate.js +11 -2
- package/dist/actions/documents/validate.js.map +1 -1
- package/dist/actions/documents/validateDocuments.worker.js +4 -4
- package/dist/actions/documents/validateDocuments.worker.js.map +1 -1
- package/dist/actions/documents/validation/reporters/jsonReporter.js +1 -1
- package/dist/actions/documents/validation/reporters/jsonReporter.js.map +1 -1
- package/dist/actions/documents/validation/reporters/ndjsonReporter.js +1 -1
- package/dist/actions/documents/validation/reporters/ndjsonReporter.js.map +1 -1
- package/dist/actions/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/__tests__/fixtures/many-self-refs.js +540 -0
- package/dist/actions/graphql/__tests__/fixtures/many-self-refs.js.map +1 -0
- package/dist/actions/graphql/__tests__/fixtures/test-studio.js +1143 -0
- package/dist/actions/graphql/__tests__/fixtures/test-studio.js.map +1 -0
- package/dist/actions/graphql/__tests__/fixtures/union-refs.js +591 -0
- package/dist/actions/graphql/__tests__/fixtures/union-refs.js.map +1 -0
- package/dist/actions/graphql/__tests__/helpers.js +23 -0
- package/dist/actions/graphql/__tests__/helpers.js.map +1 -0
- package/dist/actions/graphql/extractFromSanitySchema.js +5 -5
- 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/generateTypeFilters.js +1 -1
- package/dist/actions/graphql/gen1/generateTypeFilters.js.map +1 -1
- package/dist/actions/graphql/gen1/generateTypeQueries.js +2 -1
- package/dist/actions/graphql/gen1/generateTypeQueries.js.map +1 -1
- package/dist/actions/graphql/gen1/index.js +5 -5
- package/dist/actions/graphql/gen1/index.js.map +1 -1
- package/dist/actions/graphql/gen2/generateTypeQueries.js +1 -1
- package/dist/actions/graphql/gen2/generateTypeQueries.js.map +1 -1
- package/dist/actions/graphql/gen2/index.js +6 -6
- package/dist/actions/graphql/gen2/index.js.map +1 -1
- package/dist/actions/graphql/gen3/generateTypeQueries.js +3 -4
- 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 +15 -57
- 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 +10 -8
- 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/bootstrapTemplate.js.map +1 -1
- package/dist/actions/init/checkNextJsReactCompatibility.js +1 -1
- package/dist/actions/init/checkNextJsReactCompatibility.js.map +1 -1
- package/dist/actions/init/createAppCliConfig.js.map +1 -1
- package/dist/actions/init/createCliConfig.js.map +1 -1
- package/dist/actions/init/createPackageManifest.js +21 -9
- package/dist/actions/init/createPackageManifest.js.map +1 -1
- package/dist/actions/init/remoteTemplate.js +1 -2
- package/dist/actions/init/remoteTemplate.js.map +1 -1
- package/dist/actions/init/sdkAppDependencies.js +19 -0
- package/dist/actions/init/sdkAppDependencies.js.map +1 -0
- package/dist/actions/init/studioDependencies.js.map +1 -0
- package/dist/actions/init/templates/appQuickstart.js +1 -22
- package/dist/actions/init/templates/appQuickstart.js.map +1 -1
- package/dist/actions/init/templates/appSanityUi.js +3 -22
- package/dist/actions/init/templates/appSanityUi.js.map +1 -1
- package/dist/actions/init/types.js.map +1 -1
- package/dist/actions/manifest/SchemaIcon.js +6 -4
- package/dist/actions/manifest/SchemaIcon.js.map +1 -1
- package/dist/actions/manifest/blockTypeTransformer.js +67 -0
- package/dist/actions/manifest/blockTypeTransformer.js.map +1 -0
- package/dist/actions/manifest/debug.js +4 -0
- package/dist/actions/manifest/debug.js.map +1 -0
- package/dist/actions/manifest/extractAppManifest.js +39 -22
- package/dist/actions/manifest/extractAppManifest.js.map +1 -1
- package/dist/actions/manifest/extractManifest.js +27 -78
- package/dist/actions/manifest/extractManifest.js.map +1 -1
- package/dist/actions/manifest/extractManifest.worker.js +30 -0
- package/dist/actions/manifest/extractManifest.worker.js.map +1 -0
- package/dist/actions/manifest/extractWorkspaceManifest.js +31 -372
- package/dist/actions/manifest/extractWorkspaceManifest.js.map +1 -1
- package/dist/actions/manifest/iconResolver.js +30 -0
- package/dist/actions/manifest/iconResolver.js.map +1 -0
- package/dist/actions/manifest/referenceTransformer.js +51 -0
- package/dist/actions/manifest/referenceTransformer.js.map +1 -0
- package/dist/actions/manifest/schemaTypeHelpers.js +2 -2
- package/dist/actions/manifest/schemaTypeHelpers.js.map +1 -1
- package/dist/actions/manifest/schemaTypeTransformer.js +168 -0
- package/dist/actions/manifest/schemaTypeTransformer.js.map +1 -0
- package/dist/actions/manifest/transformerUtils.js +40 -0
- package/dist/actions/manifest/transformerUtils.js.map +1 -0
- package/dist/actions/manifest/types.js +5 -0
- package/dist/actions/manifest/types.js.map +1 -1
- package/dist/actions/manifest/validationTransformer.js +84 -0
- package/dist/actions/manifest/validationTransformer.js.map +1 -0
- package/dist/actions/manifest/writeManifestFile.js +30 -0
- package/dist/actions/manifest/writeManifestFile.js.map +1 -0
- package/dist/actions/manifest/writeWorkspaceFiles.js +30 -0
- package/dist/actions/manifest/writeWorkspaceFiles.js.map +1 -0
- package/dist/actions/mcp/detectAvailableEditors.js +34 -13
- package/dist/actions/mcp/detectAvailableEditors.js.map +1 -1
- package/dist/actions/mcp/editorConfigs.js +231 -109
- package/dist/actions/mcp/editorConfigs.js.map +1 -1
- package/dist/actions/mcp/promptForMCPSetup.js +16 -7
- package/dist/actions/mcp/promptForMCPSetup.js.map +1 -1
- package/dist/actions/mcp/setupMCP.js +62 -23
- package/dist/actions/mcp/setupMCP.js.map +1 -1
- package/dist/actions/mcp/types.js.map +1 -1
- package/dist/actions/mcp/validateEditorTokens.js +56 -0
- package/dist/actions/mcp/validateEditorTokens.js.map +1 -0
- package/dist/actions/mcp/writeMCPConfig.js +27 -15
- package/dist/actions/mcp/writeMCPConfig.js.map +1 -1
- package/dist/actions/media/buildNdjsonIndex.js +32 -0
- package/dist/actions/media/buildNdjsonIndex.js.map +1 -0
- package/dist/actions/media/importAspects.js +2 -11
- package/dist/actions/media/importAspects.js.map +1 -1
- package/dist/actions/media/importMedia.js +22 -18
- package/dist/actions/media/importMedia.js.map +1 -1
- package/dist/actions/organizations/findOrganizationByUserName.js +5 -0
- package/dist/actions/organizations/findOrganizationByUserName.js.map +1 -0
- package/dist/actions/organizations/getOrganization.js +3 -2
- package/dist/actions/organizations/getOrganization.js.map +1 -1
- package/dist/actions/organizations/getOrganizationChoices.js +27 -19
- package/dist/actions/organizations/getOrganizationChoices.js.map +1 -1
- package/dist/actions/organizations/types.js +3 -0
- package/dist/actions/organizations/types.js.map +1 -0
- package/dist/actions/projects/getManageUrl.js +1 -2
- package/dist/actions/projects/getManageUrl.js.map +1 -1
- package/dist/actions/schema/deleteSchemaAction.js +14 -30
- package/dist/actions/schema/deleteSchemaAction.js.map +1 -1
- package/dist/actions/schema/deploySchemas.js +22 -91
- package/dist/actions/schema/deploySchemas.js.map +1 -1
- package/dist/actions/schema/extractSanitySchema.worker.js +0 -5
- package/dist/actions/schema/extractSanitySchema.worker.js.map +1 -1
- package/dist/actions/schema/extractSanityWorkspace.worker.js +24 -0
- package/dist/actions/schema/extractSanityWorkspace.worker.js.map +1 -0
- package/dist/actions/schema/extractSchema.js +8 -40
- package/dist/actions/schema/extractSchema.js.map +1 -1
- package/dist/actions/schema/extractSchemaWatcher.js +128 -0
- package/dist/actions/schema/extractSchemaWatcher.js.map +1 -0
- package/dist/actions/schema/formatSchemaValidation.js +5 -1
- package/dist/actions/schema/formatSchemaValidation.js.map +1 -1
- package/dist/actions/schema/getExtractOptions.js +16 -0
- package/dist/actions/schema/getExtractOptions.js.map +1 -0
- package/dist/actions/schema/listSchemas.js +53 -56
- package/dist/actions/schema/listSchemas.js.map +1 -1
- package/dist/actions/schema/matchSchemaPattern.js +22 -0
- package/dist/actions/schema/matchSchemaPattern.js.map +1 -0
- package/dist/actions/schema/runSchemaExtraction.js +39 -0
- package/dist/actions/schema/runSchemaExtraction.js.map +1 -0
- package/dist/actions/schema/types.js +8 -0
- package/dist/actions/schema/types.js.map +1 -1
- package/dist/actions/schema/uniqueWorkspaces.worker.js +24 -0
- package/dist/actions/schema/uniqueWorkspaces.worker.js.map +1 -0
- package/dist/actions/schema/updateWorkspaceSchema.js +63 -0
- package/dist/actions/schema/updateWorkspaceSchema.js.map +1 -0
- package/dist/actions/schema/uploadSchemaToLexicon.js +87 -0
- package/dist/actions/schema/uploadSchemaToLexicon.js.map +1 -0
- package/dist/actions/schema/utils/SchemaExtractionError.js +10 -0
- package/dist/actions/schema/utils/SchemaExtractionError.js.map +1 -0
- package/dist/actions/schema/utils/schemaStoreValidation.js +1 -15
- package/dist/actions/schema/utils/schemaStoreValidation.js.map +1 -1
- package/dist/actions/schema/utils/uniqByProjectIdDataset.js +1 -1
- package/dist/actions/schema/utils/uniqByProjectIdDataset.js.map +1 -1
- package/dist/actions/schema/validateSchema.worker.js +1 -8
- package/dist/actions/schema/validateSchema.worker.js.map +1 -1
- package/dist/actions/schema/watchExtractSchema.js +72 -0
- package/dist/actions/schema/watchExtractSchema.js.map +1 -0
- 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/telemetry/telemetryDebug.js +2 -2
- package/dist/actions/telemetry/telemetryDebug.js.map +1 -1
- package/dist/actions/users/getMembersForProject.js.map +1 -1
- package/dist/actions/users/getPendingInvitations.js +1 -1
- package/dist/actions/users/getPendingInvitations.js.map +1 -1
- package/dist/actions/users/types.js.map +1 -1
- package/dist/actions/versions/filterSanityModules.js.map +1 -1
- package/dist/actions/versions/findSanityModulesVersions.js +2 -3
- package/dist/actions/versions/findSanityModulesVersions.js.map +1 -1
- package/dist/actions/versions/getFormatters.js +1 -1
- package/dist/actions/versions/getFormatters.js.map +1 -1
- package/dist/actions/versions/tryFindLatestVersion.js +1 -1
- package/dist/actions/versions/tryFindLatestVersion.js.map +1 -1
- package/dist/commands/backup/disable.js +22 -7
- package/dist/commands/backup/disable.js.map +1 -1
- package/dist/commands/backup/download.js +19 -10
- package/dist/commands/backup/download.js.map +1 -1
- package/dist/commands/backup/enable.js +22 -7
- package/dist/commands/backup/enable.js.map +1 -1
- package/dist/commands/backup/list.js +20 -8
- package/dist/commands/backup/list.js.map +1 -1
- package/dist/commands/build.js +2 -5
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/cors/add.js +20 -7
- package/dist/commands/cors/add.js.map +1 -1
- package/dist/commands/cors/delete.js +22 -7
- package/dist/commands/cors/delete.js.map +1 -1
- package/dist/commands/cors/list.js +22 -7
- package/dist/commands/cors/list.js.map +1 -1
- package/dist/commands/dataset/alias/create.js +26 -7
- package/dist/commands/dataset/alias/create.js.map +1 -1
- package/dist/commands/dataset/alias/delete.js +20 -7
- package/dist/commands/dataset/alias/delete.js.map +1 -1
- package/dist/commands/dataset/alias/link.js +20 -7
- package/dist/commands/dataset/alias/link.js.map +1 -1
- package/dist/commands/dataset/alias/unlink.js +20 -7
- package/dist/commands/dataset/alias/unlink.js.map +1 -1
- package/dist/commands/dataset/copy.js +45 -30
- package/dist/commands/dataset/copy.js.map +1 -1
- package/dist/commands/dataset/create.js +32 -7
- package/dist/commands/dataset/create.js.map +1 -1
- package/dist/commands/dataset/delete.js +16 -7
- package/dist/commands/dataset/delete.js.map +1 -1
- package/dist/commands/dataset/embeddings/disable.js +77 -0
- package/dist/commands/dataset/embeddings/disable.js.map +1 -0
- package/dist/commands/dataset/embeddings/enable.js +141 -0
- package/dist/commands/dataset/embeddings/enable.js.map +1 -0
- package/dist/commands/dataset/embeddings/status.js +72 -0
- package/dist/commands/dataset/embeddings/status.js.map +1 -0
- package/dist/commands/dataset/export.js +25 -16
- package/dist/commands/dataset/export.js.map +1 -1
- package/dist/commands/dataset/import.js +306 -1
- package/dist/commands/dataset/import.js.map +1 -1
- package/dist/commands/dataset/list.js +22 -7
- package/dist/commands/dataset/list.js.map +1 -1
- package/dist/commands/dataset/visibility/get.js +18 -7
- package/dist/commands/dataset/visibility/get.js.map +1 -1
- package/dist/commands/dataset/visibility/set.js +22 -7
- package/dist/commands/dataset/visibility/set.js.map +1 -1
- package/dist/commands/debug.js +4 -2
- package/dist/commands/debug.js.map +1 -1
- package/dist/commands/deploy.js +22 -11
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/dev.js +2 -4
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/doctor.js +125 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/documents/create.js +19 -12
- package/dist/commands/documents/create.js.map +1 -1
- package/dist/commands/documents/delete.js +19 -12
- package/dist/commands/documents/delete.js.map +1 -1
- package/dist/commands/documents/get.js +17 -12
- package/dist/commands/documents/get.js.map +1 -1
- package/dist/commands/documents/query.js +26 -18
- package/dist/commands/documents/query.js.map +1 -1
- package/dist/commands/documents/validate.js +32 -10
- package/dist/commands/documents/validate.js.map +1 -1
- package/dist/commands/graphql/deploy.js +58 -30
- package/dist/commands/graphql/deploy.js.map +1 -1
- package/dist/commands/graphql/list.js +15 -7
- package/dist/commands/graphql/list.js.map +1 -1
- package/dist/commands/graphql/undeploy.js +37 -19
- package/dist/commands/graphql/undeploy.js.map +1 -1
- package/dist/commands/hook/attempt.js +22 -7
- package/dist/commands/hook/attempt.js.map +1 -1
- package/dist/commands/hook/create.js +23 -8
- package/dist/commands/hook/create.js.map +1 -1
- package/dist/commands/hook/delete.js +22 -7
- package/dist/commands/hook/delete.js.map +1 -1
- package/dist/commands/hook/list.js +22 -7
- package/dist/commands/hook/list.js.map +1 -1
- package/dist/commands/hook/logs.js +21 -8
- package/dist/commands/hook/logs.js.map +1 -1
- package/dist/commands/init.js +55 -32
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/login.js +19 -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/manage.js +0 -1
- package/dist/commands/manage.js.map +1 -1
- package/dist/commands/manifest/extract.js +14 -10
- package/dist/commands/manifest/extract.js.map +1 -1
- package/dist/commands/mcp/configure.js +4 -2
- package/dist/commands/mcp/configure.js.map +1 -1
- package/dist/commands/media/create-aspect.js +4 -4
- package/dist/commands/media/create-aspect.js.map +1 -1
- package/dist/commands/media/delete-aspect.js +9 -7
- package/dist/commands/media/delete-aspect.js.map +1 -1
- package/dist/commands/media/deploy-aspect.js +22 -9
- package/dist/commands/media/deploy-aspect.js.map +1 -1
- package/dist/commands/media/export.js +9 -7
- package/dist/commands/media/export.js.map +1 -1
- package/dist/commands/media/import.js +10 -8
- package/dist/commands/media/import.js.map +1 -1
- package/dist/commands/preview.js +5 -8
- package/dist/commands/preview.js.map +1 -1
- package/dist/commands/projects/list.js +2 -1
- package/dist/commands/projects/list.js.map +1 -1
- package/dist/commands/schema/delete.js +33 -34
- package/dist/commands/schema/delete.js.map +1 -1
- package/dist/commands/schema/deploy.js +19 -30
- package/dist/commands/schema/deploy.js.map +1 -1
- package/dist/commands/schema/extract.js +32 -4
- package/dist/commands/schema/extract.js.map +1 -1
- package/dist/commands/schema/list.js +10 -31
- package/dist/commands/schema/list.js.map +1 -1
- package/dist/commands/tokens/add.js +24 -7
- package/dist/commands/tokens/add.js.map +1 -1
- package/dist/commands/tokens/delete.js +20 -7
- package/dist/commands/tokens/delete.js.map +1 -1
- package/dist/commands/tokens/list.js +20 -7
- package/dist/commands/tokens/list.js.map +1 -1
- package/dist/commands/users/invite.js +24 -7
- package/dist/commands/users/invite.js.map +1 -1
- package/dist/commands/users/list.js +76 -33
- package/dist/commands/users/list.js.map +1 -1
- package/dist/commands/versions.js +1 -1
- package/dist/commands/versions.js.map +1 -1
- package/dist/config/createCliConfig.js +1 -2
- package/dist/config/createCliConfig.js.map +1 -1
- package/dist/exports/_internal.d.ts +132 -0
- package/dist/exports/_internal.js +4 -0
- package/dist/exports/_internal.js.map +1 -0
- package/dist/exports/index.d.ts +113 -0
- package/dist/exports/index.js +6 -0
- package/dist/exports/index.js.map +1 -0
- package/dist/hooks/init/checkForUpdates.js +14 -0
- package/dist/hooks/init/checkForUpdates.js.map +1 -0
- 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 +16 -10
- package/dist/hooks/prerun/setupTelemetry.js.map +1 -1
- package/dist/prompts/promptForProject.js +64 -0
- package/dist/prompts/promptForProject.js.map +1 -0
- package/dist/{actions/auth/login/promptProviders.js → prompts/promptForProviders.js} +3 -3
- package/dist/prompts/promptForProviders.js.map +1 -0
- package/dist/prompts/selectMediaLibrary.js +1 -1
- package/dist/prompts/selectMediaLibrary.js.map +1 -1
- package/dist/server/devServer.js +4 -2
- package/dist/server/devServer.js.map +1 -1
- package/dist/server/previewServer.js +2 -2
- package/dist/server/previewServer.js.map +1 -1
- package/dist/server/vite/plugin-schema-extraction.js +201 -0
- package/dist/server/vite/plugin-schema-extraction.js.map +1 -0
- package/dist/server/vite/plugin-typegen.js +217 -0
- package/dist/server/vite/plugin-typegen.js.map +1 -0
- package/dist/services/auth.js +42 -3
- package/dist/services/auth.js.map +1 -1
- package/dist/services/datasets.js +7 -5
- package/dist/services/datasets.js.map +1 -1
- package/dist/services/docs.js +2 -2
- package/dist/services/docs.js.map +1 -1
- package/dist/services/embeddings.js +25 -0
- package/dist/services/embeddings.js.map +1 -0
- package/dist/services/getUrlHeaders.js +7 -18
- package/dist/services/getUrlHeaders.js.map +1 -1
- package/dist/services/grants.js +13 -0
- package/dist/services/grants.js.map +1 -0
- package/dist/services/graphql.js +1 -1
- package/dist/services/graphql.js.map +1 -1
- package/dist/services/mcp.js +55 -1
- package/dist/services/mcp.js.map +1 -1
- package/dist/services/projects.js +4 -2
- package/dist/services/projects.js.map +1 -1
- package/dist/services/schemas.js +1 -1
- package/dist/services/schemas.js.map +1 -1
- package/dist/services/telemetry.js +2 -1
- package/dist/services/telemetry.js.map +1 -1
- package/dist/services/userApplications.js +21 -6
- package/dist/services/userApplications.js.map +1 -1
- package/dist/telemetry/extractSchema.telemetry.js +10 -0
- package/dist/telemetry/extractSchema.telemetry.js.map +1 -1
- package/dist/types/grants.js +3 -0
- package/dist/types/grants.js.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -1
- package/dist/util/checkProjectPermissions.js +21 -0
- package/dist/util/checkProjectPermissions.js.map +1 -0
- package/dist/util/cliClient.js +5 -3
- package/dist/util/cliClient.js.map +1 -1
- package/dist/util/compareDependencyVersions.js +74 -38
- package/dist/util/compareDependencyVersions.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/errorMessages.js +0 -1
- package/dist/util/errorMessages.js.map +1 -1
- package/dist/util/extractDocumentsFromNdjsonOrTarball.js +1 -2
- package/dist/util/extractDocumentsFromNdjsonOrTarball.js.map +1 -1
- package/dist/util/getCliVersion.js +1 -1
- package/dist/util/getCliVersion.js.map +1 -1
- package/dist/util/getLocalPackageVersion.js +33 -23
- package/dist/util/getLocalPackageVersion.js.map +1 -1
- package/dist/util/getProjectDefaults.js +22 -28
- package/dist/util/getProjectDefaults.js.map +1 -1
- package/dist/util/getSharedServerConfig.js +1 -0
- package/dist/util/getSharedServerConfig.js.map +1 -1
- package/dist/util/getWorkspace.js +1 -1
- package/dist/util/getWorkspace.js.map +1 -1
- package/dist/util/gitConfig.js +45 -0
- package/dist/util/gitConfig.js.map +1 -0
- 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/packageManager/getPeerDependencies.js +44 -0
- package/dist/util/packageManager/getPeerDependencies.js.map +1 -0
- package/dist/util/packageManager/installationInfo/analyzeIssues.js +225 -0
- package/dist/util/packageManager/installationInfo/analyzeIssues.js.map +1 -0
- package/dist/util/packageManager/installationInfo/commands.js +73 -0
- package/dist/util/packageManager/installationInfo/commands.js.map +1 -0
- package/dist/util/packageManager/installationInfo/detectCliInstallation.js +66 -0
- package/dist/util/packageManager/installationInfo/detectCliInstallation.js.map +1 -0
- package/dist/util/packageManager/installationInfo/detectGlobals.js +295 -0
- package/dist/util/packageManager/installationInfo/detectGlobals.js.map +1 -0
- package/dist/util/packageManager/installationInfo/detectPackages.js +190 -0
- package/dist/util/packageManager/installationInfo/detectPackages.js.map +1 -0
- package/dist/util/packageManager/installationInfo/detectWorkspace.js +192 -0
- package/dist/util/packageManager/installationInfo/detectWorkspace.js.map +1 -0
- package/dist/util/packageManager/installationInfo/index.js +4 -0
- package/dist/util/packageManager/installationInfo/index.js.map +1 -0
- package/dist/util/packageManager/installationInfo/readJsonFile.js +14 -0
- package/dist/util/packageManager/installationInfo/readJsonFile.js.map +1 -0
- package/dist/util/packageManager/installationInfo/resolveVersionRange.js +42 -0
- package/dist/util/packageManager/installationInfo/resolveVersionRange.js.map +1 -0
- package/dist/util/packageManager/installationInfo/types.js +3 -0
- package/dist/util/packageManager/installationInfo/types.js.map +1 -0
- package/dist/util/packageManager/packageManagerChoice.js +1 -20
- package/dist/util/packageManager/packageManagerChoice.js.map +1 -1
- package/dist/util/packageManager/upgradePackages.js +4 -1
- package/dist/util/packageManager/upgradePackages.js.map +1 -1
- package/dist/util/promiseRaceWithTimeout.js +28 -0
- package/dist/util/promiseRaceWithTimeout.js.map +1 -0
- package/dist/util/readdirRecursive.js.map +1 -1
- package/dist/util/resolveLatestVersions.js +2 -2
- package/dist/util/resolveLatestVersions.js.map +1 -1
- package/dist/util/sharedFlags.js +54 -0
- package/dist/util/sharedFlags.js.map +1 -0
- 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/toForwardSlashes.js +8 -0
- package/dist/util/toForwardSlashes.js.map +1 -0
- package/dist/util/update/fetchLatestVersion.js +21 -0
- package/dist/util/update/fetchLatestVersion.js.map +1 -0
- package/dist/util/update/getUpdateCommand.js +20 -0
- package/dist/util/update/getUpdateCommand.js.map +1 -0
- package/dist/util/update/isInstalledUsingYarn.js +17 -0
- package/dist/util/update/isInstalledUsingYarn.js.map +1 -0
- package/dist/util/update/showNotificationUpdate.js +31 -0
- package/dist/util/update/showNotificationUpdate.js.map +1 -0
- package/dist/util/update/updateChecker.js +60 -0
- package/dist/util/update/updateChecker.js.map +1 -0
- package/dist/util/update/updateCheckerDebug.js +4 -0
- package/dist/util/update/updateCheckerDebug.js.map +1 -0
- package/oclif.config.js +1 -0
- package/oclif.manifest.json +1285 -492
- package/package.json +72 -73
- package/static/favicons/apple-touch-icon.png +0 -0
- package/static/favicons/favicon-192.png +0 -0
- package/static/favicons/favicon-512.png +0 -0
- package/static/favicons/favicon-96.png +0 -0
- package/static/favicons/favicon.ico +0 -0
- package/static/favicons/favicon.svg +12 -0
- package/dist/actions/auth/login/promptProviders.js.map +0 -1
- package/dist/actions/dev/getCoreAppUrl.js +0 -10
- package/dist/actions/dev/getCoreAppUrl.js.map +0 -1
- package/dist/actions/schema/schemaStoreTypes.js +0 -19
- package/dist/actions/schema/schemaStoreTypes.js.map +0 -1
- package/dist/actions/schema/utils/manifestExtractor.js +0 -33
- package/dist/actions/schema/utils/manifestExtractor.js.map +0 -1
- package/dist/actions/schema/utils/manifestReader.js +0 -71
- package/dist/actions/schema/utils/manifestReader.js.map +0 -1
- package/dist/index.d.ts +0 -2326
- package/dist/index.js +0 -6
- package/dist/index.js.map +0 -1
- package/dist/studioDependencies.js.map +0 -1
- package/dist/typings/deepSortObject.d.js +0 -2
- package/dist/typings/deepSortObject.d.js.map +0 -1
- package/dist/util/findNdjsonEntry.js +0 -21
- package/dist/util/findNdjsonEntry.js.map +0 -1
- package/dist/util/importStudioConfig.js +0 -40
- package/dist/util/importStudioConfig.js.map +0 -1
- package/dist/util/readModuleVersion.js +0 -15
- package/dist/util/readModuleVersion.js.map +0 -1
- package/dist/util/readPackageJson.js +0 -44
- package/dist/util/readPackageJson.js.map +0 -1
- package/dist/util/readPackageManifest.js +0 -46
- package/dist/util/readPackageManifest.js.map +0 -1
- package/dist/util/uniqBy.js +0 -14
- package/dist/util/uniqBy.js.map +0 -1
- package/dist/util/workerChannels.js +0 -172
- package/dist/util/workerChannels.js.map +0 -1
- /package/dist/{studioDependencies.js → actions/init/studioDependencies.js} +0 -0
package/README.md
CHANGED
|
@@ -38,8 +38,11 @@ Code for sanity cli
|
|
|
38
38
|
- [`sanity dataset copy [SOURCE] [TARGET]`](#sanity-dataset-copy-source-target)
|
|
39
39
|
- [`sanity dataset create [NAME]`](#sanity-dataset-create-name)
|
|
40
40
|
- [`sanity dataset delete DATASETNAME`](#sanity-dataset-delete-datasetname)
|
|
41
|
+
- [`sanity dataset embeddings disable [DATASET]`](#sanity-dataset-embeddings-disable-dataset)
|
|
42
|
+
- [`sanity dataset embeddings enable [DATASET]`](#sanity-dataset-embeddings-enable-dataset)
|
|
43
|
+
- [`sanity dataset embeddings status [DATASET]`](#sanity-dataset-embeddings-status-dataset)
|
|
41
44
|
- [`sanity dataset export [NAME] [DESTINATION]`](#sanity-dataset-export-name-destination)
|
|
42
|
-
- [`sanity dataset import SOURCE`](#sanity-dataset-import-source)
|
|
45
|
+
- [`sanity dataset import SOURCE [TARGETDATASET]`](#sanity-dataset-import-source-targetdataset)
|
|
43
46
|
- [`sanity dataset list`](#sanity-dataset-list)
|
|
44
47
|
- [`sanity dataset visibility get DATASET`](#sanity-dataset-visibility-get-dataset)
|
|
45
48
|
- [`sanity dataset visibility set DATASET MODE`](#sanity-dataset-visibility-set-dataset-mode)
|
|
@@ -49,6 +52,7 @@ Code for sanity cli
|
|
|
49
52
|
- [`sanity docs browse`](#sanity-docs-browse)
|
|
50
53
|
- [`sanity docs read PATH`](#sanity-docs-read-path)
|
|
51
54
|
- [`sanity docs search QUERY`](#sanity-docs-search-query)
|
|
55
|
+
- [`sanity doctor [CHECKS]`](#sanity-doctor-checks)
|
|
52
56
|
- [`sanity documents create [FILE]`](#sanity-documents-create-file)
|
|
53
57
|
- [`sanity documents delete ID [IDS]`](#sanity-documents-delete-id-ids)
|
|
54
58
|
- [`sanity documents get DOCUMENTID`](#sanity-documents-get-documentid)
|
|
@@ -97,7 +101,6 @@ Code for sanity cli
|
|
|
97
101
|
- [`sanity schema extract`](#sanity-schema-extract)
|
|
98
102
|
- [`sanity schema list`](#sanity-schema-list)
|
|
99
103
|
- [`sanity schema validate`](#sanity-schema-validate)
|
|
100
|
-
- [`sanity start [OUTPUTDIR]`](#sanity-start-outputdir)
|
|
101
104
|
- [`sanity telemetry disable`](#sanity-telemetry-disable)
|
|
102
105
|
- [`sanity telemetry enable`](#sanity-telemetry-enable)
|
|
103
106
|
- [`sanity telemetry status`](#sanity-telemetry-status)
|
|
@@ -116,11 +119,14 @@ Disable backup for a dataset.
|
|
|
116
119
|
|
|
117
120
|
```
|
|
118
121
|
USAGE
|
|
119
|
-
$ sanity backup disable [DATASET]
|
|
122
|
+
$ sanity backup disable [DATASET] [-p <id>]
|
|
120
123
|
|
|
121
124
|
ARGUMENTS
|
|
122
125
|
[DATASET] Dataset name to disable backup for
|
|
123
126
|
|
|
127
|
+
OVERRIDE FLAGS
|
|
128
|
+
-p, --project-id=<id> Project ID to disable backups for (overrides CLI configuration)
|
|
129
|
+
|
|
124
130
|
DESCRIPTION
|
|
125
131
|
Disable backup for a dataset.
|
|
126
132
|
|
|
@@ -134,7 +140,7 @@ EXAMPLES
|
|
|
134
140
|
$ sanity backup disable production
|
|
135
141
|
```
|
|
136
142
|
|
|
137
|
-
_See code: [src/commands/backup/disable.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
143
|
+
_See code: [src/commands/backup/disable.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/backup/disable.ts)_
|
|
138
144
|
|
|
139
145
|
## `sanity backup download [DATASET]`
|
|
140
146
|
|
|
@@ -142,7 +148,8 @@ Download a dataset backup to a local file.
|
|
|
142
148
|
|
|
143
149
|
```
|
|
144
150
|
USAGE
|
|
145
|
-
$ sanity backup download [DATASET] [--backup-id <value>] [--concurrency <value>] [--out <value>]
|
|
151
|
+
$ sanity backup download [DATASET] [-p <id>] [--backup-id <value>] [--concurrency <value>] [--out <value>]
|
|
152
|
+
[--overwrite]
|
|
146
153
|
|
|
147
154
|
ARGUMENTS
|
|
148
155
|
[DATASET] Dataset name to download backup from
|
|
@@ -153,6 +160,9 @@ FLAGS
|
|
|
153
160
|
--out=<value> The file or directory path the backup should download to
|
|
154
161
|
--overwrite Allows overwriting of existing backup file
|
|
155
162
|
|
|
163
|
+
OVERRIDE FLAGS
|
|
164
|
+
-p, --project-id=<id> Project ID to download backup from (overrides CLI configuration)
|
|
165
|
+
|
|
156
166
|
DESCRIPTION
|
|
157
167
|
Download a dataset backup to a local file.
|
|
158
168
|
|
|
@@ -174,7 +184,7 @@ EXAMPLES
|
|
|
174
184
|
$ sanity backup download production --backup-id 2024-01-01-backup-3 --out /path/to/file --overwrite
|
|
175
185
|
```
|
|
176
186
|
|
|
177
|
-
_See code: [src/commands/backup/download.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
187
|
+
_See code: [src/commands/backup/download.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/backup/download.ts)_
|
|
178
188
|
|
|
179
189
|
## `sanity backup enable [DATASET]`
|
|
180
190
|
|
|
@@ -182,11 +192,14 @@ Enable backup for a dataset.
|
|
|
182
192
|
|
|
183
193
|
```
|
|
184
194
|
USAGE
|
|
185
|
-
$ sanity backup enable [DATASET]
|
|
195
|
+
$ sanity backup enable [DATASET] [-p <id>]
|
|
186
196
|
|
|
187
197
|
ARGUMENTS
|
|
188
198
|
[DATASET] Dataset name to enable backup for
|
|
189
199
|
|
|
200
|
+
OVERRIDE FLAGS
|
|
201
|
+
-p, --project-id=<id> Project ID to enable backups for (overrides CLI configuration)
|
|
202
|
+
|
|
190
203
|
DESCRIPTION
|
|
191
204
|
Enable backup for a dataset.
|
|
192
205
|
|
|
@@ -200,7 +213,7 @@ EXAMPLES
|
|
|
200
213
|
$ sanity backup enable production
|
|
201
214
|
```
|
|
202
215
|
|
|
203
|
-
_See code: [src/commands/backup/enable.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
216
|
+
_See code: [src/commands/backup/enable.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/backup/enable.ts)_
|
|
204
217
|
|
|
205
218
|
## `sanity backup list [DATASET]`
|
|
206
219
|
|
|
@@ -208,7 +221,7 @@ List available backups for a dataset.
|
|
|
208
221
|
|
|
209
222
|
```
|
|
210
223
|
USAGE
|
|
211
|
-
$ sanity backup list [DATASET] [--after <value>] [--before <value>] [-l <value>]
|
|
224
|
+
$ sanity backup list [DATASET] [-p <id>] [--after <value>] [--before <value>] [-l <value>]
|
|
212
225
|
|
|
213
226
|
ARGUMENTS
|
|
214
227
|
[DATASET] Dataset name to list backups for
|
|
@@ -218,6 +231,9 @@ FLAGS
|
|
|
218
231
|
--after=<value> Only return backups after this date (inclusive, YYYY-MM-DD format)
|
|
219
232
|
--before=<value> Only return backups before this date (exclusive, YYYY-MM-DD format)
|
|
220
233
|
|
|
234
|
+
OVERRIDE FLAGS
|
|
235
|
+
-p, --project-id=<id> Project ID to list backups for (overrides CLI configuration)
|
|
236
|
+
|
|
221
237
|
DESCRIPTION
|
|
222
238
|
List available backups for a dataset.
|
|
223
239
|
|
|
@@ -239,7 +255,7 @@ EXAMPLES
|
|
|
239
255
|
$ sanity backup list production --after 2024-01-31 --limit 10
|
|
240
256
|
```
|
|
241
257
|
|
|
242
|
-
_See code: [src/commands/backup/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
258
|
+
_See code: [src/commands/backup/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/backup/list.ts)_
|
|
243
259
|
|
|
244
260
|
## `sanity blueprints add TYPE`
|
|
245
261
|
|
|
@@ -248,9 +264,9 @@ Add a function resource to a Blueprint
|
|
|
248
264
|
```
|
|
249
265
|
USAGE
|
|
250
266
|
$ sanity blueprints add TYPE [--example <value> | -n <value> | --fn-type
|
|
251
|
-
document-
|
|
252
|
-
te|media-library-asset-delete... | --language ts|js | --javascript | --fn-helpers |
|
|
253
|
-
skip|npm|pnpm|yarn] [-i | ]
|
|
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 | ]
|
|
254
270
|
|
|
255
271
|
ARGUMENTS
|
|
256
272
|
TYPE (function) Type of resource to add (only "function" is supported)
|
|
@@ -265,8 +281,8 @@ FLAGS
|
|
|
265
281
|
<options: skip|npm|pnpm|yarn>
|
|
266
282
|
--fn-type=<option>... Document change event(s) that should trigger the function; you can specify multiple
|
|
267
283
|
events by specifying this flag multiple times
|
|
268
|
-
<options: document-
|
|
269
|
-
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>
|
|
270
286
|
--javascript Use JavaScript instead of TypeScript
|
|
271
287
|
--language=<option> [default: ts] Language of the new function
|
|
272
288
|
<options: ts|js>
|
|
@@ -291,7 +307,7 @@ EXAMPLES
|
|
|
291
307
|
$ sanity blueprints add function --name my-function --fn-type document-create --fn-type document-update --lang js
|
|
292
308
|
```
|
|
293
309
|
|
|
294
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
310
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/add.ts)_
|
|
295
311
|
|
|
296
312
|
## `sanity blueprints config`
|
|
297
313
|
|
|
@@ -299,12 +315,12 @@ View or edit the local Blueprint configuration
|
|
|
299
315
|
|
|
300
316
|
```
|
|
301
317
|
USAGE
|
|
302
|
-
$ sanity blueprints config [--project-id <value> -e] [--stack
|
|
318
|
+
$ sanity blueprints config [--project-id <value> -e] [--stack <value> ]
|
|
303
319
|
|
|
304
320
|
FLAGS
|
|
305
321
|
-e, --edit Modify the configuration interactively, or directly when combined with ID flags.
|
|
306
322
|
--project-id=<value> Directly set the project ID in the configuration. Requires --edit flag
|
|
307
|
-
--stack
|
|
323
|
+
--stack=<value> Stack name or ID to set in the configuration. Requires --edit flag
|
|
308
324
|
|
|
309
325
|
DESCRIPTION
|
|
310
326
|
View or edit the local Blueprint configuration
|
|
@@ -314,7 +330,7 @@ DESCRIPTION
|
|
|
314
330
|
Without flags, displays the current configuration. Use --edit to interactively modify settings, or combine --edit with
|
|
315
331
|
ID flags to update values directly (useful for scripting and automation).
|
|
316
332
|
|
|
317
|
-
If you need to switch your Blueprint to a different Stack, use --edit --stack
|
|
333
|
+
If you need to switch your Blueprint to a different Stack, use --edit --stack.
|
|
318
334
|
|
|
319
335
|
EXAMPLES
|
|
320
336
|
$ sanity blueprints config
|
|
@@ -323,10 +339,10 @@ EXAMPLES
|
|
|
323
339
|
|
|
324
340
|
$ sanity blueprints config --edit --project-id <projectId>
|
|
325
341
|
|
|
326
|
-
$ sanity blueprints config --edit --project-id <projectId> --stack-id
|
|
342
|
+
$ sanity blueprints config --edit --project-id <projectId> --stack <name-or-id>
|
|
327
343
|
```
|
|
328
344
|
|
|
329
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
345
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/config.ts)_
|
|
330
346
|
|
|
331
347
|
## `sanity blueprints deploy`
|
|
332
348
|
|
|
@@ -334,10 +350,11 @@ Deploy the local Blueprint to the remote Stack
|
|
|
334
350
|
|
|
335
351
|
```
|
|
336
352
|
USAGE
|
|
337
|
-
$ sanity blueprints deploy [--no-wait]
|
|
353
|
+
$ sanity blueprints deploy [--stack <value>] [--no-wait]
|
|
338
354
|
|
|
339
355
|
FLAGS
|
|
340
|
-
--no-wait
|
|
356
|
+
--no-wait Do not wait for Stack deployment to complete
|
|
357
|
+
--stack=<value> Stack name or ID to use instead of the locally configured Stack
|
|
341
358
|
|
|
342
359
|
DESCRIPTION
|
|
343
360
|
Deploy the local Blueprint to the remote Stack
|
|
@@ -350,13 +367,19 @@ DESCRIPTION
|
|
|
350
367
|
|
|
351
368
|
Use --no-wait to queue the deployment and return immediately without waiting for completion.
|
|
352
369
|
|
|
370
|
+
Use --fn-installer to force which package manager to use when deploying functions.
|
|
371
|
+
|
|
372
|
+
Set SANITY_ASSET_TIMEOUT (seconds) to override the 60-second timeout for processing resource assets.
|
|
373
|
+
|
|
353
374
|
EXAMPLES
|
|
354
375
|
$ sanity blueprints deploy
|
|
355
376
|
|
|
356
377
|
$ sanity blueprints deploy --no-wait
|
|
378
|
+
|
|
379
|
+
$ sanity blueprints deploy --fn-installer npm
|
|
357
380
|
```
|
|
358
381
|
|
|
359
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
382
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/deploy.ts)_
|
|
360
383
|
|
|
361
384
|
## `sanity blueprints destroy`
|
|
362
385
|
|
|
@@ -364,13 +387,13 @@ Destroy the remote Stack deployment and its resources (will not delete local fil
|
|
|
364
387
|
|
|
365
388
|
```
|
|
366
389
|
USAGE
|
|
367
|
-
$ sanity blueprints destroy [--project-id <value> --stack
|
|
390
|
+
$ sanity blueprints destroy [--project-id <value> --stack <value> --force] [--no-wait]
|
|
368
391
|
|
|
369
392
|
FLAGS
|
|
370
393
|
--force Force Stack destruction (skip confirmation)
|
|
371
394
|
--no-wait Do not wait for Stack destruction to complete
|
|
372
395
|
--project-id=<value> Project associated with the Stack
|
|
373
|
-
--stack
|
|
396
|
+
--stack=<value> Stack name or ID to destroy (defaults to the locally configured Stack)
|
|
374
397
|
|
|
375
398
|
DESCRIPTION
|
|
376
399
|
Destroy the remote Stack deployment and its resources (will not delete local files)
|
|
@@ -385,10 +408,10 @@ DESCRIPTION
|
|
|
385
408
|
EXAMPLES
|
|
386
409
|
$ sanity blueprints destroy
|
|
387
410
|
|
|
388
|
-
$ sanity blueprints destroy --stack-id
|
|
411
|
+
$ sanity blueprints destroy --stack <name-or-id> --project-id <projectId> --force --no-wait
|
|
389
412
|
```
|
|
390
413
|
|
|
391
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
414
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/destroy.ts)_
|
|
392
415
|
|
|
393
416
|
## `sanity blueprints doctor`
|
|
394
417
|
|
|
@@ -396,13 +419,13 @@ Diagnose potential issues with local Blueprint and remote Stack configuration
|
|
|
396
419
|
|
|
397
420
|
```
|
|
398
421
|
USAGE
|
|
399
|
-
$ sanity blueprints doctor [--json] [
|
|
422
|
+
$ sanity blueprints doctor [--json] [-p <value>] [--verbose] [--fix]
|
|
400
423
|
|
|
401
424
|
FLAGS
|
|
402
|
-
--
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
425
|
+
-p, --path=<value> [env: SANITY_BLUEPRINT_PATH] Path to a Blueprint file or directory containing one
|
|
426
|
+
--fix Interactively fix configuration issues
|
|
427
|
+
--json Format output as json.
|
|
428
|
+
--[no-]verbose Verbose output; defaults to true
|
|
406
429
|
|
|
407
430
|
DESCRIPTION
|
|
408
431
|
Diagnose potential issues with local Blueprint and remote Stack configuration
|
|
@@ -414,7 +437,7 @@ DESCRIPTION
|
|
|
414
437
|
issues.
|
|
415
438
|
```
|
|
416
439
|
|
|
417
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
440
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/doctor.ts)_
|
|
418
441
|
|
|
419
442
|
## `sanity blueprints info`
|
|
420
443
|
|
|
@@ -422,10 +445,10 @@ Show information about the local Blueprint's remote Stack deployment
|
|
|
422
445
|
|
|
423
446
|
```
|
|
424
447
|
USAGE
|
|
425
|
-
$ sanity blueprints info [--
|
|
448
|
+
$ sanity blueprints info [--stack <value>]
|
|
426
449
|
|
|
427
450
|
FLAGS
|
|
428
|
-
--
|
|
451
|
+
--stack=<value> Stack name or ID to use instead of the locally configured Stack
|
|
429
452
|
|
|
430
453
|
DESCRIPTION
|
|
431
454
|
Show information about the local Blueprint's remote Stack deployment
|
|
@@ -441,10 +464,10 @@ DESCRIPTION
|
|
|
441
464
|
EXAMPLES
|
|
442
465
|
$ sanity blueprints info
|
|
443
466
|
|
|
444
|
-
$ sanity blueprints info --
|
|
467
|
+
$ sanity blueprints info --stack <name-or-id>
|
|
445
468
|
```
|
|
446
469
|
|
|
447
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
470
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/info.ts)_
|
|
448
471
|
|
|
449
472
|
## `sanity blueprints init [DIR]`
|
|
450
473
|
|
|
@@ -494,7 +517,7 @@ EXAMPLES
|
|
|
494
517
|
$ sanity blueprints init --blueprint-type <json|js|ts> --stack-name <stackName>
|
|
495
518
|
```
|
|
496
519
|
|
|
497
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
520
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/init.ts)_
|
|
498
521
|
|
|
499
522
|
## `sanity blueprints logs`
|
|
500
523
|
|
|
@@ -502,10 +525,11 @@ Display logs for the current Blueprint's Stack deployment
|
|
|
502
525
|
|
|
503
526
|
```
|
|
504
527
|
USAGE
|
|
505
|
-
$ sanity blueprints logs [-w]
|
|
528
|
+
$ sanity blueprints logs [--stack <value>] [-w]
|
|
506
529
|
|
|
507
530
|
FLAGS
|
|
508
|
-
-w, --watch
|
|
531
|
+
-w, --watch Watch for new Stack logs (streaming mode)
|
|
532
|
+
--stack=<value> Stack name or ID to use instead of the locally configured Stack
|
|
509
533
|
|
|
510
534
|
DESCRIPTION
|
|
511
535
|
Display logs for the current Blueprint's Stack deployment
|
|
@@ -522,7 +546,7 @@ EXAMPLES
|
|
|
522
546
|
$ sanity blueprints logs --watch
|
|
523
547
|
```
|
|
524
548
|
|
|
525
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
549
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/logs.ts)_
|
|
526
550
|
|
|
527
551
|
## `sanity blueprints plan`
|
|
528
552
|
|
|
@@ -530,7 +554,10 @@ Enumerate resources to be deployed to the remote Stack - will not modify any res
|
|
|
530
554
|
|
|
531
555
|
```
|
|
532
556
|
USAGE
|
|
533
|
-
$ sanity blueprints plan
|
|
557
|
+
$ sanity blueprints plan [--stack <value>]
|
|
558
|
+
|
|
559
|
+
FLAGS
|
|
560
|
+
--stack=<value> Stack name or ID to use instead of the locally configured Stack
|
|
534
561
|
|
|
535
562
|
DESCRIPTION
|
|
536
563
|
Enumerate resources to be deployed to the remote Stack - will not modify any resources
|
|
@@ -545,7 +572,7 @@ EXAMPLES
|
|
|
545
572
|
$ sanity blueprints plan
|
|
546
573
|
```
|
|
547
574
|
|
|
548
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
575
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/plan.ts)_
|
|
549
576
|
|
|
550
577
|
## `sanity blueprints stacks`
|
|
551
578
|
|
|
@@ -574,7 +601,7 @@ EXAMPLES
|
|
|
574
601
|
$ sanity blueprints stacks --organization-id <organizationId>
|
|
575
602
|
```
|
|
576
603
|
|
|
577
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
604
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/stacks.ts)_
|
|
578
605
|
|
|
579
606
|
## `sanity build [OUTPUTDIR]`
|
|
580
607
|
|
|
@@ -603,7 +630,7 @@ EXAMPLES
|
|
|
603
630
|
$ sanity build --no-minify --source-maps
|
|
604
631
|
```
|
|
605
632
|
|
|
606
|
-
_See code: [src/commands/build.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
633
|
+
_See code: [src/commands/build.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/build.ts)_
|
|
607
634
|
|
|
608
635
|
## `sanity codemod [CODEMODNAME]`
|
|
609
636
|
|
|
@@ -634,7 +661,7 @@ EXAMPLES
|
|
|
634
661
|
$ sanity codemod reactIconsV3 --dry
|
|
635
662
|
```
|
|
636
663
|
|
|
637
|
-
_See code: [src/commands/codemod.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
664
|
+
_See code: [src/commands/codemod.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/codemod.ts)_
|
|
638
665
|
|
|
639
666
|
## `sanity cors add ORIGIN`
|
|
640
667
|
|
|
@@ -642,7 +669,7 @@ Allow a new origin to use your project API through CORS
|
|
|
642
669
|
|
|
643
670
|
```
|
|
644
671
|
USAGE
|
|
645
|
-
$ sanity cors add ORIGIN [--credentials]
|
|
672
|
+
$ sanity cors add ORIGIN [-p <id>] [--credentials]
|
|
646
673
|
|
|
647
674
|
ARGUMENTS
|
|
648
675
|
ORIGIN Origin to allow (e.g., https://example.com)
|
|
@@ -650,6 +677,9 @@ ARGUMENTS
|
|
|
650
677
|
FLAGS
|
|
651
678
|
--[no-]credentials Allow credentials (token/cookie) to be sent from this origin
|
|
652
679
|
|
|
680
|
+
OVERRIDE FLAGS
|
|
681
|
+
-p, --project-id=<id> Project ID to add CORS origin to (overrides CLI configuration)
|
|
682
|
+
|
|
653
683
|
DESCRIPTION
|
|
654
684
|
Allow a new origin to use your project API through CORS
|
|
655
685
|
|
|
@@ -665,9 +695,13 @@ EXAMPLES
|
|
|
665
695
|
Add a production origin with credentials allowed
|
|
666
696
|
|
|
667
697
|
$ sanity cors add https://myapp.com --credentials
|
|
698
|
+
|
|
699
|
+
Add a CORS origin for a specific project
|
|
700
|
+
|
|
701
|
+
$ sanity cors add https://myapp.com --project-id abc123
|
|
668
702
|
```
|
|
669
703
|
|
|
670
|
-
_See code: [src/commands/cors/add.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
704
|
+
_See code: [src/commands/cors/add.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/cors/add.ts)_
|
|
671
705
|
|
|
672
706
|
## `sanity cors delete [ORIGIN]`
|
|
673
707
|
|
|
@@ -675,11 +709,14 @@ Delete an existing CORS origin from your project
|
|
|
675
709
|
|
|
676
710
|
```
|
|
677
711
|
USAGE
|
|
678
|
-
$ sanity cors delete [ORIGIN]
|
|
712
|
+
$ sanity cors delete [ORIGIN] [-p <id>]
|
|
679
713
|
|
|
680
714
|
ARGUMENTS
|
|
681
715
|
[ORIGIN] Origin to delete (will prompt if not provided)
|
|
682
716
|
|
|
717
|
+
OVERRIDE FLAGS
|
|
718
|
+
-p, --project-id=<id> Project ID to delete CORS origin from (overrides CLI configuration)
|
|
719
|
+
|
|
683
720
|
DESCRIPTION
|
|
684
721
|
Delete an existing CORS origin from your project
|
|
685
722
|
|
|
@@ -691,9 +728,13 @@ EXAMPLES
|
|
|
691
728
|
Delete a specific CORS origin
|
|
692
729
|
|
|
693
730
|
$ sanity cors delete https://example.com
|
|
731
|
+
|
|
732
|
+
Delete a CORS origin from a specific project
|
|
733
|
+
|
|
734
|
+
$ sanity cors delete --project-id abc123
|
|
694
735
|
```
|
|
695
736
|
|
|
696
|
-
_See code: [src/commands/cors/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
737
|
+
_See code: [src/commands/cors/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/cors/delete.ts)_
|
|
697
738
|
|
|
698
739
|
## `sanity cors list`
|
|
699
740
|
|
|
@@ -701,7 +742,10 @@ List all origins allowed to access the API for this project
|
|
|
701
742
|
|
|
702
743
|
```
|
|
703
744
|
USAGE
|
|
704
|
-
$ sanity cors list
|
|
745
|
+
$ sanity cors list [-p <id>]
|
|
746
|
+
|
|
747
|
+
OVERRIDE FLAGS
|
|
748
|
+
-p, --project-id=<id> Project ID to list CORS origins for (overrides CLI configuration)
|
|
705
749
|
|
|
706
750
|
DESCRIPTION
|
|
707
751
|
List all origins allowed to access the API for this project
|
|
@@ -710,9 +754,13 @@ EXAMPLES
|
|
|
710
754
|
List CORS origins for the current project
|
|
711
755
|
|
|
712
756
|
$ sanity cors list
|
|
757
|
+
|
|
758
|
+
List CORS origins for a specific project
|
|
759
|
+
|
|
760
|
+
$ sanity cors list --project-id abc123
|
|
713
761
|
```
|
|
714
762
|
|
|
715
|
-
_See code: [src/commands/cors/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
763
|
+
_See code: [src/commands/cors/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/cors/list.ts)_
|
|
716
764
|
|
|
717
765
|
## `sanity dataset alias create [ALIASNAME] [TARGETDATASET]`
|
|
718
766
|
|
|
@@ -720,16 +768,23 @@ Create a dataset alias within your project
|
|
|
720
768
|
|
|
721
769
|
```
|
|
722
770
|
USAGE
|
|
723
|
-
$ sanity dataset alias create [ALIASNAME] [TARGETDATASET]
|
|
771
|
+
$ sanity dataset alias create [ALIASNAME] [TARGETDATASET] [-p <id>]
|
|
724
772
|
|
|
725
773
|
ARGUMENTS
|
|
726
774
|
[ALIASNAME] Dataset alias name to create
|
|
727
775
|
[TARGETDATASET] Target dataset name to link the alias to
|
|
728
776
|
|
|
777
|
+
OVERRIDE FLAGS
|
|
778
|
+
-p, --project-id=<id> Project ID to create dataset alias in (overrides CLI configuration)
|
|
779
|
+
|
|
729
780
|
DESCRIPTION
|
|
730
781
|
Create a dataset alias within your project
|
|
731
782
|
|
|
732
783
|
EXAMPLES
|
|
784
|
+
Create alias in a specific project
|
|
785
|
+
|
|
786
|
+
$ sanity dataset alias create --project-id abc123 conference conf-2025
|
|
787
|
+
|
|
733
788
|
Create an alias with interactive prompts
|
|
734
789
|
|
|
735
790
|
$ sanity dataset alias create
|
|
@@ -747,7 +802,7 @@ EXAMPLES
|
|
|
747
802
|
$ sanity dataset alias create ~conference conf-2025
|
|
748
803
|
```
|
|
749
804
|
|
|
750
|
-
_See code: [src/commands/dataset/alias/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
805
|
+
_See code: [src/commands/dataset/alias/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/dataset/alias/create.ts)_
|
|
751
806
|
|
|
752
807
|
## `sanity dataset alias delete ALIASNAME`
|
|
753
808
|
|
|
@@ -755,7 +810,7 @@ Delete a dataset alias within your project
|
|
|
755
810
|
|
|
756
811
|
```
|
|
757
812
|
USAGE
|
|
758
|
-
$ sanity dataset alias delete ALIASNAME [--force]
|
|
813
|
+
$ sanity dataset alias delete ALIASNAME [-p <id>] [--force]
|
|
759
814
|
|
|
760
815
|
ARGUMENTS
|
|
761
816
|
ALIASNAME Dataset alias name to delete
|
|
@@ -763,6 +818,9 @@ ARGUMENTS
|
|
|
763
818
|
FLAGS
|
|
764
819
|
--force Skip confirmation prompt and delete immediately
|
|
765
820
|
|
|
821
|
+
OVERRIDE FLAGS
|
|
822
|
+
-p, --project-id=<id> Project ID to delete dataset alias from (overrides CLI configuration)
|
|
823
|
+
|
|
766
824
|
DESCRIPTION
|
|
767
825
|
Delete a dataset alias within your project
|
|
768
826
|
|
|
@@ -780,7 +838,7 @@ EXAMPLES
|
|
|
780
838
|
$ sanity dataset alias delete conference --force
|
|
781
839
|
```
|
|
782
840
|
|
|
783
|
-
_See code: [src/commands/dataset/alias/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
841
|
+
_See code: [src/commands/dataset/alias/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/dataset/alias/delete.ts)_
|
|
784
842
|
|
|
785
843
|
## `sanity dataset alias link [ALIASNAME] [TARGETDATASET]`
|
|
786
844
|
|
|
@@ -788,7 +846,7 @@ Link a dataset alias to a dataset within your project
|
|
|
788
846
|
|
|
789
847
|
```
|
|
790
848
|
USAGE
|
|
791
|
-
$ sanity dataset alias link [ALIASNAME] [TARGETDATASET] [--force]
|
|
849
|
+
$ sanity dataset alias link [ALIASNAME] [TARGETDATASET] [-p <id>] [--force]
|
|
792
850
|
|
|
793
851
|
ARGUMENTS
|
|
794
852
|
[ALIASNAME] Dataset alias name to link
|
|
@@ -797,6 +855,9 @@ ARGUMENTS
|
|
|
797
855
|
FLAGS
|
|
798
856
|
--force Skip confirmation prompt when relinking existing alias
|
|
799
857
|
|
|
858
|
+
OVERRIDE FLAGS
|
|
859
|
+
-p, --project-id=<id> Project ID to link dataset alias in (overrides CLI configuration)
|
|
860
|
+
|
|
800
861
|
DESCRIPTION
|
|
801
862
|
Link a dataset alias to a dataset within your project
|
|
802
863
|
|
|
@@ -822,7 +883,7 @@ EXAMPLES
|
|
|
822
883
|
$ sanity dataset alias link conference conf-2025 --force
|
|
823
884
|
```
|
|
824
885
|
|
|
825
|
-
_See code: [src/commands/dataset/alias/link.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
886
|
+
_See code: [src/commands/dataset/alias/link.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/dataset/alias/link.ts)_
|
|
826
887
|
|
|
827
888
|
## `sanity dataset alias unlink [ALIASNAME]`
|
|
828
889
|
|
|
@@ -830,7 +891,7 @@ Unlink a dataset alias from its dataset within your project
|
|
|
830
891
|
|
|
831
892
|
```
|
|
832
893
|
USAGE
|
|
833
|
-
$ sanity dataset alias unlink [ALIASNAME] [--force]
|
|
894
|
+
$ sanity dataset alias unlink [ALIASNAME] [-p <id>] [--force]
|
|
834
895
|
|
|
835
896
|
ARGUMENTS
|
|
836
897
|
[ALIASNAME] Dataset alias name to unlink
|
|
@@ -838,6 +899,9 @@ ARGUMENTS
|
|
|
838
899
|
FLAGS
|
|
839
900
|
--force Skip confirmation prompt and unlink immediately
|
|
840
901
|
|
|
902
|
+
OVERRIDE FLAGS
|
|
903
|
+
-p, --project-id=<id> Project ID to unlink dataset alias in (overrides CLI configuration)
|
|
904
|
+
|
|
841
905
|
DESCRIPTION
|
|
842
906
|
Unlink a dataset alias from its dataset within your project
|
|
843
907
|
|
|
@@ -859,7 +923,7 @@ EXAMPLES
|
|
|
859
923
|
$ sanity dataset alias unlink conference --force
|
|
860
924
|
```
|
|
861
925
|
|
|
862
|
-
_See code: [src/commands/dataset/alias/unlink.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
926
|
+
_See code: [src/commands/dataset/alias/unlink.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/dataset/alias/unlink.ts)_
|
|
863
927
|
|
|
864
928
|
## `sanity dataset copy [SOURCE] [TARGET]`
|
|
865
929
|
|
|
@@ -867,8 +931,8 @@ Manages dataset copying, including starting a new copy job, listing copy jobs an
|
|
|
867
931
|
|
|
868
932
|
```
|
|
869
933
|
USAGE
|
|
870
|
-
$ sanity dataset copy [SOURCE] [TARGET] [--attach <value> | --list | --detach | --skip-history]
|
|
871
|
-
] [--offset <value> ]
|
|
934
|
+
$ sanity dataset copy [SOURCE] [TARGET] [-p <id>] [--attach <value> | --list | --detach | --skip-history]
|
|
935
|
+
[--limit <value> ] [--offset <value> ]
|
|
872
936
|
|
|
873
937
|
ARGUMENTS
|
|
874
938
|
[SOURCE] Name of the dataset to copy from
|
|
@@ -882,6 +946,9 @@ FLAGS
|
|
|
882
946
|
--offset=<value> Start position in the list of jobs (default 0)
|
|
883
947
|
--skip-history Don't preserve document history on copy
|
|
884
948
|
|
|
949
|
+
OVERRIDE FLAGS
|
|
950
|
+
-p, --project-id=<id> Project ID to copy dataset in (overrides CLI configuration)
|
|
951
|
+
|
|
885
952
|
DESCRIPTION
|
|
886
953
|
Manages dataset copying, including starting a new copy job, listing copy jobs and following the progress of a running
|
|
887
954
|
copy job
|
|
@@ -920,7 +987,7 @@ EXAMPLES
|
|
|
920
987
|
$ sanity dataset copy --list --offset 2 --limit 10
|
|
921
988
|
```
|
|
922
989
|
|
|
923
|
-
_See code: [src/commands/dataset/copy.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
990
|
+
_See code: [src/commands/dataset/copy.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/dataset/copy.ts)_
|
|
924
991
|
|
|
925
992
|
## `sanity dataset create [NAME]`
|
|
926
993
|
|
|
@@ -928,14 +995,20 @@ Create a new dataset within your project
|
|
|
928
995
|
|
|
929
996
|
```
|
|
930
997
|
USAGE
|
|
931
|
-
$ sanity dataset create [NAME] [--
|
|
998
|
+
$ sanity dataset create [NAME] [-p <id>] [--embeddings-projection <value> --embeddings] [--visibility
|
|
999
|
+
custom|private|public]
|
|
932
1000
|
|
|
933
1001
|
ARGUMENTS
|
|
934
1002
|
[NAME] Name of the dataset to create
|
|
935
1003
|
|
|
936
1004
|
FLAGS
|
|
937
|
-
--
|
|
938
|
-
|
|
1005
|
+
--embeddings Enable embeddings for this dataset
|
|
1006
|
+
--embeddings-projection=<value> GROQ projection for embeddings indexing (e.g. "{ title, body }")
|
|
1007
|
+
--visibility=<option> Set visibility for this dataset (custom/private/public)
|
|
1008
|
+
<options: custom|private|public>
|
|
1009
|
+
|
|
1010
|
+
OVERRIDE FLAGS
|
|
1011
|
+
-p, --project-id=<id> Project ID to create dataset in (overrides CLI configuration)
|
|
939
1012
|
|
|
940
1013
|
DESCRIPTION
|
|
941
1014
|
Create a new dataset within your project
|
|
@@ -954,7 +1027,7 @@ EXAMPLES
|
|
|
954
1027
|
$ sanity dataset create my-dataset --visibility private
|
|
955
1028
|
```
|
|
956
1029
|
|
|
957
|
-
_See code: [src/commands/dataset/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
1030
|
+
_See code: [src/commands/dataset/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/dataset/create.ts)_
|
|
958
1031
|
|
|
959
1032
|
## `sanity dataset delete DATASETNAME`
|
|
960
1033
|
|
|
@@ -962,7 +1035,7 @@ Delete a dataset within your project
|
|
|
962
1035
|
|
|
963
1036
|
```
|
|
964
1037
|
USAGE
|
|
965
|
-
$ sanity dataset delete DATASETNAME [--force]
|
|
1038
|
+
$ sanity dataset delete DATASETNAME [-p <id>] [--force]
|
|
966
1039
|
|
|
967
1040
|
ARGUMENTS
|
|
968
1041
|
DATASETNAME Dataset name to delete
|
|
@@ -970,6 +1043,9 @@ ARGUMENTS
|
|
|
970
1043
|
FLAGS
|
|
971
1044
|
--force Do not prompt for delete confirmation - forcefully delete
|
|
972
1045
|
|
|
1046
|
+
OVERRIDE FLAGS
|
|
1047
|
+
-p, --project-id=<id> Project ID to delete dataset from (overrides CLI configuration)
|
|
1048
|
+
|
|
973
1049
|
DESCRIPTION
|
|
974
1050
|
Delete a dataset within your project
|
|
975
1051
|
|
|
@@ -983,7 +1059,94 @@ EXAMPLES
|
|
|
983
1059
|
$ sanity dataset delete my-dataset --force
|
|
984
1060
|
```
|
|
985
1061
|
|
|
986
|
-
_See code: [src/commands/dataset/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
1062
|
+
_See code: [src/commands/dataset/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/dataset/delete.ts)_
|
|
1063
|
+
|
|
1064
|
+
## `sanity dataset embeddings disable [DATASET]`
|
|
1065
|
+
|
|
1066
|
+
Disable embeddings for a dataset
|
|
1067
|
+
|
|
1068
|
+
```
|
|
1069
|
+
USAGE
|
|
1070
|
+
$ sanity dataset embeddings disable [DATASET] [-p <id>]
|
|
1071
|
+
|
|
1072
|
+
ARGUMENTS
|
|
1073
|
+
[DATASET] Dataset name to disable embeddings for
|
|
1074
|
+
|
|
1075
|
+
OVERRIDE FLAGS
|
|
1076
|
+
-p, --project-id=<id> Project ID to disable embeddings for (overrides CLI configuration)
|
|
1077
|
+
|
|
1078
|
+
DESCRIPTION
|
|
1079
|
+
Disable embeddings for a dataset
|
|
1080
|
+
|
|
1081
|
+
EXAMPLES
|
|
1082
|
+
Disable embeddings for the production dataset
|
|
1083
|
+
|
|
1084
|
+
$ sanity dataset embeddings disable production
|
|
1085
|
+
```
|
|
1086
|
+
|
|
1087
|
+
_See code: [src/commands/dataset/embeddings/disable.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/dataset/embeddings/disable.ts)_
|
|
1088
|
+
|
|
1089
|
+
## `sanity dataset embeddings enable [DATASET]`
|
|
1090
|
+
|
|
1091
|
+
Enable embeddings for a dataset
|
|
1092
|
+
|
|
1093
|
+
```
|
|
1094
|
+
USAGE
|
|
1095
|
+
$ sanity dataset embeddings enable [DATASET] [-p <id>] [--projection <value>] [--wait]
|
|
1096
|
+
|
|
1097
|
+
ARGUMENTS
|
|
1098
|
+
[DATASET] Dataset name to enable embeddings for
|
|
1099
|
+
|
|
1100
|
+
FLAGS
|
|
1101
|
+
--projection=<value> GROQ projection defining which fields to embed (e.g. "{ title, body }")
|
|
1102
|
+
--wait Wait for embeddings processing to complete before returning
|
|
1103
|
+
|
|
1104
|
+
OVERRIDE FLAGS
|
|
1105
|
+
-p, --project-id=<id> Project ID to enable embeddings for (overrides CLI configuration)
|
|
1106
|
+
|
|
1107
|
+
DESCRIPTION
|
|
1108
|
+
Enable embeddings for a dataset
|
|
1109
|
+
|
|
1110
|
+
EXAMPLES
|
|
1111
|
+
Enable embeddings for the production dataset
|
|
1112
|
+
|
|
1113
|
+
$ sanity dataset embeddings enable production
|
|
1114
|
+
|
|
1115
|
+
Enable embeddings with a specific projection
|
|
1116
|
+
|
|
1117
|
+
$ sanity dataset embeddings enable production --projection "{ title, body }"
|
|
1118
|
+
|
|
1119
|
+
Enable embeddings and wait for processing to complete
|
|
1120
|
+
|
|
1121
|
+
$ sanity dataset embeddings enable production --wait
|
|
1122
|
+
```
|
|
1123
|
+
|
|
1124
|
+
_See code: [src/commands/dataset/embeddings/enable.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/dataset/embeddings/enable.ts)_
|
|
1125
|
+
|
|
1126
|
+
## `sanity dataset embeddings status [DATASET]`
|
|
1127
|
+
|
|
1128
|
+
Show embeddings settings and status for a dataset
|
|
1129
|
+
|
|
1130
|
+
```
|
|
1131
|
+
USAGE
|
|
1132
|
+
$ sanity dataset embeddings status [DATASET] [-p <id>]
|
|
1133
|
+
|
|
1134
|
+
ARGUMENTS
|
|
1135
|
+
[DATASET] The name of the dataset to check embeddings status for
|
|
1136
|
+
|
|
1137
|
+
OVERRIDE FLAGS
|
|
1138
|
+
-p, --project-id=<id> Project ID to check embeddings status for (overrides CLI configuration)
|
|
1139
|
+
|
|
1140
|
+
DESCRIPTION
|
|
1141
|
+
Show embeddings settings and status for a dataset
|
|
1142
|
+
|
|
1143
|
+
EXAMPLES
|
|
1144
|
+
Show embeddings status for the production dataset
|
|
1145
|
+
|
|
1146
|
+
$ sanity dataset embeddings status production
|
|
1147
|
+
```
|
|
1148
|
+
|
|
1149
|
+
_See code: [src/commands/dataset/embeddings/status.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/dataset/embeddings/status.ts)_
|
|
987
1150
|
|
|
988
1151
|
## `sanity dataset export [NAME] [DESTINATION]`
|
|
989
1152
|
|
|
@@ -991,8 +1154,8 @@ Export dataset to local filesystem as a gzipped tarball. Assets failing with HTT
|
|
|
991
1154
|
|
|
992
1155
|
```
|
|
993
1156
|
USAGE
|
|
994
|
-
$ sanity dataset export [NAME] [DESTINATION] [--asset-concurrency <value>] [--mode stream|cursor]
|
|
995
|
-
[--no-compress] [--no-drafts] [--overwrite] [--raw] [--types <value>]
|
|
1157
|
+
$ sanity dataset export [NAME] [DESTINATION] [-p <id>] [--asset-concurrency <value>] [--mode stream|cursor]
|
|
1158
|
+
[--no-assets] [--no-compress] [--no-drafts] [--overwrite] [--raw] [--types <value>]
|
|
996
1159
|
|
|
997
1160
|
ARGUMENTS
|
|
998
1161
|
[NAME] Name of the dataset to export
|
|
@@ -1011,6 +1174,9 @@ FLAGS
|
|
|
1011
1174
|
--raw Extract only documents, without rewriting asset references
|
|
1012
1175
|
--types=<value> Defines which document types to export (comma-separated)
|
|
1013
1176
|
|
|
1177
|
+
OVERRIDE FLAGS
|
|
1178
|
+
-p, --project-id=<id> Project ID to export dataset from (overrides CLI configuration)
|
|
1179
|
+
|
|
1014
1180
|
DESCRIPTION
|
|
1015
1181
|
Export dataset to local filesystem as a gzipped tarball. Assets failing with HTTP status codes 401, 403 and 404 upon
|
|
1016
1182
|
download are ignored and excluded from export.
|
|
@@ -1033,24 +1199,24 @@ EXAMPLES
|
|
|
1033
1199
|
$ sanity dataset export staging staging.tar.gz --types products,shops
|
|
1034
1200
|
```
|
|
1035
1201
|
|
|
1036
|
-
_See code: [src/commands/dataset/export.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
1202
|
+
_See code: [src/commands/dataset/export.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/dataset/export.ts)_
|
|
1037
1203
|
|
|
1038
|
-
## `sanity dataset import SOURCE`
|
|
1204
|
+
## `sanity dataset import SOURCE [TARGETDATASET]`
|
|
1039
1205
|
|
|
1040
1206
|
Import documents to a Sanity dataset
|
|
1041
1207
|
|
|
1042
1208
|
```
|
|
1043
1209
|
USAGE
|
|
1044
|
-
$ sanity dataset import SOURCE
|
|
1045
|
-
[--allow-
|
|
1046
|
-
[--
|
|
1210
|
+
$ sanity dataset import SOURCE [TARGETDATASET] [--allow-assets-in-different-dataset] [--allow-failing-assets]
|
|
1211
|
+
[--allow-replacement-characters] [--allow-system-documents] [--asset-concurrency <value>] [-d <name>] [--missing |
|
|
1212
|
+
--replace] [-p <id>] [--replace-assets] [--skip-cross-dataset-references] [-t <value>]
|
|
1047
1213
|
|
|
1048
1214
|
ARGUMENTS
|
|
1049
|
-
SOURCE
|
|
1215
|
+
SOURCE Source file (use "-" for stdin)
|
|
1216
|
+
[TARGETDATASET] Target dataset (prefer --dataset flag instead)
|
|
1050
1217
|
|
|
1051
1218
|
FLAGS
|
|
1052
|
-
-d, --dataset=<
|
|
1053
|
-
-p, --project=<value> (required) Project ID to import to
|
|
1219
|
+
-d, --dataset=<name> Dataset to import to
|
|
1054
1220
|
-t, --token=<value> [env: SANITY_IMPORT_TOKEN] Token to authenticate with
|
|
1055
1221
|
--allow-assets-in-different-dataset Allow asset documents to reference different project/dataset
|
|
1056
1222
|
--allow-failing-assets Skip assets that cannot be fetched/uploaded
|
|
@@ -1062,20 +1228,27 @@ FLAGS
|
|
|
1062
1228
|
--replace-assets Skip reuse of existing assets
|
|
1063
1229
|
--skip-cross-dataset-references Skips references to other datasets
|
|
1064
1230
|
|
|
1231
|
+
OVERRIDE FLAGS
|
|
1232
|
+
-p, --project-id=<id> Project ID to import to (overrides CLI configuration)
|
|
1233
|
+
|
|
1065
1234
|
DESCRIPTION
|
|
1066
1235
|
Import documents to a Sanity dataset
|
|
1067
1236
|
|
|
1068
1237
|
EXAMPLES
|
|
1069
1238
|
Import "./my-dataset.ndjson" into dataset "staging"
|
|
1070
1239
|
|
|
1071
|
-
$ sanity dataset import -
|
|
1240
|
+
$ sanity dataset import -d staging -t someSecretToken my-dataset.ndjson
|
|
1241
|
+
|
|
1242
|
+
Import into dataset "test" from stdin
|
|
1072
1243
|
|
|
1073
|
-
|
|
1244
|
+
cat my-dataset.ndjson | sanity dataset import -d test -t someToken -
|
|
1074
1245
|
|
|
1075
|
-
|
|
1246
|
+
Import with explicit project ID (overrides CLI configuration)
|
|
1247
|
+
|
|
1248
|
+
$ sanity dataset import -p projectId -d staging -t someSecretToken my-dataset.ndjson
|
|
1076
1249
|
```
|
|
1077
1250
|
|
|
1078
|
-
_See code: [src/commands/dataset/import.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
1251
|
+
_See code: [src/commands/dataset/import.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/dataset/import.ts)_
|
|
1079
1252
|
|
|
1080
1253
|
## `sanity dataset list`
|
|
1081
1254
|
|
|
@@ -1083,7 +1256,10 @@ List datasets of your project
|
|
|
1083
1256
|
|
|
1084
1257
|
```
|
|
1085
1258
|
USAGE
|
|
1086
|
-
$ sanity dataset list
|
|
1259
|
+
$ sanity dataset list [-p <id>]
|
|
1260
|
+
|
|
1261
|
+
OVERRIDE FLAGS
|
|
1262
|
+
-p, --project-id=<id> Project ID to list datasets for (overrides CLI configuration)
|
|
1087
1263
|
|
|
1088
1264
|
DESCRIPTION
|
|
1089
1265
|
List datasets of your project
|
|
@@ -1092,9 +1268,13 @@ EXAMPLES
|
|
|
1092
1268
|
List datasets of your project
|
|
1093
1269
|
|
|
1094
1270
|
$ sanity dataset list
|
|
1271
|
+
|
|
1272
|
+
List datasets for a specific project
|
|
1273
|
+
|
|
1274
|
+
$ sanity dataset list --project-id abc123
|
|
1095
1275
|
```
|
|
1096
1276
|
|
|
1097
|
-
_See code: [src/commands/dataset/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
1277
|
+
_See code: [src/commands/dataset/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/dataset/list.ts)_
|
|
1098
1278
|
|
|
1099
1279
|
## `sanity dataset visibility get DATASET`
|
|
1100
1280
|
|
|
@@ -1102,11 +1282,14 @@ Get the visibility of a dataset
|
|
|
1102
1282
|
|
|
1103
1283
|
```
|
|
1104
1284
|
USAGE
|
|
1105
|
-
$ sanity dataset visibility get DATASET
|
|
1285
|
+
$ sanity dataset visibility get DATASET [-p <id>]
|
|
1106
1286
|
|
|
1107
1287
|
ARGUMENTS
|
|
1108
1288
|
DATASET The name of the dataset to get visibility for
|
|
1109
1289
|
|
|
1290
|
+
OVERRIDE FLAGS
|
|
1291
|
+
-p, --project-id=<id> Project ID to get dataset visibility for (overrides CLI configuration)
|
|
1292
|
+
|
|
1110
1293
|
DESCRIPTION
|
|
1111
1294
|
Get the visibility of a dataset
|
|
1112
1295
|
|
|
@@ -1116,7 +1299,7 @@ EXAMPLES
|
|
|
1116
1299
|
$ sanity dataset visibility get my-dataset
|
|
1117
1300
|
```
|
|
1118
1301
|
|
|
1119
|
-
_See code: [src/commands/dataset/visibility/get.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
1302
|
+
_See code: [src/commands/dataset/visibility/get.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/dataset/visibility/get.ts)_
|
|
1120
1303
|
|
|
1121
1304
|
## `sanity dataset visibility set DATASET MODE`
|
|
1122
1305
|
|
|
@@ -1124,12 +1307,15 @@ Set the visibility of a dataset
|
|
|
1124
1307
|
|
|
1125
1308
|
```
|
|
1126
1309
|
USAGE
|
|
1127
|
-
$ sanity dataset visibility set DATASET MODE
|
|
1310
|
+
$ sanity dataset visibility set DATASET MODE [-p <id>]
|
|
1128
1311
|
|
|
1129
1312
|
ARGUMENTS
|
|
1130
1313
|
DATASET The name of the dataset to set visibility for
|
|
1131
1314
|
MODE (public|private) The visibility mode to set
|
|
1132
1315
|
|
|
1316
|
+
OVERRIDE FLAGS
|
|
1317
|
+
-p, --project-id=<id> Project ID to set dataset visibility for (overrides CLI configuration)
|
|
1318
|
+
|
|
1133
1319
|
DESCRIPTION
|
|
1134
1320
|
Set the visibility of a dataset
|
|
1135
1321
|
|
|
@@ -1143,7 +1329,7 @@ EXAMPLES
|
|
|
1143
1329
|
$ sanity dataset visibility set my-dataset public
|
|
1144
1330
|
```
|
|
1145
1331
|
|
|
1146
|
-
_See code: [src/commands/dataset/visibility/set.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
1332
|
+
_See code: [src/commands/dataset/visibility/set.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/dataset/visibility/set.ts)_
|
|
1147
1333
|
|
|
1148
1334
|
## `sanity debug`
|
|
1149
1335
|
|
|
@@ -1165,7 +1351,7 @@ EXAMPLES
|
|
|
1165
1351
|
$ sanity debug --secrets
|
|
1166
1352
|
```
|
|
1167
1353
|
|
|
1168
|
-
_See code: [src/commands/debug.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
1354
|
+
_See code: [src/commands/debug.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/debug.ts)_
|
|
1169
1355
|
|
|
1170
1356
|
## `sanity deploy [SOURCEDIR]`
|
|
1171
1357
|
|
|
@@ -1173,8 +1359,8 @@ Builds and deploys Sanity Studio or application to Sanity hosting
|
|
|
1173
1359
|
|
|
1174
1360
|
```
|
|
1175
1361
|
USAGE
|
|
1176
|
-
$ sanity deploy [SOURCEDIR] [--auto-updates] [--
|
|
1177
|
-
[--verbose] [-y]
|
|
1362
|
+
$ sanity deploy [SOURCEDIR] [--auto-updates] [--external | --source-maps | --minify | --build]
|
|
1363
|
+
[--schema-required] [--verbose] [-y]
|
|
1178
1364
|
|
|
1179
1365
|
ARGUMENTS
|
|
1180
1366
|
[SOURCEDIR] Source directory
|
|
@@ -1183,6 +1369,7 @@ FLAGS
|
|
|
1183
1369
|
-y, --yes Unattended mode, answers "yes" to any "yes/no" prompt and otherwise uses defaults
|
|
1184
1370
|
--[no-]auto-updates Automatically update the studio to the latest version
|
|
1185
1371
|
--[no-]build Don't build the studio prior to deploy, instead deploying the version currently in `dist/`
|
|
1372
|
+
--external Register an externally hosted studio
|
|
1186
1373
|
--[no-]minify Skip minifying built JavaScript (speeds up build, increases size of bundle)
|
|
1187
1374
|
--schema-required Fail-fast deployment if schema store fails
|
|
1188
1375
|
--source-maps Enable source maps for built bundles (increases size of bundle)
|
|
@@ -1192,7 +1379,7 @@ DESCRIPTION
|
|
|
1192
1379
|
Builds and deploys Sanity Studio or application to Sanity hosting
|
|
1193
1380
|
|
|
1194
1381
|
EXAMPLES
|
|
1195
|
-
Build the studio
|
|
1382
|
+
Build and deploy the studio to Sanity hosting
|
|
1196
1383
|
|
|
1197
1384
|
$ sanity deploy
|
|
1198
1385
|
|
|
@@ -1203,9 +1390,13 @@ EXAMPLES
|
|
|
1203
1390
|
Fail fast on schema store fails - for when other services rely on the stored schema
|
|
1204
1391
|
|
|
1205
1392
|
$ sanity deploy --schema-required
|
|
1393
|
+
|
|
1394
|
+
Register an externally hosted studio (studioHost contains full URL)
|
|
1395
|
+
|
|
1396
|
+
$ sanity deploy --external
|
|
1206
1397
|
```
|
|
1207
1398
|
|
|
1208
|
-
_See code: [src/commands/deploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
1399
|
+
_See code: [src/commands/deploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/deploy.ts)_
|
|
1209
1400
|
|
|
1210
1401
|
## `sanity dev`
|
|
1211
1402
|
|
|
@@ -1232,7 +1423,7 @@ EXAMPLES
|
|
|
1232
1423
|
$ sanity dev --load-in-dashboard
|
|
1233
1424
|
```
|
|
1234
1425
|
|
|
1235
|
-
_See code: [src/commands/dev.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
1426
|
+
_See code: [src/commands/dev.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/dev.ts)_
|
|
1236
1427
|
|
|
1237
1428
|
## `sanity docs browse`
|
|
1238
1429
|
|
|
@@ -1246,7 +1437,7 @@ DESCRIPTION
|
|
|
1246
1437
|
Open Sanity docs in a web browser
|
|
1247
1438
|
```
|
|
1248
1439
|
|
|
1249
|
-
_See code: [src/commands/docs/browse.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
1440
|
+
_See code: [src/commands/docs/browse.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/docs/browse.ts)_
|
|
1250
1441
|
|
|
1251
1442
|
## `sanity docs read PATH`
|
|
1252
1443
|
|
|
@@ -1283,7 +1474,7 @@ EXAMPLES
|
|
|
1283
1474
|
$ sanity docs read https://www.sanity.io/docs/studio/installation -w
|
|
1284
1475
|
```
|
|
1285
1476
|
|
|
1286
|
-
_See code: [src/commands/docs/read.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
1477
|
+
_See code: [src/commands/docs/read.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/docs/read.ts)_
|
|
1287
1478
|
|
|
1288
1479
|
## `sanity docs search QUERY`
|
|
1289
1480
|
|
|
@@ -1316,7 +1507,38 @@ EXAMPLES
|
|
|
1316
1507
|
$ sanity docs search "deployment" --limit=5
|
|
1317
1508
|
```
|
|
1318
1509
|
|
|
1319
|
-
_See code: [src/commands/docs/search.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
1510
|
+
_See code: [src/commands/docs/search.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/docs/search.ts)_
|
|
1511
|
+
|
|
1512
|
+
## `sanity doctor [CHECKS]`
|
|
1513
|
+
|
|
1514
|
+
Run diagnostics on your Sanity project
|
|
1515
|
+
|
|
1516
|
+
```
|
|
1517
|
+
USAGE
|
|
1518
|
+
$ sanity doctor [CHECKS...] [-j]
|
|
1519
|
+
|
|
1520
|
+
ARGUMENTS
|
|
1521
|
+
[CHECKS...] Checks to enable (defaults to all). Valid: cli
|
|
1522
|
+
|
|
1523
|
+
FLAGS
|
|
1524
|
+
-j, --json Output results as JSON
|
|
1525
|
+
|
|
1526
|
+
DESCRIPTION
|
|
1527
|
+
Run diagnostics on your Sanity project
|
|
1528
|
+
|
|
1529
|
+
EXAMPLES
|
|
1530
|
+
$ sanity doctor
|
|
1531
|
+
|
|
1532
|
+
Output results as JSON
|
|
1533
|
+
|
|
1534
|
+
$ sanity doctor --json
|
|
1535
|
+
|
|
1536
|
+
Only run CLI-related diagnostics
|
|
1537
|
+
|
|
1538
|
+
$ sanity doctor cli
|
|
1539
|
+
```
|
|
1540
|
+
|
|
1541
|
+
_See code: [src/commands/doctor.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/doctor.ts)_
|
|
1320
1542
|
|
|
1321
1543
|
## `sanity documents create [FILE]`
|
|
1322
1544
|
|
|
@@ -1324,18 +1546,21 @@ Create one or more documents
|
|
|
1324
1546
|
|
|
1325
1547
|
```
|
|
1326
1548
|
USAGE
|
|
1327
|
-
$ sanity documents create [FILE] [-d <
|
|
1549
|
+
$ sanity documents create [FILE] [-p <id>] [-d <name>] [--id <value>] [--json5] [--missing] [--replace] [--watch]
|
|
1328
1550
|
|
|
1329
1551
|
ARGUMENTS
|
|
1330
1552
|
[FILE] JSON file to create document(s) from
|
|
1331
1553
|
|
|
1332
1554
|
FLAGS
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1555
|
+
--id=<value> Specify a document ID to use. Will fetch remote document ID and populate editor.
|
|
1556
|
+
--json5 Use JSON5 file type to allow a "simplified" version of JSON
|
|
1557
|
+
--missing On duplicate document IDs, don't modify the target document(s)
|
|
1558
|
+
--replace On duplicate document IDs, replace existing document with specified document(s)
|
|
1559
|
+
--watch Write the documents whenever the target file or buffer changes
|
|
1560
|
+
|
|
1561
|
+
OVERRIDE FLAGS
|
|
1562
|
+
-d, --dataset=<name> Dataset to create document(s) in (overrides CLI configuration)
|
|
1563
|
+
-p, --project-id=<id> Project ID to create document(s) in (overrides CLI configuration)
|
|
1339
1564
|
|
|
1340
1565
|
DESCRIPTION
|
|
1341
1566
|
Create one or more documents
|
|
@@ -1358,9 +1583,13 @@ EXAMPLES
|
|
|
1358
1583
|
parser for simplified syntax.
|
|
1359
1584
|
|
|
1360
1585
|
$ sanity documents create --id myDocId --watch --replace --json5
|
|
1586
|
+
|
|
1587
|
+
Create documents in a specific project
|
|
1588
|
+
|
|
1589
|
+
$ sanity documents create myDocument.json --project-id abc123
|
|
1361
1590
|
```
|
|
1362
1591
|
|
|
1363
|
-
_See code: [src/commands/documents/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
1592
|
+
_See code: [src/commands/documents/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/documents/create.ts)_
|
|
1364
1593
|
|
|
1365
1594
|
## `sanity documents delete ID [IDS]`
|
|
1366
1595
|
|
|
@@ -1368,14 +1597,15 @@ Delete one or more documents from the projects configured dataset
|
|
|
1368
1597
|
|
|
1369
1598
|
```
|
|
1370
1599
|
USAGE
|
|
1371
|
-
$ sanity documents delete ID... [IDS...] [
|
|
1600
|
+
$ sanity documents delete ID... [IDS...] [-p <id>] [-d <name>]
|
|
1372
1601
|
|
|
1373
1602
|
ARGUMENTS
|
|
1374
1603
|
ID... Document ID to delete
|
|
1375
1604
|
[IDS...] Additional document IDs to delete
|
|
1376
1605
|
|
|
1377
|
-
FLAGS
|
|
1378
|
-
--dataset=<
|
|
1606
|
+
OVERRIDE FLAGS
|
|
1607
|
+
-d, --dataset=<name> Dataset to delete from (overrides CLI configuration)
|
|
1608
|
+
-p, --project-id=<id> Project ID to delete from (overrides CLI configuration)
|
|
1379
1609
|
|
|
1380
1610
|
DESCRIPTION
|
|
1381
1611
|
Delete one or more documents from the projects configured dataset
|
|
@@ -1396,9 +1626,13 @@ EXAMPLES
|
|
|
1396
1626
|
Delete the document with ID "doc1" and "doc2"
|
|
1397
1627
|
|
|
1398
1628
|
$ sanity documents delete doc1 doc2
|
|
1629
|
+
|
|
1630
|
+
Delete a document from a specific project
|
|
1631
|
+
|
|
1632
|
+
$ sanity documents delete myDocId --project-id abc123
|
|
1399
1633
|
```
|
|
1400
1634
|
|
|
1401
|
-
_See code: [src/commands/documents/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
1635
|
+
_See code: [src/commands/documents/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/documents/delete.ts)_
|
|
1402
1636
|
|
|
1403
1637
|
## `sanity documents get DOCUMENTID`
|
|
1404
1638
|
|
|
@@ -1406,14 +1640,17 @@ Get and print a document by ID
|
|
|
1406
1640
|
|
|
1407
1641
|
```
|
|
1408
1642
|
USAGE
|
|
1409
|
-
$ sanity documents get DOCUMENTID [-d <
|
|
1643
|
+
$ sanity documents get DOCUMENTID [-p <id>] [-d <name>] [--pretty]
|
|
1410
1644
|
|
|
1411
1645
|
ARGUMENTS
|
|
1412
1646
|
DOCUMENTID Document ID to retrieve
|
|
1413
1647
|
|
|
1414
1648
|
FLAGS
|
|
1415
|
-
|
|
1416
|
-
|
|
1649
|
+
--pretty Colorize JSON output
|
|
1650
|
+
|
|
1651
|
+
OVERRIDE FLAGS
|
|
1652
|
+
-d, --dataset=<name> Dataset to get document from (overrides CLI configuration)
|
|
1653
|
+
-p, --project-id=<id> Project ID to get document from (overrides CLI configuration)
|
|
1417
1654
|
|
|
1418
1655
|
DESCRIPTION
|
|
1419
1656
|
Get and print a document by ID
|
|
@@ -1430,9 +1667,13 @@ EXAMPLES
|
|
|
1430
1667
|
Get document from a specific dataset
|
|
1431
1668
|
|
|
1432
1669
|
$ sanity documents get myDocId --dataset production
|
|
1670
|
+
|
|
1671
|
+
Get a document from a specific project
|
|
1672
|
+
|
|
1673
|
+
$ sanity documents get myDocId --project-id abc123
|
|
1433
1674
|
```
|
|
1434
1675
|
|
|
1435
|
-
_See code: [src/commands/documents/get.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
1676
|
+
_See code: [src/commands/documents/get.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/documents/get.ts)_
|
|
1436
1677
|
|
|
1437
1678
|
## `sanity documents query QUERY`
|
|
1438
1679
|
|
|
@@ -1440,17 +1681,19 @@ Query for documents
|
|
|
1440
1681
|
|
|
1441
1682
|
```
|
|
1442
1683
|
USAGE
|
|
1443
|
-
$ sanity documents query QUERY [
|
|
1684
|
+
$ sanity documents query QUERY [-p <id>] [-d <name>] [--anonymous] [--api-version <value>] [--pretty]
|
|
1444
1685
|
|
|
1445
1686
|
ARGUMENTS
|
|
1446
1687
|
QUERY GROQ query to run against the dataset
|
|
1447
1688
|
|
|
1448
1689
|
FLAGS
|
|
1449
|
-
|
|
1450
|
-
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1690
|
+
--anonymous Send the query without any authorization token
|
|
1691
|
+
--api-version=<value> [env: SANITY_CLI_QUERY_API_VERSION] API version to use (defaults to 2025-08-15)
|
|
1692
|
+
--pretty Colorize JSON output
|
|
1693
|
+
|
|
1694
|
+
OVERRIDE FLAGS
|
|
1695
|
+
-d, --dataset=<name> Dataset to query (overrides CLI configuration)
|
|
1696
|
+
-p, --project-id=<id> Project ID to query (overrides CLI configuration)
|
|
1454
1697
|
|
|
1455
1698
|
DESCRIPTION
|
|
1456
1699
|
Query for documents
|
|
@@ -1467,9 +1710,13 @@ EXAMPLES
|
|
|
1467
1710
|
Use API version v2021-06-07 and do a query
|
|
1468
1711
|
|
|
1469
1712
|
$ sanity documents query '*[_id == "header"] { "headerText": pt::text(body) }' --api-version v2021-06-07
|
|
1713
|
+
|
|
1714
|
+
Query documents in a specific project and dataset
|
|
1715
|
+
|
|
1716
|
+
$ sanity documents query '*[_type == "post"]' --project-id abc123 --dataset production
|
|
1470
1717
|
```
|
|
1471
1718
|
|
|
1472
|
-
_See code: [src/commands/documents/query.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
1719
|
+
_See code: [src/commands/documents/query.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/documents/query.ts)_
|
|
1473
1720
|
|
|
1474
1721
|
## `sanity documents validate`
|
|
1475
1722
|
|
|
@@ -1477,23 +1724,24 @@ Validate documents in a dataset against the studio schema
|
|
|
1477
1724
|
|
|
1478
1725
|
```
|
|
1479
1726
|
USAGE
|
|
1480
|
-
$ sanity documents validate [-d <
|
|
1727
|
+
$ sanity documents validate [-p <id>] [-d <name>] [--file <value>] [--format <value>] [--level error|warning|info]
|
|
1481
1728
|
[--max-custom-validation-concurrency <value>] [--max-fetch-concurrency <value>] [--workspace <value>] [-y]
|
|
1482
1729
|
|
|
1483
1730
|
FLAGS
|
|
1484
|
-
-d, --dataset=<
|
|
1731
|
+
-d, --dataset=<name> Override the dataset used. By default, this is derived from the given
|
|
1485
1732
|
workspace
|
|
1733
|
+
-p, --project-id=<id> Override the project ID used. By default, this is derived from the
|
|
1734
|
+
given workspace
|
|
1486
1735
|
-y, --yes Skips the first confirmation prompt
|
|
1487
1736
|
--file=<value> Provide a path to either an .ndjson file or a tarball containing an
|
|
1488
1737
|
.ndjson file
|
|
1489
1738
|
--format=<value> The output format used to print the found validation markers and
|
|
1490
1739
|
report progress
|
|
1491
|
-
--level=<option> [default: warning] The minimum level reported
|
|
1492
|
-
warning
|
|
1740
|
+
--level=<option> [default: warning] The minimum level reported. Defaults to warning
|
|
1493
1741
|
<options: error|warning|info>
|
|
1494
1742
|
--max-custom-validation-concurrency=<value> [default: 5] Specify how many custom validators can run concurrently
|
|
1495
|
-
--max-fetch-concurrency=<value> [default: 25] Specify how many `client.fetch` requests are
|
|
1496
|
-
|
|
1743
|
+
--max-fetch-concurrency=<value> [default: 25] Specify how many `client.fetch` requests are allowed to
|
|
1744
|
+
run concurrently
|
|
1497
1745
|
--workspace=<value> The name of the workspace to use when downloading and validating all
|
|
1498
1746
|
documents
|
|
1499
1747
|
|
|
@@ -1516,9 +1764,13 @@ EXAMPLES
|
|
|
1516
1764
|
Report out info level validation markers too
|
|
1517
1765
|
|
|
1518
1766
|
$ sanity documents validate --level info
|
|
1767
|
+
|
|
1768
|
+
Validate documents in a specific project and dataset
|
|
1769
|
+
|
|
1770
|
+
$ sanity documents validate --project-id abc123 --dataset production
|
|
1519
1771
|
```
|
|
1520
1772
|
|
|
1521
|
-
_See code: [src/commands/documents/validate.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
1773
|
+
_See code: [src/commands/documents/validate.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/documents/validate.ts)_
|
|
1522
1774
|
|
|
1523
1775
|
## `sanity exec SCRIPT`
|
|
1524
1776
|
|
|
@@ -1559,7 +1811,7 @@ EXAMPLES
|
|
|
1559
1811
|
$ sanity exec --mock-browser-env myscript.js -- --dry-run positional-argument
|
|
1560
1812
|
```
|
|
1561
1813
|
|
|
1562
|
-
_See code: [src/commands/exec.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
1814
|
+
_See code: [src/commands/exec.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/exec.ts)_
|
|
1563
1815
|
|
|
1564
1816
|
## `sanity functions add`
|
|
1565
1817
|
|
|
@@ -1568,8 +1820,8 @@ Add a Function to your Blueprint
|
|
|
1568
1820
|
```
|
|
1569
1821
|
USAGE
|
|
1570
1822
|
$ sanity functions add [--example <value> | -n <value> | | --language ts|js | --javascript | | ] [--type
|
|
1571
|
-
document-
|
|
1572
|
-
te|media-library-asset-delete... ] [--helpers] [--installer skip|npm|pnpm|yarn] [-i | ]
|
|
1823
|
+
document-publish|document-create|document-update|document-delete|media-library-asset-create|media-library-asset-upda
|
|
1824
|
+
te|media-library-asset-delete|scheduled-function... ] [--helpers] [--installer skip|npm|pnpm|yarn] [-i | ]
|
|
1573
1825
|
|
|
1574
1826
|
FLAGS
|
|
1575
1827
|
-i, --install Shortcut for --fn-installer npm
|
|
@@ -1583,8 +1835,8 @@ FLAGS
|
|
|
1583
1835
|
<options: ts|js>
|
|
1584
1836
|
--type=<option>... Document change event(s) that should trigger the function; you can specify multiple events
|
|
1585
1837
|
by specifying this flag multiple times
|
|
1586
|
-
<options: document-
|
|
1587
|
-
et-create|media-library-asset-update|media-library-asset-delete>
|
|
1838
|
+
<options: document-publish|document-create|document-update|document-delete|media-library-ass
|
|
1839
|
+
et-create|media-library-asset-update|media-library-asset-delete|scheduled-function>
|
|
1588
1840
|
|
|
1589
1841
|
DESCRIPTION
|
|
1590
1842
|
Add a Function to your Blueprint
|
|
@@ -1608,7 +1860,7 @@ EXAMPLES
|
|
|
1608
1860
|
$ sanity functions add --name my-function --type document-create --type document-update --lang js
|
|
1609
1861
|
```
|
|
1610
1862
|
|
|
1611
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
1863
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/functions/add.ts)_
|
|
1612
1864
|
|
|
1613
1865
|
## `sanity functions dev`
|
|
1614
1866
|
|
|
@@ -1642,7 +1894,7 @@ EXAMPLES
|
|
|
1642
1894
|
$ sanity functions dev --timeout 60
|
|
1643
1895
|
```
|
|
1644
1896
|
|
|
1645
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
1897
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/functions/dev.ts)_
|
|
1646
1898
|
|
|
1647
1899
|
## `sanity functions env add NAME KEY VALUE`
|
|
1648
1900
|
|
|
@@ -1669,7 +1921,7 @@ EXAMPLES
|
|
|
1669
1921
|
$ sanity functions env add MyFunction API_URL https://api.example.com/
|
|
1670
1922
|
```
|
|
1671
1923
|
|
|
1672
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
1924
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/functions/env/add.ts)_
|
|
1673
1925
|
|
|
1674
1926
|
## `sanity functions env list NAME`
|
|
1675
1927
|
|
|
@@ -1693,7 +1945,7 @@ EXAMPLES
|
|
|
1693
1945
|
$ sanity functions env list MyFunction
|
|
1694
1946
|
```
|
|
1695
1947
|
|
|
1696
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
1948
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/functions/env/list.ts)_
|
|
1697
1949
|
|
|
1698
1950
|
## `sanity functions env remove NAME KEY`
|
|
1699
1951
|
|
|
@@ -1719,7 +1971,7 @@ EXAMPLES
|
|
|
1719
1971
|
$ sanity functions env remove MyFunction API_URL
|
|
1720
1972
|
```
|
|
1721
1973
|
|
|
1722
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
1974
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/functions/env/remove.ts)_
|
|
1723
1975
|
|
|
1724
1976
|
## `sanity functions logs [NAME]`
|
|
1725
1977
|
|
|
@@ -1727,7 +1979,7 @@ Retrieve or delete logs for a Sanity Function
|
|
|
1727
1979
|
|
|
1728
1980
|
```
|
|
1729
1981
|
USAGE
|
|
1730
|
-
$ sanity functions logs [NAME] [-u] [-f [-d | -l <value> | -j]] [-w]
|
|
1982
|
+
$ sanity functions logs [NAME] [--stack <value>] [-u] [-f [-d | -l <value> | -j]] [-w]
|
|
1731
1983
|
|
|
1732
1984
|
ARGUMENTS
|
|
1733
1985
|
[NAME] The name of the Sanity Function
|
|
@@ -1739,6 +1991,7 @@ FLAGS
|
|
|
1739
1991
|
-l, --limit=<value> [default: 50] Total number of log entries to retrieve
|
|
1740
1992
|
-u, --utc Show dates in UTC time zone
|
|
1741
1993
|
-w, --watch Watch for new logs (streaming mode)
|
|
1994
|
+
--stack=<value> Stack name or ID to use instead of the locally configured Stack
|
|
1742
1995
|
|
|
1743
1996
|
DESCRIPTION
|
|
1744
1997
|
Retrieve or delete logs for a Sanity Function
|
|
@@ -1758,7 +2011,7 @@ EXAMPLES
|
|
|
1758
2011
|
$ sanity functions logs <name> --delete
|
|
1759
2012
|
```
|
|
1760
2013
|
|
|
1761
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
2014
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/functions/logs.ts)_
|
|
1762
2015
|
|
|
1763
2016
|
## `sanity functions test [NAME]`
|
|
1764
2017
|
|
|
@@ -1812,7 +2065,7 @@ EXAMPLES
|
|
|
1812
2065
|
$ sanity functions test <name> --event update --data-before '{ "title": "before" }' --data-after '{ "title": "after" }'
|
|
1813
2066
|
```
|
|
1814
2067
|
|
|
1815
|
-
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/
|
|
2068
|
+
_See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/functions/test.ts)_
|
|
1816
2069
|
|
|
1817
2070
|
## `sanity graphql deploy`
|
|
1818
2071
|
|
|
@@ -1820,21 +2073,21 @@ Deploy a GraphQL API from the current Sanity schema
|
|
|
1820
2073
|
|
|
1821
2074
|
```
|
|
1822
2075
|
USAGE
|
|
1823
|
-
$ sanity graphql deploy [--api <value>...] [
|
|
2076
|
+
$ sanity graphql deploy [--api <value>...] [-d <name>] [--dry-run] [--force] [--generation gen1|gen2|gen3]
|
|
1824
2077
|
[--non-null-document-fields] [--playground] [--tag <value>] [--with-union-cache]
|
|
1825
2078
|
|
|
1826
2079
|
FLAGS
|
|
1827
|
-
--
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
2080
|
+
-d, --dataset=<name> Deploy API for the given dataset
|
|
2081
|
+
--api=<value>... Only deploy API with this ID. Can be specified multiple times.
|
|
2082
|
+
--dry-run Validate defined GraphQL APIs, check for breaking changes, skip deploy
|
|
2083
|
+
--force Deploy API without confirming breaking changes
|
|
2084
|
+
--generation=<option> API generation to deploy (defaults to "gen3")
|
|
2085
|
+
<options: gen1|gen2|gen3>
|
|
2086
|
+
--non-null-document-fields Use non-null document fields (_id, _type etc)
|
|
2087
|
+
--[no-]playground Enable GraphQL playground for easier debugging
|
|
2088
|
+
--tag=<value> Deploy API(s) to given tag (defaults to "default")
|
|
2089
|
+
--with-union-cache Enable union cache that optimizes schema generation for schemas with many self
|
|
2090
|
+
referencing types
|
|
1838
2091
|
|
|
1839
2092
|
DESCRIPTION
|
|
1840
2093
|
Deploy a GraphQL API from the current Sanity schema
|
|
@@ -1857,7 +2110,7 @@ EXAMPLES
|
|
|
1857
2110
|
$ sanity graphql deploy --playground
|
|
1858
2111
|
```
|
|
1859
2112
|
|
|
1860
|
-
_See code: [src/commands/graphql/deploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2113
|
+
_See code: [src/commands/graphql/deploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/graphql/deploy.ts)_
|
|
1861
2114
|
|
|
1862
2115
|
## `sanity graphql list`
|
|
1863
2116
|
|
|
@@ -1865,7 +2118,10 @@ List all GraphQL endpoints deployed for this project
|
|
|
1865
2118
|
|
|
1866
2119
|
```
|
|
1867
2120
|
USAGE
|
|
1868
|
-
$ sanity graphql list
|
|
2121
|
+
$ sanity graphql list [-p <id>]
|
|
2122
|
+
|
|
2123
|
+
OVERRIDE FLAGS
|
|
2124
|
+
-p, --project-id=<id> Project ID to list GraphQL endpoints for (overrides CLI configuration)
|
|
1869
2125
|
|
|
1870
2126
|
DESCRIPTION
|
|
1871
2127
|
List all GraphQL endpoints deployed for this project
|
|
@@ -1874,9 +2130,13 @@ EXAMPLES
|
|
|
1874
2130
|
List GraphQL endpoints for the current project
|
|
1875
2131
|
|
|
1876
2132
|
$ sanity graphql list
|
|
2133
|
+
|
|
2134
|
+
List GraphQL endpoints for a specific project
|
|
2135
|
+
|
|
2136
|
+
$ sanity graphql list --project-id abc123
|
|
1877
2137
|
```
|
|
1878
2138
|
|
|
1879
|
-
_See code: [src/commands/graphql/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2139
|
+
_See code: [src/commands/graphql/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/graphql/list.ts)_
|
|
1880
2140
|
|
|
1881
2141
|
## `sanity graphql undeploy`
|
|
1882
2142
|
|
|
@@ -1884,14 +2144,16 @@ Remove a deployed GraphQL API
|
|
|
1884
2144
|
|
|
1885
2145
|
```
|
|
1886
2146
|
USAGE
|
|
1887
|
-
$ sanity graphql undeploy [--api <value>] [
|
|
2147
|
+
$ sanity graphql undeploy [--api <value> | -p <id> | ] [-d <name>] [--force] [--tag <value>]
|
|
1888
2148
|
|
|
1889
2149
|
FLAGS
|
|
1890
|
-
--api=<value>
|
|
1891
|
-
--
|
|
1892
|
-
--
|
|
1893
|
-
|
|
1894
|
-
|
|
2150
|
+
--api=<value> Undeploy API with this ID
|
|
2151
|
+
--force Skip confirmation prompt
|
|
2152
|
+
--tag=<value> [default: default] Tag to undeploy GraphQL API from
|
|
2153
|
+
|
|
2154
|
+
OVERRIDE FLAGS
|
|
2155
|
+
-d, --dataset=<name> Dataset to undeploy GraphQL API from (overrides CLI configuration)
|
|
2156
|
+
-p, --project-id=<id> Project ID to undeploy GraphQL API from (overrides CLI configuration)
|
|
1895
2157
|
|
|
1896
2158
|
DESCRIPTION
|
|
1897
2159
|
Remove a deployed GraphQL API
|
|
@@ -1916,9 +2178,13 @@ EXAMPLES
|
|
|
1916
2178
|
Undeploy GraphQL API without confirmation prompt
|
|
1917
2179
|
|
|
1918
2180
|
$ sanity graphql undeploy --force
|
|
2181
|
+
|
|
2182
|
+
Undeploy GraphQL API for a specific project and dataset
|
|
2183
|
+
|
|
2184
|
+
$ sanity graphql undeploy --project-id abc123 --dataset production
|
|
1919
2185
|
```
|
|
1920
2186
|
|
|
1921
|
-
_See code: [src/commands/graphql/undeploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2187
|
+
_See code: [src/commands/graphql/undeploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/graphql/undeploy.ts)_
|
|
1922
2188
|
|
|
1923
2189
|
## `sanity help [COMMAND]`
|
|
1924
2190
|
|
|
@@ -1946,11 +2212,14 @@ Print details of a given webhook delivery attempt
|
|
|
1946
2212
|
|
|
1947
2213
|
```
|
|
1948
2214
|
USAGE
|
|
1949
|
-
$ sanity hook attempt ATTEMPTID
|
|
2215
|
+
$ sanity hook attempt ATTEMPTID [-p <id>]
|
|
1950
2216
|
|
|
1951
2217
|
ARGUMENTS
|
|
1952
2218
|
ATTEMPTID The delivery attempt ID to get details for
|
|
1953
2219
|
|
|
2220
|
+
OVERRIDE FLAGS
|
|
2221
|
+
-p, --project-id=<id> Project ID to view webhook attempt for (overrides CLI configuration)
|
|
2222
|
+
|
|
1954
2223
|
DESCRIPTION
|
|
1955
2224
|
Print details of a given webhook delivery attempt
|
|
1956
2225
|
|
|
@@ -1958,9 +2227,13 @@ EXAMPLES
|
|
|
1958
2227
|
Print details of webhook delivery attempt with ID abc123
|
|
1959
2228
|
|
|
1960
2229
|
$ sanity hook attempt abc123
|
|
2230
|
+
|
|
2231
|
+
Get attempt details for a specific project
|
|
2232
|
+
|
|
2233
|
+
$ sanity hook attempt abc123 --project-id projectId
|
|
1961
2234
|
```
|
|
1962
2235
|
|
|
1963
|
-
_See code: [src/commands/hook/attempt.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2236
|
+
_See code: [src/commands/hook/attempt.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/hook/attempt.ts)_
|
|
1964
2237
|
|
|
1965
2238
|
## `sanity hook create`
|
|
1966
2239
|
|
|
@@ -1968,7 +2241,10 @@ Create a new webhook for the current project
|
|
|
1968
2241
|
|
|
1969
2242
|
```
|
|
1970
2243
|
USAGE
|
|
1971
|
-
$ sanity hook create
|
|
2244
|
+
$ sanity hook create [-p <id>]
|
|
2245
|
+
|
|
2246
|
+
OVERRIDE FLAGS
|
|
2247
|
+
-p, --project-id=<id> Project ID to create webhook for (overrides CLI configuration)
|
|
1972
2248
|
|
|
1973
2249
|
DESCRIPTION
|
|
1974
2250
|
Create a new webhook for the current project
|
|
@@ -1977,9 +2253,13 @@ EXAMPLES
|
|
|
1977
2253
|
Create a new webhook for the current project
|
|
1978
2254
|
|
|
1979
2255
|
$ sanity hook create
|
|
2256
|
+
|
|
2257
|
+
Create a webhook for a specific project
|
|
2258
|
+
|
|
2259
|
+
$ sanity hook create --project-id abc123
|
|
1980
2260
|
```
|
|
1981
2261
|
|
|
1982
|
-
_See code: [src/commands/hook/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2262
|
+
_See code: [src/commands/hook/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/hook/create.ts)_
|
|
1983
2263
|
|
|
1984
2264
|
## `sanity hook delete [NAME]`
|
|
1985
2265
|
|
|
@@ -1987,11 +2267,14 @@ Delete a hook within your project
|
|
|
1987
2267
|
|
|
1988
2268
|
```
|
|
1989
2269
|
USAGE
|
|
1990
|
-
$ sanity hook delete [NAME]
|
|
2270
|
+
$ sanity hook delete [NAME] [-p <id>]
|
|
1991
2271
|
|
|
1992
2272
|
ARGUMENTS
|
|
1993
2273
|
[NAME] Name of hook to delete (will prompt if not provided)
|
|
1994
2274
|
|
|
2275
|
+
OVERRIDE FLAGS
|
|
2276
|
+
-p, --project-id=<id> Project ID to delete webhook from (overrides CLI configuration)
|
|
2277
|
+
|
|
1995
2278
|
DESCRIPTION
|
|
1996
2279
|
Delete a hook within your project
|
|
1997
2280
|
|
|
@@ -2003,9 +2286,13 @@ EXAMPLES
|
|
|
2003
2286
|
Delete a specific hook by name
|
|
2004
2287
|
|
|
2005
2288
|
$ sanity hook delete my-hook
|
|
2289
|
+
|
|
2290
|
+
Delete a hook from a specific project
|
|
2291
|
+
|
|
2292
|
+
$ sanity hook delete --project-id abc123
|
|
2006
2293
|
```
|
|
2007
2294
|
|
|
2008
|
-
_See code: [src/commands/hook/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2295
|
+
_See code: [src/commands/hook/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/hook/delete.ts)_
|
|
2009
2296
|
|
|
2010
2297
|
## `sanity hook list`
|
|
2011
2298
|
|
|
@@ -2013,7 +2300,10 @@ List hooks for a given project
|
|
|
2013
2300
|
|
|
2014
2301
|
```
|
|
2015
2302
|
USAGE
|
|
2016
|
-
$ sanity hook list
|
|
2303
|
+
$ sanity hook list [-p <id>]
|
|
2304
|
+
|
|
2305
|
+
OVERRIDE FLAGS
|
|
2306
|
+
-p, --project-id=<id> Project ID to list webhooks for (overrides CLI configuration)
|
|
2017
2307
|
|
|
2018
2308
|
DESCRIPTION
|
|
2019
2309
|
List hooks for a given project
|
|
@@ -2022,9 +2312,13 @@ EXAMPLES
|
|
|
2022
2312
|
List hooks for a given project
|
|
2023
2313
|
|
|
2024
2314
|
$ sanity hook list
|
|
2315
|
+
|
|
2316
|
+
List hooks for a specific project
|
|
2317
|
+
|
|
2318
|
+
$ sanity hook list --project-id abc123
|
|
2025
2319
|
```
|
|
2026
2320
|
|
|
2027
|
-
_See code: [src/commands/hook/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2321
|
+
_See code: [src/commands/hook/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/hook/list.ts)_
|
|
2028
2322
|
|
|
2029
2323
|
## `sanity hook logs [NAME]`
|
|
2030
2324
|
|
|
@@ -2032,7 +2326,7 @@ List latest log entries for a given hook
|
|
|
2032
2326
|
|
|
2033
2327
|
```
|
|
2034
2328
|
USAGE
|
|
2035
|
-
$ sanity hook logs [NAME] [--detailed]
|
|
2329
|
+
$ sanity hook logs [NAME] [-p <id>] [--detailed]
|
|
2036
2330
|
|
|
2037
2331
|
ARGUMENTS
|
|
2038
2332
|
[NAME] Name of the hook to show logs for
|
|
@@ -2040,6 +2334,9 @@ ARGUMENTS
|
|
|
2040
2334
|
FLAGS
|
|
2041
2335
|
--detailed Include detailed payload and attempts
|
|
2042
2336
|
|
|
2337
|
+
OVERRIDE FLAGS
|
|
2338
|
+
-p, --project-id=<id> Project ID to view webhook logs for (overrides CLI configuration)
|
|
2339
|
+
|
|
2043
2340
|
DESCRIPTION
|
|
2044
2341
|
List latest log entries for a given hook
|
|
2045
2342
|
|
|
@@ -2051,9 +2348,13 @@ EXAMPLES
|
|
|
2051
2348
|
List latest log entries for a specific hook by name
|
|
2052
2349
|
|
|
2053
2350
|
$ sanity hook logs [NAME]
|
|
2351
|
+
|
|
2352
|
+
List hook logs for a specific project
|
|
2353
|
+
|
|
2354
|
+
$ sanity hook logs --project-id abc123
|
|
2054
2355
|
```
|
|
2055
2356
|
|
|
2056
|
-
_See code: [src/commands/hook/logs.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2357
|
+
_See code: [src/commands/hook/logs.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/hook/logs.ts)_
|
|
2057
2358
|
|
|
2058
2359
|
## `sanity init`
|
|
2059
2360
|
|
|
@@ -2122,7 +2423,7 @@ EXAMPLES
|
|
|
2122
2423
|
--output-path /Users/espenh/movies-unlimited
|
|
2123
2424
|
```
|
|
2124
2425
|
|
|
2125
|
-
_See code: [src/commands/init.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2426
|
+
_See code: [src/commands/init.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/init.ts)_
|
|
2126
2427
|
|
|
2127
2428
|
## `sanity install [PACKAGES]`
|
|
2128
2429
|
|
|
@@ -2146,7 +2447,7 @@ EXAMPLES
|
|
|
2146
2447
|
$ sanity install some-package another-package
|
|
2147
2448
|
```
|
|
2148
2449
|
|
|
2149
|
-
_See code: [src/commands/install.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2450
|
+
_See code: [src/commands/install.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/install.ts)_
|
|
2150
2451
|
|
|
2151
2452
|
## `sanity learn`
|
|
2152
2453
|
|
|
@@ -2160,7 +2461,7 @@ DESCRIPTION
|
|
|
2160
2461
|
Opens Sanity Learn in your web browser
|
|
2161
2462
|
```
|
|
2162
2463
|
|
|
2163
|
-
_See code: [src/commands/learn.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2464
|
+
_See code: [src/commands/learn.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/learn.ts)_
|
|
2164
2465
|
|
|
2165
2466
|
## `sanity login`
|
|
2166
2467
|
|
|
@@ -2168,7 +2469,7 @@ Authenticates the CLI for access to Sanity projects
|
|
|
2168
2469
|
|
|
2169
2470
|
```
|
|
2170
2471
|
USAGE
|
|
2171
|
-
$ sanity login [--open] [--provider <providerId>
|
|
2472
|
+
$ sanity login [--open] [--provider <providerId> | --sso <slug>]
|
|
2172
2473
|
|
|
2173
2474
|
FLAGS
|
|
2174
2475
|
--[no-]open Open a browser window to log in (`--no-open` only prints URL)
|
|
@@ -2192,7 +2493,7 @@ EXAMPLES
|
|
|
2192
2493
|
$ sanity login --provider github --no-open
|
|
2193
2494
|
```
|
|
2194
2495
|
|
|
2195
|
-
_See code: [src/commands/login.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2496
|
+
_See code: [src/commands/login.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/login.ts)_
|
|
2196
2497
|
|
|
2197
2498
|
## `sanity logout`
|
|
2198
2499
|
|
|
@@ -2206,7 +2507,7 @@ DESCRIPTION
|
|
|
2206
2507
|
Logs out the CLI from the current user session
|
|
2207
2508
|
```
|
|
2208
2509
|
|
|
2209
|
-
_See code: [src/commands/logout.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2510
|
+
_See code: [src/commands/logout.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/logout.ts)_
|
|
2210
2511
|
|
|
2211
2512
|
## `sanity manage`
|
|
2212
2513
|
|
|
@@ -2220,7 +2521,7 @@ DESCRIPTION
|
|
|
2220
2521
|
Opens project management interface in your web browser
|
|
2221
2522
|
```
|
|
2222
2523
|
|
|
2223
|
-
_See code: [src/commands/manage.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2524
|
+
_See code: [src/commands/manage.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/manage.ts)_
|
|
2224
2525
|
|
|
2225
2526
|
## `sanity manifest extract`
|
|
2226
2527
|
|
|
@@ -2231,7 +2532,7 @@ USAGE
|
|
|
2231
2532
|
$ sanity manifest extract [--path <value>]
|
|
2232
2533
|
|
|
2233
2534
|
FLAGS
|
|
2234
|
-
--path=<value> [default:
|
|
2535
|
+
--path=<value> [default: dist/static] Optional path to specify destination directory of the manifest files
|
|
2235
2536
|
|
|
2236
2537
|
DESCRIPTION
|
|
2237
2538
|
Extracts the studio configuration as one or more JSON manifest files.
|
|
@@ -2248,18 +2549,18 @@ EXAMPLES
|
|
|
2248
2549
|
$ sanity manifest extract --path /public/static
|
|
2249
2550
|
```
|
|
2250
2551
|
|
|
2251
|
-
_See code: [src/commands/manifest/extract.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2552
|
+
_See code: [src/commands/manifest/extract.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/manifest/extract.ts)_
|
|
2252
2553
|
|
|
2253
2554
|
## `sanity mcp configure`
|
|
2254
2555
|
|
|
2255
|
-
Configure Sanity MCP server for AI editors (Cursor,
|
|
2556
|
+
Configure Sanity MCP server for AI editors (Claude Code, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, VS Code)
|
|
2256
2557
|
|
|
2257
2558
|
```
|
|
2258
2559
|
USAGE
|
|
2259
2560
|
$ sanity mcp configure
|
|
2260
2561
|
|
|
2261
2562
|
DESCRIPTION
|
|
2262
|
-
Configure Sanity MCP server for AI editors (Cursor,
|
|
2563
|
+
Configure Sanity MCP server for AI editors (Claude Code, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, VS Code)
|
|
2263
2564
|
|
|
2264
2565
|
EXAMPLES
|
|
2265
2566
|
Configure Sanity MCP server for detected AI editors
|
|
@@ -2267,7 +2568,7 @@ EXAMPLES
|
|
|
2267
2568
|
$ sanity mcp configure
|
|
2268
2569
|
```
|
|
2269
2570
|
|
|
2270
|
-
_See code: [src/commands/mcp/configure.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2571
|
+
_See code: [src/commands/mcp/configure.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/mcp/configure.ts)_
|
|
2271
2572
|
|
|
2272
2573
|
## `sanity media create-aspect`
|
|
2273
2574
|
|
|
@@ -2286,7 +2587,7 @@ EXAMPLES
|
|
|
2286
2587
|
$ sanity media create-aspect
|
|
2287
2588
|
```
|
|
2288
2589
|
|
|
2289
|
-
_See code: [src/commands/media/create-aspect.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2590
|
+
_See code: [src/commands/media/create-aspect.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/media/create-aspect.ts)_
|
|
2290
2591
|
|
|
2291
2592
|
## `sanity media delete-aspect ASPECTNAME`
|
|
2292
2593
|
|
|
@@ -2294,7 +2595,7 @@ Undeploy an aspect
|
|
|
2294
2595
|
|
|
2295
2596
|
```
|
|
2296
2597
|
USAGE
|
|
2297
|
-
$ sanity media delete-aspect ASPECTNAME [--media-library-id <value>] [--yes]
|
|
2598
|
+
$ sanity media delete-aspect ASPECTNAME [-p <id>] [--media-library-id <value>] [--yes]
|
|
2298
2599
|
|
|
2299
2600
|
ARGUMENTS
|
|
2300
2601
|
ASPECTNAME Name of the aspect to delete
|
|
@@ -2303,6 +2604,9 @@ FLAGS
|
|
|
2303
2604
|
--media-library-id=<value> The id of the target media library
|
|
2304
2605
|
--yes Skip confirmation prompt
|
|
2305
2606
|
|
|
2607
|
+
OVERRIDE FLAGS
|
|
2608
|
+
-p, --project-id=<id> Project ID to delete media aspect from (overrides CLI configuration)
|
|
2609
|
+
|
|
2306
2610
|
DESCRIPTION
|
|
2307
2611
|
Undeploy an aspect
|
|
2308
2612
|
|
|
@@ -2312,7 +2616,7 @@ EXAMPLES
|
|
|
2312
2616
|
$ sanity media delete-aspect someAspect
|
|
2313
2617
|
```
|
|
2314
2618
|
|
|
2315
|
-
_See code: [src/commands/media/delete-aspect.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2619
|
+
_See code: [src/commands/media/delete-aspect.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/media/delete-aspect.ts)_
|
|
2316
2620
|
|
|
2317
2621
|
## `sanity media deploy-aspect [ASPECTNAME]`
|
|
2318
2622
|
|
|
@@ -2320,7 +2624,7 @@ Deploy an aspect
|
|
|
2320
2624
|
|
|
2321
2625
|
```
|
|
2322
2626
|
USAGE
|
|
2323
|
-
$ sanity media deploy-aspect [ASPECTNAME] [--all] [--media-library-id <value>]
|
|
2627
|
+
$ sanity media deploy-aspect [ASPECTNAME] [-p <id>] [--all] [--media-library-id <value>]
|
|
2324
2628
|
|
|
2325
2629
|
ARGUMENTS
|
|
2326
2630
|
[ASPECTNAME] Name of the aspect to deploy
|
|
@@ -2329,6 +2633,9 @@ FLAGS
|
|
|
2329
2633
|
--all Deploy all aspects
|
|
2330
2634
|
--media-library-id=<value> The id of the target media library
|
|
2331
2635
|
|
|
2636
|
+
OVERRIDE FLAGS
|
|
2637
|
+
-p, --project-id=<id> Project ID to deploy media aspect to (overrides CLI configuration)
|
|
2638
|
+
|
|
2332
2639
|
DESCRIPTION
|
|
2333
2640
|
Deploy an aspect
|
|
2334
2641
|
|
|
@@ -2342,7 +2649,7 @@ EXAMPLES
|
|
|
2342
2649
|
$ sanity media deploy-aspect --all
|
|
2343
2650
|
```
|
|
2344
2651
|
|
|
2345
|
-
_See code: [src/commands/media/deploy-aspect.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2652
|
+
_See code: [src/commands/media/deploy-aspect.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/media/deploy-aspect.ts)_
|
|
2346
2653
|
|
|
2347
2654
|
## `sanity media export [DESTINATION]`
|
|
2348
2655
|
|
|
@@ -2350,8 +2657,8 @@ Export an archive of all file and image assets including their aspect data from
|
|
|
2350
2657
|
|
|
2351
2658
|
```
|
|
2352
2659
|
USAGE
|
|
2353
|
-
$ sanity media export [DESTINATION] [--asset-concurrency <value>] [--media-library-id <value>]
|
|
2354
|
-
[--overwrite]
|
|
2660
|
+
$ sanity media export [DESTINATION] [-p <id>] [--asset-concurrency <value>] [--media-library-id <value>]
|
|
2661
|
+
[--no-compress] [--overwrite]
|
|
2355
2662
|
|
|
2356
2663
|
ARGUMENTS
|
|
2357
2664
|
[DESTINATION] Output destination file path
|
|
@@ -2362,6 +2669,9 @@ FLAGS
|
|
|
2362
2669
|
--no-compress Skips compressing tarball entries (still generates a gzip file)
|
|
2363
2670
|
--overwrite Overwrite any file with the same name
|
|
2364
2671
|
|
|
2672
|
+
OVERRIDE FLAGS
|
|
2673
|
+
-p, --project-id=<id> Project ID to export media from (overrides CLI configuration)
|
|
2674
|
+
|
|
2365
2675
|
DESCRIPTION
|
|
2366
2676
|
Export an archive of all file and image assets including their aspect data from the target media library. Video assets
|
|
2367
2677
|
are excluded from the export.
|
|
@@ -2380,7 +2690,7 @@ EXAMPLES
|
|
|
2380
2690
|
$ sanity media export --media-library-id my-library-id
|
|
2381
2691
|
```
|
|
2382
2692
|
|
|
2383
|
-
_See code: [src/commands/media/export.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2693
|
+
_See code: [src/commands/media/export.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/media/export.ts)_
|
|
2384
2694
|
|
|
2385
2695
|
## `sanity media import SOURCE`
|
|
2386
2696
|
|
|
@@ -2388,7 +2698,7 @@ Import a set of assets to the target media library.
|
|
|
2388
2698
|
|
|
2389
2699
|
```
|
|
2390
2700
|
USAGE
|
|
2391
|
-
$ sanity media import SOURCE [--media-library-id <value>] [--replace-aspects]
|
|
2701
|
+
$ sanity media import SOURCE [-p <id>] [--media-library-id <value>] [--replace-aspects]
|
|
2392
2702
|
|
|
2393
2703
|
ARGUMENTS
|
|
2394
2704
|
SOURCE Image file or folder to import from
|
|
@@ -2398,6 +2708,9 @@ FLAGS
|
|
|
2398
2708
|
--replace-aspects Replace existing aspect data. All versions will be replaced (e.g. published and draft
|
|
2399
2709
|
aspect data)
|
|
2400
2710
|
|
|
2711
|
+
OVERRIDE FLAGS
|
|
2712
|
+
-p, --project-id=<id> Project ID to import media to (overrides CLI configuration)
|
|
2713
|
+
|
|
2401
2714
|
DESCRIPTION
|
|
2402
2715
|
Import a set of assets to the target media library.
|
|
2403
2716
|
|
|
@@ -2415,7 +2728,7 @@ EXAMPLES
|
|
|
2415
2728
|
$ sanity media import products --replace-aspects
|
|
2416
2729
|
```
|
|
2417
2730
|
|
|
2418
|
-
_See code: [src/commands/media/import.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2731
|
+
_See code: [src/commands/media/import.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/media/import.ts)_
|
|
2419
2732
|
|
|
2420
2733
|
## `sanity migration create [TITLE]`
|
|
2421
2734
|
|
|
@@ -2441,7 +2754,7 @@ EXAMPLES
|
|
|
2441
2754
|
$ sanity migration create "Rename field from location to address"
|
|
2442
2755
|
```
|
|
2443
2756
|
|
|
2444
|
-
_See code: [@sanity/migrate](https://github.com/sanity-io/migrate/blob/
|
|
2757
|
+
_See code: [@sanity/migrate](https://github.com/sanity-io/migrate/blob/v6.0.0/src/commands/migration/create.ts)_
|
|
2445
2758
|
|
|
2446
2759
|
## `sanity migration list`
|
|
2447
2760
|
|
|
@@ -2460,7 +2773,7 @@ EXAMPLES
|
|
|
2460
2773
|
$ sanity migration list
|
|
2461
2774
|
```
|
|
2462
2775
|
|
|
2463
|
-
_See code: [@sanity/migrate](https://github.com/sanity-io/migrate/blob/
|
|
2776
|
+
_See code: [@sanity/migrate](https://github.com/sanity-io/migrate/blob/v6.0.0/src/commands/migration/list.ts)_
|
|
2464
2777
|
|
|
2465
2778
|
## `sanity migration run [ID]`
|
|
2466
2779
|
|
|
@@ -2504,7 +2817,7 @@ EXAMPLES
|
|
|
2504
2817
|
$ sanity migration run <id> --from-export=production.tar.gz --no-dry-run --project xyz --dataset staging
|
|
2505
2818
|
```
|
|
2506
2819
|
|
|
2507
|
-
_See code: [@sanity/migrate](https://github.com/sanity-io/migrate/blob/
|
|
2820
|
+
_See code: [@sanity/migrate](https://github.com/sanity-io/migrate/blob/v6.0.0/src/commands/migration/run.ts)_
|
|
2508
2821
|
|
|
2509
2822
|
## `sanity openapi get SLUG`
|
|
2510
2823
|
|
|
@@ -2543,7 +2856,7 @@ EXAMPLES
|
|
|
2543
2856
|
$ sanity openapi get query > query-api.yaml
|
|
2544
2857
|
```
|
|
2545
2858
|
|
|
2546
|
-
_See code: [src/commands/openapi/get.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2859
|
+
_See code: [src/commands/openapi/get.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/openapi/get.ts)_
|
|
2547
2860
|
|
|
2548
2861
|
## `sanity openapi list`
|
|
2549
2862
|
|
|
@@ -2574,7 +2887,7 @@ EXAMPLES
|
|
|
2574
2887
|
$ sanity openapi list --web
|
|
2575
2888
|
```
|
|
2576
2889
|
|
|
2577
|
-
_See code: [src/commands/openapi/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2890
|
+
_See code: [src/commands/openapi/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/openapi/list.ts)_
|
|
2578
2891
|
|
|
2579
2892
|
## `sanity preview [OUTPUTDIR]`
|
|
2580
2893
|
|
|
@@ -2594,9 +2907,6 @@ FLAGS
|
|
|
2594
2907
|
DESCRIPTION
|
|
2595
2908
|
Starts a server to preview a production build
|
|
2596
2909
|
|
|
2597
|
-
ALIASES
|
|
2598
|
-
$ sanity start
|
|
2599
|
-
|
|
2600
2910
|
EXAMPLES
|
|
2601
2911
|
$ sanity preview --host=0.0.0.0
|
|
2602
2912
|
|
|
@@ -2605,7 +2915,7 @@ EXAMPLES
|
|
|
2605
2915
|
$ sanity preview some/build-output-dir
|
|
2606
2916
|
```
|
|
2607
2917
|
|
|
2608
|
-
_See code: [src/commands/preview.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2918
|
+
_See code: [src/commands/preview.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/preview.ts)_
|
|
2609
2919
|
|
|
2610
2920
|
## `sanity projects create [PROJECTNAME]`
|
|
2611
2921
|
|
|
@@ -2653,7 +2963,7 @@ EXAMPLES
|
|
|
2653
2963
|
$ sanity projects create "CI Project" --yes --json
|
|
2654
2964
|
```
|
|
2655
2965
|
|
|
2656
|
-
_See code: [src/commands/projects/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2966
|
+
_See code: [src/commands/projects/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/projects/create.ts)_
|
|
2657
2967
|
|
|
2658
2968
|
## `sanity projects list`
|
|
2659
2969
|
|
|
@@ -2682,7 +2992,7 @@ EXAMPLES
|
|
|
2682
2992
|
$ sanity projects list --sort=members --order=asc
|
|
2683
2993
|
```
|
|
2684
2994
|
|
|
2685
|
-
_See code: [src/commands/projects/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2995
|
+
_See code: [src/commands/projects/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/projects/list.ts)_
|
|
2686
2996
|
|
|
2687
2997
|
## `sanity schema delete`
|
|
2688
2998
|
|
|
@@ -2690,14 +3000,15 @@ Delete schema documents by id
|
|
|
2690
3000
|
|
|
2691
3001
|
```
|
|
2692
3002
|
USAGE
|
|
2693
|
-
$ sanity schema delete --ids <value> [
|
|
3003
|
+
$ sanity schema delete --ids <value> [-p <id>] [-d <name>] [--verbose]
|
|
2694
3004
|
|
|
2695
3005
|
FLAGS
|
|
2696
|
-
--dataset=<
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
3006
|
+
-d, --dataset=<name> Delete schemas from a specific dataset
|
|
3007
|
+
--ids=<value> (required) Comma-separated list of schema ids to delete
|
|
3008
|
+
--verbose Enable verbose logging
|
|
3009
|
+
|
|
3010
|
+
OVERRIDE FLAGS
|
|
3011
|
+
-p, --project-id=<id> Project ID to delete schema from (overrides CLI configuration)
|
|
2701
3012
|
|
|
2702
3013
|
DESCRIPTION
|
|
2703
3014
|
Delete schema documents by id
|
|
@@ -2710,13 +3021,9 @@ EXAMPLES
|
|
|
2710
3021
|
Delete multiple schemas
|
|
2711
3022
|
|
|
2712
3023
|
$ sanity schema delete --ids sanity.workspace.schema.workspaceName,prefix.sanity.workspace.schema.otherWorkspace
|
|
2713
|
-
|
|
2714
|
-
Delete using a pre-existing manifest file (config changes in sanity.config will not be picked up)
|
|
2715
|
-
|
|
2716
|
-
$ sanity schema delete --no-extract-manifest --ids sanity.workspace.schema.workspaceName
|
|
2717
3024
|
```
|
|
2718
3025
|
|
|
2719
|
-
_See code: [src/commands/schema/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
3026
|
+
_See code: [src/commands/schema/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/schema/delete.ts)_
|
|
2720
3027
|
|
|
2721
3028
|
## `sanity schema deploy`
|
|
2722
3029
|
|
|
@@ -2750,13 +3057,9 @@ EXAMPLES
|
|
|
2750
3057
|
Deploy the schema for only the workspace "default"
|
|
2751
3058
|
|
|
2752
3059
|
$ sanity schema deploy --workspace default
|
|
2753
|
-
|
|
2754
|
-
Runs using a pre-existing manifest file. Config changes in sanity.config will not be picked up in this case.
|
|
2755
|
-
|
|
2756
|
-
$ sanity schema deploy --no-extract-manifest
|
|
2757
3060
|
```
|
|
2758
3061
|
|
|
2759
|
-
_See code: [src/commands/schema/deploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
3062
|
+
_See code: [src/commands/schema/deploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/schema/deploy.ts)_
|
|
2760
3063
|
|
|
2761
3064
|
## `sanity schema extract`
|
|
2762
3065
|
|
|
@@ -2764,14 +3067,17 @@ Extracts a JSON representation of a Sanity schema within a Studio context.
|
|
|
2764
3067
|
|
|
2765
3068
|
```
|
|
2766
3069
|
USAGE
|
|
2767
|
-
$ sanity schema extract [--enforce-required-fields] [--format <format>] [--path <value>] [--
|
|
3070
|
+
$ sanity schema extract [--enforce-required-fields] [--format <format>] [--path <value>] [--watch]
|
|
3071
|
+
[--watch-patterns <glob>...] [--workspace <name>]
|
|
2768
3072
|
|
|
2769
3073
|
FLAGS
|
|
2770
|
-
--enforce-required-fields
|
|
2771
|
-
--format=<format>
|
|
2772
|
-
|
|
2773
|
-
--path=<value>
|
|
2774
|
-
--
|
|
3074
|
+
--enforce-required-fields Makes the schema generated treat fields marked as required as non-optional
|
|
3075
|
+
--format=<format> [default: groq-type-nodes] Format the schema as GROQ type nodes. Only available format at
|
|
3076
|
+
the moment.
|
|
3077
|
+
--path=<value> Optional path to specify destination of the schema file
|
|
3078
|
+
--watch Enable watch mode to re-extract schema on file changes
|
|
3079
|
+
--watch-patterns=<glob>... Additional glob pattern(s) to watch (can be specified multiple times)
|
|
3080
|
+
--workspace=<name> The name of the workspace to generate a schema for
|
|
2775
3081
|
|
|
2776
3082
|
DESCRIPTION
|
|
2777
3083
|
Extracts a JSON representation of a Sanity schema within a Studio context.
|
|
@@ -2782,9 +3088,17 @@ EXAMPLES
|
|
|
2782
3088
|
Extracts schema types in a Sanity project with more than one workspace
|
|
2783
3089
|
|
|
2784
3090
|
$ sanity schema extract --workspace default
|
|
3091
|
+
|
|
3092
|
+
Watch mode - re-extract on changes
|
|
3093
|
+
|
|
3094
|
+
$ sanity schema extract --watch
|
|
3095
|
+
|
|
3096
|
+
Watch with custom glob patterns
|
|
3097
|
+
|
|
3098
|
+
$ sanity schema extract --watch --watch-patterns "lib/**/*.ts"
|
|
2785
3099
|
```
|
|
2786
3100
|
|
|
2787
|
-
_See code: [src/commands/schema/extract.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
3101
|
+
_See code: [src/commands/schema/extract.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/schema/extract.ts)_
|
|
2788
3102
|
|
|
2789
3103
|
## `sanity schema list`
|
|
2790
3104
|
|
|
@@ -2792,13 +3106,11 @@ Lists all schemas in the current dataset.
|
|
|
2792
3106
|
|
|
2793
3107
|
```
|
|
2794
3108
|
USAGE
|
|
2795
|
-
$ sanity schema list [--
|
|
3109
|
+
$ sanity schema list [--id <schema_id>] [--json]
|
|
2796
3110
|
|
|
2797
3111
|
FLAGS
|
|
2798
|
-
--
|
|
2799
|
-
--
|
|
2800
|
-
--json Get schema as json
|
|
2801
|
-
--manifest-dir=<directory> [default: ./dist/static] Directory containing manifest file
|
|
3112
|
+
--id=<schema_id> Fetch a single schema by id
|
|
3113
|
+
--json Get schema as json
|
|
2802
3114
|
|
|
2803
3115
|
DESCRIPTION
|
|
2804
3116
|
Lists all schemas in the current dataset.
|
|
@@ -2824,13 +3136,9 @@ EXAMPLES
|
|
|
2824
3136
|
Get singular stored schema as pretty-printed json-object
|
|
2825
3137
|
|
|
2826
3138
|
$ sanity schema list --json --id _.schemas.workspaceName
|
|
2827
|
-
|
|
2828
|
-
Runs using a pre-existing manifest file. Config changes in sanity.config will not be picked up in this case.
|
|
2829
|
-
|
|
2830
|
-
$ sanity schema list --no-extract-manifest
|
|
2831
3139
|
```
|
|
2832
3140
|
|
|
2833
|
-
_See code: [src/commands/schema/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
3141
|
+
_See code: [src/commands/schema/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/schema/list.ts)_
|
|
2834
3142
|
|
|
2835
3143
|
## `sanity schema validate`
|
|
2836
3144
|
|
|
@@ -2873,36 +3181,7 @@ EXAMPLES
|
|
|
2873
3181
|
$ sanity schema validate --debug-metafile-path metafile.json
|
|
2874
3182
|
```
|
|
2875
3183
|
|
|
2876
|
-
_See code: [src/commands/schema/validate.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
2877
|
-
|
|
2878
|
-
## `sanity start [OUTPUTDIR]`
|
|
2879
|
-
|
|
2880
|
-
Starts a server to preview a production build
|
|
2881
|
-
|
|
2882
|
-
```
|
|
2883
|
-
USAGE
|
|
2884
|
-
$ sanity start [OUTPUTDIR] [--host <value>] [--port <value>]
|
|
2885
|
-
|
|
2886
|
-
ARGUMENTS
|
|
2887
|
-
[OUTPUTDIR] Output directory
|
|
2888
|
-
|
|
2889
|
-
FLAGS
|
|
2890
|
-
--host=<value> [default: localhost] The local network interface at which to listen.
|
|
2891
|
-
--port=<value> [default: 3333] TCP port to start server on.
|
|
2892
|
-
|
|
2893
|
-
DESCRIPTION
|
|
2894
|
-
Starts a server to preview a production build
|
|
2895
|
-
|
|
2896
|
-
ALIASES
|
|
2897
|
-
$ sanity start
|
|
2898
|
-
|
|
2899
|
-
EXAMPLES
|
|
2900
|
-
$ sanity start --host=0.0.0.0
|
|
2901
|
-
|
|
2902
|
-
$ sanity start --port=1942
|
|
2903
|
-
|
|
2904
|
-
$ sanity start some/build-output-dir
|
|
2905
|
-
```
|
|
3184
|
+
_See code: [src/commands/schema/validate.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/schema/validate.ts)_
|
|
2906
3185
|
|
|
2907
3186
|
## `sanity telemetry disable`
|
|
2908
3187
|
|
|
@@ -2921,7 +3200,7 @@ EXAMPLES
|
|
|
2921
3200
|
$ sanity telemetry telemetry disable
|
|
2922
3201
|
```
|
|
2923
3202
|
|
|
2924
|
-
_See code: [src/commands/telemetry/disable.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
3203
|
+
_See code: [src/commands/telemetry/disable.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/telemetry/disable.ts)_
|
|
2925
3204
|
|
|
2926
3205
|
## `sanity telemetry enable`
|
|
2927
3206
|
|
|
@@ -2940,7 +3219,7 @@ EXAMPLES
|
|
|
2940
3219
|
$ sanity telemetry telemetry enable
|
|
2941
3220
|
```
|
|
2942
3221
|
|
|
2943
|
-
_See code: [src/commands/telemetry/enable.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
3222
|
+
_See code: [src/commands/telemetry/enable.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/telemetry/enable.ts)_
|
|
2944
3223
|
|
|
2945
3224
|
## `sanity telemetry status`
|
|
2946
3225
|
|
|
@@ -2959,7 +3238,7 @@ EXAMPLES
|
|
|
2959
3238
|
$ sanity telemetry telemetry status
|
|
2960
3239
|
```
|
|
2961
3240
|
|
|
2962
|
-
_See code: [src/commands/telemetry/status.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
3241
|
+
_See code: [src/commands/telemetry/status.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/telemetry/status.ts)_
|
|
2963
3242
|
|
|
2964
3243
|
## `sanity tokens add [LABEL]`
|
|
2965
3244
|
|
|
@@ -2967,7 +3246,7 @@ Create a new API token for this project
|
|
|
2967
3246
|
|
|
2968
3247
|
```
|
|
2969
3248
|
USAGE
|
|
2970
|
-
$ sanity tokens add [LABEL] [--json] [--role viewer] [-y]
|
|
3249
|
+
$ sanity tokens add [LABEL] [-p <id>] [--json] [--role viewer] [-y]
|
|
2971
3250
|
|
|
2972
3251
|
ARGUMENTS
|
|
2973
3252
|
[LABEL] Label for the new token
|
|
@@ -2977,6 +3256,9 @@ FLAGS
|
|
|
2977
3256
|
--json Output as JSON
|
|
2978
3257
|
--role=viewer Role to assign to the token
|
|
2979
3258
|
|
|
3259
|
+
OVERRIDE FLAGS
|
|
3260
|
+
-p, --project-id=<id> Project ID to add token to (overrides CLI configuration)
|
|
3261
|
+
|
|
2980
3262
|
DESCRIPTION
|
|
2981
3263
|
Create a new API token for this project
|
|
2982
3264
|
|
|
@@ -2996,9 +3278,13 @@ EXAMPLES
|
|
|
2996
3278
|
Output token information as JSON
|
|
2997
3279
|
|
|
2998
3280
|
$ sanity tokens add "API Token" --json
|
|
3281
|
+
|
|
3282
|
+
Create a token for a specific project
|
|
3283
|
+
|
|
3284
|
+
$ sanity tokens add "My Token" --project-id abc123 --role=editor
|
|
2999
3285
|
```
|
|
3000
3286
|
|
|
3001
|
-
_See code: [src/commands/tokens/add.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
3287
|
+
_See code: [src/commands/tokens/add.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/tokens/add.ts)_
|
|
3002
3288
|
|
|
3003
3289
|
## `sanity tokens delete [TOKENID]`
|
|
3004
3290
|
|
|
@@ -3006,7 +3292,7 @@ Delete an API token from this project
|
|
|
3006
3292
|
|
|
3007
3293
|
```
|
|
3008
3294
|
USAGE
|
|
3009
|
-
$ sanity tokens delete [TOKENID] [--yes]
|
|
3295
|
+
$ sanity tokens delete [TOKENID] [-p <id>] [--yes]
|
|
3010
3296
|
|
|
3011
3297
|
ARGUMENTS
|
|
3012
3298
|
[TOKENID] Token ID to delete (will prompt if not provided)
|
|
@@ -3014,6 +3300,9 @@ ARGUMENTS
|
|
|
3014
3300
|
FLAGS
|
|
3015
3301
|
--yes Skip confirmation prompt (unattended mode)
|
|
3016
3302
|
|
|
3303
|
+
OVERRIDE FLAGS
|
|
3304
|
+
-p, --project-id=<id> Project ID to delete token from (overrides CLI configuration)
|
|
3305
|
+
|
|
3017
3306
|
DESCRIPTION
|
|
3018
3307
|
Delete an API token from this project
|
|
3019
3308
|
|
|
@@ -3029,9 +3318,13 @@ EXAMPLES
|
|
|
3029
3318
|
Delete a specific token without confirmation prompt
|
|
3030
3319
|
|
|
3031
3320
|
$ sanity tokens delete silJ2lFmK6dONB --yes
|
|
3321
|
+
|
|
3322
|
+
Delete a token from a specific project
|
|
3323
|
+
|
|
3324
|
+
$ sanity tokens delete --project-id abc123
|
|
3032
3325
|
```
|
|
3033
3326
|
|
|
3034
|
-
_See code: [src/commands/tokens/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
3327
|
+
_See code: [src/commands/tokens/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/tokens/delete.ts)_
|
|
3035
3328
|
|
|
3036
3329
|
## `sanity tokens list`
|
|
3037
3330
|
|
|
@@ -3039,11 +3332,14 @@ List API tokens for the current project
|
|
|
3039
3332
|
|
|
3040
3333
|
```
|
|
3041
3334
|
USAGE
|
|
3042
|
-
$ sanity tokens list [--json]
|
|
3335
|
+
$ sanity tokens list [-p <id>] [--json]
|
|
3043
3336
|
|
|
3044
3337
|
FLAGS
|
|
3045
3338
|
--json Output tokens in JSON format
|
|
3046
3339
|
|
|
3340
|
+
OVERRIDE FLAGS
|
|
3341
|
+
-p, --project-id=<id> Project ID to list tokens for (overrides CLI configuration)
|
|
3342
|
+
|
|
3047
3343
|
DESCRIPTION
|
|
3048
3344
|
List API tokens for the current project
|
|
3049
3345
|
|
|
@@ -3055,13 +3351,17 @@ EXAMPLES
|
|
|
3055
3351
|
List tokens in JSON format
|
|
3056
3352
|
|
|
3057
3353
|
$ sanity tokens list --json
|
|
3354
|
+
|
|
3355
|
+
List tokens for a specific project
|
|
3356
|
+
|
|
3357
|
+
$ sanity tokens list --project-id abc123
|
|
3058
3358
|
```
|
|
3059
3359
|
|
|
3060
|
-
_See code: [src/commands/tokens/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
3360
|
+
_See code: [src/commands/tokens/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/tokens/list.ts)_
|
|
3061
3361
|
|
|
3062
3362
|
## `sanity typegen generate`
|
|
3063
3363
|
|
|
3064
|
-
Sanity TypeGen
|
|
3364
|
+
Sanity TypeGen
|
|
3065
3365
|
|
|
3066
3366
|
```
|
|
3067
3367
|
USAGE
|
|
@@ -3073,8 +3373,7 @@ FLAGS
|
|
|
3073
3373
|
--watch [Default: false] Run the typegen in watch mode
|
|
3074
3374
|
|
|
3075
3375
|
DESCRIPTION
|
|
3076
|
-
Sanity TypeGen
|
|
3077
|
-
This command is currently in beta and may undergo significant changes. Feedback is welcome!
|
|
3376
|
+
Sanity TypeGen
|
|
3078
3377
|
|
|
3079
3378
|
Configuration:
|
|
3080
3379
|
This command can utilize configuration settings defined in a `sanity-typegen.json` file. These settings include:
|
|
@@ -3096,8 +3395,6 @@ DESCRIPTION
|
|
|
3096
3395
|
Note:
|
|
3097
3396
|
- The `sanity schema extract` command is a prerequisite for extracting your Sanity Studio schema into a `schema.json`
|
|
3098
3397
|
file, which is then used by the `sanity typegen generate` command to generate type definitions.
|
|
3099
|
-
- While this tool is in beta, we encourage you to experiment with these configurations and provide feedback to help
|
|
3100
|
-
improve its functionality and usability.
|
|
3101
3398
|
|
|
3102
3399
|
EXAMPLES
|
|
3103
3400
|
Generate TypeScript type definitions from a Sanity Studio schema extracted using the `sanity schema extract`
|
|
@@ -3106,7 +3403,7 @@ EXAMPLES
|
|
|
3106
3403
|
$ sanity typegen generate
|
|
3107
3404
|
```
|
|
3108
3405
|
|
|
3109
|
-
_See code: [@sanity/codegen](https://github.com/sanity-io/codegen/blob/
|
|
3406
|
+
_See code: [@sanity/codegen](https://github.com/sanity-io/codegen/blob/v6.0.0/src/commands/typegen/generate.ts)_
|
|
3110
3407
|
|
|
3111
3408
|
## `sanity undeploy`
|
|
3112
3409
|
|
|
@@ -3123,7 +3420,7 @@ DESCRIPTION
|
|
|
3123
3420
|
Removes the deployed Sanity Studio/App from Sanity hosting
|
|
3124
3421
|
```
|
|
3125
3422
|
|
|
3126
|
-
_See code: [src/commands/undeploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
3423
|
+
_See code: [src/commands/undeploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/undeploy.ts)_
|
|
3127
3424
|
|
|
3128
3425
|
## `sanity users invite [EMAIL]`
|
|
3129
3426
|
|
|
@@ -3131,7 +3428,7 @@ Invite a new user to the project
|
|
|
3131
3428
|
|
|
3132
3429
|
```
|
|
3133
3430
|
USAGE
|
|
3134
|
-
$ sanity users invite [EMAIL] [--role <value>]
|
|
3431
|
+
$ sanity users invite [EMAIL] [-p <id>] [--role <value>]
|
|
3135
3432
|
|
|
3136
3433
|
ARGUMENTS
|
|
3137
3434
|
[EMAIL] Email address to invite
|
|
@@ -3139,6 +3436,9 @@ ARGUMENTS
|
|
|
3139
3436
|
FLAGS
|
|
3140
3437
|
--role=<value> Role to invite the user as
|
|
3141
3438
|
|
|
3439
|
+
OVERRIDE FLAGS
|
|
3440
|
+
-p, --project-id=<id> Project ID to invite user to (overrides CLI configuration)
|
|
3441
|
+
|
|
3142
3442
|
DESCRIPTION
|
|
3143
3443
|
Invite a new user to the project
|
|
3144
3444
|
|
|
@@ -3154,9 +3454,13 @@ EXAMPLES
|
|
|
3154
3454
|
Send a new user invite to the email "pippi@sanity.io", as administrator
|
|
3155
3455
|
|
|
3156
3456
|
$ sanity users invite pippi@sanity.io --role administrator
|
|
3457
|
+
|
|
3458
|
+
Invite a user to a specific project
|
|
3459
|
+
|
|
3460
|
+
$ sanity users invite pippi@sanity.io --project-id abc123
|
|
3157
3461
|
```
|
|
3158
3462
|
|
|
3159
|
-
_See code: [src/commands/users/invite.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
3463
|
+
_See code: [src/commands/users/invite.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/users/invite.ts)_
|
|
3160
3464
|
|
|
3161
3465
|
## `sanity users list`
|
|
3162
3466
|
|
|
@@ -3164,7 +3468,7 @@ List all users of the project
|
|
|
3164
3468
|
|
|
3165
3469
|
```
|
|
3166
3470
|
USAGE
|
|
3167
|
-
$ sanity users list [--invitations] [--order asc|desc] [--robots] [--sort id|name|role|date]
|
|
3471
|
+
$ sanity users list [-p <id>] [--invitations] [--order asc|desc] [--robots] [--sort id|name|role|date]
|
|
3168
3472
|
|
|
3169
3473
|
FLAGS
|
|
3170
3474
|
--[no-]invitations Includes or excludes pending invitations
|
|
@@ -3174,6 +3478,9 @@ FLAGS
|
|
|
3174
3478
|
--sort=<option> [default: date] Sort users by specified column
|
|
3175
3479
|
<options: id|name|role|date>
|
|
3176
3480
|
|
|
3481
|
+
OVERRIDE FLAGS
|
|
3482
|
+
-p, --project-id=<id> Project ID to list users for (overrides CLI configuration)
|
|
3483
|
+
|
|
3177
3484
|
DESCRIPTION
|
|
3178
3485
|
List all users of the project
|
|
3179
3486
|
|
|
@@ -3189,9 +3496,13 @@ EXAMPLES
|
|
|
3189
3496
|
List all users, sorted by role
|
|
3190
3497
|
|
|
3191
3498
|
$ sanity users list --sort role
|
|
3499
|
+
|
|
3500
|
+
List users for a specific project
|
|
3501
|
+
|
|
3502
|
+
$ sanity users list --project-id abc123
|
|
3192
3503
|
```
|
|
3193
3504
|
|
|
3194
|
-
_See code: [src/commands/users/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
3505
|
+
_See code: [src/commands/users/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/users/list.ts)_
|
|
3195
3506
|
|
|
3196
3507
|
## `sanity versions`
|
|
3197
3508
|
|
|
@@ -3208,6 +3519,6 @@ EXAMPLES
|
|
|
3208
3519
|
$ sanity versions
|
|
3209
3520
|
```
|
|
3210
3521
|
|
|
3211
|
-
_See code: [src/commands/versions.ts](https://github.com/sanity-io/cli/blob/v6.0.0
|
|
3522
|
+
_See code: [src/commands/versions.ts](https://github.com/sanity-io/cli/blob/v6.0.0/src/commands/versions.ts)_
|
|
3212
3523
|
|
|
3213
3524
|
<!-- commandsstop -->
|