Bluetui – A TUI for managing Bluetooth on Linux

2025-11-0423:29278102github.com

🛜 TUI for managing bluetooth on Linux. Contribute to pythops/bluetui development by creating an account on GitHub.

A Linux based OS with bluez installed.

Note

You might need to install nerdfonts for the icons to be displayed correctly.

You can download the pre-built binaries from the release page release page

You can install bluetui from crates.io

You can install bluetui from the extra repository:

You can install bluetui from the lamdness Gentoo Overlay:

sudo eselect repository enable lamdness
sudo emaint -r lamdness sync
sudo emerge -av net-wireless/bluetui

If you are a user of x-cmd, you can run:

Run the following command:

git clone https://github.com/pythops/bluetui
cd bluetui
cargo build --release

This will produce an executable file at target/release/bluetui that you can copy to a directory in your $PATH.

Tab: Switch between different sections.

j or Down : Scroll down.

k or Up: Scroll up.

s: Start/Stop scanning.

?: Show help.

esc: Dismiss the help pop-up.

ctrl+c or q: Quit the app.

p: Enable/Disable the pairing.

o: Power on/off the adapter.

d: Enable/Disable the discovery.

u: Unpair the device.

Space or Enter: Connect/Disconnect the device.

t: Trust/Untrust the device.

e: Rename the device.

Space or Enter: Pair the device.

Keybindings can be customized in the default config file location $HOME/.config/bluetui/config.toml or from a custom path with -c

# Possible values: "Legacy", "Start", "End", "Center", "SpaceAround", "SpaceBetween"
layout = "SpaceAround" # Window width
# Possible values: "auto" or a positive integer
width = "auto" toggle_scanning = "s" [adapter]
toggle_pairing = "p"
toggle_power = "o"
toggle_discovery = "d" [paired_device]
unpair = "u"
toggle_trust = "t"
rename = "e"

GPLv3

Bluetui logo: Marco Bulgarelli


Read the original article

