Minimal interactive line picker for the command line.
Read newline-separated choices from stdin or a file and select one interactively.
cargo install pik-cliGrab the binary for your platform from the latest release on GitHub.
Linux (x86_64)
curl -sSLo pik https://github.com/programmersd21/pik/releases/latest/download/pik-linux-x86_64
chmod +x pik
sudo mv pik /usr/local/bin/macOS (Intel)
curl -sSLo pik https://github.com/programmersd21/pik/releases/latest/download/pik-macos-x86_64
chmod +x pik
sudo mv pik /usr/local/bin/macOS (Apple Silicon)
curl -sSLo pik https://github.com/programmersd21/pik/releases/latest/download/pik-macos-aarch64
chmod +x pik
sudo mv pik /usr/local/bin/Windows (PowerShell)
Invoke-WebRequest -Uri https://github.com/programmersd21/pik/releases/latest/download/pik-windows-x86_64.exe -OutFile pik.exepik --file list.txt --prompt "Select:"
cat list.txt | pik
git branch | pik | xargs git checkout| Flag | Description |
|---|---|
-p, --prompt <text> |
Header text |
-f, --file <path> |
Read from file |
-V, --version |
Show version |
-h, --help |
Show help |
| Key | Action |
|---|---|
↑ / k |
Move up |
↓ / j |
Move down |
Home / g |
Jump to first |
End / G |
Jump to last |
PageUp / Ctrl+u |
Page up |
PageDown / Ctrl+d |
Page down |
Enter |
Confirm |
Esc / q / Ctrl+c |
Cancel |
Click |
Move cursor |
Double-click |
Confirm |
Mouse capture is enabled automatically.
- Click a row to move the cursor to it, press
Enterto confirm, same as keyboard navigation. - Scroll wheel moves the cursor up or down one row at a time.
| Code | Meaning |
|---|---|
| 0 | Selection made |
| 1 | Error |
| 130 | Cancelled |
MIT
