tui-tools

tui-router

Every part of the router on one screen

A terminal UI (TUI) for ip, nft and wg on Linux: the read-only cockpit for a Linux router.

v0.5.0betanetworkMIT

Betatui-router may still change keys, flags or output before its 1.0. Pin the version you depend on, and report what breaks.What stable means

The cockpit: one card per area of the router, refreshed in place
The cockpit: one card per area of the router, refreshed in place

The read-only cockpit for a Linux router. One screen, one card per area — interfaces and their WAN/LAN roles, the firewall's posture, live traffic per interface, the DHCP server and its leases, the WireGuard peers, the self-hosted tailnet — read from cheap system probes and refreshed in place.

It changes nothing itself. Press ENTER on a card and tui-router suspends, hands the terminal to the tool that manages that area — tui-firewall, tui-network, tui-traffic, tui-wireguard, tui-tailscale — and resumes when you leave it. The overview is here; the change happens in the tool the card opens, behind that tool's own preview and confirm.

It also carries what no per-area tool can: tui-router export, run as root, writes one .tuiback artifact with the router's identity (WAN/LAN roles, networkd units, forwarding and resolver drop-ins, DHCP/DNS, WireGuard configs minus keys, the saved ruleset, account names), signed with a machine key; it refuses rather than omit what it cannot read. tui-router restore verifies it with the machine's key or one you name, then applies it behind a diff, a reload preview, a typed confirmation and an atomic apply that rolls back unless you confirm access.

Keys

KeyAction
↑/↓Select a card
enterOpen the tool that manages the selected card
wRoles wizard: assign the WAN/LAN roles (router profile)
bBackup: export a signed artifact, or restore one (typed confirm)
BReboot the router (typed confirm)
PPower the router off (typed confirm)
r / ctrl+rRead the router again now
?Help
qQuit

Press ? inside the tool for the full help screen, which is generated from the same action table as the key map.

Compatibility

This tool is a face on the program below, so its version matters. Tested is not a claim: a version lands there only after the tool's own suite passed against it on a real machine in the lab, and the run is kept as evidence in the repository. At startup the tool probes the backend once and says what it found in its header — a version nobody has run against is shown as (untested) in the warning colour, one older than the minimum as (below minimum) in the error colour. Neither stops it: the backend still refuses what it cannot do, in its own words.

iproute2

ip ≥ 5.0
Binary
ip
Minimum
5.0
Probed with
ip -V
Tested
No recorded run yet. The tool still runs and reports the version it found as untested.

Needs a version this new

  • json-outputsince 4.13

What changes on older versions

  • iproute2 <4.13

    ip -j (JSON output) is missing, so the interface and route cards cannot be read from this version

nftables

nft ≥ 0.9
Binary
nft
Minimum
0.9
Probed with
nft -v
Tested
No recorded run yet. The tool still runs and reports the version it found as untested.

wireguard-tools

wg ≥ 1.0
Binary
wg
Minimum
1.0
Probed with
wg --version
Tested
No recorded run yet. The tool still runs and reports the version it found as untested.

Maintain iproute2, nftables or wireguard-tools? You are welcome to help shape this tool. About → maintainers

Install

Once per machine, then every tool in the family is one pacman away.

Add the repository
$ curl -fsSL https://pkgs.tui.tools/install.sh | sh
Or run the same thing yourself, one command at a time

A family whose whole promise is preview before you run is not going to insist you pipe a script into a shell. These are the commands that script runs.

The one-time setup, by hand
$ k="$(mktemp -d)/tui-tools.asc"
  curl -fsSL --proto =https --tlsv1.2 -o "$k" https://pkgs.tui.tools/pubkey.asc
  [ "$(gpg --show-keys --with-colons "$k" | awk -F: '$1 == "pub" { p = 1; next } p && $1 == "fpr" { print $10; p = 0 }')" = 767CFB337B01F32FFC073F3F389120B277E4FB44 ] && echo "key OK" || { echo "WRONG KEY: stop here"; rm -f "$k"; }
  sudo pacman-key --add "$k"
  sudo pacman-key --lsign-key 767CFB337B01F32FFC073F3F389120B277E4FB44
  printf '[tui-tools]\nServer = https://pkgs.tui.tools/arch/$arch\n' | sudo tee -a /etc/pacman.conf
  sudo pacman -Sy

