Hostodo CLI

Deploy, manage, and SSH into your VPS instances from the command line. Available for macOS, Linux, and Windows.

Quick Start

Get up and running in 3 commands:

# Install via Homebrew
brew install hostodo/tap/hostodo

# Login to your account
hostodo login

# List your instances and SSH in
hostodo list
hostodo ssh my-server

Installation

Homebrew (macOS & Linux)

The recommended way to install the Hostodo CLI:

# Add the Hostodo tap and install
brew tap hostodo/tap
brew install hostodo

# Or install directly
brew install hostodo/tap/hostodo

Download Pre-built Binary

Download binaries from the releases page. Available for macOS (Intel & Apple Silicon), Linux (amd64, arm64), and Windows (amd64).

# macOS (Apple Silicon)
curl -L https://github.com/hostodo/hostodo-cli/releases/latest/download/hostodo_Darwin_arm64.tar.gz | tar xz
sudo mv hostodo /usr/local/bin/

# Linux (amd64)
curl -L https://github.com/hostodo/hostodo-cli/releases/latest/download/hostodo_Linux_x86_64.tar.gz | tar xz
sudo mv hostodo /usr/local/bin/

Package Managers

# Debian / Ubuntu
wget https://github.com/hostodo/hostodo-cli/releases/latest/download/hostodo_Linux_x86_64.deb
sudo dpkg -i hostodo_Linux_x86_64.deb

# RHEL / CentOS / Fedora
wget https://github.com/hostodo/hostodo-cli/releases/latest/download/hostodo_Linux_x86_64.rpm
sudo rpm -i hostodo_Linux_x86_64.rpm

From Source

Requires Go 1.24 or higher:

git clone https://github.com/hostodo/hostodo-cli.git
cd hostodo-cli
make install

Authentication

The CLI uses OAuth device flow for secure authentication. When you run hostodo login, a browser window opens where you authorize the CLI with your Hostodo account. Your tokens are securely stored in the OS keychain (macOS Keychain, Linux Secret Service) with an encrypted file fallback.

Login

hostodo login

This opens your default browser to authorize the CLI. Once approved, you're authenticated and ready to go.

