🍺 BREW Explorer

← all formulae

batt

brew install batt v0.7.3 GPL-2.0-only

Control and limit battery charging on Apple Silicon MacBooks

75
30-day installs · #3890
285
90-day · #3621
2.9k
365-day · #2439
1.6k
★ GitHub stars · updated 2mo ago

Build dependencies

go

GitHub topics

apple battery bclm longevity mac macbook macos smc

Links

Caveats

The batt service must be running before most of batt's commands will work.
Raw metadata
{
  "aliases": [],
  "alternatives": [],
  "build_dependencies": [
    "go"
  ],
  "categories": [],
  "caveats": "The batt service must be running before most of batt\u0027s commands will work.\n",
  "conflicts_with": [],
  "dependencies": [],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Control and limit battery charging on Apple Silicon MacBooks",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:35:47+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "batt",
  "github_default_branch": "master",
  "github_last_commit_at": "2026-06-15T06:19:18Z",
  "github_readme_excerpt": "\u003e [!TIP]\n\u003e Feb 17, 2026 UPDATE: Finally, after more than 5 years, macOS 26.4 and later supports charge limiting natively (adjustable from 80% to 100%), so **`batt` is not needed if you are using macOS 26.4 or later**. However, `batt` won\u0027t go anywhere so if you are on an older version of macOS or you want to set a charge limit lower than 80%, you can still use `batt`.\n\nNote: Use table of contents of quickly navigate to the section you want, e.g., `Installation`. \ud83d\udc46\u2197\n\n# batt\n\n[![Go Checks](https://github.com/charlie0129/batt/actions/workflows/gochecks.yml/badge.svg)](https://github.com/charlie0129/batt/actions/workflows/gochecks.yml)[![Buind Test Binary](https://github.com/charlie0129/batt/actions/workflows/build-test-binary.yml/badge.svg)](https://github.com/charlie0129/batt/actions/workflows/build-test-binary.yml)![GitHub Downloads](https://img.shields.io/github/downloads/charlie0129/batt/total)\n\n\n`batt` is a tool to control battery charging on Apple Silicon MacBooks.\n\n## Why do you need this?\n\n[This article](https://batteryuniversity.com/article/bu-808-how-to-prolong-lithium-based-batteries) might be helpful. TL;DR: keep your battery at 80% or lower when plugged in, and discharge it as shallowly as feasible.\n\nPreviously, 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](#but-macos-have-similar-features-built-in-is-it)).\n\n`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.\n\nQuick link to [installation guide](#installation).\n\n## Features\n\n`batt` tried to keep as simple as possible. Char",
  "github_repo": "charlie0129/batt",
  "github_stars": 1601,
  "github_topics": [
    "apple",
    "battery",
    "bclm",
    "longevity",
    "mac",
    "macbook",
    "macos",
    "smc"
  ],
  "homepage": "https://github.com/charlie0129/batt",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 75,
  "installs_365d": 2881,
  "installs_90d": 285,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "GPL-2.0-only",
  "llm_generated_at": null,
  "llm_model": null,
  "name": "batt",
  "oldnames": [],
  "one_liner": null,
  "optional_dependencies": [],
  "rank_30d": 3890,
  "rank_365d": 2439,
  "rank_90d": 3621,
  "raw_hash": "58c2ab05728b1490",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/b/batt.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": "HEAD",
  "version_stable": "0.7.3",
  "versioned_formulae": [],
  "why_use_this": null
}