CLI reference
yank is built to sit beside pbcopy, pbpaste and xclip in a pipeline, not to replace them.
Commands
Reference
yank list [-n N] [--json] newest first (default 20) yank get <N|id:ID> print one clip to stdout yank copy [TEXT] stdin or TEXT -> clipboard + history yank search <QUERY> [--json] full-text search yank pin <N> | unpin <N> yank register <a-z> [N] bind a clip, or print the bound one yank stats yank journal [--tail N]
Composition
It is a Unix tool
yank get 3 | pbcopy pbpaste | yank copy git rev-parse HEAD | yank copy yank list --json | jq -r '.[].preview' | fzf | yank copy
Conventions
- Text on stdout, JSON only behind
--json. A tool that prints JSON by default is not a Unix tool. - No trailing newline from
get, soyank get 1 | pbcopydoes not add one. - Exit codes mean something: 0 found, 1 not found, 2 usage.
- Every clip prints in full. Detected credentials are flagged with
!inlistandsearch; nothing is masked or withheld.
It reads the encrypted vault directly, so it works whether or not the app is running. Indexes are positions in the current list; id:42 addresses a stable row.