Skip to content
项目

关于

Go-based cli for blueOS

开发工具

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
+2
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

blucli 🫐 — Pick a player, press play.

CI GitHub release Go License Homebrew

blucli is a command-line client for discovering and controlling Bluesound and NAD players that run BluOS. It gives people and scripts access to playback, grouping, queues, presets, browsing, and diagnostics over the local network.

Install

Homebrew installs the blu command on macOS or Linux:

brew install steipete/tap/blucli

With Go 1.25 or newer:

go install github.com/steipete/blucli/cmd/blu@latest

Prebuilt macOS, Linux, and Windows archives are available from GitHub Releases. macOS release binaries require macOS 13 or newer and are Developer ID signed by Peter Steinberger and notarized by Apple, so direct downloads pass Gatekeeper. See the release guide for checksum and signature verification. For a container-based setup, see the Docker guide.

Quick start

Discover players, then address one by its discovery name or host:port:

blu devices
blu --device "Living Room" status
blu --device 192.168.1.19:11000 now

When discovery finds exactly one player, blu status selects it automatically. Otherwise, pass --device, set BLU_DEVICE, or configure a default.

Commands

Area Commands
Discovery and status devices, status, now, watch status|sync
Playback play, pause, stop, next, prev, shuffle, repeat, sleep
Volume and groups volume, mute, group
Content queue, presets, browse, playlists, inputs, tunein
Spotify spotify open, plus optional Web API login, search, and playback
Automation and diagnostics --json, --dry-run, --trace-http, diag, doctor, raw

See the usage guide for command examples, Spotify setup, Docker, shell completions, and automation notes. The protocol and implementation spec documents discovery, BluOS endpoints, CLI behavior, and the project layout.

Device selection

blu resolves a target in this order:

  1. --device <host:port|name|alias>
  2. BLU_DEVICE
  3. default_device in the config file
  4. the discovery cache, when it contains exactly one player
  5. live discovery, when it finds exactly one player

Run blu devices to refresh the cache. Discovery names work directly; aliases are useful for custom shortcuts or disambiguation.

Configuration

The default config file is ~/Library/Application Support/blu/config.json on macOS and ~/.config/blu/config.json on Linux. Override it with --config <path>. Configuration can contain Spotify tokens; new and rewritten files have user-only permissions on systems with POSIX permissions.

{
  "default_device": "192.168.1.19:11000",
  "aliases": {
    "kitchen": "192.168.1.19:11000",
    "office": "192.168.1.115:11000"
  }
}

Development

CI and release builds use Go 1.27.4, while the source minimum remains Go 1.25. macOS jobs run on the Apple Silicon xcode-27 image and smoke-test Intel release binaries with Rosetta. Both macOS architectures require macOS 13.0 or newer.

go build -o dist/blu ./cmd/blu
go test ./...
golangci-lint run --timeout=5m

The repository also provides equivalent pnpm build, pnpm test, and pnpm lint helpers.

License

MIT

探索相关项目

加载中…