terminal ui to control wifi
- Go 93.8%
- Nix 3.4%
- Shell 2%
- Makefile 0.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github/workflows | ||
| internal | ||
| .envrc | ||
| .gitignore | ||
| .SRCINFO | ||
| flake.lock | ||
| flake.nix | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| main.go | ||
| Makefile | ||
| PKGBUILD | ||
| README.md | ||
nmtui
A terminal UI for managing Wi-Fi with NetworkManager, built with bubbletea.
Features
- List nearby networks with signal strength, security, and channel
- Scan on demand (
r) - Connect to networks — reuses saved profiles automatically, only prompts for a password when the network has no saved profile yet
- Disconnect (
d), forget saved networks (f) - Toggle Wi-Fi radio on/off (
t) - Live status bar: radio state, active connection, and IP address
- Filter the network list (
/)
Requirements
- Linux with NetworkManager (
networkmanagerpackage on Arch) nmcliin$PATH- An active session (polkit grants Wi-Fi management without root on desktop sessions like KDE)
Build
go build -o nmtui .
Reproducible build with Nix
flake.nix pins nixpkgs and the Go toolchain through flake.lock, so every
build uses an identical dependency set regardless of the host system:
nix build # binary at ./result/bin/nmtui
nix flake check # builds the package and runs the test suite in the sandbox
nix run . # run the TUI straight from the flake
If you use direnv, direnv allow once — every shell in
this directory then automatically uses the pinned dev shell (Go 1.27, gopls,
make) via nix-direnv:
direnv allow
go version # reports the toolchain from the flake, not the system
make build # or: make check (vet + tests), make run, make install
Usage
./nmtui [flags]
Flags
| Flag | Description |
|---|---|
-i, --interface <name> |
Wi-Fi interface to manage (e.g. wlan0) |
-v, --version |
Print version information and exit |
-h, --help |
Show help information and exit |
Keybindings
| Key | Action |
|---|---|
↑/k ↓/j |
navigate networks |
enter |
connect |
r |
rescan |
t |
toggle Wi-Fi on/off |
d |
disconnect current network |
f |
forget selected network's saved profile |
/ |
filter networks |
esc |
clear active filter / dismiss message |
q / ctrl+c |
quit |
Notes
- If a saved profile has a stale password, connect will fail — press
fto forget the network, thenenterto reconnect with the correct password. - Hidden networks appear as
(hidden network)and cannot be joined from the list; create a profile for them once vianmcliand they will show up normally afterwards.
Layout
main.go entry point
internal/nm/ nmcli wrapper (exec, terse-mode parsing, actions)
internal/ui/ bubbletea model, keybindings, styles