Maccy + Terminal: A Power User Setup for macOS
Quick answer: Maccy works with the terminal because it watches the system pasteboard, the same one pbcopy and pbpaste read and write. Anything you pipe into pbcopy, copy from tmux or Neovim (once they’re wired to the system clipboard), or select in your terminal lands in Maccy App‘s history. You can then search, pin and re-paste it from any app.
What problem does this setup solve?
You ran a long kubectl command twenty minutes ago, copied a pod name, then copied a Slack message, then a URL. The pod name is gone from the clipboard, and it isn’t in your shell history either, because you copied it from output, not from a command you typed.
Shell history records what you typed. A clipboard manager records what you moved. Terminal work involves a lot of the second kind: hashes, paths, IPs, tokens, log lines, JSON fragments. Maccy Mac covers that gap, and it does it without a daemon, an account or a cloud sync. It’s a local, privacy-security/is-maccy-safe-privacy-security-review-2026″>open-source menu bar app.
Layer 1: Install and the settings that matter
Install with Homebrew, or download from the site or the Mac App Store:
brew install --cask maccy
Open the Settings window from the menu bar icon (or with ⌘, while the popup is open). For terminal use, these are the ones worth touching:
| Setting | Recommendation | Why it matters in a terminal workflow |
|---|---|---|
| Search mode (General) | Mixed or Regexp | Lets you find a copied IP or hash by pattern, not just by literal text. |
| Paste automatically (General) | On, if you accept the Accessibility prompt | Picking an item pastes it straight into the focused terminal instead of just loading the clipboard. |
| History size (Storage) | Raise it from the default if you copy a lot of snippets | Log fragments and hashes churn through fast. |
| Pins (Appearance/Pins) | Pin the 3-5 strings you retype daily | Pinned items stay at the top and survive history rollover. |
| Ignore (Ignore tab) | Add your password manager; review pasteboard types and regex | Keeps secrets out of history. See Layer 5. |
“Paste automatically” needs permission under System Settings → Privacy & Security → Accessibility, because Maccy Clipboard synthesizes a paste keystroke. If it silently stops pasting after a macOS upgrade, check that toggle first.
Layer 2: pbcopy and pbpaste pipelines
pbcopy reads stdin into the system pasteboard. pbpaste writes the pasteboard to stdout. Because Maccy sits on the same pasteboard, every pbcopy call becomes a history entry.
# Public SSH key, ready to paste into GitHub pbcopy < ~/.ssh/id_ed25519.pub # Last 50 log lines, errors only tail -n 50 app.log | grep -i error | pbcopy # Pretty-print the JSON you just copied, then copy the result back pbpaste | jq . | pbcopy # Current git branch, no trailing newline git branch --show-current | tr -d '\n' | pbcopy # Sort and de-duplicate whatever list is on the clipboard pbpaste | sort -u | pbcopy
The pbpaste | tool | pbcopy pattern is the core idiom. You copy something in a browser, transform it in the shell, and the cleaned version is now the top Maccy entry. The original is still one keystroke away if you need it.
One detail from daily use: Maccy polls the pasteboard on an interval rather than receiving a push notification. If a script calls pbcopy several times within a fraction of a second, intermediate values can be missed and only the last one is recorded. That is fine for interactive use. If you’re generating many values in a loop and want each one captured, add a short sleep between calls.
Layer 3: tmux, Neovim and SSH
Is the terminal’s own selection going into Maccy?
It depends on the terminal. In Terminal.app, ⌘C on a selection writes to the system pasteboard, so Maccy sees it. In iTerm2, enable Settings → General → Selection → Copy to pasteboard on selection if you want select-to-copy behavior; each selection then becomes a history entry (which can get noisy, so decide whether you want that).
tmux
Copy-mode yanks stay inside tmux’s own buffer unless you pipe them out. Add this to ~/.tmux.conf:
set -g mode-keys vi bind -T copy-mode-vi v send -X begin-selection bind -T copy-mode-vi y send -X copy-pipe-and-cancel "pbcopy"
Now y in copy mode sends the selection to pbcopy, and therefore to Maccy. This works for local sessions. Inside an SSH session on a remote machine, pbcopy doesn’t exist, which brings us to OSC 52.
Neovim and Vim
" init.vim / .vimrc set clipboard=unnamedplus " Neovim; use =unnamed on macOS Vim if needed
With this, yanks (y) go to the system pasteboard, and Maccy records them. If you’d rather keep yanks private to Vim, leave it off and use "+y only when you want a handoff.
Copying from a remote server
Terminals that support the OSC 52 escape sequence let a remote program write to your local clipboard, which means Maccy captures it too. iTerm2 supports this but gates it behind a setting (Settings → General → Selection → Applications in terminal may access clipboard). In tmux, set -g set-clipboard on forwards it. Support varies by terminal, and I wouldn’t assume Terminal.app handles OSC 52. Test with:
printf '\033]52;c;%s\a' "$(printf 'hello from remote' | base64)"
If “hello from remote” shows up at the top of Maccy, your chain works.
Layer 4: Pasting into a shell safely
A clipboard manager makes pasting so easy that you can forget what you’re pasting. Two habits are worth building.
- Prefer bracketed paste. Modern zsh and bash (readline 8.1+) enable bracketed paste, so a multi-line paste lands in the prompt for review instead of executing line by line. If a paste ever runs immediately, your shell or terminal isn’t using it. Check before pasting anything from the web.
- Use plain-text paste. Maccy can paste without formatting, and in a terminal that is almost always what you want. Rich-text artifacts are not a problem in shells, but plain text avoids surprises in editors that run inside them. Check the Settings → General toggle and the modifier-key behavior for your version.
A pasted command from a web page can differ from what you see on screen (hidden characters, swapped text). Pause on the Maccy preview, or paste into the prompt without pressing Return and read it first.
Layer 5: Secrets and what not to record
This is the section most clipboard-manager guides skip. If you copy an API token, Maccy will remember it unless something tells it not to. What protects you:
| Mechanism | What it does | Limitation |
|---|---|---|
| Pasteboard type filtering | Maccy skips items flagged as concealed or transient by the source app, following the nspasteboard.org convention. Well-behaved password managers set these flags. | Only works if the source app sets the flag. pbcopy does not. |
| Ignore applications | Skips everything copied from listed apps. | Works per app, so it can’t distinguish a token from a harmless string in the same terminal. |
| Ignore by regex | Skips copied text matching a pattern you define, for example a rough “long unbroken token” shape. | Heuristic. It will miss some secrets and occasionally skip harmless strings. |
| Delete the item | Remove the entry from history right after use. | Manual. Needs a habit. |
The honest summary: anything you push through pbcopy is an ordinary pasteboard write, so Maccy treats it as normal text. For secrets, pull them from your password manager (which flags them) and delete any history entry you didn’t mean to keep. A regex such as ^[A-Za-z0-9+/=_-]{32,}$ in the ignore list is a reasonable safety net for token-shaped strings, not a guarantee.
Everything Maccy stores stays on your Mac, with no sync service in the loop. That is a real privacy advantage, but it also means the history is only as private as your disk and your login session.
How do you find an old command or hash fast?
Open Maccy (default shortcut ⇧⌘C) and just start typing. With search mode set to Regexp or Mixed, patterns work:
| You want | Type |
|---|---|
| An IPv4 address | \b\d{1,3}(\.\d{1,3}){3}\b |
| A 40-char git SHA | \b[0-9a-f]{40}\b |
| Any kubectl command | ^kubectl |
| A UUID | [0-9a-f]{8}-[0-9a-f]{4}- |
| A file path under home | ^/Users/ |
Pin the handful of strings you’d otherwise retype every day: a staging hostname, a Docker login line, a long rsync flag set. Pins don’t age out as new copies push old ones off the list.
Where does this setup fall short?
- It isn’t shell history. Maccy stores what hit the clipboard. Use
atuin,fzfwith Ctrl-R, or plainhistoryfor typed commands. They complement each other. - No sync. Local-first means your remote servers and other Macs don’t share the history.
- Polling. Very rapid scripted copies can be collapsed (see Layer 2).
- Select-to-copy noise. Terminals that copy on selection fill history quickly. Consider turning that off.
Putting it together
The minimal power-user stack is small: install Maccy, switch search to Mixed or Regexp, allow automatic paste, wire tmux and Neovim to pbcopy, and set up ignore rules for secrets. After that, the habit that pays off most is using pbpaste | … | pbcopy instead of retyping.
If you try it, here’s a question worth answering for your own workflow: which three strings do you retype most often, and should they be pins by tomorrow? If you want to get started, Maccy is free and open source.
