Repository navigation
Releases: modexvpn/hcloud-ts
Release list
v1.4
v1.4.0 β SSH Key Support
MODEX SDK now supports full SSH Key management via the Hetzner Cloud API.
β¨ New Features
createSSHKey(options)β Create a new SSH keygetSSHKeys()β List all SSH keysgetSSHKey(id)β Get a single SSH key by IDupdateSSHKey(id, options)β Update an existing SSH keydeleteSSHKey(id)β Delete an SSH key
βοΈ Usage Examples
Create SSH Key
const sshKey = await hcloud.security.createSSHKey({
name: "modex-prod-key",
public_key: "ssh-ed25519 AAAAC3N...",
labels: { environment: "prod" }
})List SSH Keys
const allKeys = await hcloud.security.listSSHKeys()Get SSH Key by ID
const key = await hcloud.security.getSSHKey(12345)Update SSH Key
const updated = await hcloud.security.updateSSHKey(12345, {
name: "modex-updated-key",
labels: { updated: "true" }
})Delete SSH Key
await hcloud.security.deleteSSHKey(12345)Let us know if you need support for importing private keys or attaching SSH keys to servers during provisioning.
MODEX HCloud SDK Update v1.3
Modex HCloud SDK
A TypeScript SDK for interacting with the [Hetzner Cloud API](https://docs.hetzner.cloud/), designed for internal use by MODEX services. Built for performance, type-safety, and simplicity.
π Whatβs New in v1.3
β¨ Features
-
π
getDatacenter+getDatacenters- Fetch individual datacenter info
- Filter, sort, and paginate across datacenters
- Returns full
location+server_typessupport
-
π
sshIntoServer- Execute commands over SSH using
node-ssh - Automatically handles connection, command, and cleanup
- Can be used to provision servers post-creation
- Execute commands over SSH using
-
β
serverTypesfunctions have been moved tosdk/servers/server-type/- Cleaner structure
- Better grouping with related server actions
β Test Coverage
- Full integration tests for:
getLocation,getLocationsgetDatacenter,getDatacenterssshIntoServer(with mocks)
π Installation
npm install @modex/hcloudπ§ Usage
Get a Location
const location = await hcloud.locations.getById(1)
console.log(location.city) // "Nuremberg"List Datacenters
const { datacenters, meta } = await getDatacenters({ per_page: 10 })SSH Into Server
const { stdout } = await sshIntoServer("192.168.1.100", "apt update && apt upgrade -y", "root")
console.log(stdout)π‘ Requires
SSH_PRIVATE_KEYin your environment
π File Structure (partial)
sdk/
βββ locations/
β βββ datacenters/
β βββ getDatacenters.ts
β βββ getDatacenter.ts
βββ servers/
β βββ actions/
β β βββ sshIntoServer.ts
β βββ server-type/
β βββ getServerTypes.ts
β βββ getServerType.ts
β β
v1.2.0
@modexvpn/hcloud β v1.2.0
This marks the release of v1.2.0 of @modexvpn/hcloud β a Zod-powered, type-safe SDK for Hetzner Cloud.
π Whatβs New in 1.2.0
β Bug Fixes
- Fixed several functions where props were incorrectly typed as
stringwhen they should have beennumber. - These fixes bring better stability and developer experience when using the SDK.
πΊοΈ Locations Module Added
locations.list()β fetch a list of all locations.locations.getById(id)β fetch a single location by its ID.
π Runtime Type Safety with Zod
- Full Zod integration for all existing types.
- Both TypeScript and JavaScript consumers are now fully type- and runtime-safe.
- We'll continue converting more types and response schemas to Zod going forward.
π§ͺ Testing Coverage
- Tests have been introduced using Vitest.
- Previous versions shipped without proper tests β we acknowledge this and apologize for past rushed bug releases.
- All core functions will now be tested to their limit to prevent regressions and broken behavior.
π§ Development Philosophy Moving Forward
- Stability and correctness are now top priorities.
- Bugs will no longer be pushed without validation.
- Every function will be test-backed before release.
- We're planning NodeSSH integration for server commands and remote provisioning will be coming soon.
Looking Ahead
- β More API coverage across the Hetzner Cloud API
- β Continued Zod schema conversions
- β Increased testing coverage
- β Better DX and developer feedback loops
Weβre grateful for your patience and will continue improving the SDK each week. If you hit issues or want to contribute, open an issue or PR](https://github.com/modexvpn/hcloud)!
Thanks for using @modexvpn/hcloud β€οΈ
First Release
π v1.0.0 - First Release
Initial release of @modexvpn/hcloud
This version includes the core structure of a fully typed Hetzner Cloud SDK built with TypeScript and Axios.
β¨ Features
- βοΈ Modular API client using Axios
- π¦ List, create, delete, and power-control Hetzner servers
- π Fetch live CPU metrics per server
- π§Ό Centralized error handling
- β Fully type-safe with enums and interfaces
- π ESM & CJS support via
tsup
Published to npm
More API endpoints like SSH Keys, Images, and Firewalls are coming soon.