CLI & APICommand reference
stackblaze previews
Manage a project's preview environments (per-branch preview apps)
Usage: stackblaze previews|preview [options] [command]
Manage a project's preview environments (per-branch preview apps)
Options:
-h, --help Print help
Commands:
list [options] List the project's preview apps (-e narrows to
one environment)
delete|rm [options] <name> Delete a preview app and its cloned add-ons (-e
when the name exists in several environments)
enable [options] Turn preview environments on for the project
(pull requests create previews)
disable [options] Turn preview environments off for the project
(existing previews keep running)
help [command] Print this message or the help of the given
subcommand(s)previews list
Usage: stackblaze previews list [options]
List the project's preview apps (-e narrows to one environment)
Options:
--api-url <url> StackBlaze API base URL (env STACKBLAZE_API_URL)
--token <token> API token, sb_pat_... (env STACKBLAZE_TOKEN)
-p, --project <name> Project name
-e, --env <name> Environment name (default: production)
-a, --app <name> App name
--json Output JSON (same as -o json) (default: false)
-o, --output <format> Output format: text or json (choices: "text", "json")
-h, --help Print helpExample
List a project's preview apps, here narrowed to one environment. This project has none yet:
stackblaze previews list -p github-demo-gv35 -e devNo preview environments in project github-demo-gv35 (environment dev).In a script, --json prints an empty list:
stackblaze previews list -p github-demo-gv35 --json[]previews delete
Usage: stackblaze previews delete|rm [options] <name>
Delete a preview app and its cloned add-ons (-e when the name exists in several
environments)
Options:
--api-url <url> StackBlaze API base URL (env STACKBLAZE_API_URL)
--token <token> API token, sb_pat_... (env STACKBLAZE_TOKEN)
-p, --project <name> Project name
-e, --env <name> Environment name (default: production)
-a, --app <name> App name
--json Output JSON (same as -o json) (default: false)
-y, --yes Skip confirmation prompt (default: false)
-o, --output <format> Output format: text or json (choices: "text", "json")
-h, --help Print helppreviews enable
Usage: stackblaze previews enable [options]
Turn preview environments on for the project (pull requests create previews)
Options:
--api-url <url> StackBlaze API base URL (env STACKBLAZE_API_URL)
--token <token> API token, sb_pat_... (env STACKBLAZE_TOKEN)
-p, --project <name> Project name
-e, --env <name> Environment name (default: production)
-a, --app <name> App name
--json Output JSON (same as -o json) (default: false)
--source-app <app> Preview only this app (default: every app that deploys
from the PR repository)
-o, --output <format> Output format: text or json (choices: "text", "json")
-h, --help Print helppreviews disable
Usage: stackblaze previews disable [options]
Turn preview environments off for the project (existing previews keep running)
Options:
--api-url <url> StackBlaze API base URL (env STACKBLAZE_API_URL)
--token <token> API token, sb_pat_... (env STACKBLAZE_TOKEN)
-p, --project <name> Project name
-e, --env <name> Environment name (default: production)
-a, --app <name> App name
--json Output JSON (same as -o json) (default: false)
-o, --output <format> Output format: text or json (choices: "text", "json")
-h, --help Print helpExample
Stop pull requests from creating new previews in a project. Previews that already exist keep running:
stackblaze previews disable -p github-demo-cw8zOK Preview environments are off for project github-demo-cw8z
Existing previews keep running until their pull request closes or you delete them.