bleswiftcli-macos-bluetooth

Scan, connect, read, write, and inspect Bluetooth Low Energy devices from the macOS command line.

4|Updated May 16, 2026
One-click install
npx skills add https://github.com/reason-machines/devtools-skills --skill bleswiftcli-macos-bluetooth-reason-machines
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bleswiftcli-macos-bluetooth
Source: https://github.com/reason-machines/devtools-skills/tree/main/skills/bleswiftcli-macos-bluetooth
Command: npx skills add https://github.com/reason-machines/devtools-skills --skill bleswiftcli-macos-bluetooth-reason-machines

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Interacting with Bluetooth Low Energy peripherals on macOS normally requires writing Swift code against CoreBluetooth or using GUI tools, making quick debugging, testing, and scripting of BLE devices slow and cumbersome. ## Core Features & Use Cases - Device Discovery & Connection: Scan for BLE peripherals with RSSI filtering, service UUID filtering, and JSON output, then connect by UUID or name substring with optional auto-reconnect. - GATT Operations: Inspect full GATT databases, read and subscribe to characteristics and descriptors, and write hex, string, or structured YAML/JSON payloads with typed fields and endianness control. - Pairing & L2CAP: Trigger macOS pairing dialogs by accessing encrypted characteristics and open connection-oriented L2CAP channels for raw binary streaming. - Use Case: A firmware engineer debugging a heart-rate sensor runs ble scan -s 180D to find the device, ble inspect to enumerate its GATT services, and ble read mydevice -s 180D -c 2A37 --notify to stream live heart-rate measurements to a log file. ## Quick Start Ask the agent to scan for nearby Bluetooth Low Energy devices on this Mac and read the battery level characteristic from a named peripheral.

Frequently Asked Questions about bleswiftcli-macos-bluetooth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan for Bluetooth Low Energy devices on macOS from the command line?▼

Run `ble scan` to list nearby BLE devices in a live table sorted by signal strength. Add `-s 180D` to filter by service UUID, `--min-rssi -70` for signal thresholds, or `--json` to pipe results into jq for scripting.

How to read and write BLE characteristics without writing Swift code?▼

Use `ble read mydevice -s 180F -c 2A19` to read a characteristic and `ble write mydevice -s FFF0 -c FFF1 --hex 0x01FF` to write one. The tool automatically selects write-with-response or write-without-response based on characteristic properties.

Does ble CLI support pairing with encrypted BLE devices?▼

Yes, pairing is triggered by accessing a characteristic that requires encryption, since CoreBluetooth has no explicit pair API. Run `ble pair mydevice -s <service> -c <protected-characteristic>` and macOS shows the pairing dialog to bond the device.

Why does ble CLI say Bluetooth access denied on macOS?▼

macOS requires explicit Bluetooth permission for the terminal application. Grant access in System Settings under Privacy & Security, then Bluetooth, for Terminal, iTerm, or whichever terminal app runs the ble command.

Can I use ble CLI in shell scripts for automated BLE testing?▼

Yes, use `--json` flags for machine-readable output and pipe through jq to extract device UUIDs. Notifications can be limited with `--count`, and raw L2CAP streams can be redirected to files for capture and analysis.

What are the limitations of ble CLI for BLE development?▼

Connections stay open only while the CLI process runs, and the tool warns about MTU limits but does not auto-split oversized payloads. It is macOS-only since it builds on CoreBluetooth, so Linux or Windows BLE work needs different tooling.