Yank: Interactive File Copying in Your Terminal

A TUI utility to recursively scan directories, interactively select files, and copy their content & metadata to the clipboard. Features fuzzy filtering and persistent selections.

Get Started Learn More (Repo)

Features

Interactive TUI

Easy file selection via a terminal interface powered by Bubble Tea.

Fuzzy Filtering

Quickly find files with built-in fuzzy searching.

Persistence

Remembers your selections per directory in a .yank file.

Rich Clipboard Content

Copies file content along with path, modification time, and size.

Cross-Platform

Supports macOS, Linux (xclip/xsel), and Windows.

Recursive & Smart

Scans subdirectories, ignores .git, handles hidden files.

Quick Example

Run yank in your project directory:


# Scan the current directory
yank

# Or specify a directory
yank -dir ./my-project
            

Use arrow keys (or j/k) to navigate, space/m to select, / to filter, and enter/y to copy & quit.

Keybindings

Normal Mode

Key(s) Action
j, k, ↓, ↑ Move cursor up/down.
space, m Toggle selection for the focused file/path.
c, C Clear all selected files.
. Toggle visibility of hidden files/directories (starting with .). Selected hidden items remain visible.
/ Enter filter mode (fuzzy search).
y, enter Confirm selection, copy data to clipboard, save selection, and quit.
q, ctrl+c, ctrl+q Quit without copying or saving.
? Show/hide the full help view (includes keys like PgUp/PgDn).

Filter Mode (after pressing /)

Key(s) Action
(type text) Enter text to fuzzy filter the list.
esc Exit filter mode and clear the current filter.
ctrl+j Move cursor down within the filtered list.
ctrl+k Move cursor up within the filtered list.
ctrl+m Toggle selection for the focused file (works on the underlying overall selection).
backspace Delete the last character from the filter query.
y, enter Confirm selection (uses *all* selected files), copy, save, and quit.
q, ctrl+c Quit without copying or saving.