Metadata-Version: 2.1
Name: macmonitor
Version: 1.0.0
Summary: MacMonitor — macOS hardware telemetry agent, Menu Bar controller, and BLE GATT peripheral for ESP32 OLED
Home-page: https://github.com/anbuinfosec/MacMonitor-Application
Author: Mohammad Alamin
Author-email: anbuinfosec@gmail.com
License: MIT
Project-URL: Homepage, https://anbuinfosec.dev
Project-URL: Repository, https://github.com/anbuinfosec/MacMonitor-Application
Project-URL: Issues, https://github.com/anbuinfosec/MacMonitor-Application/issues
Keywords: macos,telemetry,ble,bluetooth,esp32,oled,menubar,apple-silicon
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: MacOS X
Classifier: Environment :: No Input/Output (Daemon)
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: System :: Hardware
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE

# MacMonitor — macOS Telemetry Agent, Menu Bar & BLE Server

Lightweight macOS background agent, native **Menu Bar** status item, and **CoreBluetooth** GATT peripheral (`v1.0.0`) that streams real-time Apple Silicon / macOS hardware metrics over authenticated BLE to an ESP32 OLED dashboard.

---

## Features

- **Automatic Startup on Login**: Native macOS `LaunchAgent` (`dev.anbuinfosec.macmonitor` + `dev.anbuinfosec.macmonitor.menubar`) starts automatically when you log in and restarts automatically if interrupted.
- **Native macOS Menu Bar App**: Zero-dependency Swift `AppKit` status bar icon showing live CPU %, BLE connection status, GPU %, RAM, Battery, Temperature, Network speed, VPN state, 1-click Pairing Key copy, USB ESP32 provisioning, and autostart toggle.
- **Zero-Sudo Apple Silicon Telemetry**: Reads Mach CPU/RAM ticks, `IOAccelerator` GPU utilization, `IOHIDEventSystem` die thermal sensors, `AppleSmartBattery`, `scutil`/`utun` WireGuard/VPN state, and sanitized top-5 processes without root privileges.
- **PyPI & Homebrew Ready**: Installable via `pip`, `brew`, or `./install.sh` (`macmonitor` and `macmon` CLI aliases).

---

## Installation

### Option 1: Homebrew (`brew`)

```bash
# Install from formula & start login service
brew install --build-from-source ../Formula/macmonitor.rb
macmonitor autostart enable
```

### Option 2: PyPI / `pip`

```bash
pip install .
macmonitor autostart enable
```

### Option 3: Local Installer Script

```bash
./install.sh
```

---

## CLI Reference (`macmonitor` / `macmon`)

```bash
macmonitor start              # Start background service + Menu Bar & register LaunchAgent
macmonitor stop               # Stop background service
macmonitor restart            # Restart background service
macmonitor status             # Show daemon, BLE, and autostart status JSON
macmonitor menu               # Start native macOS Menu Bar app (--stop to quit)
macmonitor autostart enable   # Enable automatic startup at macOS login
macmonitor autostart disable  # Disable automatic startup at macOS login
macmonitor autostart status   # Check LaunchAgent registration status
macmonitor pair-init          # Generate or display 64-hex Keychain pairing key
macmonitor pair-esp32         # Auto-provision a USB-connected ESP32 over Serial
macmonitor devices            # List connected & authenticated ESP32 devices
macmonitor snapshot           # Print a live JSON telemetry snapshot
macmonitor doctor             # Run full system, BLE, Menu Bar, and telemetry diagnostics
macmonitor logs -n 50         # Tail rotating agent logs
macmonitor config --init      # Write default ~/.config/macmonitor/config.toml
```

---

## Building PyPI Distributions (`sdist` & `wheel`)

```bash
make pypi
ls -lh dist/
# Produces dist/macmonitor-1.0.0.tar.gz and dist/macmonitor-1.0.0-py3-none-any.whl
# Publish with: twine upload dist/*
```