The first lines check the signing key: go on only if they print key OK.

Arch Linux · tui-router
$ sudo pacman -S tui-router

Upgrades then arrive with the rest of your system updates.

What it can do to your machine

  • Preview, then confirm

    Every change is shown as an exact command line and confirmed before it runs. The dialog and the runner receive the same value, so the preview cannot drift from what executes.

  • Escalates for actions

    The cards only read; the reads that need root (the nftables ruleset, ufw status, the WireGuard dump) escalate with sudo -n, which never prompts. The four mutations — roles wizard, reboot, poweroff, restore — escalate the same way, each behind its literal command and a confirmation.

  • No daemon, no state of its own

    Nothing keeps running after you quit, and nothing is installed to run later. The system is the source of truth; the tool re-reads it after every change.

  • No network access

    The tool opens no network connection of its own. No telemetry, no update check, no phone home.

  • Static binary

    Released statically linked, with no runtime dependencies to install.

  • Signed release, with provenance

    checksums.txt carries a keyless cosign signature from this repository's release workflow, every archive has a CycloneDX SBOM, and every archive, package and the checksum file carry SLSA build provenance. The security page shows the three commands that check it.

Reporting

Report a security issue privately, through GitHub's private vulnerability reporting on the repository's Security tab. The family-wide policy, and what counts as in scope, is on the security page.

Downloads

v0.5.0 · 2026-11-20
FileSizeSHA-256
checksums.txt1 KB—
checksums.txt.sigstore.json10 KB—
provenance.intoto.jsonl12 KB—
tui-router-0.5.0-1-aarch64.pkg.tar.zst2.0 MB3d864a2616849dd15333d2f5dea890d7d99dd87670108b4c08cb8088f9e37c6b
tui-router-0.5.0-1-x86_64.pkg.tar.zst2.2 MB6a68b5929d9a17b13eef29369ec66079327c31d9a74d850ee09c784e48603854
tui-router-0.5.0-1.aarch64.rpm2.0 MB04081cb32fc75c562b6f392a42376a75d69891ef940184f5fa4f13e8a7142180
tui-router-0.5.0-1.x86_64.rpm2.2 MB6bcbabde8c61dc0964373e071041d7ae6633f4a710742cf51f109be4bc3790b8
tui-router_0.5.0_amd64.deb2.2 MBb3f5076a36cac8cebc0986cd37f35df5965353574337dd63b77333eac155d9e3
tui-router_0.5.0_arm64.deb2.0 MB47d823832f8a001393a92a988c45b217a1260cc3e56ad405af0e359ff3607707
tui-router_0.5.0_linux_amd64.tar.gz2.2 MBdc1cb06b0ad6462f480225bc32b6d7dc3b68a332103f9ebb52fbd2d1d3999f26
tui-router_0.5.0_linux_amd64.tar.gz.cyclonedx.json23 KB3eaf9273c6f8225908c86ef92da752d860a7ae140e934c315f8a08da7c38a036
tui-router_0.5.0_linux_arm64.tar.gz2.0 MB71361a88cf696a94cb76e690c85f8f958f6dfb5619b13e3b1dd766f0d68b6f52
tui-router_0.5.0_linux_arm64.tar.gz.cyclonedx.json23 KBaf031704208f6b436098c29a9c4017c57fadf5c90ac6460ab83c9c395a5eb28d

Every release ships a checksums.txt. Download it next to the archive and run sha256sum -c checksums.txt --ignore-missing. See verifying a download.

Releases

