๐ PortSage - Process + Port Explorer
PortSage is a sleek TUI (Terminal User Interface) tool that helps you:
- ๐งญ Explore processes on your machine
- ๐ Filter by name, command, PID, or port
- ๐ View ports associated with each process
- ๐ช Inspect process details in a side panel or floating modal
- ๐๏ธ Kill processes interactively with confirmation dialog
- ๐ Copy PID to clipboard with one key
- ๐จ Switch themes between Kanagawa, Tokyo Night, and Nord
- ๐ช Adapts to terminal width with a two-pane layout on wide screens
โจ Features
๐ Process Overview
- Lists all processes
- Shows PID, name, ports, and command line
- Port-bound processes are sorted to the top
๐ฏ Filter Mode
- Press
:to enter filter mode - Matches against name, command, and PID
๐ Detail Mode
-
Press
Tabto open process detail window -
Shows full metadata including:
- CPU usage, memory
- Executable path
- Current working directory
- Listening ports
๐ Copy PID
- Press
Enterto copy the selected PID to clipboard - Confirmation message appears for 2 seconds
โ Kill Process
- Press
xto open confirmation dialog - Press
yto kill the process (SIGKILL) - Press
norEscto cancel - โ Success message shown after killing
๐ช Responsive Layout
- Terminals โฅ 100 columns wide split into a list pane (left) and a live detail panel (right)
- The right panel updates as you navigate;
Tabstill opens a full-screen expanded view - Narrower terminals fall back to a single-pane list with the floating Tab modal
- The whole UI is capped at 120 columns and centered, so ultra-wide terminals stay readable
๐จ Themes
- Three built-in palettes: Kanagawa (default), Tokyo Night, Nord
- Pick one with
--theme <name>or setPORTSAGE_THEME=<name> - The CLI flag wins over the env var; unknown names exit with a clear error
PORTSAGE_THEME=nord
๐ฎ Key Bindings
| Key | Action |
|---|---|
j / Down |
Move down |
k / Up |
Move up |
: |
Enter filter mode |
Tab |
Show detail |
Enter |
Copy PID to clipboard |
x |
Kill process (confirm) |
q / Esc |
Quit |
๐ ๏ธ Install & Run
๐ฆ Install from crates.io
โ๏ธ Install via Nix Flakes
๐ฆ CLI Options
)
)
Theme can also be set via the PORTSAGE_THEME environment variable. The CLI flag takes precedence.
๐งช Requirements
- ๐ฆ Rust 1.70+
- Linux/macOS (requires
lsof)
๐ฏ Examples
TUI Mode (Default)
# Launch interactive TUI
# Use a specific theme
# Or set the theme via env var
PORTSAGE_THEME=nord
CLI Mode
# List all processes with ports
# Filter by process name
# Filter by port
# Output as JSON
# Kill a process