This utility was built to counter the battery indicator missing issue in Windows 10 for me. Apparently, this could also be used to view the battery's charging information while using a command-line OS like ubuntu-server, etc.
> npm i -g batinfo
OR
$ sudo npm i -g batinfo
H:\__tryouts\batinfo>batinfo
🔋 Charge Remaining: 88%
🔌 Charging: YES ⚡
⏲️ Time remaining: Not available
The "Time remaining" functionality is only available on UNIX based OS, while the battery is discharging. The above command was run on a Windows machine, hence the "Time remaining" functionality displays as "Not Available".
$ git clone https://www.github.com/jaffreyjoy/batinfo
$ cd batinfo
$ npm i
$ node index.js
MIT