sleepwatcher

Install command:
brew install sleepwatcher

Monitors sleep, wakeup, and idleness of a Mac

https://www.bernhard-baehr.de/

/api/formula/sleepwatcher.json (JSON API)

/api/bottle/sleepwatcher.json (Bottle JSON API)

Formula code on GitHub

Bottle (binary package) installation support provided for macOS releases:

Intel big sur
catalina
mojave
high sierra
sierra
Apple Silicon big sur

Current versions:

stable 2.2.1
For SleepWatcher to work, you will need to read the following:

    $(brew --prefix)/Cellar/sleepwatcher/2.2.1/ReadMe.rtf

Ignore information about installing the binary and man page,
but read information regarding setup of the launchd files which
are installed here:

    

These are the examples provided by the author.

Analytics:

Installs (30 days)
sleepwatcher 275
Installs on Request (30 days)
sleepwatcher 269
Build Errors (30 days)
sleepwatcher 0
Installs (90 days)
sleepwatcher 860
Installs on Request (90 days)
sleepwatcher 821
Installs (365 days)
sleepwatcher 3,571
Installs on Request (365 days)
sleepwatcher 3,411
Fork me on GitHub