README
¶
go-clipper
Interactive TUI file line selector with vim-like navigation. Select multiple lines and copy them to clipboard in real-time.
Install
Via go install (recommended)
go install -v github.com/K4Ni1337/go-clipper@latest
Make sure
$GOPATH/binor$GOBINis in your$PATH.
Build from source
git clone https://github.com/K4Ni1337/go-clipper.git
cd go-clipper
go build -o go-clipper .
Usage
go-clipper <file> [--clear-cache]
Keybindings
| Key | Action |
|---|---|
↑/↓ or j/k |
Navigate up/down |
Space |
Toggle selection of current line + auto-copy to clipboard |
a |
Select all visible lines + auto-copy |
c |
Clear all selections + auto-copy |
i |
Invert selection + auto-copy |
g |
Go to first line |
G |
Go to last line |
: |
Go to specific line (type number + Enter) |
/ |
Search / filter — type to filter lines in real-time |
Enter |
In filter mode: accept filter. Otherwise: quit |
Esc |
In filter mode: cancel filter. Otherwise: quit |
f |
Sort by URL (toggle ↑/↓/off) |
F |
Sort by HTTP status code |
s |
Sort by port |
u |
Undo last selection/deselection |
t |
Toggle dark / light theme |
v |
Toggle columns visibility (CSV mode) |
q |
Quit |
How it works
- Open any text file
- Navigate with arrow keys or vim keys
- Press
Spaceto toggle a line — it is instantly copied to your clipboard - Press
Spaceagain on another line — both lines are now in your clipboard - Press
Enterorqwhen done - Paste anywhere!
The clipboard always contains all currently selected lines (newline-separated). No need to press a separate copy key.
Visual indicators
| Indicator | Meaning |
|---|---|
[ ] |
Not selected |
[x] |
Selected now (yellow background) |
✓ |
Already copied in a previous session (grayed out) |
The Copied state is only set when you quit the program (Enter / q / Esc). Selecting and then deselecting a line with Space does not mark it as copied.
Persistence
go-clipper saves copied URLs to ~/.config/go-clipper/cache.json on exit. Next time you open the same file (or any file with the same URLs), those lines appear marked as ✓ (already copied).
# Clear the cache
go-clipper --clear-cache
# Or manually
rm ~/.config/go-clipper/cache.json
CSV mode
When you pass a .csv file (e.g. httpx-full-report.csv), go-clipper automatically switches to CSV mode:
- Only these columns are displayed:
url,port,status_code,host_ip,cdn_name - Pressing
Spacecopies only the URL from each selected row - The header row is skipped
- Status codes are color-coded: 🟢 2xx · 🟡 3xx · 🔴 4xx · 🟠 5xx
- Press
vto toggle column visibility
This is perfect for filtering recon output and opening only the URLs you care about.
Search / Filter mode
Press / to enter filter mode. Type any string — only lines containing the text remain visible.
| Key | Action |
|---|---|
| Type text | Filter lines in real-time |
Space |
Toggle selection on/off for current line |
↑/↓ or j/k |
Navigate filtered results |
Enter |
Accept filter and return to normal mode |
Esc |
Cancel filter and show all lines |
Backspace |
Delete last character in filter |
Multi-criteria sorting
Press f, F or s to sort by URL, status code, or port. Press again to reverse order. A third press removes sorting.
Current sort is shown in the header: URL ↑, Status ↓, Port ↑.
Undo
Made a mistake? Press u to undo the last selection/deselection action. Multiple undo levels are supported.
Theme
Press t to toggle between dark and light theme. Preference is not saved between sessions (yet).
Column visibility (CSV mode)
Press v to toggle which columns are displayed. A dropdown menu lets you show/hide Port, Status, Host IP, and CDN.
Highlights
Create a file at ~/.config/go-clipper/highlights.json to highlight matching lines with custom colors:
[
{"pattern": "admin", "color": "cyan"},
{"pattern": "403", "color": "red"},
{"pattern": "200", "color": "green"}
]
Supported colors: black, red, green, yellow, blue, white, gray, orange, darkred, darkgreen, darkblue, teal, lime, navy, maroon.
Custom keymap
Create a file at ~/.config/go-clipper/keymap.json to customize keybindings:
{
"down": "j",
"up": "k",
"toggle": " ",
"selectAll": "a",
"clearAll": "c",
"invert": "i",
"goto": ":",
"sort": "f",
"sortStatus": "F",
"sortPort": "s",
"top": "g",
"bottom": "G",
"search": "/",
"undo": "u",
"theme": "t",
"toggleColumns": "v",
"quit": "q"
}
License
MIT
Documentation
¶
There is no documentation for this package.