ducktrace-tui
A terminal user interface for browsing logs and managing services β aiming to provide both good UX as well as DX.
Features
-
π Browse local log files (default ~/.config/duckTrace/)
-
π Secure network support - using SSH
-
βοΈ List and view logs of system and user services (via journalctl)
-
π Scroll through logs with arrow keys, PageUp/Down
-
ποΈ Follow logs in realβtime (tail)
-
π οΈ Start, stop, restart services
-
π¦ Works seamlessly with:
- ducktrace-loggger (Rust apps)
- ducktrace-python (Python apps)
- ducktrace-sh (Bash scripts)
- sytemd (System & User service management)
Installation
NixOS (using flakes)
Add the flake input and overlay to your configuration:
{
inputs.ducktrace-tui.url = "github:QuackHack-McBlindy/ducktrace-tui";
outputs = { self, nixpkgs, ducktrace-tui, ... }: {
nixosConfigurations.myMachine = nixpkgs.lib.nixosSystem {
modules = [
{
environment.systemPackages = [
ducktrace-tui.packages.${system}.default
];
}
];
};
};}
Build from source
# Run the binary
Configuration
The TUI respects these environment variables (they override defaults):
$DT_LOG_PATH β directory containing log files (default: ~/.config/duckTrace/)
$DT_SSH_HOST - hostname of the machine to browse logs on
$DT_SSH_USER - username to connect to
DT_SSH_PORT - SSH port to connect on (default: 22)
No other configuration is required β log files with the .log extension are automatically discovered.
Usage
Run ducktrace-tui in your terminal.
Keybindings
| Key | Action |
|---|---|
Tab |
Switch focus between left (sources) and right (log) panels |
β / β |
Navigate sources or scroll log |
PageUp/PageDown |
Scroll log by page |
Enter |
Load selected source (file or service log) |
f |
Toggle follow mode (tail log) β right panel only |
a |
Show service actions (start/stop/restart) β left panel only |
s / t / r |
In action menu: start, stop, restart |
Esc |
Close popup (error or action menu) |
q |
Quit |
License
MIT