Home Blog Use macOS pbcopy and pbpaste safely in Terminal

Use macOS pbcopy and pbpaste safely in Terminal

The built-in pasteboard commands make it easy to move plain text between Terminal and another app. That system clipboard workflow is separate from NotchDock Quick Access; no NotchDock hotkey or shell pipe is documented.

Copy a short, non-sensitive result

Pipe plain text into pbcopy to place it on the macOS general pasteboard:

printf 'Build note: ready for review
' | pbcopy

Move to the target app and paste with Command+V. Apple documents the general pasteboard as a shared transfer service between apps, so do not treat it as private storage.

Inspect the current clipboard only when needed

pbpaste writes the current pasteboard text to standard output:

pbpaste

Be aware that terminal output can be captured in scrollback, screen recordings, or logs. Avoid running this when the clipboard may contain a password, recovery code, API token, or private message.

How this relates to NotchDock

The reviewed app source includes a user-managed Quick Access snippet list stored through the Keychain helper. That list is distinct from the system pasteboard. The source does not document a customizable global hotkey, a pbcopy-to-widget pipe, or automatic import of terminal output. Add a snippet using the app’s available controls, and do not store production credentials there.

For the shared pasteboard API, see Apple’s NSPasteboard reference. This page does not claim NotchDock controls Terminal or captures shell output.