The Problem With Commands You Almost Remember
Every developer has a category of knowledge that doesn’t fit anywhere: commands too long to memorize but too common to look up every single time. The SELECT with three joins for that one reporting query. The jq filter that flattens a nested API response. The git incantation that recovers from a detached HEAD. The curl command with the right auth headers for staging.
These aren’t worth committing to muscle memory — they’re too specific and too rarely changed to justify that. But Googling them again wastes 5–10 minutes each time, especially when the answer is buried in a Stack Overflow thread you’ve already found before. The right solution sits somewhere between “memorized” and “documented.” Most developers handle this badly, including me for a long time.
I Tried Dedicated Snippet Apps. They Didn’t Stick.
I tried Snippets Lab. I tried Lepton for GitHub Gists. Both are genuinely well-built apps. Neither became a habit.
The problem isn’t the apps — it’s the context switch. When I need a snippet, I’m in a terminal, or in my editor, or reviewing something in a browser. Opening a separate app, navigating to the right folder, finding the snippet, copying it — that’s three steps and a context switch that breaks concentration. I tried both for a couple of months and kept drifting back to a messy commands.md because it was already open in my editor.
GitHub Gists have a different problem: they’re on the web. Ideal for sharing. Slow for retrieval. There’s no keyboard shortcut to summon them, no offline access, and finding a specific snippet means loading a tab and searching — even more friction than my janky text file.
How a Clipboard Manager Solves This (Without Even Trying)
A clipboard manager is already running. It lives in your menu bar. You trigger it with a global hotkey you’ve internalized, grab what you need, and it disappears. The whole interaction takes under three seconds and doesn’t require switching apps.
What I realized: the same mechanism that retrieves “that link I copied 20 minutes ago” can also retrieve “that jq filter I pinned four months ago.” Pinned items don’t expire. They’re just always there, alongside the live clipboard history.
So I started treating the pinned clips section as a persistent snippet library. It grew organically. Now I have around 200 pinned snippets and I couldn’t tell you the last time I Googled a command I’d already solved.
What’s Actually In My Library
I use a naming prefix system so search is fast. Every snippet title starts with a category abbreviation:
- sql: — Reporting queries, schema introspection, one-off migrations I know I’ll need again. “The query that finds duplicate emails in the users table” is now a three-second retrieval, not a 10-minute reconstruction.
- curl: — API test commands with actual auth headers and payloads for staging and production. These are the ones I used to rewrite most often because the flags are fiddly and the order matters.
- git: — My preferred
git logformat, rebase recovery commands, and the exact syntax to push a branch to a fork upstream. Git’s CLI is powerful but not memorable. - jq: — JSON transformations that take me 10 minutes to write from scratch but 5 seconds to retrieve. jq syntax is unforgiving and I’ve never fully memorized it.
- py: — Python one-liners for quick data work: CSV transforms, date arithmetic, batch file renaming. The kind of thing you’d run in a terminal once but don’t want to rederive each time.
- regex: — Patterns I’ve verified actually work: email validation, ISO date extraction, the one that strips ANSI escape codes from terminal output. Regex is fast to run and slow to write correctly.
- tmpl: — Boilerplate starters: Dockerfile
FROMlines with the right base images, GitHub Actions checkout steps, Makefile.PHONYtargets. Not quite snippets, not quite templates.
Searching works two ways. Typing sql: or curl: filters by category immediately. But Clasp also uses on-device AI to classify clips by what they do — so searching “check if docker is running” finds the right snippet even if I titled it something else.
Speed Is the Entire Point
The metric that matters here is time-to-paste from need. Old approach (commands.md): 15–30 seconds, assuming I found it on the first scroll. Snippets Lab: 10–15 seconds. Clipboard manager hotkey: under 3 seconds.
The time difference sounds small. The cognitive difference isn’t. A 15-second retrieval involves a context switch, visual scanning, uncertainty about whether you’re looking in the right place. A 3-second retrieval doesn’t interrupt your flow at all. I’ve stopped thinking of my snippet library as “something I consult” and started treating it as an extension of memory. That shift only works because the access time is low enough to feel immediate.
What Clasp Does Well for This Use Case
I use Clasp for this — it’s the app we built at LorisLabs, so I’m obviously biased, but here’s what actually matters for a snippet library:
- Pinned clips don’t expire. My 200 snippets survived a Mac migration, two macOS upgrades, and one full app reinstall — they came back because they sync through iCloud. An app that wipes pinned items on reinstall is useless as a snippet library.
- On-device AI search means I can query by what a snippet does, not just what I called it. “The command that exports postgres to csv” finds it even if the title just says
pg dump csv. This matters as the library grows past 50 items. - Text expansion is separate but complementary. For snippets I paste multiple times a day, I set up
;;-prefix abbreviations. For ones I use weekly, I pin and search instead. Both live in the same app with no duplication. - Cross-device sync through iCloud. My snippet library is also on my iPhone. I’ve pulled a curl command from my Mac library while standing in front of a server. That’s useful in a way I didn’t predict when I started this.
Try Clasp — free clipboard manager & snippet library for Mac and iOS
Unlimited history, pinned snippets, on-device AI search, and iCloud sync. No account required.
Download FreeOne Habit Change, Tangible Daily Impact
I’m not saying this replaces a dedicated snippet manager in every case. If you need syntax highlighting, version history, or team sharing, a purpose-built tool is probably worth the workflow overhead.
But for the “commands I almost remember” problem — the SQL queries, the curl incantations, the git one-liners — the clipboard manager you already have running beats the dedicated app you have to switch to. The barrier to adding a snippet drops to zero (copy and pin), and retrieval stays under three seconds. Those two things together are what finally made a snippet habit stick for me, after years of trying to make it work with text files and dedicated apps.