Claude-skill-registry hcloud-cli
Use when interacting with Hetzner Cloud via command line - managing servers, networks, volumes, load balancers, firewalls, DNS, or any cloud infrastructure operations with hcloud CLI
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/hcloud-cli" ~/.claude/skills/majiayu000-claude-skill-registry-hcloud-cli && rm -rf "$T"
manifest:
skills/data/hcloud-cli/SKILL.mdsource content
Hetzner Cloud CLI (hcloud)
Overview
hcloud is the official CLI for Hetzner Cloud. Use it for quick operations, scripting, and CI/CD workflows. For complex automation or custom Go integrations, use the
hetzner:hcloud-go-sdk skill instead.
Quick Setup
# Install brew install hcloud # or: go install github.com/hetznercloud/cli/cmd/hcloud@latest # Authenticate hcloud context create myproject # Enter your API token when prompted (from https://console.hetzner.cloud)
See
references/configuration.md for multi-project and advanced setup.
Quick Reference
| Task | Command |
|---|---|
| Servers | |
| List servers | |
| Create server | |
| SSH to server | |
| Delete server | |
| Reboot/Reset | / |
| Networks | |
| Create network | |
| Attach server | |
| Volumes | |
| Create volume | |
| Attach volume | |
| Firewalls | |
| Create firewall | |
| Add rule | |
| Apply to server | |
| Load Balancers | |
| Create LB | |
| Add target | |
| SSH Keys | |
| Upload key | |
| DNS (Zones) | |
| List zones | |
| Create zone | |
Command Categories
See
references/commands.md for complete command reference:
- Servers (lifecycle, rescue, metrics, console)
- Networks, subnets, routes
- Volumes, storage boxes
- Firewalls and rules
- Load balancers, targets, services
- Floating IPs, primary IPs
- SSH keys, images, ISOs
- DNS zones and records
- Certificates, placement groups
Output Formats
# JSON output for scripting hcloud server list --output json | jq '.[] | select(.status == "running")' # YAML output hcloud server describe web --output yaml # Go template formatting hcloud server describe web --output format='{{.ServerType.Cores}} cores' # Table customization hcloud server list --output columns=id,name,status,ipv4 hcloud server list --output noheader
Context Management (Multi-Project)
# Create contexts for different projects/tokens hcloud context create production hcloud context create staging # Switch context hcloud context use production # List contexts hcloud context list
Common Patterns
# Create server with SSH key and private network hcloud server create \ --name web-01 \ --type cpx22 \ --image ubuntu-24.04 \ --ssh-key mykey \ --network private \ --location fsn1 # Create firewall with rules file hcloud firewall create --name web-fw --rules-file rules.json # Bulk server creation for i in {1..3}; do hcloud server create --name "node-$i" --type cx22 --image ubuntu-24.04 done # Wait for server to be running hcloud server create --name app --type cx22 --image ubuntu-24.04 while [[ $(hcloud server describe app -o format='{{.Status}}') != "running" ]]; do sleep 2 done
Common Mistakes
| Problem | Solution |
|---|---|
| "context not set" | Run and enter token |
| "resource not found" | Check - might be in different project |
| Token expired | Update with (same name replaces) |
| Wrong location | Use or or explicitly |
| Server unreachable | Check firewall rules, ensure SSH port 22 is open |
| Volume not visible | Use or mount manually via SSH |