preprinttui
Fast, interactive Terminal User Interface (TUI) for the PreConnect printer subsystem, crafted with Charm & Bubble Tea design principles.
Overview
preprinttui is a standalone, ultra-fast terminal dashboard inspired by Charm and Bubble Tea to monitor and inspect the PreConnect printer swarm in real time. It connects directly with the PreConnect printer endpoints (/print/stats, /print/active, /print/history) to deliver live telemetry, active worker relay status, and instant searchable print records.
Features
- Charm & Bubble Tea Design: High-contrast pill tabs, Bubbles textinput prompt, Huh modal dialogs, and minimalist help keymaps.
- Micro-Animations & Real-Time Engine: 20 FPS live Braille spinner (
⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏), blinking cursor, dynamic status badge toasts (✓ Saved,✓ Refreshed), and sub-second uptime ticking. - Parallel Async Concurrency: Concurrent multi-endpoint fetching via
tokio::join!cutting round-trip latency in half. - Dedicated Search Tab & Live Search: Search across active cluster workers and job history with real-time query matching directly in the tab row.
- Adaptive Inspector Card: Dynamically responsive bottom inspector card preventing any row overflow or clipping across all terminal widths.
- Cross-Platform Secure Storage: Zero-plaintext secret management via OS keychain (macOS Keychain, Linux Secret Service, Windows Credential Manager) with fallback to restricted user-only files (
0600). - Single-Word Interface: Clean, clutter-free minimalist typography.
Installation
Homebrew (macOS & Linux)
To update anytime:
One-Line Installer (macOS, Linux & Android Termux)
|
Cargo
From Source
Requires Rust (2024 edition or later):
The optimized binary will be available at target/release/preprinttui.
Prebuilt Binaries
Precompiled standalone binaries for Windows (x86_64), Linux (x86_64-unknown-linux-musl), Android (Termux), and macOS (arm64) are available on the GitHub Releases page.
Usage
Authentication Workflow
- Launch
preprinttui: - Public statistics load automatically.
- If credentials were previously saved,
preprinttuiloads them securely and authenticates immediately. - To view or change protected active workers and history credentials, press
e(orc) to open the Credentials modal. - Enter your
KeyorPassword(inputs are securely masked). - Press
Enterto save credentials securely and authenticate immediately. - Press
xat any time to purge credentials from secure storage.
Keyboard Controls
| Key | Action |
|---|---|
1 |
Switch to Workers tab |
2 |
Switch to History tab |
3 |
Switch to Search tab |
Tab / l / Right |
Cycle forward through tabs |
BackTab / h / Left |
Cycle backward through tabs |
j / Down |
Move selection down |
k / Up |
Move selection up |
/ |
Open live Search on active view |
e / c |
Open Credentials modal |
x |
Clear credentials from storage |
r |
Trigger Refresh |
a |
Toggle Auto-refresh |
q / Ctrl+C |
Quit |
Credits & Acknowledgments
- Author: Sabbir Bin Abbas
- PreConnect Ecosystem: Developed as part of the PreConnect academic companion platform for BRAC University students.
- Daemon & Swarm Protocol: Inspired by and compatible with
hitblast/preprintdby Anindya Shiddhartha. - Design Inspiration: Charm and Bubble Tea.
License
This project is licensed under the GNU General Public License v3.0.