Skip to main content

Mac Manager

Monitor your Mac's health, security and hardware from the terminal — battery alerts, live dashboard, security audit and dev-tooling inventory.

Lint Tests Type check CodeQL Coverage PyPI License: Apache 2.0 Python 3.9+ Platform: macOS Version Status: alpha PRs welcome

A Python CLI to monitor and take care of your MacBook (Apple Silicon) right from the terminal — battery, system, disk, network — with a live dashboard, automatic daily logging, and native notifications to preserve battery health.

Designed for Apple Silicon MacBook Air/Pro. It also works on Intel, but some metrics (battery capacity, etc.) may vary.

Installation

Homebrew (recommended)

brew install armelingu/tap/mac-manager

The formula lives at armelingu/homebrew-tap. You can also brew install --HEAD armelingu/tap/mac-manager to track the latest commit on main instead of the released version.

pipx / pip

pipx install mac-manager   # isolated, recommended
# or
pip install --user mac-manager

After installation, the mm command is on your PATH. Register the background agents (daily battery log + alerts) with:

mm setup

mm uninstall removes those agents. It does not uninstall the CLI — use brew uninstall mac-manager or pipx uninstall mac-manager for that.

From source

git clone https://github.com/armelingu/mac-manager.git
cd mac-manager
./install.sh

This will:

  • create a local venv in .venv/
  • install rich and psutil
  • create the symlink ~/.local/bin/mm
  • register two launchd agents:
    • daily log at 09:00 → writes a snapshot to ~/Library/Application Support/mac-manager/battery.csv
    • battery alerts every 15 min → native macOS notification

Make sure ~/.local/bin is in your PATH:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

Commands

For the complete reference for each command (description, options, when to use, examples), see COMMANDS.md.

Hardware and system

Command What it does
mm General status (battery + system + disk + network)
mm battery Charge, health, cycles, temperature, power source
mm health CPU, RAM, memory pressure, top 5 processes
mm disk Disk usage + local snapshots + cleanup candidates
mm clean Lists what can be cleaned (deletes nothing) and shows the commands
mm net Local/public IPs, SSID, Wi-Fi signal
mm doctor 0-100 score with automatic recommendations
mm watch Live dashboard (Ctrl+C to exit)

Battery — history

Command What it does
mm log Writes a battery snapshot to the CSV
mm history -n 20 Last N recorded measurements
mm alerts Runs the alert check (called by launchd)

Setup

Command What it does
mm setup Registers launchd agents (daily log at 09:00 + alerts every 15 min)
mm uninstall Removes those agents; keeps the CLI and battery history

Security

Command What it does
mm security Audits FileVault, SIP, Firewall, Gatekeeper, pending updates, LaunchAgents, remote SSH, XProtect and provides a 0-100 score

Development

Command What it does
mm dev Lists installed languages, package managers, devops, editors and CLIs — with version and path
mm dev --all Also shows known tools that are not installed
mm dev --check Lists outdated packages in Homebrew, global npm, pip and Mac App Store

Smart alerts

To preserve the lithium-ion battery (every cycle counts!), the agent checks every 15 min and fires a notification:

  • ≥ 80% charging → "consider unplugging" (every 2h)
  • ≤ 20% on battery → "good time to plug in" (every 30min)
  • ≤ 10% on battery → critical alert (every 10min)
  • health < 80% → 1x per week

History

Every day at 9 AM, a snapshot is written to ~/Library/Application Support/mac-manager/battery.csv:

timestamp,percent,is_charging,power_source,cycle_count,max_capacity_mah,design_capacity_mah,health_percent,temperature_c
2026-04-19T09:00:01,82,1,AC Power,12,4350,4380,99.3,30.5

In a few months you can plot the real degradation of your Mac.

Structure

