Hetzner Cloud
Clanker supports querying and managing Hetzner Cloud infrastructure using the hcloud CLI.
Authentication
Hetzner Cloud authentication requires an API token.
Obtaining a token
- Log in to the Hetzner Cloud Console.
- Select your project.
- Navigate to Security > API Tokens.
- Generate a new token with Read or Read/Write permissions.
Configuration
Add your API token to ~/.clanker.yaml:
hetzner:
api_token: "abc123..."Alternatively, use an environment variable:
export HCLOUD_TOKEN="abc123..."Token resolution order
hetzner.api_tokenin the config fileHCLOUD_TOKENenvironment variable
Prerequisites
The hcloud CLI must be installed and available on your PATH:
# macOS
brew install hcloud
# Linux
# Download from https://github.com/hetznercloud/cli/releases
# Verify
hcloud versionClanker passes the API token to hcloud via the HCLOUD_TOKEN environment variable, so you do not need to configure hcloud separately.
Querying Hetzner
Explicit flag
clanker ask --hetzner "What servers are running?"Automatic routing
If your question mentions Hetzner-specific terms, Clanker routes to Hetzner automatically:
clanker ask "List my Hetzner cloud servers"Supported Services
Clanker queries Hetzner Cloud services through hcloud. Commonly queried resources include:
- Servers (virtual machines)
- Load Balancers
- Volumes
- Firewalls
- Networks (private networking)
- Floating IPs
- SSH Keys
- Images and Snapshots
- Placement Groups
Maker Pipeline
The maker feature supports Hetzner Cloud infrastructure provisioning:
# Generate a plan
clanker ask --maker --hetzner "Create a server called web-01 with type cx22 in fsn1"
# Apply the plan
clanker ask --apply --plan-file plan.jsonRetry Behavior
Clanker includes automatic retry logic for hcloud commands with backoff delays (200ms, 500ms, 1200ms) to handle transient API errors gracefully.