Docs/ CLI/ Installation

Installation

Install, authenticate, and configure the sh0 CLI.

Install Script

The recommended way to install. The script detects your OS and architecture, downloads the correct binary from GitHub Releases, and places it in /usr/local/bin/sh0.

Install
curl -fsSL https://get.sh0.dev | bash

After installation, verify with:

Verify
sh0 --version

Manual Download

Download the binary directly from the download page or from GitHub Releases:

Manual install (Linux x64)
curl -Lo sh0 https://github.com/zerosuite-inc/sh0/releases/latest/download/sh0-linux-x86_64
chmod +x sh0
sudo mv sh0 /usr/local/bin/

Available binary names:

  • sh0-linux-x86_64
  • sh0-linux-aarch64
  • sh0-darwin-x86_64
  • sh0-darwin-aarch64

Supported Platforms

OSArchitectureStatus
Linuxx86_64Supported
Linuxaarch64 (ARM64)Supported
macOSx86_64 (Intel)Supported
macOSaarch64 (Apple Silicon)Supported

Authentication

The CLI supports two authentication methods. Use interactive login for local development and environment variables for CI/CD.

sh0 login

Interactive login prompts for your server URL, email, and password. The session token is stored in ~/.sh0/config.toml.

Interactive login
sh0 login --url https://panel.example.com

If you omit --url, the CLI uses the URL from your existing config or defaults to http://localhost:9000.

Environment Variables

For CI/CD and automation, set these environment variables. They take precedence over config.toml.

CI/CD credentials
export SH0_API_URL="https://panel.example.com"
export SH0_API_TOKEN="sh0_tok_..."
Tip
In GitHub Actions, store these as repository secrets and reference them in your workflow file.

Config File

The CLI stores configuration in ~/.sh0/config.toml. This file is created automatically by sh0 login.

~/.sh0/config.toml
api_url = "https://panel.example.com"
token = "sh0_tok_..."
default_app = "myapi"
output = "table"  # or "json"

All fields are optional except api_url and token. The default_app lets you omit the app name in commands like sh0 logs.

Verify Installation

After installing and authenticating, verify everything works:

Verify
sh0 whoami

Expected output:

Output
Server:  https://panel.example.com
User:    [email protected]
Role:    admin
Warning
The config file contains your authentication token. It is created with 600 permissions (owner read/write only). Do not commit it to version control.