I copy and paste things all day. URLs, SQL snippets, JSON blobs, terminal commands. And every single time I copy something new, the previous thing vanishes. Gone. If I need it again, I'm hunting through browser tabs or scrolling back through my terminal history. It's a small annoyance that adds up to a real productivity drain over the course of a day.

So I built ClipStash -- a lightweight clipboard manager that lives in the macOS menu bar. It remembers your last few copies so you don't have to. No Electron app, no subscription, no 200MB download. Just a simple Python script that does one thing well.

Why Not Use an Existing One?

I tried a few. Some of them are genuinely good, but they all had the same problem: they did way too much. I don't need clipboard syncing across devices. I don't need rich text formatting preservation. I don't need a searchable archive of every string I've copied since 2019. I just need to see my last five clips and pick one.

The paid options felt absurd for something this simple. And the free ones either looked abandoned or required granting accessibility permissions that made me uncomfortable. I figured if all I need is a menu bar icon with a short list of recent copies, I can build that in an afternoon. And I pretty much did.

How It Actually Works

The core of ClipStash is straightforward. A Python script uses rumps to create a native macOS menu bar application. Every half second, it checks the system clipboard using pyperclip. If the content has changed, it pushes the new entry onto a list and saves it to a JSON file in your home directory. The menu bar icon shows your last five clipboard entries, and clicking any of them copies it back to your clipboard.

That's it. No database, no background service eating memory, no complex UI framework. The JSON file acts as both persistence and state. When you restart ClipStash, your history is right where you left it. The whole thing runs as a regular Python process managed by a macOS LaunchAgent, so it starts automatically when you log in and stays out of your way.

One Command to Install

I wanted the install experience to be dead simple. No cloning repos, no pip installing dependencies manually, no dragging things into Applications. Just one line:

curl -fsSL https://raw.githubusercontent.com/Himanshub15/ClipStash/main/install.sh | bash

The install script handles everything. It creates a virtual environment, installs the dependencies, sets up the LaunchAgent plist, and starts the app. If you already have ClipStash installed, it updates in place. The whole process takes a few seconds.

I also built in auto-updates. There's a VERSION file in the GitHub repo, and the LaunchAgent periodically checks it against the locally installed version. If there's a mismatch, it pulls the latest code and restarts. No update prompts, no manual downloads. It just stays current.

Technical Decisions

A few choices worth explaining. I went with rumps instead of bundling a full app with py2app or PyInstaller. Those tools are great for distribution, but they produce large binaries and add complexity to the build process. Since ClipStash is installed via a script that sets up its own Python environment, there's no need to freeze the app into a standalone bundle. Rumps gives me a native menu bar presence with minimal overhead, and the user never has to think about the Python runtime underneath.

The LaunchAgent approach was another deliberate choice. I could have added ClipStash to Login Items or used a cron job, but LaunchAgents are the proper macOS way to manage background processes. They handle restarts if the process crashes, they respect system sleep/wake cycles, and they can be unloaded cleanly. It's the right tool for the job.

Storing clipboard history in a JSON file instead of SQLite or a proper database might seem lazy, but for five items it's the right call. There's no query complexity, no schema to maintain, and the file is human-readable if you ever want to inspect it. Sometimes the simplest solution is the correct one.

What's Next

ClipStash works well for my daily workflow, but there are a few things I want to improve. Expanding beyond five items is the obvious one -- maybe ten or fifteen, with the menu showing the most recent and a submenu for older entries. I'd also like to add a basic search capability, so you can find a specific clip without scrolling through the list.

Image support is the more ambitious goal. Right now ClipStash only handles text, but copying screenshots and images is a common workflow. Handling binary clipboard data and displaying thumbnails in a menu bar app adds real complexity, but it would make the tool significantly more useful.

For now, though, ClipStash does exactly what I built it to do. It remembers what I forget, it stays out of my way, and it cost me zero dollars. The project is open source -- check it out on GitHub or visit the product page to get started. Sometimes the best tool is the one you write yourself.