blew

a BLE scanner and CLI tool for Mac OS X

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

$ git clone --recurse-submodules https://github.com/stass/blew.git
$ swift build -c release
$ cp .build/release/blew /usr/local/bin/blew

Runs on Mac OS X 13+. Swift toolchain required. Grant Bluetooth permission on first run.

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]

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.

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 (git clone, swift build), 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.