Skip to main content

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

CommandDescription
szc authAuthentication management
szc database / szc dbDatabase instances (PostgreSQL, MySQL, MongoDB, Redis)
szc namespace / szc nsKubernetes namespaces
szc storageObject storage buckets
szc registryContainer registries

Messaging & Data

CommandDescription
szc kafkaApache Kafka clusters and topics
szc nfsNetwork File System shares
szc backupBackups and backup policies

Networking & Security

CommandDescription
szc vpcVirtual Private Clouds
szc vaultVault clusters and secrets
szc secretSecret management

Infrastructure as Code

CommandDescription
szc stackStacks IaC deployments

Management

CommandDescription
szc apikeyAPI key management
szc integrationThird-party integrations
szc projectProject organization
szc organization / szc orgOrganization and team management
szc billingBilling and subscriptions
szc logsView 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-exists for 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.