# 使用 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
- **版本:** 2.13.0
- **来源摘要:** Get/set bluetooth power and discoverable state
- **主页:** <https://github.com/toy/blueutil>
- **仓库:** <https://github.com/toy/blueutil>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- blueutil (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.13.0
## 项目历史与用法

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

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

- 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


## Combined YAML source

View the package source record on GitHub. [combined/blueutil.yml](https://github.com/mxcl/pkgdb/blob/main/combined/blueutil.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
