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/cliOr run directly with npx:
npx @buildspacestudio/cli --helpCommands
| Command | Description |
|---|---|
buildspace auth | Login and manage personal access tokens |
buildspace app | Create apps, choose the active app, and manage hosting |
buildspace init | Clone a Buildspace app repository |
buildspace deploy | Push code and check deployment status |
buildspace env | Manage environment variables |
buildspace config | Configure 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 deploybuildspace 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:
--app <slug>flag (highest priority)- Git remote
originURL (parses the slug from the repo URL) - 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.