# Hetzner Cloud CLI
> Manage Hetzner Cloud resources from the command line

## Summary
Official Hetzner Cloud CLI for managing servers, volumes, networks, firewalls, load balancers, and other cloud resources from the terminal.

## Capabilities
- Create, list, and manage cloud servers
- Manage volumes, snapshots, and backups
- Configure networks, subnets, and firewalls
- Manage SSH keys and server access
- Create and manage load balancers
- Output in JSON or table format for scripting

## When to Use
- Managing Hetzner Cloud infrastructure from the terminal
- Scripting server provisioning and teardown workflows
- Need quick server creation without the web console
- Automating Hetzner Cloud operations in CI/CD

## When NOT to Use
- Not using Hetzner Cloud as your provider
- Need multi-cloud infrastructure management (use Pulumi or Terraform)
- Want a graphical interface for cloud management

## Key Flags
- `server create`: Create a new cloud server
- `server list`: List all servers
- `server ssh`: SSH into a server
- `volume create`: Create a new volume
- `firewall create`: Create a new firewall
- `context create`: Create a new context for API token management

## Usage Patterns
### Create a new server
```
hcloud server create --name my-server --type cx22 --image ubuntu-24.04 --ssh-key my-key
```
Creates a CX22 server with Ubuntu 24.04 and an SSH key

### List all servers with details
```
hcloud server list -o columns=id,name,status,ipv4
```
Lists servers showing only selected columns

### SSH into a server
```
hcloud server ssh my-server
```
Opens an SSH connection to the named server

### Create a snapshot
```
hcloud server create-image --type snapshot my-server
```
Creates a snapshot of the specified server

## Input / Output
- **stdin**: Accepts interactive input for context setup and confirmations
- **stdout**: Resource listings, server details, and operation results
- **stderr**: Error messages and API errors

## Installation
- **homebrew**: `brew install hcloud`

## Related Tools
- [vultr-cli](/tools/vultr-cli) (alternative): Vultr CLI manages a competing cloud provider with similar features
- [linode-cli](/tools/linode-cli) (alternative): Linode CLI manages Akamai/Linode cloud resources
- [pulumi](/tools/pulumi) (complementary): Pulumi can manage Hetzner resources via its provider for infrastructure as code

---
Source: https://littlescripts.sh/tools/hcloud
