Caution
This project is under active development and may not yet be stable. If you encounter any issues, please open an issue report.
- Manage API Keys: List, create, expire, and delete API keys.
- Manage 8474 Nodes: List, get, register, delete, expire, rename, tag, update user, and backfill IPs for nodes.
- Manage Users: List, create, delete, and rename users.
- Manage Policies: Get and update policy documents.
- Manage Pre-Auth Keys: List, create, and expire pre-auth keys.
- Customizable HTTP client, user agent, and logger support.
- Idiomatic Go API with context support.
Requires Go 1.24+ and Headscale v0.26.0 & above.
go get github.com/hibare/headscale-client-go
See the examples/
directory for usage examples.
The client exposes resource interfaces for each Headscale API resource:
client.APIKeys()
– Manage API keysclient.Nodes()
– Manage nodesclient.Users()
– Manage usersclient.Policy()
– Manage policyclient.PreAuthKeys()
– Manage pre-auth keys
Each resource provides methods for CRUD and management operations. See pkg.go.dev for full API documentation.
- Run tests:
make test
- Lint:
make install-golangci-lint golangci-lint run
- Pre-commit hooks:
make install-pre-commit pre-commit run --all-files
- Formatting:
go fmt ./...
Contributions are welcome! Please open issues or pull requests.
This project is licensed under the MIT License. See LICENSE for details.