A tiny macOS menu bar app that cleans messy copied text before you paste it.
Copy something out of your terminal and paste it into Discord, Slack, or a doc, and it often arrives broken: lines snapped into rows, spaces padded onto every row, indentation that turns into a stray code block. ClipTidy fixes the clipboard so the paste lands clean.
I run two healthcare companies in the Philippines, and over the past year I have spent more and more time in the terminal, learning to build alongside AI coding tools instead of only steering from a dashboard.
That is where this came from. I would work an idea out in the terminal, a plan, a snippet, a few bullet points, then paste it to my team on Discord to talk it through. Every time, the paste landed broken. Lines chopped into rows. Spaces stuck to the front of each line. A clean three-line thought turned into noise nobody wanted to read.
So I built ClipTidy. It notices when the thing I copied came from a terminal and tidies it before I paste. Copy, paste, done. Everything else I copy, from a doc, a browser, a text file, it leaves alone.
Small problem, small tool. But it is the kind of friction that adds up, and fixing it myself was half the fun.
- Clean Clipboard Now rewrites whatever is currently on your clipboard. Copy the messy text, click the menu bar icon, choose Clean, then paste.
- Auto-clean on Copy watches the clipboard while it is on. Every time you copy text from a terminal, it gets cleaned automatically. Just copy and paste, nothing else to click. By default it only acts on copies made from a terminal app, so text you copy from anywhere else is untouched.
Lives in the menu bar only. No Dock icon, no window.
| Mode | What it does | Best for |
|---|---|---|
| Smart reflow | Strips blockquote bars (▌, >), rejoins wrap-broken lines, keeps list items, blank lines, and URLs as real line breaks |
Quoted AI answers, numbered lists, chat messages (the default) |
| Join paragraphs | Merges wrap-broken lines back into paragraphs, keeps blank lines as breaks | Plain prose |
| Trim lines | Strips leading and trailing spaces from every line, keeps line breaks | Lists, short snippets |
| One line | Collapses everything into a single space-separated line | A URL or command split across rows |
| Code block | Removes the terminal's left padding, keeps real indentation, wraps in ``` |
Pasting code or logs into Discord |
Pick the mode from the menu. It applies to both the manual click and auto-clean.
Grab the latest ClipTidy.dmg from the Releases page, open it, and drag ClipTidy to Applications. Requires macOS 13 or later.
The app is not notarized, so the first time you open it macOS warns you. Right-click ClipTidy and choose Open (just once), or allow it under System Settings, Privacy and Security. A wand icon then appears in your menu bar.
Needs the Swift toolchain (install Xcode or the Command Line Tools).
git clone https://github.com/denseymour/cliptidy.git
cd cliptidy
make installmake install builds the app and copies it to /Applications. Other targets:
make appbuildsClipTidy.appin the project folder without installing.make runruns it straight from the build directory.make buildcompiles the binary only.
- Click the wand icon in the menu bar.
- Turn on Auto-clean on Copy for hands-off cleaning, or leave it off and use Clean Clipboard Now when you need it.
- Optionally turn on Launch at Login so it is always ready.
With auto-clean on, your flow is just: copy the messy text, paste it where you want it.
These work from anywhere, so you never need to find the menu bar icon (handy when the notch hides it):
| Shortcut | Action |
|---|---|
| Control + Option + Command + C | Clean the clipboard now (plays a short sound) |
| Control + Option + Command + A | Toggle auto-clean on or off (sound confirms the new state) |
The shortcuts use Carbon hot keys and need no Accessibility permission.
By default, auto-clean only touches copies that come from a terminal app (Ghostty, Terminal, iTerm, Warp, and others). Anything you copy from a text editor, browser, or any other app is left exactly as it was. ClipTidy knows the source because the frontmost app at the moment you copy is where the copy came from.
Turn off Auto-clean from Terminals Only if you want auto-clean to apply to every copy instead. In that mode it keeps only the plain text, so formatting from styled copies is dropped. Either way, the manual Clean Clipboard Now and its shortcut always work no matter where the text came from.
ClipTidy runs entirely on your Mac. It reads the clipboard and checks which app is in front when you copy, and that is all. There is no network code, no analytics, and nothing ever leaves your machine. It needs no special permissions. The whole app is a few hundred lines you can read in one sitting.
A timer checks the clipboard's change count a few times a second. When it changes, ClipTidy reads the plain text, runs it through the selected cleaner, and writes it back, recording its own write so it never reprocesses itself. For auto-clean, it also checks the frontmost application's bundle identifier against a list of known terminals (see terminalBundleIDs in AppController.swift), which is how it tells terminal copies from everything else. All the text transforms live in Sources/ClipTidy/Cleaner.swift and have no UI or clipboard dependencies, so they are easy to read, change, and reuse.
Pull requests welcome. The whole app is three small Swift files:
Cleaner.swiftis the pure text logic.AppController.swiftis the menu bar item, preferences, and clipboard watcher.main.swiftis the entry point.
Add a new cleaning mode by adding a case to CleanMode and a method in Cleaner. The menu builds itself from the enum.
To cut a release: bump CFBundleShortVersionString in Resources/Info.plist, then run make release. It builds a universal ClipTidy.dmg and publishes it to GitHub Releases (make dmg builds it locally without publishing).
Built by Dennis Seymour (@denseymour). If you want to see what my teams ship:
- SeriousMD: EMR and practice management for doctors and clinics.
- NowServing: find and book doctors across the Philippines.
- NowExpress: order medicine and get it delivered.
MIT. See LICENSE.