FlagDescription
--api-urlUse a custom API URL (default: https://api.hostodo.com)

Logout

Clear stored credentials:

hostodo logout

Current User

Display information about the authenticated user:

hostodo whoami

Active Sessions

View your active CLI sessions:

hostodo auth sessions

Security: Tokens are stored in the OS keychain, never in plain-text config files. The config file (~/.hostodo/config.json) only stores the API URL and device ID. File permissions are set to 0600 automatically.

Listing Instances

List all your VPS instances. Aliases: ls, ps.

# Interactive TUI (default)
hostodo list

# JSON output for scripting
hostodo list --json

# Simple ASCII table
hostodo list --simple

# Detailed view with all info
hostodo list --details
FlagDescription
--jsonOutput as JSON
--simpleOutput as simple ASCII table
--detailsShow detailed information
--limitMax instances to fetch (default: 100)
--offsetOffset for pagination (default: 0)

The default interactive TUI supports keyboard navigation:

Instance Status

Get detailed information about a specific instance:

hostodo status my-server
hostodo status my-server --json

Displays basic info, network configuration, resource allocation (RAM, CPU, disk, bandwidth), plan details, billing information, and timestamps.

Example output:

Instance: abc123 Hostname: server1.hostodo.com IP Address: 192.168.1.100 Status: provisioned Power: running Resources: 4096 MB RAM, 2 CPU, 50 GB Disk Bandwidth: 45.20 / 1000 GB Plan: Starter VPS Template: Ubuntu 22.04 Region: US-East Billing: $5.00 / monthly Next Due: 2025-12-08

Power Control

Start

Start a stopped instance. Waits up to 30 seconds for the instance to boot:

hostodo start my-server

Stop

Stop a running instance. Waits up to 60 seconds for graceful shutdown:

# Graceful shutdown
hostodo stop my-server

# Force immediate shutdown
hostodo stop my-server --force

Restart

Restart an instance. Waits up to 90 seconds:

# Graceful restart
hostodo restart my-server

# Force restart
hostodo restart my-server --force
FlagApplies ToDescription
-f, --forcestop, restartForce immediate shutdown without graceful stop

SSH Access

Connect to an instance via SSH. The CLI uses the system ssh binary and auto-detects the SSH user from the instance's OS template. If key-based auth fails and the instance has a default password, it automatically retries with sshpass.

# SSH with auto-detected user
hostodo ssh my-server

# Specify a different user
hostodo ssh my-server --user ubuntu
FlagDescription
-u, --userSSH user (default: auto-detected from OS template)

Hostname Resolution

All instance commands accept hostnames as the primary identifier. The CLI resolves hostnames using a three-step fallback:

  1. Exact match — Full hostname match (e.g., my-server)
  2. Prefix match — Unambiguous prefix (e.g., my-s resolves to my-server if unique)
  3. Instance ID fallback — Direct instance ID (e.g., ins::abc123)

Tab completion for hostnames is available when shell completions are enabled.

Deploy Instances

Deploy a new VPS instance with an interactive wizard or by passing flags. Aliases: new, create.

Interactive Mode

Run hostodo deploy without flags for a guided experience. The wizard walks you through selecting an OS template, region, plan, hostname, and optional SSH key.

hostodo deploy

Non-interactive Mode

Skip prompts by passing flags:

# Deploy with specific options
hostodo deploy --os "Ubuntu 22.04" --region "Los Angeles" --plan KVM-2G

# Custom hostname
hostodo deploy --hostname my-server

# Skip confirmation
hostodo deploy --os "Ubuntu 22.04" --region "Los Angeles" --plan KVM-2G --yes

# JSON output (requires --os, --region, --plan)
hostodo deploy --os "Ubuntu 22.04" --region "Los Angeles" --plan KVM-2G --json
FlagDescription
--osOS template name (skips OS prompt)
--regionRegion name (skips region prompt)
--planPlan name (skips plan prompt)
--hostnameCustom hostname (skips auto-generation)
--ssh-keySSH key name to use for authentication
-y, --yesSkip confirmation prompt
--jsonJSON output (requires --os, --region, --plan)

Invoices

List your invoices with optional filtering. Alias: bills.

# List all invoices
hostodo invoices

# Show only unpaid invoices
hostodo invoices --status=unpaid
FlagDescription
--statusFilter by status (e.g., unpaid)

Pay Invoice

Pay an invoice by its ID:

hostodo pay INV-12345

SSH Key Management

List Keys

hostodo keys list

Add a Key

# Add key inline
hostodo keys add mykey "ssh-rsa AAAAB3NzaC1yc2EAAA... user@host"

# Add key from file
hostodo keys add mykey --file ~/.ssh/id_rsa.pub
FlagDescription
-f, --fileRead public key from file

Remove a Key

hostodo keys remove mykey

Output Formats

Commands that display data support multiple output modes:

Interactive TUI (default)

A keyboard-navigable, color-coded table that adapts to your terminal size. Use arrow keys or j/k to navigate, Enter to view details.

JSON (--json)

Structured JSON output, perfect for scripting and piping to tools like jq:

# Get running instances as JSON
hostodo list --json | jq '.[] | select(.status == "running")'

Simple Table (--simple)

Clean ASCII table for quick viewing or piping:

ID HOSTNAME IP ADDRESS STATUS POWER RAM (MB) CPU DISK (GB) abc123 server1.hostodo.com 192.168.1.100 provisioned running 4096 2 50 def456 server2.hostodo.com 192.168.1.101 provisioned stopped 2048 1 25

Detailed View (--details)

Comprehensive, human-readable output per instance:

Instance: abc123 Hostname: server1.hostodo.com IP Address: 192.168.1.100 Status: provisioned Power: running Resources: 4096 MB RAM, 2 CPU, 50 GB Disk Bandwidth: 45.20 / 1000 GB Plan: Starter VPS Template: Ubuntu 22.04 Region: US-East Billing: $5.00 / monthly Next Due: 2025-12-08

Configuration

Config File

Configuration is stored at ~/.hostodo/config.json:

{
  "api_url": "https://api.hostodo.com",
  "device_id": "a1b2c3d4-..."
}

Access tokens are stored separately in the OS keychain, with an AES-encrypted file fallback at ~/.hostodo/token.enc when no keychain is available.

Permissions: Config file permissions are automatically set to 0600 (owner read/write only) and directory permissions to 0700.

Environment Variables

VariableDescription
HOSTODO_API_URLOverride the default API URL
HOMEUsed to locate the config directory
# Use a custom API endpoint
export HOSTODO_API_URL=https://custom-api.example.com
hostodo login

Shell Completion

Generate completion scripts for your shell. This enables tab-completion for commands and hostnames.

# Bash
hostodo completion bash > /etc/bash_completion.d/hostodo

# Zsh
hostodo completion zsh > "${fpath[1]}/_hostodo"

# Fish
hostodo completion fish > ~/.config/fish/completions/hostodo.fish

Global Flags

All commands support these flags:

FlagDescription
--api-urlAPI URL (default: https://api.hostodo.com or $HOSTODO_API_URL)
--configConfig file path (default: $HOME/.hostodo/config.json)
-h, --helpShow help for any command
-v, --versionShow CLI version