Skip to content

Releases: modexvpn/hcloud-ts

v1.4

Choose a tag to compare

@TahierJerr TahierJerr released this 24 Apr 07:24

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 key
  • getSSHKeys() β€” List all SSH keys
  • getSSHKey(id) β€” Get a single SSH key by ID
  • updateSSHKey(id, options) β€” Update an existing SSH key
  • deleteSSHKey(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

Choose a tag to compare

@TahierJerr TahierJerr released this 22 Apr 13:56

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_types support
  • πŸ†• sshIntoServer

    • Execute commands over SSH using node-ssh
    • Automatically handles connection, command, and cleanup
    • Can be used to provision servers post-creation
  • β†’ serverTypes functions have been moved to sdk/servers/server-type/

    • Cleaner structure
    • Better grouping with related server actions

βœ… Test Coverage

  • Full integration tests for:
    • getLocation, getLocations
    • getDatacenter, getDatacenters
    • sshIntoServer (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_KEY in 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

Choose a tag to compare

@TahierJerr TahierJerr released this 15 Apr 22:54

@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 string when they should have been number.
  • 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

Choose a tag to compare

@TahierJerr TahierJerr released this 10 Apr 20:39

πŸŽ‰ 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.