Reference

`peekaboo paste`

peekaboo paste

paste is an atomic “clipboard + Cmd+V + restore” helper. It temporarily replaces the system clipboard with your payload, pastes into the focused target, then restores the previous clipboard contents (or clears it if it was empty).

This reduces drift by collapsing multiple CLI steps into one command.

#Key options

FlagDescription
[text] / --textPlain text to paste.
--file-path / --image-pathCopy a file or image into the clipboard, then paste.
--data-base64 + --utiPaste raw base64 payload with explicit UTI (e.g. public.rtf).
--also-textOptional plain-text companion when pasting binary.
--restore-delay-msDelay before restoring the previous clipboard (default 150ms).
Target flags--app <name>, --pid <pid>, --window-id <id>, --window-title <title>, --window-index <n> — focus a specific app/window before pasting.
Focus flagsSame as click/type (--space-switch, --no-auto-focus, etc.).

#Examples

# Paste plain text into TextEdit
peekaboo paste "Hello, world" --app TextEdit

# Paste rich text (RTF) into a specific window title
peekaboo paste --data-base64 "$RTF_B64" --uti public.rtf --also-text "fallback" --app TextEdit --window-title "Untitled"

# Paste a PNG into Notes
peekaboo paste --file-path /tmp/snippet.png --app Notes

#Notes

  • File paths for --file-path and --image-path accept ~/....

#Troubleshooting

  • Verify Screen Recording + Accessibility permissions (peekaboo permissions status).
  • Confirm your target (app/window/selector) with peekaboo list/peekaboo see before rerunning.
  • Re-run with --json or --verbose to surface detailed errors.