Skip to content

Installation

powermonitor is published as the powermonitor Python package and provides the powermonitor command.

Requirements

  • Operating system: macOS 12.0+ Monterey or later
  • Python: 3.13+
  • Permissions: no root privileges required
  • Storage: local SQLite database under ~/.powermonitor/ by default

Note

powermonitor is macOS-only because it reads Mac power and battery data through IOKit/SMC or ioreg.

Install the command as an isolated tool:

uv tool install powermonitor
powermonitor

Upgrade later with:

uv tool upgrade powermonitor

Run without installing

Use uvx for one-off runs:

uvx powermonitor

This is the fastest way to try the real-time MacBook power monitor without changing a project environment.

Install with pipx

pipx install powermonitor
powermonitor

Upgrade later with:

pipx upgrade powermonitor

Install with pip

python -m pip install powermonitor

Prefer uv tool install or pipx install when you want to keep the CLI isolated from project dependencies.

Verify the command

powermonitor --help
powermonitor config show

powermonitor without a subcommand launches the Textual TUI. On non-macOS platforms the command exits because the collector depends on macOS power APIs.

Local development install

From a repository checkout:

git clone https://github.com/narumiruna/power-monitor.git
cd power-monitor
uv sync
uv run powermonitor --help

Build the package locally with:

uv build --no-sources

For documentation work, install the docs dependency group:

uv sync --group docs
uv run mkdocs serve