Pure-Go editing of Windows registry hive files. Point it at a SYSTEM or SOFTWARE hive on disk and it can read and patch values directly in the binary format, no hivex, no cgo, no Windows required. The main use case is servicing offline images: the Windows install you are modifying is not running, its hives are just files.
The API is small. ApplyDWordPatches and ReadDWord handle the common case of flipping and verifying REG_DWORD values. WriteKey adds whole keys with typed values, growing the hive when it runs out of room. ParseRegExport turns a .reg export into a key tree you can replay with WriteKey, which is handy for copying a service definition from a reference machine. There are also BCD helpers (SetHypervisorLaunchType, ClearWinPEFlag and friends), since a BCD store is just another hive.
This library is part of the Windows tooling behind devcell. Hive editing is the kind of thing you want tested against the real consumer: the test suite includes fixtures from actual hives and an opt-in check that loads a patched hive on a live Windows machine. No v1 yet, so pin a version.
go get github.com/devcell-sh/go-regedit