Deploy, manage, and SSH into your VPS instances from the command line. Available for macOS, Linux, and Windows.
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
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 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/
# 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
Requires Go 1.24 or higher:
git clone https://github.com/hostodo/hostodo-cli.git
cd hostodo-cli
make install
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.
hostodo login
This opens your default browser to authorize the CLI. Once approved, you're authenticated and ready to go.
| Flag | Description |
|---|---|
--api-url | Use a custom API URL (default: https://api.hostodo.com) |
Clear stored credentials:
hostodo logout
Display information about the authenticated user:
hostodo whoami
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.
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
| Flag | Description |
|---|---|
--json | Output as JSON |
--simple | Output as simple ASCII table |
--details | Show detailed information |
--limit | Max instances to fetch (default: 100) |
--offset | Offset for pagination (default: 0) |
The default interactive TUI supports keyboard navigation:
↑ / ↓ or j / k — Navigate through instancesEnter — View detailed instance informationq or Esc — QuitGet 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:
Start a stopped instance. Waits up to 30 seconds for the instance to boot:
hostodo start my-server
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 an instance. Waits up to 90 seconds:
# Graceful restart
hostodo restart my-server
# Force restart
hostodo restart my-server --force
| Flag | Applies To | Description |
|---|---|---|
-f, --force | stop, restart | Force immediate shutdown without graceful stop |
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
| Flag | Description |
|---|---|
-u, --user | SSH user (default: auto-detected from OS template) |
All instance commands accept hostnames as the primary identifier. The CLI resolves hostnames using a three-step fallback:
my-server)my-s resolves to my-server if unique)ins::abc123)Tab completion for hostnames is available when shell completions are enabled.
Deploy a new VPS instance with an interactive wizard or by passing flags. Aliases: new, create.
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
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
| Flag | Description |
|---|---|
--os | OS template name (skips OS prompt) |
--region | Region name (skips region prompt) |
--plan | Plan name (skips plan prompt) |
--hostname | Custom hostname (skips auto-generation) |
--ssh-key | SSH key name to use for authentication |
-y, --yes | Skip confirmation prompt |
--json | JSON output (requires --os, --region, --plan) |
List your invoices with optional filtering. Alias: bills.
# List all invoices
hostodo invoices
# Show only unpaid invoices
hostodo invoices --status=unpaid
| Flag | Description |
|---|---|
--status | Filter by status (e.g., unpaid) |
Pay an invoice by its ID:
hostodo pay INV-12345
hostodo keys list
# 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
| Flag | Description |
|---|---|
-f, --file | Read public key from file |
hostodo keys remove mykey
Commands that display data support multiple output modes:
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)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)Clean ASCII table for quick viewing or piping:
--details)Comprehensive, human-readable output per instance:
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.
| Variable | Description |
|---|---|
HOSTODO_API_URL | Override the default API URL |
HOME | Used to locate the config directory |
# Use a custom API endpoint
export HOSTODO_API_URL=https://custom-api.example.com
hostodo login
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
All commands support these flags:
| Flag | Description |
|---|---|
--api-url | API URL (default: https://api.hostodo.com or $HOSTODO_API_URL) |
--config | Config file path (default: $HOME/.hostodo/config.json) |
-h, --help | Show help for any command |
-v, --version | Show CLI version |