Skip to content

Repository files navigation

PowerLens app icon

PowerLens

Battery and power telemetry for the macOS menu bar.

License: AGPL-3.0-only macOS target: 26+ Architecture: Apple silicon Tested on macOS 26 Swift 6.2

PowerLens is a macOS utility that makes battery and power flow visible at a glance. It shows how power moves between the adapter, battery, and system load, then surfaces the same information in a lightweight popover and a richer dashboard.

Why PowerLens

macOS can tell you the battery percentage, but it does not make the live power story easy to read. PowerLens focuses on the questions that usually matter when your Mac is connected to a charger, dock, display, or running on battery:

  • Is the adapter covering the system load, or is the battery helping?
  • Is the battery charging, holding, or discharging?
  • Is external power persistently falling short of the current system load?
  • Which app is currently using the most energy?
  • Is the battery health, temperature, and cycle count still in a normal range?

Quick Look

PowerLens dashboard showing battery cards, live status, and a power-flow diagram

Dashboard overview
Live battery status, charger input, system load, battery health, cycles, and the current power-flow state in one place.

Features

Menu Bar Readout

PowerLens menu bar display styles with percentage, charging, and external-power icons

PowerLens lives in the macOS menu bar and can show a compact battery readout, percentage, live watts, and charging or holding-state badges. It is designed to work as a small utility first, with the Dock icon optional.

Power Flow Popover

PowerLens menu bar popover showing power flow and diagnostics

The popover is the fast check: battery level, power-flow diagram, diagnostics, high-energy app, battery snapshot, and raw power details. The flow diagram distinguishes adapter-only power, battery-only power, battery assist, charging, and holding-current states. When independently sampled sensors do not line up, the diagram keeps its additive layout and preserves the observed readings instead of forcing the totals to balance. It discloses the timing mismatch and marks values derived from other readings with .

Dashboard

The dashboard gives the same data more room. It is useful when you want to keep an eye on charger behavior, compare input power with system load, or inspect battery health and cycles without digging through command-line tools.

Diagnostics

PowerLens watches for common power situations:

Situation What PowerLens highlights
Healthy external power Adapter covers the current system load.
Battery assist Battery supplements the adapter when load spikes.
Charging Input power splits between system load and battery charging.
Holding current level Adapter covers the system while the battery stays nearly still.
Sustained external-power shortfall External input remains below system load while the battery assists; PowerLens reports the observed flow without assigning a cause to the adapter, cable, or dock.

Settings

PowerLens settings window for menu bar and Dock behavior

PowerLens includes app-language settings, telemetry-engine selection, menu bar display styles, Dock visibility control, optional diagnostic notifications, update checking, and Stable/Alpha update-channel selection. The telemetry engine can run in automatic, compatible, or live precision mode depending on the Mac and the data available.

Insights And Local History

Recent telemetry is stored locally in a SQLite history, so PowerLens can show trends and comparisons without sending your data anywhere. The Insights view offers selectable time ranges (24 hours, 7 days, 30 days, or all), summary statistics, interactive charts you can scrub, and a long-term battery health and charge-cycle trend. You choose how long minute-level samples remain. Older samples can be rolled up hourly or daily; choosing Don't keep also removes older rollups and battery-health and cycle history outside the full-detail window, plus app, adapter, and battery metadata that retained samples no longer reference. PowerLens asks for confirmation before applying this irreversible change. Hourly or daily rollups retain battery-health states for the long-term health trend. You can export retained raw history as CSV or JSON.

Requirements

  • A Mac with Apple silicon (M1 or later). Intel Macs are not supported.
  • macOS 26.0 or later.
  • Tested environment: macOS 26.
  • A battery-equipped Mac for battery telemetry.
  • Xcode command line tools or Xcode for building from source.

Install

  1. Download the latest PowerLens-<version>.dmg from Releases.
  2. Open the DMG.
  3. Drag PowerLens.app into Applications.
  4. Launch PowerLens from Applications.

Release builds are distributed as Developer ID signed and notarized macOS apps. PowerLens can check for updates from the app menu or Settings when a release build includes the configured Sparkle update feed. The update feed is published through GitHub Pages by the release workflow.

Verify The Download

Each release includes PowerLens-<version>-checksums.txt. To verify the DMG, download the checksum file into the same folder as the DMG, then run:

grep "PowerLens-<version>.dmg$" PowerLens-<version>-checksums.txt | shasum -a 256 -c -

Uninstall

Quit PowerLens, then remove PowerLens.app from Applications.

To delete local history and preferences as well, follow the steps in PRIVACY.md.

Build From Source

swift build --build-system native --arch arm64
./script/test_swiftpm.sh
./script/build_and_run.sh

./script/build_and_run.sh builds a local app bundle at dist/PowerLens.app and launches it. It must run from a native Apple silicon shell; Rosetta and Intel hosts are rejected because PowerLens app bundles are arm64-only. Pass debug, logs, telemetry, or verify for the helper modes documented in the script.

With Swift 6.3 or later, exercise SwiftBuild explicitly, matching the compatibility path in CI, by running POWERLENS_BUILD_SYSTEM=swiftbuild ./script/test_swiftpm.sh.

Release packaging notes for maintainers live in Packaging/README.md.

Contributing and Security

See CONTRIBUTING.md before opening an issue or pull request. Ordinary changes target develop; maintainers promote reviewed releases from develop to main before creating a version tag.

Report suspected vulnerabilities privately through GitHub Security Advisories instead of opening a public issue. The response process is documented in SECURITY.md.

Privacy

PowerLens reads battery and power information locally on your Mac. It does not send analytics, telemetry, or crash data to a server.

See PRIVACY.md for the full local-data description.

License

Copyright (C) 2026 HYEONJIN HAN.

PowerLens is licensed under the GNU Affero General Public License v3.0 only (AGPL-3.0-only). See LICENSE.

About

Local-first macOS menu bar app for battery, charger, and power-flow diagnostics.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages