purple-ssh 0.5.0

A fast, interactive TUI (terminal UI) for managing your ~/.ssh/config. Add, edit, delete and connect to SSH hosts from the terminal
Documentation

😩 The Problem

Your ~/.ssh/config has 47 hosts and counting. You edit it by hand. One typo locks you out of production. You have no backups. You grep for hostnames like a caveman. Sound familiar?

✨ What Purple Does

Purple reads your SSH config, gives you a proper interface and writes it back. Byte-for-byte. Your comments, formatting and unknown directives survive every edit. No proprietary formats. No surprises.

🖥️ Manage Hosts

Add, edit, clone and delete hosts through a form interface. Connect to any host by pressing Enter. Quick-add from the command line with purple add user@host:port. Bulk import from a hosts file or ~/.ssh/known_hosts. Paste user@host:port into the alias field and watch it auto-fill the rest. Smart paste. Because life's too short to fill out forms.

🔍 Find Things Fast

Search and filter by alias, hostname or user. Filter by tag with tag:prod. Sort by alias, hostname or frecency. Vim-style navigation with j/k and arrow keys. Group headers turn comments above Host blocks into visual sections. Your config stays organized without you trying.

📡 Know What's Alive

Ping hosts with a TCP reachability check before you connect. One host or all of them. No more SSHing into the void.

🔑 SSH Key Management

Browse your keys, see fingerprints and linked hosts. Pick a key with Ctrl+K right from the form. No more guessing which key goes where.

📂 Include Support

Reads Include directives recursively with glob expansion. Included hosts show up in the list but stay read-only. Your multi-file setup just works.

🏷️ Tags and Labels

Tag hosts with t and comma-separated labels. Filter by tag with /tag:prod. Tags are stored as comments in your config. Fully round-trip safe.

📋 Copy to Clipboard

Press y to copy the SSH command or x to export the full config block. Works on macOS, Wayland and X11.

🔄 Auto-Reload

Edit your config in another editor? Purple detects external changes and reloads automatically. Deleted a host by accident? Press u to undo.

📊 Connection History

Purple remembers when you last connected to each host. Sort by frecency to surface your most-used hosts. History persists across sessions.


🛡️ Built for the Paranoid

Round-trip fidelity Comments, formatting, unknown directives. All preserved.
Atomic writes Temp file, chmod 600, rename. No half-written configs.
Automatic backups Every write creates a backup. Keeps the last 5.
Shell completions Bash, zsh and fish.
Works everywhere ANSI 16 colors. Any terminal theme, any monospace font. No Nerd Font needed.
NO_COLOR Respects the NO_COLOR standard. Set NO_COLOR=1 to disable colors.

📦 Install

Homebrew (macOS)

brew install erickochen/purple/purple

Cargo

cargo install purple-ssh

From Source

git clone https://github.com/erickochen/purple.git && cd purple && cargo build --release

🚀 Usage

purple                              # Launch the TUI
purple myserver                     # Connect or search
purple -c myserver                  # Direct connect
purple --list                       # List all hosts
purple add deploy@10.0.1.5:22      # Quick-add a host
purple import hosts.txt             # Bulk import from file
purple import --known-hosts         # Import from known_hosts
purple import hosts.txt --group Prod # Import with group label
purple --completions zsh             # Generate shell completions

⌨️ Keybindings

Host List

Key Action
j / k Navigate up and down
Enter Connect to selected host
a Add new host
e Edit selected host
d Delete selected host
c Clone host
y Copy SSH command
x Export config block to clipboard
/ Search and filter
t Tag host (comma-separated)
s Cycle sort mode
i Inspect host details
u Undo last delete
p Ping selected host
P Ping all hosts
K SSH key list
? Help
q / Esc Quit

Search

Key Action
Type Filter hosts
Enter Connect to selected
Esc Cancel search
Tab / Shift+Tab Next / previous result

Form

Key Action
Tab / Shift+Tab Next / previous field
Ctrl+K Pick SSH key
Enter Save
Esc Cancel

💜 Why "Purple"?

Every project needs a name. This one got picked because purple is the creator's favorite color. No acronym, no grand metaphor. Just vibes. 😉

License

MIT