charlie0129

    charlie0129/batt

    Control and limit battery charging on Apple Silicon MacBooks.

    ios
    apple
    battery
    bclm
    longevity
    mac
    Go
    GPL-2.0
    1.8K stars
    84 forks
    1.8K GitHub watchers
    Updated Oct 30, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Where it stands

    Rank, growth pace and release cadence relative to everything GStars tracks.

    No releases in the last 90 days; the most recent was 101 days ago, with 17 contributors on GitHub.

    Gained 179% more stars in the last 90 days than in the 90 days before.

    Use Cases & Benefits

    • Controls and limits battery charging on Apple Silicon MacBooks to extend battery longevity by setting maximum charge levels.
    • Offers precise, user-defined charge limits with advanced sleep and power adapter controls, outperforming macOS's optimized charging by ensuring predictable battery management.
    • Use for maintaining battery health by capping charge levels to prevent battery swelling and degradation on Apple Silicon MacBooks.
    • Use for developers or power users needing command-line tools to automate and customize battery charge limits and power adapter behavior.
    • Use for MacBook users wanting to prevent overcharging during sleep or irregular schedules by disabling charging before sleep and preventing idle sleep.

    Should you depend on it?

    License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.

    License

    GPL 2.0

    Copyleft: distributing software that includes it generally requires releasing your source under the same license.

    Community files

    • README: present

    Watch-outs

    • GPL-style copyleft: including it in distributed software generally requires releasing your source under the same license.

    General guidance from repository metadata, not legal advice. How we score

    From the README

    Note: Use table of contents of quickly navigate to the section you want, e.g., Installation. 👆↗

    batt is a tool to control battery charging on Apple Silicon MacBooks.

    This article might be helpful. TL;DR: keep your battery at 80% or lower when plugged in, and discharge it as shallowly as feasible.

    Previously, before optimized battery charging is introduced, MacBooks are known to suffer from battery swelling when they are kept at 100% all the time, especially the 2015s. Even with optimized battery charging, the effect is not optimal (described below).

    batt can effectively alleviate this problem by limiting the battery charge level. It can be used to set a maximum charge level. For example, you can set it to 80%, and it will stop charging when the battery reaches 80%. Once it reaches the predefined level, your computer will use power from the wall only, leaving no strain on your battery.

    Quick link to installation guide.

    Excerpt from the charlie0129/batt README on GitHub (GPL-2.0 license). © its authors.Read the full README on GitHub

    Daily snapshots

    Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots

    Forks

    84+13

    Open issues

    34+4

    Compared with peers in iOS

    Fastest-growing repositories GStars tracks in this cohort for the week of Nov 1, by 7-day star growth

    charlie0129/batt compared with iOS repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    vercel-labs/agent-desktop17.0K+13.3K33today
    nightly-labs/openbot5.8K+2.0K45today
    rustdesk/rustdesk128.3K+839654 days ago
    crmne/zapfast3.1K+839602 days ago
    makecindy/cindy9.3K+77145today
    charlie0129/batt1.8K—30101 days ago
    Category median9.3K+83945—

    Discover Repositories

    Search across tracked repositories by name or description