Buildspace
CLI

CLI Overview

Install the Buildspace CLI, use the buildspace command, and manage your app lifecycle from the terminal.

The Buildspace CLI gives you a single terminal entrypoint for Buildspace app creation, local setup, deployment, and environment management.

Installation

npm install -g @buildspacestudio/cli

Or run directly with npx:

npx @buildspacestudio/cli --help

Commands

CommandDescription
buildspace authLogin and manage personal access tokens
buildspace appCreate apps, choose the active app, and manage hosting
buildspace initClone a Buildspace app repository
buildspace deployPush code and check deployment status
buildspace envManage environment variables
buildspace configConfigure CLI settings

Default Flow

npm install -g @buildspacestudio/cli

buildspace auth login

buildspace app create --name "My App"

# note the generated slug from the create command output
buildspace init --app <generated-slug>
cd <generated-slug>
bun install

# Make changes, commit them, then deploy
buildspace deploy

buildspace app ... is the main app-management surface. Use it to create apps, select the active app, and inspect hosting state.

When you create an app without --slug, Buildspace generates one for you from the app name and adds a short suffix automatically if needed to avoid collisions.

See App Lifecycle for the full install -> auth -> create -> init -> develop -> deploy walkthrough.

App Resolution

Many commands need to know which app to target. The CLI resolves the app in this order:

  1. --app <slug> flag (highest priority)
  2. Git remote origin URL (parses the slug from the repo URL)
  3. Active app set via buildspace app use <slug>

Machine-Readable Output

All key commands support a --json flag for machine-readable JSON output. This is useful for scripting and LLM integrations. See JSON Output for details.

On this page