mac-manager/
├── mm                      # entrypoint (bash → venv python)
├── macmanager/
│   ├── cli.py              # dispatcher
│   ├── ui.py               # UI helpers
│   ├── battery.py          # ioreg + pmset
│   ├── system.py           # CPU/RAM/processes via psutil
│   ├── disk.py             # usage + snapshots + cleanup
│   ├── network.py          # Wi-Fi + IPs
│   ├── notify.py           # osascript notifications
│   ├── logger.py           # CSV history
│   ├── doctor.py           # score + tips
│   ├── alerts.py           # notification rules
│   ├── security.py         # security audit (mm security)
│   ├── dev.py              # dev tooling inventory (mm dev)
│   └── watch.py            # live dashboard
├── launchd/
│   ├── com.macmanager.battery-log.plist
│   └── com.macmanager.battery-alert.plist
├── logs/
├── install.sh
├── uninstall.sh
└── requirements.txt

Uninstallation

mm uninstall          # launchd agents only (Homebrew / pipx / source)
./uninstall.sh        # source install: agents + symlink + venv

mm uninstall does not remove the CLI. For packaged installs:

brew uninstall mac-manager
# or
pipx uninstall mac-manager

Battery history in ~/Library/Application Support/mac-manager/ is preserved.

Status

Mac Manager is currently in alpha: the public CLI surface is stabilizing, breaking changes can still happen between 0.x releases without a deprecation window. Once we ship 1.0.0, every breaking change will follow Semantic Versioning and a deprecation cycle.

Changelog

All notable changes are documented in CHANGELOG.md, following the Keep a Changelog format.

Releasing

Maintainers: see RELEASING.md for the full release runbook (SemVer policy, version bump, tagging and the tag-driven GitHub Actions pipeline that builds artifacts and cuts a GitHub Release automatically — PyPI publication is wired with Trusted Publishing and can be activated by flipping a single flag).

Contributing

Contributions are very welcome — whether it's a bug report, a feature request or a pull request. Please read the contribution guide before opening anything:

  • 📖 CONTRIBUTING.md — how to set up a dev environment, coding style, commit conventions and PR workflow.
  • 🛡️ SECURITY.md — how to responsibly report a vulnerability.
  • 🤝 CODE_OF_CONDUCT.md — what we expect from everyone participating in this project.

The files above are being added incrementally; until each one lands, please open an issue on GitHub for anything you'd like to discuss.

License

Copyright © 2026 Gustavo Armelin.

This project is released under the Apache License 2.0 — a permissive license that allows commercial use, modification, distribution and private use, with patent protection. See NOTICE for the required attribution and the third-party licenses bundled at runtime.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mac_manager-0.2.0.tar.gz (51.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mac_manager-0.2.0-py3-none-any.whl (42.8 kB view details)

Uploaded Python 3

File details

Details for the file mac_manager-0.2.0.tar.gz.

File metadata

  • Download URL: mac_manager-0.2.0.tar.gz
  • Upload date:
  • Size: 51.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mac_manager-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ba822e0bc29d32a1610fd156d37e28d0f9bb893cc20a44dcc58c0f29a6070961
MD5 f5487ff40eac18e40d727de5a1d17379
BLAKE2b-256 f77d7b8b81753e5e47618eecb48fe9c681def916d163161734b3b6e9df406a82

See more details on using hashes here.

Provenance

The following attestation bundles were made for mac_manager-0.2.0.tar.gz:

Publisher: release.yml on armelingu/mac-manager

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mac_manager-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mac_manager-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 42.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mac_manager-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 96cb55f9f4f6986ea01ffa11c9aefa37c7a1f62bed1932c6c75a755ef5a76f3a
MD5 252fc9a5686c78a31d8e34ed49f3e497
BLAKE2b-256 b2f5979eaefabae867afec5c741ba478009d24a76079ccca7771aa0673d7e24c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mac_manager-0.2.0-py3-none-any.whl:

Publisher: release.yml on armelingu/mac-manager

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.2

2 files

0.1.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page