I travel with a GL.iNet Slate AX (GL-AXT1800), a small router that sits between my devices and whatever hotel or café Wi-Fi I'm on. It keeps a WireGuard tunnel back to my homelab. My traffic goes through home, and I keep the services I run there, like network-wide ad blocking.
Everything else in my homelab is code. The router was the one box I configured by clicking through a web UI and hoping I'd remember what I did. terraform-provider-glinet fixes that. I describe the router in Terraform or OpenTofu, and a plan shows where the router and the code differ.
provider "glinet" {
host = "http://192.168.8.1"
password = var.glinet_password
}
resource "glinet_adguardhome" "this" {
enabled = true
dns_enabled = true
}
resource "glinet_fan" "this" {
temperature = 60
}
# Read the POSIX TZ string from this machine's zoneinfo file
# instead of hard-coding daylight saving rules.
data "external" "tz" {
program = ["sh", "-c", "printf '{\"posix\":\"%s\"}' \"$(tail -n 1 /usr/share/zoneinfo/America/New_York)\""]
}
resource "glinet_system_timezone" "this" {
zone_name = "America/New York"
timezone = data.external.tz.result.posix
}
# Saves the profile. Starting the tunnel is a separate step.
resource "glinet_wireguard_client_group" "home" {
name = "home"
}
resource "glinet_wireguard_client_config" "home" {
group_id = glinet_wireguard_client_group.home.id
name = "home server"
address_v4 = "10.0.0.2/32"
private_key = var.wireguard_private_key
public_key = var.wireguard_server_public_key
endpoint = "vpn.example.com:51820"
allowed_ips = ["0.0.0.0/0", "::/0"]
}The provider talks to the router through glinet-client-go, a Go library I wrote alongside it. It handles login and session renewal. It has typed methods for most of the router's JSON-RPC API and a generic call for the rest.
client, err := glinet.NewClientWithHost("192.168.8.1", "root", []byte(password))
if err != nil {
return err
}
tz, err := client.System.GetTimezoneConfig(ctx)The client also ships an in-memory fake router for tests. The provider's default test suite runs against it, and other projects can use it too. The repository keeps saved, redacted responses from the real router, with a report per firmware version that says which writes were verified on hardware.
An older version of this page showed an example full of resources I hadn't built.
2022
I started the provider and, the same day, a Go client for the router's API, to learn Go and Terraform.
2023
I rewrote the client for the JSON-RPC API of firmware v4 and shipped a few small releases.
2026
After more than two years away, I picked it up again with Claude Code. Eight days later, both projects had shipped v1.0.0.
One long Claude Code session ran Claude Fable 5.2 as the orchestrator. It wrote the task briefs, checked the diffs, and opened the pull requests, but wrote almost no code itself. Claude Opus 5.5 subagents implemented the tasks, each in a separate checkout so several could run at once. GitHub Copilot reviewed every pull request, and valid findings went back to the same subagent.
At first I approved every push and merge. Later I delegated routine merges and kept the decisions: scope, naming, anything that could affect my router, and the release. I ran each release on my own network, which is where most of my feedback came from. Delegating was only safe because the rules were written down first:
terraform plan. terraform apply needed my permission every time.glinet_fan now manages that setting in my own config.zone_name, but the router also needs a POSIX TZ string. I could have put a lookup table in the provider, but I didn't love that a country changing its daylight saving rules would require a provider release. So the provider stays dumb, and the consuming Terraform code provides the POSIX string from the machine's zoneinfo file with an external data source, like in the example above.gpt-6.2-sol) review both repositories adversarially. It found that destroying a parental-control group could delete a different group after a rename on the router. It also found a failed router write that could be read as success. Both were fixed before release.main.I didn't type most of the code. I decided what it does, what it refuses to do, and what counts as proof that it works.
Two gaps I'd like help with are Wi-Fi 7 multi-link networks and cellular modems. I don't own that hardware, and I won't add support for an API I can't record. If you own one of those models, the issues say what I need. And if you work at GL.iNet and want to send me a router for testing, I won't say no.