CLI Overview
The szc command-line interface lets you manage Sparbz Cloud resources from your terminal.
Installation
macOS / Linux
curl -fsSL https://get.sparbz.cloud | sh
Windows (PowerShell)
irm https://get.sparbz.cloud/win | iex
Homebrew
brew install sparbz/tap/szc
Manual Download
Download binaries from releases.sparbz.cloud.
Authentication
# Interactive login (opens browser)
szc auth login
# Login with API key
szc auth login --api-key YOUR_API_KEY
# Check current user
szc auth whoami
# Logout
szc auth logout
Configuration
The CLI stores configuration in ~/.szc/config.yaml.
# Set default organization
szc config set organization my-org
# Set default output format
szc config set output json
# View config
szc config list
Output Formats
# Table (default)
szc database list
# JSON
szc database list --output json
# YAML
szc database list --output yaml
# JSON with field selection
szc database list --json id,name,status
Common Commands
Core Resources
| Command | Description |
|---|---|
szc auth | Authentication management |
szc database / szc db | Database instances (PostgreSQL, MySQL, MongoDB, Redis) |
szc namespace / szc ns | Kubernetes namespaces |
szc storage | Object storage buckets |
szc registry | Container registries |
Messaging & Data
| Command | Description |
|---|---|
szc kafka | Apache Kafka clusters and topics |
szc nfs | Network File System shares |
szc backup | Backups and backup policies |
Networking & Security
| Command | Description |
|---|---|
szc vpc | Virtual Private Clouds |
szc vault | Vault clusters and secrets |
szc secret | Secret management |
Infrastructure as Code
| Command | Description |
|---|---|
szc stack | Stacks IaC deployments |
Management
| Command | Description |
|---|---|
szc apikey | API key management |
szc integration | Third-party integrations |
szc project | Project organization |
szc organization / szc org | Organization and team management |
szc billing | Billing and subscriptions |
szc logs | View resource logs |
Help
# General help
szc help
# Command help
szc database --help
szc database create --help
Shell Completions
# Bash
szc completion bash > /etc/bash_completion.d/szc
# Zsh
szc completion zsh > "${fpath[1]}/_szc"
# Fish
szc completion fish > ~/.config/fish/completions/szc.fish
Agent-Friendly Features
The CLI is designed to work well with automation and AI agents:
- Idempotent operations: Use
--if-not-existsfor safe retries - Dry run mode: Preview changes with
--dry-run - JSON field selection: Extract specific fields with
--json id,name - Batch operations: Process multiple resources with
--batch - Watch mode: Monitor long-running operations with
--watch - Structured exit codes: Programmatic error handling
See the Commands Reference for full details.