Automic VaultAutomic Vault

brew

使用 Homebrew 安装 batt

查看 batt 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install batt

local Homebrew formula metadata

概览

软件包摘要

Control and limit battery charging on Apple Silicon MacBooks

命令和别名

  • batt

历史

项目历史与用法

batt is a macOS utility for controlling and limiting battery charging on Apple Silicon MacBooks, available as a command-line daemon/client and a native menu-bar app.

项目历史

The README states the maintainer created batt because existing tools were unsatisfactory. It focuses on predictable charge limiting, with the common use case of stopping charge around a configured maximum such as 80 percent.

batt's design is intentionally daemon-based: the README compares it to docker, with a client sending requirements to a background daemon that performs the charging control.

By 2026, the README notes a changed platform landscape: macOS 26.4 and later supports native charge limiting from 80 to 100 percent, while batt remains useful on older macOS versions or when users want limits below 80 percent.

采用历史

batt is Homebrew-packaged and its README documents `brew install batt` followed by running it as a brew service. It also offers an installation script and release binaries.

The repository page showed about 1.6k stars at enrichment time, reflecting a niche but visible Apple Silicon power-user audience.

使用方式

Typical CLI usage is to install the daemon, check status with `sudo batt status`, set an upper charge limit with commands such as `sudo batt limit 80`, disable the limit with `batt disable` or `batt limit 100`, and optionally control adapter power.

Advanced usage includes lower and upper charge bands, MagSafe LED control, idle/sleep handling, automatic calibration, scheduled calibration, and logs under `/tmp/batt.log`.

为什么软件包爱好者会关心

batt is interesting because it is a package-manager-distributed hardware-control tool that depends on private-feeling macOS power behavior and firmware compatibility rather than a stable cross-platform Unix API.

It also captures a packaging moment: before native macOS charge limits became broader, power users installed a daemon through Homebrew to get ThinkPad-style charge thresholds on Apple Silicon MacBooks.

时间线

  • 2025: v0.4.1 release highlights an experimental GUI and macOS Tahoe compatibility work.
  • 2026: README update says macOS 26.4 adds native charge limiting, reducing batt's necessity for some users.
  • 2026: v0.7.x releases include auto-calibration and scheduling work.

Related projects

  • The README links third-party GUI projects BattGUI and batt-helper.
  • macOS Optimized Battery Charging and macOS 26.4 native charge limiting are the platform features batt complements or replaces depending on OS version.

安全态势

风险级别:orange

formula declares a Homebrew service.

风险分类器

orange 风险 · 中 置信度 · infrastructure

原因

  • formula declares a Homebrew service

信号

  • metadata:service

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • formula 元数据声明了服务或守护进程块。
  • Homebrew bottle 元数据适用于 3 个平台目标。
  • 构建元数据列出 1 个构建依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

local files

Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.

Configuration files

Config paths the tool may read or write during local use.

macOS
/opt/homebrew/etc/batt.json/etc/batt*

可执行文件

已安装的可执行文件

命令类型暴露范围备注
battcli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-26
管理器版本0.8.0
管理器更新时间2026-07-21
本地数据OK
上游not checked
检测到的最新版本未检测到

https://github.com/charlie0129/batt

安装元数据

软件包元数据

软件包键brew:batt
版本0.8.0
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/batt
主页https://github.com/charlie0129/batt
仓库https://github.com/charlie0129/batt
上游文档https://github.com/charlie0129/batt#readme
许可证GPL-2.0-only
源码归档https://github.com/charlie0129/batt.git
最后更新2026-07-21T07:10:34Z
Pulseupdated
构建依赖go
Bottle可用 (于 arm64_sequoia, arm64_sonoma, arm64_tahoe)
Homebrew post-install未定义
服务declared
注意事项The batt service must be running as root before most of batt's commands will work.

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namebatt
Version Scheme0
Revision0
Head VersionHEAD
Requirements
  • arch
  • macos
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated configuration and credential file locations
  • curated package history
  • package relationship graph
  • package version freshness
  • package-page enrichment