fleet-tui

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 25 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README ΒΆ

Fleet TUI πŸ“‘

Lightweight, zero-dependency Terminal User Interface (TUI) for Linux fleet monitoring & diagnostics.

Go Version License Architecture

Fleet TUI Live Demo

Fleet TUI is a fast, keyboard-centric terminal dashboard designed to monitor and diagnose Linux servers and virtual machines in real time. Built with Bubble Tea and Lip Gloss.


✨ Features

  • ⚑ Zero Infrastructure: Single static binary. No Docker, daemon, or database required.
  • 🎨 7 Color Themes:
    • Dark Themes: Cyberpunk, Dracula, Nord, Matrix
    • Light Themes: Solarized Light, Paper Light, Catppuccin Latte
    • Press [t] to cycle themes live with instant contrast adaptation.
  • πŸ” Incremental Search: Press [/] or [Ctrl+F] to filter hosts by name, IP, or status in real time.
  • πŸ“Š Real-Time Telemetry: Multi-threaded SSH sweeps reporting Root Disk %, RAM %, and Kernel CPU load averages (1/5/15 min).
  • πŸ›  7 Inbuilt Diagnostics: Run disk usage, memory/swap, top CPU processes, inode health, and network socket diagnostics with a single keypress. Toggle continuous live streaming with [l].
  • βž• Easy Host Onboarding: Add hosts interactively via [n] or maintain your inventory in standard JSON.

πŸ“‘ Quick Start

1. Installation
Pre-built Binary

Download the latest binary from Releases or build directly with Go:

# Clone the repository
git clone https://github.com/csharmatech/fleet-tui.git
cd fleet-tui

# Build standalone binary (zero CGO required)
CGO_ENABLED=0 go build -ldflags="-s -w" -o fleet-tui .
2. Choose Your Deployment Mode

Fleet TUI supports two deployment modes out of the box using the same binary:

Mode A: Standalone Personal TUI (Default / Zero-Setup)

Best for individual developers, homelabs, or ad-hoc debugging on a single machine:

./fleet-tui
  • Launches the interactive dashboard directly on your terminal.
  • Performs local and direct SSH sweeps to your configured hosts.
  • Zero listening network ports, zero daemons.
Mode B: Centralized Team Mode (Daemon + Shared Viewers)

Best for operations teams monitoring shared infrastructure without causing an SSH connection storm:

  1. Start the Headless Poller Daemon on your central management server or jump box:

    ./fleet-tui --daemon :8090 &
    
    • Sweeps all fleet nodes via SSH once every 2 seconds in the background.
    • Holds live metrics in memory and exposes a lightweight REST API (/api/v1/telemetry).
    • Zero TUI rendered on the server.
  2. Connect TUI Viewers from anywhere on your team:

    ./fleet-tui --connect <server-ip>:8090
    
    • Multiple users can attach their visual TUI dashboards simultaneously.
    • Zero redundant SSH load: Target servers are only probed once by the daemon.
    • Real-Time Synchronization: If any team member adds ([n]) or deletes ([x]) a server, it updates the central daemon and reflects on all connected screens within 2 seconds.

3. Adding Hosts for Monitoring

You can add Linux hosts to your fleet using either the Interactive In-App Modal or by editing the JSON Inventory File.

  1. Launch fleet-tui.
  2. Press [n] or [+] to open the Add Linux Host modal.
  3. Fill in the three fields:
    • Host name: A human-friendly alias (e.g., web-prod-01, db-node-02).
    • IP address / FQDN: The target IPv4 address or hostname (e.g., 192.168.1.50).
    • SSH username: The Linux user on the remote target machine where your SSH key is authorized (e.g., test, ubuntu, root).
  4. Press [Tab] or [↓] to move between fields.
  5. Press [Enter] to save and begin monitoring immediately (or [Esc] to cancel).
  6. To delete a host, select it in the list and press [x] or [Delete].
Method B: Static JSON Inventory (hosts.json)

You can manage your fleet inventory declaratively in JSON. By default, fleet-tui checks:

  1. FLEET_HOSTS_PATH (environment variable override)
  2. ./hosts.json (current working directory)
  3. ~/.config/fleet-tui/hosts.json (user home directory configuration)

Copy the example template or create your own:

cp hosts.json.example hosts.json
[
  {
    "name": "localhost",
    "ip": "127.0.0.1",
    "user": "local",
    "is_local": true
  },
  {
    "name": "web-prod-01",
    "ip": "192.168.1.50",
    "user": "test"
  }
]

4. SSH Prerequisites for Remote Hosts

To monitor a remote host, fleet-tui connects via standard OpenSSH key-based authentication. Ensure the following prerequisites:

  1. Target User: The user specified must match the account on the target machine that holds your authorized public key.
  2. Authorized Key: Your monitoring machine's public key (~/.ssh/id_rsa.pub or derived from ~/.ssh/id_rsa) must be present in the remote user's ~/.ssh/authorized_keys.
    # One-line copy to remote machine
    ssh-copy-id -i ~/.ssh/id_rsa.pub user@<remote-ip>
    
  3. Verify Passwordless Access: Test that passwordless execution works:
    ssh -o BatchMode=yes user@<remote-ip> "uptime"
    
    (If this returns Permission denied, check that ~/.ssh has 0700 permissions and ~/.ssh/authorized_keys has 0600 permissions on the remote server).
  4. POSIX Utilities: Ensure df, free, and uptime are installed on the remote machine (standard in all Linux distributions).

⌨️ Keyboard Shortcuts

Key Action
[t] Cycle through all 7 themes (Cyberpunk β†’ Dracula β†’ Nord β†’ Matrix β†’ Solarized Light β†’ Paper Light β†’ Catppuccin Latte)
[/], [f] Open live search bar
[Ctrl+U] Clear search filter
[Esc] Cancel search / close modal / close dropdown
[↑] / [k], [↓] / [j] Navigate host list
[d] / [c] Open diagnostic commands dropdown menu
[Tab] Cycle diagnostic command directly
[Enter] Execute selected command on active VM
[n] / [+] Add new Linux host
[x] / [Del] Remove selected host
[l] Toggle live diagnostic streaming (auto-executes command on heartbeat)
[r] Pause / resume fleet telemetry auto-refresh
[i] Cycle refresh interval (2s β†’ 10s β†’ 30s β†’ 60s)
[1], [2], [3], [6] Direct jump to 2s, 10s, 30s, 60s
[a] Force immediate fleet rescan
[q] / [Ctrl+C] Quit

πŸ›‘ Security & Privacy

  • Zero Telemetry Collection: No data ever leaves your local terminal.
  • Direct SSH Handshake: All SSH connections use standard OpenSSH cryptographic keys.
  • Zero Daemon Overhead: Runs on demand and exits cleanly.

πŸ“„ License

MIT License. See LICENSE for details.

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL