CLI
Your stack, from the terminal.
Deploy and operate StackBlaze apps from your terminal and from CI. Ship a repo, an image, or a folder, follow the build, and manage everything after with the same access you have in the dashboard.
stackblaze up
Install
One command to install
A single binary for macOS, Linux, and Windows. Pick your platform, then sign in from the terminal.
curl -fsSL https://stackblaze.com/install.sh | shInstalls a standalone binary to ~/.local/bin. No Node.js needed. Update later with stackblaze upgrade.
Quick start
From folder to live app
Run these from your project folder. init links the folder, so every command after it knows which app you mean.
stackblaze login # one-click sign-in in your browser
stackblaze init # create a project and link this folder
stackblaze up # deploy it and stream the build
stackblaze logs -f # follow the app's logs
stackblaze open # open the app in the dashboard- stackblaze up
- In a git checkout, builds the repo and branch you pushed.
- stackblaze up --local
- Uploads the folder and builds it. No git remote needed.
- stackblaze up --image nginx --tag 1.27
- Runs a Docker image as is.
What it does
Everything after the first deploy
The CLI talks to the same API as the dashboard, so it can do exactly what your account or token is allowed to do.
Deploy anything
A git repo, a Docker image, or a plain folder. Run up again to ship the next change.
$ stackblaze upLive build logs
Build output streams to your terminal as it is written, and the command fails if the build does.
$ stackblaze builds logs -fVariables, done safely
Values are masked by default. Pipe secrets in with --stdin, edit everything in $EDITOR, or stage changes and ship them together.
$ stackblaze variables editScale and autoscale
Set replicas for web and worker processes, or let them autoscale between a minimum and a maximum.
$ stackblaze scale --autoscale web=2:5Pause and resume
Stop an app without deleting it. Compute stops billing while volumes and add-ons keep running. Bring it back with resume.
$ stackblaze downPrivate database shell
Open psql, mysql, or redis-cli on your machine through a private tunnel. The database never goes public.
$ stackblaze connect --localCustom domains
Add a domain, get the DNS records to create, and wait until HTTPS is live.
$ stackblaze domain add www.example.com --waitRoll back any deploy
Pick a deploy from the history, or go back to the previous good one.
$ stackblaze deployments rollbackShell into your app
An interactive shell in a running instance of your app, over the API. No SSH keys, no open ports.
$ stackblaze sshInfrastructure as Code
Export projects as manifests, preview changes, then apply them. Opt-in, so check status first.
$ stackblaze plan ./stackblazeBuilt for coding agents
One command installs StackBlaze skills and the MCP server for Cursor and Claude Code.
$ stackblaze setup agent -yMade for scripts
Add --json for machine-readable output on stdout, and rely on clear exit codes for auth, API, and deploy failures.
$ stackblaze apps list --jsonCI
Deploy from GitHub Actions
Save an API token as the STACKBLAZE_TOKEN secret, and stackblaze up --ci --wait deploys on every push. It is safe to re-run: the first run creates the app, later runs update it.
- Builds the exact commit that triggered the run, not whatever is newest on the branch.
- Streams the build as one JSON record per line, and fails the job when the build fails.
- With --wait, the step only passes once the new version is running.
Exit codes
- 0
- Success
- 1
- Failed build or deploy, app not ready, or a usage error
- 2
- Missing or rejected credentials
- 3
- API or network error
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
env:
STACKBLAZE_API_URL: https://api.stackblaze.cloud
STACKBLAZE_TOKEN: ${{ secrets.STACKBLAZE_TOKEN }}
STACKBLAZE_PIPELINE: my-project
STACKBLAZE_PHASE: production
STACKBLAZE_APP: web
steps:
- uses: actions/checkout@v4
- name: Install StackBlaze CLI
run: |
curl -fsSL https://stackblaze.com/install.sh | sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Deploy
run: stackblaze up --ci --waitCreate the token in the dashboard under Settings, API tokens. If the app already deploys on push from GitHub, you do not need this workflow.
Ship from your terminal
Create a free account, install the CLI, and run stackblaze up.