Skip to main content

A macOS utility that alerts you via WhatsApp when your battery reaches a defined threshold using Twilio.

Project description

⚡ PowerNudge

PowerNudge is a lightweight macOS utility that monitors your MacBook's battery percentage and sends you a WhatsApp alert via Twilio when it reaches a predefined charging level — so you can unplug and prolong battery health.

Built with automation in mind, it’s perfect for users who want a hands-free way to monitor charging without keeping an eye on the battery all the time.


🚀 Features

  • 🔋 Monitors battery percentage using macOS's pmset command
  • 📤 Sends a WhatsApp message via Twilio when a threshold is reached
  • 🧪 Built-in Twilio credential validation

🛠 Requirements

  • Python 3.12+
  • macOS (uses pmset for battery info)
  • Twilio Account with WhatsApp sandbox enabled
  • Internet connection to send WhatsApp message

📦 Installation

Install dependencies:

pip install power_nudge

🧠 How It Works

  • Reads your battery percentage via pmset -g batt
  • Sends a WhatsApp alert if the threshold is reached

🧪 Usage

python src/power_nudge/main.py

Or, schedule it with a cron job or launchd to run periodically.


📬 Example Alert

🟢 Battery is 90%. Please unplug the charger!


📄 License

MIT License


Project details


Download files

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

Source Distribution

power_nudge-0.1.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

power_nudge-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file power_nudge-0.1.0.tar.gz.

File metadata

  • Download URL: power_nudge-0.1.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.9.22 Linux/6.11.0-1012-azure

File hashes

Hashes for power_nudge-0.1.0.tar.gz
Algorithm Hash digest
SHA256 61b5a263ce54ec776f2bbffbc793aaf958322864f4d9ef2b2e7ec85b01366682
MD5 34e6dde2dffbd257c458022693c232f7
BLAKE2b-256 41ee4b46231bc6f15bce7ad8f866fe7064887a10c8279e4781a7e48a832bdb1e

See more details on using hashes here.

File details

Details for the file power_nudge-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: power_nudge-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.9.22 Linux/6.11.0-1012-azure

File hashes

Hashes for power_nudge-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b73f2c7b13e8095ec9a57382dbd7e42f7b5f5ad3113522d328de2daa96dd784c
MD5 38aa2399c5aff19dab274363f44af6df
BLAKE2b-256 aacd28dc61264d68256a2dc55bf607fbf9732f5b00066d55e8fce91842a05d89

See more details on using hashes here.

Supported by

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