hcloud-js
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
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