CLI/TUI wrapper around bluetoothctl commands
- this is vibe coded *
Control your bluetooth devices via the command line. bt

- Go 1.21+
- Linux with
bluetoothctlavailable (part of thebluezpackage)
go build -o bt .This produces an executable named bt in the current directory.
./btgo install
# or
go build -o /usr/local/bin/bt .Dependencies are managed via Go modules and installed automatically with go build or go mod download.
Required packages:
github.com/charmbracelet/bubbletea— TUI frameworkgithub.com/charmbracelet/lipgloss— Terminal styling
The app follows a Model-View-Update (MVU) architecture using the Charmbracelet Bubbletea framework.
bt-cli/
├── main.go # Entry point
├── bluetooth/ # Bluetooth abstraction layer
│ └── bluetooth.go # Wraps bluetoothctl commands
└── ui/ # Terminal UI layer
├── app.go # TUI logic (Model + Update + View)
└── styles.go # Lipgloss styling definitions
#### bluetooth controls
bluetoothctl power on bluetoothctl power off
bluetoothctl scan on bluetoothctl scan off
bluetoothctl pair <MAC_ADDRESS>
bluetoothctl connect <MAC_ADDRESS> bluetoothctl disconnect <MAC_ADDRESS>
bluetoothctl devices
To create a connection with the built-in utils, you can follow this slightly more manual process using bluetoothctl.
hcitool scan # to get the MAC address of your device
bluetoothctl
power on # in case the bluez controller power is off
agent on
scan on # wait for your device's address to show up here
scan off
trust MAC_ADDRESS
pair MAC_ADDRRESS
connect MAC_ADDRESS
sudo hcitool cc 94:23:6E:6F:23:9D
then quickly pair and connect with bluetoothctl