A CLI tool written in Rust for retrieving detailed battery information and metrics.
batteryctl allows users to quickly inspect the status of their laptop battery via the terminal. Whether you need to check your battery’s State of Health (SOH), current voltage, or estimate how much time you have left before the battery runs out, batteryctl provides a clean interface for accessing this data.
- Comprehensive Stats: Displays Vendor, Model, Technology, Serial number, and specific energy statistics.
- Health Monitoring: Check your battery’s State of Health (SOH) and cycle count.
- Output Formats: Supports `default` (human-readable), `bare` (minimal), and `json` outputs for integration with other scripts or status bars (e.g., Polybar, i3status).
- Unit Support: Flexible temperature units (Celsius/Fahrenheit).
Ensure you have Rust and Cargo installed.
cargo install --path .The primary command is `info`, which retrieves the current battery status.
batteryctl infoUseful for programmatically parsing battery data.
batteryctl info jsonMinimal output format.
batteryctl info bare- `-f, --fahrenheit`: Display temperature in Fahrenheit.
- `-d, --debug`: Enable debug output.
# Example: JSON output with Fahrenheit temperatures
batteryctl info --display json --fahrenheit