Comments

  • By bfkwlfkjf 2025-11-057:181 reply

    What a coincidence, I just discovered this tool yesterday. It made me really happy how a tool so simple makes such a huge difference in terms of how smooth it is to solve a problem, compared eg with using bluetoothctl.

    It also occurred to me that there's a real value to tuis vs guis which is that since they're simpler to build with the same developer effort you can build more tools. I remember the dwarf fortress guys saying this in their interview, that they had at some point a similar game to DF but in 3d, but at some point they realized that by not wasting effort building the graphics part of the game they saved time to focus on what mattered.

    If I have one tiny criticism about bluetui is the annoying fonts. I understand what they're trying to do: with more glyphs you can increase the density of information. But the thing is it's not really necessary in this case. Like someone else commented, there's plenty of white space. I know to some people it feels like eye candy, but to me the emojis sprinkled in the text are an eye sore.

    • By pythops 2025-11-057:384 reply

      bluetui author here.

      > It made me really happy how a tool so simple makes such a huge difference in terms of how smooth it is to solve a problem,

      Happy to hear that :)

      > if I have one tiny criticism about bluetui is the annoying fonts

      You suggest to get rid of the icons ? what if they can be disabled in the config, will that fix the issue for you ?

      > there's plenty of white space You can set the window width from the config file (width = positive integer) if you don't want the TUI to be responsive.

      • By PostOnce 2025-11-059:351 reply

        I think the icons are cool.

        Emoji in text is annoying, but this isn't a page of text, it's a UI element, and that can make something clear especially if you're connecting a device whose name is unknown, but you know it's a speaker, or whatever.

        So having the option to enable / disable is better than taking away the icons, in my opinion.

        • By alias_neo 2025-11-059:43

          Absolutely this. Particularly when there might be a few unnamed devices, but you know your devices is a particular device class, you can guesstimate the correct device based on its class, and the icon is extremely useful for this!

      • By jorvi 2025-11-0513:263 reply

        > You suggest to get rid of the icons ? what if they can be disabled in the config, will that fix the issue for you ?

        Yes.

        In general, its a good idea to not rely on someone having installed nerdfonts / fonts with glyphs. Or at the very least offer fallback.

        You can usually get pretty far by repurposing Unicode symbols.

        For example, from Bamum:

          𖦤 Headphone
          𖦥 IEM
          𖤣 Mic
          ꚰ Warning
          𖥉 Bluetooth (had to get a little creative)

        • By dspillett 2025-11-0514:241 reply

          That method isn't entirely reliable either: all come out at “question mark in a box” (Chrome, Edge) or “codepoint hex in box” (FF) on the old Win10 box that I'm currently trying to retire. The come out find on a similarly default Win11 setup.

          While the issue here is Win10, it shows that the problem is client font sensitive so it might affect others too (perhaps those running old-but-still-supported Linux distro releases with default fonts).

          • By e3bc54b2 2025-11-0517:051 reply

            > all come out at “question mark in a box” (Chrome, Edge) or “codepoint hex in box” (FF) on the old Win10 box that I'm currently trying to retire. The come out find on a similarly default Win11 setup.

            This is pretty funny to me, because on plain ol' Firefox on NixOS everything looks just fine!

            We've come pretty far from the days when things were randomly broken on Linux..

            • By boromisp 2025-11-0518:02

              Firefox on Fedora 43 here, no joy, and indeed, randomly broken on Linux (too).

              [edit] Okey, so installing the complete Google Noto Fonts family resolved this issue. But I still don't know if relying on a script with almost no font support is any better than what the OP did.

        • By yjftsjthsd-h 2025-11-0514:44

          > In general, its a good idea to not rely on someone having installed nerdfonts / fonts with glyphs. Or at the very least offer fallback.

          This bears emphasis; I sometimes use tools that try to use fancy fonts for icons, and it just gives me unreadable symbols because I don't have the font installed. And you might reasonably say, "just install the font package", but that only works if the font is packaged for my system, and I know what package it's in.

        • By Ontonator 2025-11-0514:22

          For Bluetooth, you could of course use one or both of the runes upon which the logo was based: ᛡᛒ

      • By jxdxbx 2025-11-0511:20

        Hi bluetui author. I just discovered your app last week, just wanted to say it is great.

        I truly like this new generation of command line utils (I have bat, eza, etc aliased to things like cat and ls) and TUIs like yours. TUIs in particular: having grown up with DOS apps, then graduating to using Pine for email on a shell account, they are nostalgic, but also just super fast and practical. And I like having an option in between the command line and config files and a full-blown GUI app (which, on Linux, might look like any old random thing anyway).

      • By bfkwlfkjf 2025-11-0510:101 reply

        > what if they can be disabled in the config, will that fix the issue for you ?

        I mean if you're offering, I would love that.

        And thank you for releasing under GPL. <3

        • By pythops 2025-11-0510:52

          sure, feel free to open a github issue and I will do my best to implement it asap :)

  • By ekjhgkejhgk 2025-11-0510:465 reply

    Of all the Rust stuff that I've seen on HN, this is the first one that makes me go "maybe I should learn Rust". Not for the performance aspect, but because it seems so neat to be able to compile to a binary. I went to the releases page, I downloaded bluetui-x86_64-linux-gnu, and it works.

    • By SwiftyBug 2025-11-0510:594 reply

      From your comment, I'm assuming you're mostly familiar with interpreted languages. Chances are that you know JS/TS. If that's the case, I suggest that you give Go a go. The learning curve is way softer than Rust's and it's not too uncomfortable to someone who already knows TypeScript. And the advantage of Go over Rust is that the compile time is much, much shorter.

      • By jamesponddotco 2025-11-0511:07

        I went from Bash to Go as a system admin, and eventually built something with Rust too, so I can definitely confirm that the Go learning curve is softer than Rust.

      • By ekjhgkejhgk 2025-11-0513:23

        > From your comment, I'm assuming you're mostly familiar with interpreted languages.

        I'm proficient with Python and Julia, but I avoid Python as much as possible.

        > The learning curve is way softer than Rust's

        Ok, it might be easier, but then I'll have learned Go and not Rust :-)

      • By me_vinayakakv 2025-11-0511:15

        Agree. I immediately remembered k9s[1], a TUI to manage Kubernetes workloads.

        It is written in Go as well.

        [1]: https://github.com/derailed/k9s

      • By pythops 2025-11-0511:371 reply

        I still think it's better to learn Rust

        https://www.youtube.com/watch?v=nOSxuaDgl3s

        • By gabrielgio 2025-11-0512:222 reply

          I only watch the go part, and I'll say that in 3 years working with I might have had at most 3 times nil pointer crashes in prod, in which took about 30 min between getting fixed and deployed.

          There are linter which helps prevent most of if not all crashes (just keep in mind to run linting and compile the binary it would still be ages faster than anything rust I have ever compiled). His argument is weak, and not simple.

          I'll give that type system in golang is too simplistic sometimes, and a more complex could help to express better some use cases.

          Still go for a person coming from a interpreted language is a solid choice by being MUCH MUCH simpler.

          • By super_flanker 2025-11-0518:32

            I agree with simplicity and ease of learning Go.

            > 3 years working with I might have had at most 3 times nil pointer crashes in prod

            I've been running a rust app for my personal trading app and a small service at a very large FAANG company for more than 3 years, and guess what I'm yet to see a nil crash.

          • By pythops 2025-11-0515:191 reply

            I agree on the easiness of Go, but I don't think people should always choose the easy solution. The easiness of Go come at a cost.

            • By gabrielgio 2025-11-0516:03

              Agree, people should understand why they are picking a language. If it is to learn new language that is fast, compiles to a binary (also fast) and has a nice onboard experience for a person coming from a interpreted language (which is the topic of thread) go fits nicely.

              Rust is not always the answer just because it has "no nil exception". The correctness of Rust comes at a cost as well.

    • By jimangel2001 2025-11-0511:541 reply

      Why not C, C++, Go or any other compiled language? What made you want ot learn rust?

      • By ekjhgkejhgk 2025-11-0513:09

        If it's good enough for Linus Torvalds, it's good enough for me :-)

        I'm not a professional programmer, I just want to have more control over my computer. C seems like a full time job to learn and not shoot yourself in the foot.

    • By WhyNotHugo 2025-11-0512:131 reply

      There's also a program in Go which does almost the same: https://github.com/bluetuith-org/bluetuith

      • By nikoomilana 2025-11-0515:57

        This is anecdotal but I've been using bluetuith for a year on my nix machine with several adapters then switched to bluetui recently, and my experience with bluetui has been amazing. I just ran into issues all the time with bluetuith and I assumed it was due to the OS or something. An example I can think of is trusted connections- my devices just never automatically connected once switched on, but now they do.

    • By globular-toast 2025-11-0514:581 reply

      You can do it with any language that supports static linking, like C, C++, Go etc. You can also do it with things like Pyinstaller for Python. It's not that big of a deal tbh.

      • By dymk 2025-11-0515:01

        It absolutely is a big deal that you can run “cargo build” with no set up and things just work. Out of the languages you listed, Go is the other where it’s that easy.

  • By rjzzleep 2025-11-054:181 reply

    I don't usually comment on these things. But this is phenomenal. I really like that the person that did this thought about a simple space for connect and enter for disconnect. I use rofi based tool whenever I don't feel like using my mouse and frequently disconnect because I toggled something that was already connecting.

    The same happens when connecting or disconnecting from VPN using the nm applet. This is a simple but extremely useful way of separating two states.

    • By pythops 2025-11-057:391 reply

      Bluetui author here Happy to hear that :)

      • By hsbauauvhabzb 2025-11-059:092 reply

        Have you considered a network manager? Weirdly enough I have no trouble connecting to a Bluetooth device via bluetoothctl, I can never remember how to disable wifi, or set a static ip though

        • By frumiousirc 2025-11-0511:442 reply

          > Have you considered a network manager?

          I've used "nmtui" on Linux for many years to do this. "nm" = "Network Manager".

          • By bfkwlfkjf 2025-11-0520:09

            Seconded nmtui.

            The bluetui author also has impala, which is a tui for the network manager. But in this case, nmtui is good enough.

          • By hsbauauvhabzb 2025-11-0513:03

            Thanks, this sounds like what I need ;)

        • By pythops 2025-11-0515:48

          that's why I don't like network manager and bloated software in general, they try to do everything and it always come problems

          You don't need network manager for bluetooth. just install bluetoothd and there you go and use bluetui or bluetoothctl for wifi, I recommend iwd, and then you can use impala, or iwctl pick up the right tool for right purpose

HackerNews