🐹 Build tool
Keep your Mac awake during Go builds and tests
Go is fast, but a clean build across a big module or a full go test ./... with the race detector can still run long enough to trip your sleep timer. AwakeMate keeps the Mac awake until it's done.
Free 14-day trial · one-time $39.99 · no telemetry · macOS 13+
When your Mac sleeps mid-Go
A cold go build over a large module, or go test -race ./... across every package, compiles and links steadily with no input devices touched. macOS sleeps mid-run, the test pass is cut short, and a race-detector run that was minutes in has to start again from a cold cache.
AwakeMate keeps it awake while Go runs
AwakeMate recognises the Go toolchain by its process name, go, covering go build, go test, go run and go generate. It reads only that short name locally, with no module path or source ever leaving the Mac.
Detected process: go
Tip: turn on "Sleep when tools go idle"
Go builds and test runs are quick CPU bursts. With idle-sleep on, AwakeMate keeps the Mac awake while go is compiling or testing and lets it sleep the instant the command exits - so a one-shot build holds the Mac for seconds, not your whole sleep timer.
Get the most out of it
- Running a long
go test -racesuite? Idle-sleep keeps the Mac up for the whole run and lets it sleep the moment results print. - Cross-compiling with
GOOS/GOARCHset? Those builds still run asgo, so they're covered without any extra config.
More questions about Gotap to expand
Does it cover go test and go generate too?
Yes. They all run under the go process name, so builds, tests and code generation are all recognised.
Go builds are fast - do I even need this?
For incremental builds, maybe not. But cold builds, big modules and race-detector test runs can outlast a short sleep timer, and idle-sleep adds no overhead when builds are quick.
Does it touch my power settings?
No. It uses the same IOKit assertion as caffeinate to block idle sleep only, leaving your energy preferences alone.
What's the best way to keep my Mac awake during a long go build or test run?
Add the go process to AwakeMate and it keeps the Mac awake automatically whenever go build or go test runs. With idle-sleep on it holds the Mac through the work, including a long go test -race ./..., and lets it sleep the instant the command exits.
Why not just run my Go tests with caffeinate?
caffeinate -i go test -race ./... does the job for that one command, but it is manual and all-or-nothing: you wrap each run by hand, it holds the Mac awake until the process exits, and there's no idle-aware sleep or notch status. AwakeMate automates the same IOKit assertion and releases it the moment the run is done.
Why does my Mac fall asleep during a long race-detector test run?
A go test -race pass compiles and runs steadily without touching the keyboard or trackpad, so macOS reads it as idle and sleeps. AwakeMate blocks idle sleep while go is running, without altering any of your saved energy settings.
Will it keep my Mac awake for Go with the lid closed, even on battery?
Yes. Turn on "Keep awake with the lid closed" in Settings - Options and approve the one-time helper; AwakeMate then keeps the Mac awake with the lid shut while Go runs, and dims the built-in screen so it is not draining the battery under the lid. It works on most Apple Silicon Macs (Apple forces sleep on some, so close your lid once to confirm). It works on battery too, but real work drains it faster, so keep it on power for long runs. See how it works.