Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

js4jiang5

macrumors newbie
Original poster
Nov 21, 2024
5
5
BatteryOptimizer_for_MAC is a simple CLI tool. Its function is just like AlDente - set battery charge limit and schedule battery calibration for macbooks, only that this tool is free and open source.

BatteryOptimizer_for_MAC is a light-weighted tool. It provides the functions of AlDente and coconutBattery, but the memory usage is only 1/20 of AlDente, or 1/30 of coconutBattery.

BatteryOptimizer_for_MAC is a fork of battery, based on which many new features and enhancements have been added, including
  • support both Apple and Intel CPU Macs (See Note below)
  • sail mode, allowing the battery to sail from maintain percentage to sail target without charging
  • scheduled calibration, starting automatic calibration on specified days per month (at most four days), or specified one day every 1-3 month, or specified weekday every 1-12 weeks
  • charging limiter still works even when macbook sleep or shutdown
    • Intel CPU: limit is at maintain percentage
    • Apple CPU: limit is fixed at 80%
  • add battery daily log and daily notification
  • send notifications when each step of calibration is completed
  • notify user to open macbook lid before calibration is started to avoid entering sleep due to discharge process, and start calibration immediately when macbook lid is open
  • notify user when new version is available to update
Note: For Intel Macs, charge limit works for all models, but discharge and calibrate only works for model 2014 or earlier. I am still searching discharge method for the other Intel Models.​
Snapshots
  • show battery status
    VHx5ytq.jpg


  • set battery charge upper limit 85% and lower limit 70%
    mWhaVjb.jpg


  • battery calibrate
    Pj87VPN.jpg


  • battery calibrate lid not open notification
    G6R5EnH.jpg%22


  • battery calibrate start notification
    J2L99Uz.jpg

  • battery calibrate end notification
    FLvcO3h.jpg


  • calibration schedule on Day 12 28 at 21:30
    yl7HxIx.jpg


  • calibration schedule on WED every 2 weeks at 10:50
    yXYeBB1.jpg
  • daily notification
    UvAivHE.jpg


  • show daily log
    ETfjely.jpg


  • new version available notification
    nQttVUL.jpg


  • show changelog before update to the latest version
    hlvnmMW.jpg

Installation and Usage

For installation and usage details, please refer to my Github BatteryOptimizer_for_MAC.​

Your support

This tool is free, but if you want to support me to make it better, you may buy me a coffee ☕ 😀.​
 
I just released new version v2.0.13. This version support not only the battery calibration of Apple macbooks, but also all models of Intel macbooks. Finally I find out how to discharge battery for all Intel macbooks.
 
Just released v2.0.15, which should be the final version. Added features include
- add battery calibrate log, recording calibrate time and health before and after calibration
- add new command "battery calibratelog" to show calibrate log
- if battery calibrate is missed due to sleep/shutdown, run calibrate when wakeup/reboot
- if battery daily log is missed due to sleep/shutdown, run daily log when wakeup/reboot
- if battery charge/discharge abnormality is detected, abort charge/discharge automatically
- when run charge/discharge, terminate other running charge/discharge processes first to avoid conflict
- notify user one day or two days before the scheduled battery calibration day
 
  • Like
Reactions: RazaIsmail
Released v2.0.18
- fix a bug that next battery calibrate date might be incorrect at the last or first week of a year.
 
Dear Sir,
Thank you very much for sharing this application.
I'm wondering if your Battery Optimizer would work on my Intel MacBook Pro 7,1 mid 2010 running Mac OS X 10.14.6 Mojave.
If such is the case, for install, have I just to paste in terminal:
"curl -s https://raw.githubusercontent.com/js4jiang5/BatteryOptimizer_for_MAC/main/setup.sh | bash"
Thanks in advance for your attention.
Best regards.
Paul
Yes, my app works for both Intel and Apple MACs.
Just follow the instructions here.
Remember to setup the settings after installation to receive notifications successfully.
 
Yes, my app works for both Intel and Apple MACs.
Just follow the instructions here.
Remember to setup the settings after installation to receive notifications successfully.
Hi js4jiang5
Thanks for your prompt reply.
Easily and successfully installed.
Testing and reporting in a couple of days.
Best regards.
Paul.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.