Hetzner Cloud SDK

hcloud-js

Hetzner Cloud, done right

A modern TypeScript SDK that manages your Hetzner Cloud infrastructure with full type safety and built-in validation – simple, secure, and intuitive.

npm install @nilovonjs/hcloud-js
Zero dependencies • MIT Licensed • Production ready
17+
API Endpoints
100%
Type Safe
0
Extra Dependencies

Powerful Features

Everything you need to build and manage your Hetzner Cloud infrastructure

Fully Typed

Complete TypeScript types for all API endpoints ensuring type safety and excellent IDE support with autocomplete.

Easy to Use

Simple, intuitive API following modern JavaScript/TypeScript patterns. Get started in minutes with comprehensive docs.

Validated

Built-in validation using Zod schemas. All responses and requests are validated to prevent runtime errors.

Complete Coverage

All Hetzner Cloud API endpoints supported: Servers, Networks, Load Balancers, DNS, and more.

Modern Stack

Built with Bun, TypeScript, and Zod. Works seamlessly in Node.js, Bun, and modern browsers.

Well Documented

Comprehensive documentation with examples for every API endpoint and feature. Always up to date.

Get Started in Seconds

Install the package and start managing your infrastructure

typescript
1import { HCloudClient } from '@nilovonjs/hcloud-js';
2
3const client = new HCloudClient({
4  token: 'your-api-token'
5});
6
7// List all servers
8const servers = await client.servers.list();
9console.log(`Found: ${servers.servers.length} servers`);
10
11// Get a specific server
12const server = await client.servers.get(12345);
13console.log(server.server.name);
14
15// Create a new server
16const newServer = await client.servers.create({
17  name: 'my-server',
18  server_type: 'cpx11',
19  image: 'ubuntu-22.04',
20  location: 'nbg1'
21});

Complete API Coverage

All Hetzner Cloud endpoints with full TypeScript support

Servers
Images
Actions
Certificates
SSH Keys
Locations
Firewalls
Floating IPs
ISOs
Placement Groups
Primary IPs
Server Types
Load Balancers
Networks
Pricing
Volumes
DNS Zones