Simple CLI for controlling macOS Dark Mode via Apples private API
MIT License
Your friendly neighbordhood macOS Dark Mode CLI. Dark Mode is set via Apples private APIs instead of the usual Apple Script.
Tested on macOS Mojave (10.14).
$ go get -u github.com/mafredri/macos-darkmode/cmd/darkmode
$ darkmode
on
$ darkmode on
$ darkmode off
$ darkmode toggle
Sometimes setting Dark Mode via Apple Script just doesn't work, I wanted a more reliable method.
Thanks to Saagar Jha for discovering the private APIs and sharing them in his post on Scheduling Dark Mode.