u/ruiiiij

I built sdctl, a security-focused systemd service manager
▲ 16 r/tui+2 crossposts

I built sdctl, a security-focused systemd service manager

sdctl

Before I talk about `sdctl`, I want to first address the elephant in the room: why another TUI for managing systemd services?

This tool is not the first of its kind. I have been using systemctl-tui and systemd-manager-tui extensively to the point that I forgot how to use `systemctl` from the command line. However those tools share one major limitation: they require `sudo` for privileged operations. In today’s supply-chain threat landscape, that is a serious risk because a TUI app depends on many components, and any compromised dependency could become a full-privilege attack vector.

This is why I built `sdctl` with a completely different security model: the app itself should never be run with `sudo`, and no action ever asks for blanket root access. When you perform any action that requires escalated privileges, the app opens an embedded `polkit` flow that authenticates only the specific `systemctl` action you are trying to perform, using whatever mechanism is available on the system, such as password, fingerprint reader, or smart card. That keeps the privilege boundary explicit and tied to a single operation instead of the whole process.

requesting authentication to restart a service

On top of that, I've packed a lot of useful features into `sdctl`. These are meant to address actual pain points I've encountered while using similar tools, including a powerful syntax highlighter for viewing journal logs (powered by tailspin), a simple yet useful custom-built syntax highlighter for viewing unit files, a comprehensive filter system with fuzzy search, and a line-based selection mode (inspired by vim's visual mode) that makes copying multiple lines from journal logs much faster.

copying multiple lines of log into the system clipboard (with wl-copy or xclip)

unit file view with a simple built-in syntax highlighter

Here's the github repo: https://github.com/ruiiiijiiiiang/sdctl Feedback and contribution welcome!

reddit.com
u/ruiiiij — 1 day ago
▲ 6 r/CLI

https://preview.redd.it/77ozu83ej5zg1.png?width=1886&format=png&auto=webp&s=3c1e6e91eef65e11074045e5fc4376f2b560659c

I manage a number of remote servers; they are loaded with observability agents (beszel, prometheus, alloy). I like the web UI from these tools and I have no intention to stop using them. But since I spend most of my time in the terminal, sometimes I just want to do a quick checkup on how my servers are doing without switching to the browser and opening grafana. I want something that allows me to do a `top` on multiple servers simultaneously while staying in the terminal.

This is why I built rs-top (Remote System Top). It is a simple lightweight TUI system monitor for remote Linux hosts that you have ssh access to. Under the hood it uses the same ssh binary and configs already available locally, and doesn't rely on any agent/exporter installed on the remote hosts. All you need is to list your remote hosts in a `~/.config/rs-top.toml` config file and you can start monitoring them right away.

Here's the source: https://github.com/ruiiiijiiiiang/rs-top

Currently available as a binary release, from the AUR, and as a nix flake.

reddit.com
u/ruiiiij — 16 days ago