blew

a BLE scanner and CLI tool for Mac OS X

Scan, connect, read, write, subscribe, and impersonate Bluetooth Low Energy devices on macOS — from the command line or through AI agents via MCP. No GUI. No Xcode. No pairing dialogs. Just you, your terminal, and every BLE device in range.

blew
# scan the airwaves
% blew scan -w -R -70
ID                                    NAME              RSSI  Signal    Services
------------------------------------------------------------------------------------------
F3C2A1B0-1234-5678-ABCD-000000000001  Heart Monitor     -42   ████████  180D (Heart Rate)
A7E9D4C2-9876-5432-FEDC-000000000002  Env Sensor        -58   ██████    181A (Environmental)
B1D3F5A7-ABCD-EF01-2345-000000000003  Smart Lock        -63   █████    FFF0

# x-ray a device in one shot
% blew gatt tree -n "Heart Monitor" -dr
Service 180D  Heart Rate
├── 2A37  Heart Rate Measurement  [notify]
│   └── 2902  Client Characteristic Configuration
└── 2A38  Body Sensor Location  [read]  = 1

# clone it and become it
% blew periph clone -n "Heart Monitor" --save hr.json
Cloning GATT from Heart Monitor...
Advertising "Heart Monitor" [180D]

Install

$ brew install stass/tap/blew

Runs on Mac OS X 13+. Grant Bluetooth permission on first run. Or build from source.

What you get with this Mac OS X BLE tool

Zero-ceremony commands

Scan, connect, read, write, subscribe. Each is one command. Auto-connect means blew read -n Sensor 2A19 just works.

Interactive REPL

Tab completion on UUIDs, persistent history, background subscriptions that print while you keep typing. Feels like a shell for BLE.

Full GATT visibility

Print the entire service tree with one flag. Read all values inline. Look up any Bluetooth SIG characteristic spec without connecting.

Peripheral mode

Turn your Mac into a virtual BLE device. Define a GATT server from JSON, or clone a real device and impersonate it.

Scriptable

Chain commands with exec. Pipe -o kv output into awk. Deterministic exit codes. Built for CI and automation.

Human-readable by default

265+ Bluetooth SIG UUIDs resolved to names everywhere. Standard characteristics decoded to natural types automatically.

MCP server for AI agents

Run blew mcp to expose every BLE operation as a structured MCP tool. Cursor, Claude Desktop, and other AI agents can scan, connect, read, write, and subscribe — returning typed JSON results.

Four modes of operation

Single command, interactive REPL, exec scripts, or MCP server. Same operations everywhere, same structured output, pick the mode that fits your workflow.

FAQ

Is there a BLE scanner CLI tool for Mac OS X?

Yes. blew is a free, open-source command-line BLE tool for Mac OS X (macOS 13+). It lets you scan for Bluetooth Low Energy devices, connect, inspect GATT service trees, read and write characteristics, stream notifications, and even impersonate devices -- all from the terminal with no GUI required.

How do I scan for BLE devices from the Mac terminal?

Install blew with brew install stass/tap/blew, then run blew scan to discover nearby BLE devices. Use blew scan -w for continuous watch mode, or filter by name, service UUID, or signal strength.

Can I read and write BLE characteristics from the Mac OS X command line?

Yes. blew supports reading (blew read), writing (blew write), and subscribing to notifications (blew sub) on any BLE characteristic, directly from the macOS terminal. It auto-connects and auto-discovers GATT services.

Can AI agents control BLE devices with blew?

Yes. Run blew mcp to start an MCP (Model Context Protocol) server over stdio. AI agents in Cursor, Claude Desktop, and other MCP-compatible hosts can discover and invoke all BLE operations as structured tool calls — scanning, connecting, reading, writing, subscribing, and running virtual peripherals. Results are returned as typed JSON.