# 使用 Homebrew, MacPorts, Nix 安装 blueutil

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

## 安装

```sh
sudo av install brew:blueutil
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install blueutil
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install blueutil
```

  证据: MacPorts ports tree: sysutils/blueutil/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#blueutil
```

  证据: nixpkgs package indexes: pkgs/by-name/bl/blueutil/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:blueutil
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/blueutil>
- **版本:** 2.13.0
- **来源摘要:** Get/set bluetooth power and discoverable state
- **主页:** <https://github.com/toy/blueutil>
- **仓库:** <https://github.com/toy/blueutil>
- **上游文档:** <https://github.com/toy/blueutil#readme>
- **许可证:** MIT
- **源码归档:** <https://github.com/toy/blueutil/archive/refs/tags/v2.13.0.tar.gz>
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- blueutil (cli)
- blueutil (别名)

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 2.13.0
- 本地数据: OK
- 上游仓库: https://github.com/toy/blueutil
- 检测到的最新版本: v2.13.0 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

blueutil is a long-running macOS command-line utility for reading and changing Bluetooth state: power, discoverability, paired and connected devices, device info, pairing, connection, and output formats for scripts.

### 项目历史

blueutil was originally written by Frederik Seiffert and later maintained by Ivan Kuchin, as recorded in the README copyright section. The GitHub repository dates back to 2011, with v1.0.0 tagged in 2012 and a continuing v2.x release line.

The tool grew from simple power and discoverability controls into a broader Bluetooth scripting interface. The README documents private IOBluetooth framework use, root-user safeguards, JSON output formats, device connection operations, wait commands, and an experimental system_profiler fallback for some paired-device queries.

### 采用历史

blueutil became the standard package-manager answer for 'control Bluetooth from a shell on macOS.' Its README documents Homebrew and MacPorts installs, and the input metadata also records a Nix package, reflecting adoption by both casual Mac users and reproducible-environment users.

Its role persisted because macOS does not expose all of these Bluetooth controls through a stable, script-friendly built-in CLI, so package managers filled the gap with a small native utility.

### 使用方式

Users run blueutil with flags such as --power, --discoverable, --paired, --connected, --info, --connect, --disconnect, --pair, and --unpair. Output can be human-readable or JSON, making it useful in shell scripts, status bars, automation tools, and troubleshooting flows.

The README warns that it uses private IOBluetooth preference APIs and documents macOS-version quirks such as favorite/recent-device behavior starting with macOS 12 Monterey.

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

blueutil is the classic tiny Mac systems package: one binary that unlocks automation around a GUI-controlled OS feature. Package nerds care because it has survived macOS Bluetooth API changes, packaging across Homebrew/MacPorts/Nix, architecture transitions, and years of shell-script dependence.

It also illustrates the maintenance burden of packaging native Mac utilities: private frameworks, root behavior, TCC/API access failures, output formats for scripts, and compatibility notes all live in a very small command-line surface.

### 时间线

- 2011: GitHub repository created for blueutil.
- 2012: v1.0.0 tag published.
- 2018: v2.0.0 tag published.
- 2021: README documents macOS 12 Monterey behavior changes for favorite and recent devices.
- 2025: v2.13.0 tag and README copyright show continued maintenance.

### Related projects

- blueutil-tui is documented by the README as a text user interface built on top of blueutil.
- Homebrew, MacPorts, and Nix are package-manager channels recorded for installation.
- macOS IOBluetooth and system_profiler are the platform interfaces used or offered as alternatives.

### 来源

- <https://github.com/toy/blueutil#readme>
- <https://github.com/toy/blueutil/releases>
- source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** blueutil
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Requirements:** macos, xcode
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- Nix - blueutil: normalized package name match | nixpkgs package indexes: pkgs/by-name/bl/blueutil/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - blueutil: normalized package name match | MacPorts ports tree: sysutils/blueutil/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://www.automicvault.com/zh-hans/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/zh-hans/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [bluetoothconnector](https://www.automicvault.com/zh-hans/pkg/brew/bluetoothconnector/) - Shares av.db curated category or tags: bluetooth, cli, macos, system.
- [asitop](https://www.automicvault.com/zh-hans/pkg/brew/asitop/) - Shares av.db curated category or tags: cli, macos, system.
- [bluez](https://www.automicvault.com/zh-hans/pkg/brew/bluez/) - Shares av.db curated category or tags: bluetooth, cli, system.
- [brightness](https://www.automicvault.com/zh-hans/pkg/brew/brightness/) - Shares av.db curated category or tags: cli, macos, system.
- [cliclick](https://www.automicvault.com/zh-hans/pkg/brew/cliclick/) - Shares av.db curated category or tags: cli, macos, system.
- [dark-mode](https://www.automicvault.com/zh-hans/pkg/brew/dark-mode/) - Shares av.db curated category or tags: cli, macos, system.
- [ddcctl](https://www.automicvault.com/zh-hans/pkg/brew/ddcctl/) - Shares av.db curated category or tags: cli, macos, system.
- [defaultbrowser](https://www.automicvault.com/zh-hans/pkg/brew/defaultbrowser/) - Shares av.db curated category or tags: cli, macos, system.
- [screenresolution](https://www.automicvault.com/zh-hans/pkg/brew/screenresolution/) - Local package facts share a topical domain. Shared terms: cli, get, macos, set, system.
- [infat](https://www.automicvault.com/zh-hans/pkg/brew/infat/) - Local package facts share a topical domain. Shared terms: cli, macos, set, system.

## Combined YAML source

View the package source record on GitHub. [combined/blueutil.yml](https://github.com/automic-vault/db/blob/main/combined/blueutil.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