v0.5.0

2026-11-20
## tui-router v0.5.0

tui-router 0.5.0

- Restore requires a verified signature (#26). An unsigned artifact is refused unless `--allow-unsigned` is given, which prints what is being trusted before the confirmation; the cockpit asks for "trust unsigned" typed on a danger screen. `--dry-run` still previews any artifact. Independently of the signature, a content gate refuses any line that would make root run a command or load files from elsewhere (roles.conf keys outside an allowlist, WireGuard hooks other than the ones tui-wireguard writes, dnsmasq script options, sysctl keys outside net.*, nft include, among others), listing file:line in the preview.
- Exports are signed by default with a machine-local Ed25519 key (#27), created under /etc/tui-router on the first export after a typed yes (`--create-key` for scripts); `--sign KEY` names another key and `--no-sign` skips signing. The public key is written beside the artifact with its fingerprint. Without `--verify`, restore tries the machine's own key and /etc/tui-router/trusted-keys/*.pub, so a same-machine restore needs no flags.
- Behavior changes from these security fixes: the cockpit's restore key prompt starts empty, and the `.pub` that travels with an artifact is only mentioned as untrusted, never offered or suggested; an export that cannot read a location that exists (for example /etc/wireguard without root) fails, names the locations and writes nothing, instead of writing an incomplete backup. A restore of an unsigned backup made with 0.4.x needs `--allow-unsigned` or the typed confirmation.
- Built with tui-kit v0.5.0, the kit's security release, and Go 1.27.4, which fixes GO-2026-6859 in the standard library. As root, the repository key is accepted only when it is the pinned key alone; privileged commands are resolved only from trusted root-owned system paths and start from a minimal environment; config files must be owned and writable by root alone, and TUI_ROUTER_* variables carried over from sudo, doas, pkexec or su are refused (the error points at /etc/tui-router/config.toml). Running without root is unchanged.
- The manual apt, dnf and pacman setup in the README checks the downloaded key against the pinned fingerprint before any step trusts it.
- CI actions on their latest versions. Nothing else changes.

Built by this repository's CI on the tag itself. Each archive ships a
CycloneDX SBOM, `checksums.txt` carries a keyless cosign signature, and
every file has SLSA build provenance — see the README's "Verify a
download" for the two commands that check them.

The commits in this release:

## Changelog
* e3c158963330f8cb7d07cdbb7cbbb9440794a790 0.5.0: tui-kit v0.5.0 (security release) (#29)
* 8b1477240740320c3190a21e9ecbfbb83ebce2df Bump github.com/tui-tools/tui-kit (#24)
* 6b50b22610b4340ed903932ff5e8fec86c266159 Bump the github-actions group across 1 directory with 5 updates (#25)
* c579068e81bc48c7c6691994a9ff63dea515c0c9 Packages are available from pkgs.tui.tools (#22)
* 497c08558a06ce6a48b379601a3f528f8e1ee7be Require a verified signature and gate root-run directives on restore (#26)
* 08074a256469e9e65c07343e3353a55935c8a477 Sign exports by default with a machine-local key (#27)
* f955004d1513b2a0f37d7bbb298841b62c24e088 Take tui-kit v0.5.0 and Go 1.27.4 (#28)

v0.4.2

2026-10-22
## tui-router v0.4.2

tui-router 0.4.2

- Built with Go 1.27.3, which fixes CVE-2026-111943 in the standard library (crypto/x509), and tui-kit v0.4.5; dependencies on their latest versions. No change in behavior.

Built by this repository's CI on the tag itself. Each archive ships a
CycloneDX SBOM, `checksums.txt` carries a keyless cosign signature, and
every file has SLSA build provenance — see the README's "Verify a
download" for the two commands that check them.

The commits in this release:

## Changelog
* 4668d373f07966bd37d25132989efa7119961361 0.4.2: Go 1.27.3 (stdlib security fixes) (#21)
* 5320832388ea636adc105b614a52b6e5b98f3b75 Bump the github-actions group across 1 directory with 9 updates (#19)

v0.4.1

2026-10-20
## tui-router v0.4.1

tui-router 0.4.1

- Built with Go 1.27.2, which fixes CVE-2026-78667, CVE-2026-78669 and CVE-2026-97031 in the standard library (net/http, crypto/tls). No change in behavior.

Built by this repository's CI on the tag itself. Each archive ships a
CycloneDX SBOM, `checksums.txt` carries a keyless cosign signature, and
every file has SLSA build provenance — see the README's "Verify a
download" for the two commands that check them.

The commits in this release:

## Changelog
* eb9f7df0734a679a761f2de6475151042ce7616f 0.4.1: Go 1.27.2 (stdlib security fixes) (#20)

v0.4.0

2026-09-26
## tui-router v0.4.0

tui-router 0.4.0

- **New Tailnet card**, between VPN and Updates, managed by tui-tailscale. ENTER hands the terminal to `tui-tailscale` (resolved absolute path, no arguments), like every other card.
- The card's summary comes from `tui-tailscale --check`, run unprivileged through the router's exec site and cached for a minute: whether this host's node is online and how many peers it sees, whether this host runs the headscale control plane, its node count, and the first step it still lacks (tui-tailscale's readiness `next`, with the step in words in the detail). Examples: `node online · headscale: unit`, `node online · 3 of 4 peers`, `headscale ready · 5 nodes`.
- Without the binary the card reads `tui-tailscale (not installed)` with the family hint that it comes from pkgs.tui.tools. A document of the wrong shape (not JSON, another tool's, missing halves, negative counts) is refused with a reason and the card reads unknown.
- **Grid for seven cards**: the column count no longer reserves a gap after the last column (104 columns now fit three cards), a short last row stretches across the grid, and a screen too short for every row at full height moves the tool foot onto the title row, so all seven cards fit 80x24 even with the roles banner up. A card with room for one body line now keeps its summary instead of showing only an ellipsis.
- `--check` gains the `tailnet` card and `snapshot.tailnet` (additive; no field removed or renamed).
- `--report` lists every card's managing tool, now including tui-tailscale and tui-update.
- `--demo` shows a node that also runs headscale one step short of ready, the same state `tui-tailscale --demo --check` reports.
- README (cards table, intro, demo paragraph, install snippet at 0.4.0), tool.json description, screenshots re-rendered (the selected-card frame now selects the Tailnet card), smoke test asserts the card.

Built by this repository's CI on the tag itself. Each archive ships a
CycloneDX SBOM, `checksums.txt` carries a keyless cosign signature, and
every file has SLSA build provenance — see the README's "Verify a
download" for the two commands that check them.

The commits in this release:

## Changelog
* 987ee27bc11942202eb79c3dab185d166d528088 0.4.0: a Tailnet card that hands off to tui-tailscale (#14) (#16)

v0.3.4

2026-09-26
## tui-router v0.3.4

tui-router 0.3.4

tui-router 0.3.4 follows the tui-vpn rename: ENTER on the VPN card now opens tui-wireguard (0.5.0 and later), where 0.3.3 looked for the old tui-vpn binary and reported the tool as not installed once the new package was in. A machine that still carries only the old `tui-vpn` binary keeps working: the card hands off to it and the status line says it was renamed and the package should be upgraded; `--check` carries the same hint as `toolHint`, and `--report` lists the old binary when it is present. The headscale control plane the card detects is now managed by tui-tailscale, which you run directly for now (a way into it from the cockpit is tracked in #14).

Built by this repository's CI on the tag itself. Each archive ships a
CycloneDX SBOM, `checksums.txt` carries a keyless cosign signature, and
every file has SLSA build provenance — see the README's "Verify a
download" for the two commands that check them.

The commits in this release:

## Changelog
* 41997329e2ccd30f75626ffcbdc38fa7be0fe182 0.3.4: the VPN card hands off to tui-wireguard (#15)

v0.3.3

2026-09-25
## tui-router v0.3.3

tui-router 0.3.3: tui-kit v0.4.4

tui-router 0.3.3 moves to tui-kit v0.4.4: every probe now runs in its own session without a controlling terminal, so nothing can wait on a prompt hidden behind the cockpit, while the hand-off to the managing tool keeps going through tea.Exec and keeps the terminal. The README screenshots are re-rendered with continuous box borders, and the beta banner now sits between the kit's stability markers and carries the family's standard wording.

Built by this repository's CI on the tag itself. Each archive ships a
CycloneDX SBOM, `checksums.txt` carries a keyless cosign signature, and
every file has SLSA build provenance — see the README's "Verify a
download" for the two commands that check them.

The commits in this release:

## Changelog
* 7ee100b4ecd9b14287cbecf3d3781d510b65ed20 0.3.3: tui-kit v0.4.4 (#13)
* 64103bd68da4e068db5a7284f83d2ee21d290fec Bump the github-actions group with 4 updates (#11)
* f2d072cd067fe963ee3e9e0fc5eda0ea4654b9e0 README: link the tool's page on tui.tools (#10)
* 5bd2df340cf40a73ef0fa70ba6379fa15cde5437 README: point the install snippet at the current release (#9)

v0.3.2

2026-09-02
## tui-router v0.3.2

DHCP card reads systemd-networkd's own server, and the wizard states its own verdict

Built by this repository's CI on the tag itself. Each archive ships a
CycloneDX SBOM, `checksums.txt` carries a keyless cosign signature, and
every file has SLSA build provenance — see the README's "Verify a
download" for the two commands that check them.

The commits in this release:

## Changelog
* 8f35ac18d8dbd18335d16a69eb0e704323911f0d DHCP card: read systemd-networkd's own server (#8)

v0.3.1

2026-09-02
## tui-router v0.3.1

Roles wizard: cancel the revert without reporting a false failure.

Also: tui-kit v0.3.0 — dialogs wrap and scroll instead of clipping the
command preview, and the picker filters as you type.

Built by this repository's CI on the tag itself. Each archive ships a
CycloneDX SBOM, `checksums.txt` carries a keyless cosign signature, and
every file has SLSA build provenance — see the README's "Verify a
download" for the two commands that check them.

The commits in this release:

## Changelog
* c0ecf66571db67f267345cf7383e974481bd58c1 Bump tui-kit to v0.3.0 (#7)
* b9cc8ab53514aad503b520c6bccaa3c5461cbad4 Roles wizard: cancel the revert without a false failure (#6)

v0.3.0

2026-09-01
## tui-router v0.3.0

Manage, not view (wave 2): apply what it diagnoses, author what it manages; lab-validated.

Built by this repository's CI on the tag itself. Each archive ships a
CycloneDX SBOM, `checksums.txt` carries a keyless cosign signature, and
every file has SLSA build provenance — see the README's "Verify a
download" for the two commands that check them.

The commits in this release:

## Changelog
* 9c4f5a04e0f11d0666e42c1ad3a8ddaa341964e2 Single-artifact backup/restore (item 15, complete) (#3)
* 691d94562e551636878bee8e5ba4c58a34b3aacc tool.json: released (#5)

v0.2.0

2026-09-01
## tui-router v0.2.0

Manage, not view: create and edit from the TUI (wave 1), lab-validated on the router image.

Built by this repository's CI on the tag itself. Each archive ships a
CycloneDX SBOM, `checksums.txt` carries a keyless cosign signature, and
every file has SLSA build provenance — see the README's "Verify a
download" for the two commands that check them.

The commits in this release:

## Changelog
* 0fe4b2d86b92763a7f068d0b04d05d677e2c6a50 Roles wizard, updates card, reboot — the cockpit learns to manage (#4)