EarGuard is a macOS menu-bar app that tracks listening time only while audio is actively rendering to a headphone-class output device. It also records average system volume percentage and warns after sustained loud listening.
swift build -c releaseswift run EarGuardmake app
open build/EarGuard.appmake install
open /Applications/EarGuard.appHistory is stored at:
~/Library/Application Support/EarGuard/history.json
EarGuard uses public CoreAudio APIs. It cannot detect whether third-party earbuds are physically in-ear, and it reports volume as system volume percent, not measured dB SPL.