Type safety
Full PHP 8.2+ types on requests and responses, so an IDE can tell you what came back.
[ OPEN SOURCE ]
A Laravel SDK for Hetzner Cloud that covers the whole API, types every response, and fakes cleanly in tests.
Hetzner is where a great deal of European infrastructure quietly lives, and its API is good. What was missing was a Laravel-shaped way into it: a service provider, a facade, real types on the way back, and a way to test against it without touching a live account.
It covers every resource the API exposes rather than a convenient subset — actions, billing, certificates, DNS zones, firewalls, floating IPs, images, ISOs, load balancers, locations, networks, placement groups, primary IPs, servers, SSH keys and volumes. A partial SDK is worse than none: the moment you reach the resource it skipped, you are back to raw requests, and now there are two ways of talking to the same API in one codebase.
[ OPEN SOURCE ]
An elegant, type-safe SDK for managing Hetzner Cloud: servers, DNS, networks, load balancers and every other resource the API exposes.
composer require boci/hetzner-laraveluse Boci\HetznerLaravel\Client;
$client = Client::factory()
->withApiKey('your-api-token')
->make();
$response = $client->servers()->create([
'name' => 'my-server',
'server_type' => 'cpx11',
'image' => 'ubuntu-24.04',
'location' => 'nbg1',
]);use Boci\HetznerLaravel\Facades\HetznerLaravel;
$servers = HetznerLaravel::servers()->list();
foreach ($servers->servers() as $server) {
echo $server->name();
}Full PHP 8.2+ types on requests and responses, so an IDE can tell you what came back.
A ClientFake for mocking, so a test that provisions a server does not provision a server.
Rate limits and request details come back alongside the data rather than being thrown away.
The API is organised by resource, so the code reads the way the documentation does.
Service provider and facade, registered on install. Nothing to wire up.
A separate docs repository with tutorials, samples and API reference.
Issues and pull requests are welcome, and so is a conversation about building one for another platform.
GET IN TOUCH