Store Frequently Used Commands on Mac
Store Frequently Used Commands on Mac
Every developer has a handful of commands they run constantly: a multi-stage Docker build, an ffmpeg re-encode with the exact right flags, a psql connection string, a find invocation you can never quite remember. Retyping them — or scrolling shell history hoping to catch the right one — is slow and error-prone.
Storing those commands somewhere you can recall instantly turns a 30-second hunt into a single keystroke. Here's how to do it on macOS.
The usual approaches and their limits
Developers reach for a few tactics, each with a catch:
- Shell history (Ctrl+R): great until the command scrolled past the history limit, or you're on a different shell, or you can't remember enough of it to search.
- Shell aliases / functions: powerful, but they live in
.zshrc, only work in the terminal, and editing them for a one-off is overkill. - A notes file: works, but you have to find the file, find the line, and copy it manually every time.
None of these put the command one keystroke away across every context — including outside the terminal, like pasting a command into documentation, a runbook, or a chat.
Store commands as snippets in ClipHistory
ClipHistory is a clipboard manager for macOS with a dedicated snippets feature. Saving a command as a snippet keeps it permanent, named, and instantly pastable anywhere.
1. Save the command
When you finally get a command right, save it as a snippet with a descriptive name like docker-build-prod, ffmpeg-h264-720p, or pg-connect-staging. Snippets are stored locally on your Mac — important when a command includes an internal host, a path, or a connection template you don't want leaving the device. There's no account and no cloud.
2. Recall with Cmd+Shift+V
Press Cmd+Shift+V, find the command, and paste it into your terminal. Because ClipHistory works system-wide, the same command is just as easy to paste into a README, a wiki, or a Slack thread.
3. Group with boards
Put related commands on a board — one for Docker, one for media tooling, one for database ops. Switching tasks brings the right set together instead of scrolling a flat list.
Adjust a command before you run it
Stored commands often need a small edit: a different filename, a staging host instead of production, a tweaked flag. ClipHistory's AI transforms (summarize, rewrite, translate, clean) can help reshape text on the way out, running through your own API key from Anthropic, OpenAI, DeepSeek, Google, or a custom provider. Requests go directly from your Mac to that provider — nothing is stored on a ClipHistory server.
For pure recall, though, the snippet plus a quick manual edit is usually all you need.
Snippets vs. clipboard history for commands
ClipHistory keeps both, and they serve different purposes:
- History captures the last 150 unpinned clips — including commands you copied recently. Good for "what did I just run?"
- Snippets are permanent. The command you saved months ago is still one keystroke away. Pinned items are unlimited, so your command library never gets evicted.
Use history for the recent and snippets for the keepers.
A realistic example
You maintain three services. Each has a slightly different deploy command. Instead of digging through three READMEs:
- Cmd+Shift+V, paste
deploy-service-a. - Next service: paste
deploy-service-b. - Need to share one with a teammate: paste it straight into Slack.
The commands you got right once are now permanently at hand.
Get ClipHistory for macOS
ClipHistory is signed and notarized by Apple, a universal binary for Apple Silicon and Intel Macs, macOS 12 or later. Snippets, boards, history, and AI transforms are included for a one-time $19.99 — a 12-month license with no subscription and no auto-renewal.
Stop retyping the commands you've already perfected. Get ClipHistory for macOS ($19.99).