battinfo is a standalone cli tool and a nim library to query battery information.
As of today, only GNU/Linux is targeted. Contributions to support other operating systems are welcome. The package is also published to official list of nim packages and can be installed using nimble.
nimble install battinfo
Source code: https://gitlab.com/prashere/battinfo