Skip to content
fballianoPublic

About

macOS menu bar clipboard history and clipboard cleaner

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Clipyard

Clipyard

A menu bar clipboard history and clipboard cleaner for macOS.

Latest release Downloads macOS 15 or later MIT licence

Download for macOS

If you find my work valuable, please consider sponsoring
Sponsor me on GitHub Buy me a coffee Donate via PayPal

Features

Every copy, keptText, formatted text, links and images go into a history that the menu gives back.
Plain text by defaultThe formatting goes away as you copy, so a paste never brings a strange font.
Clean linksAbout 200 tracking parameters go, from utm_source to the ones that X, TikTok and Amazon add.
No hidden charactersZero width characters, bidirectional marks and the Unicode tags block, where a text generator hides a watermark.
Passwords stay outA clipboard that a password manager marks is never read, never cleaned and never stored.
Pin and searchA pinned clip stays at the top and no limit deletes it. A search window reaches the whole history.
ScriptableAppleScript, Shortcuts and Spotlight drive the same commands.
Light and darkThe icon follows the system, in the menu bar and in the Finder.
Six languagesEnglish, Italian, French, Spanish, Brazilian Portuguese and German. The application follows the language of the system.

Install

With Homebrew:

brew tap fballiano/tap
brew trust --tap fballiano/tap
brew install --cask clipyard

Homebrew 6 refuses to load a cask from a tap outside Homebrew/* until you trust it, so the second command is also necessary.

Clipyard was called clipboard-controller before, and its cask was in the tap fballiano/clipboard-controller. If you installed it from that tap, run this command to move to the new tap:

brew uninstall --cask fballiano/clipboard-controller/clipboard-controller && brew install --cask fballiano/tap/clipyard && brew untap fballiano/clipboard-controller

Your settings and your clips stay. The new version reads them from the same place.

Or download the DMG from the latest release. Open it and drag Clipyard into Applications.

The application is signed with an Apple Developer ID and notarized by Apple, so it opens like any other application.

The application has no dock icon. It appears in the menu bar.

Item Value
macOS 15.0 or later
Hardware Apple silicon and Intel (universal binary)
Permissions None. The application never presses ⌘V for you, so it needs no Accessibility permission.

The menu

Item What it does
Private mode The first item. Stores nothing until you turn it off. The icon carries a line. ⇧⌘P while the menu is open.
Automatic cleaning Cleans each new content of the clipboard.
Clean the clipboard now Cleans what is on the clipboard at this moment.
The clips A click puts the clip back on the clipboard. ⌘1 to ⌘9 reach the first nine.
Search… Opens the whole history with a search field.
Export… Writes the history to a JSON file.
Clear the history Deletes every clip that is not pinned.

Each clip carries a submenu: Copy, Copy as plain text, Pin, Rename… and Delete.

Settings

Open Preferences… from the menu, or press ⌘,.

General

Setting Default What it does
Record the clipboard on Stores what you copy.
Store the images on Also keeps the pictures, with a small copy for the menu.
Show N clips in the menu 20 How many clips the menu lists.
Delete the old clips automatically on, keep 200 Keeps only the newest N clips.
Delete a clip after some days off An age limit, from 1 to 365 days.
Start Clipyard at login on Registers a login item through SMAppService. The first launch switches it on. A later change by you stays.

A pinned clip stays. No limit ever deletes it.

Cleaning

Setting Default What it does
Clean each new clipboard on The master switch of the cleaner.
Remove the formatting on Keeps the words, throws the fonts and the colours away.
Keep the links off Keeps the links of a formatted text.
Remove the invisible characters on Zero width characters, bidirectional marks and the Unicode tags block. A no-break space becomes an ordinary space.
Normalize the quotes off A curly quote becomes a straight quote. … becomes ....
Normalize the ends of the lines on Every end of line becomes a line feed. Two or more empty lines become one.
Turn a bullet into a hyphen off • one becomes - one.
Remove the space at the start and at the end on Also removes the space at the end of each line.
Remove the tracking parameters of a URL on About 200 known parameters, plus the rules of 20 sites.

An emoji keeps its zero width joiner, so 👨‍👩‍👧 stays one picture and does not become three people.

Privacy

Two lists: the applications that the history ignores, and the applications that the cleaner ignores. A button opens the Applications folder and reads the bundle identifier of the application you select.

Shortcuts

Four global hot keys: automatic cleaning, clean the clipboard now, private mode and open the history. No shortcut is set until you record one.

Automation

tell application "Clipyard" to clean clipboard        -- returns true or false
tell application "Clipyard" to start cleaning
tell application "Clipyard" to stop cleaning
tell application "Clipyard" to start private mode
tell application "Clipyard" to stop private mode
tell application "Clipyard" to last clip              -- returns the newest text
tell application "Clipyard" to clear history

From a terminal:

osascript -e 'tell application "Clipyard" to clean clipboard'

The same commands are App Intents, so the Shortcuts app lists them under Clipyard: Clean Clipboard, Set Automatic Cleaning, Set Private Mode, Get Last Clip and Clear Clipboard History. Spotlight runs them too.

Export

Export… writes a JSON array, pinned clips first, then the newest:

[
  {
    "date" : "2026-08-21T19:30:00+01:00",
    "kind" : "url",
    "pinned" : false,
    "source" : "Safari",
    "text" : "https://example.com/page",
    "title" : "https://example.com/page",
    "useCount" : 2
  }
]

kind is plainText, richText, url or image. An image writes an empty text, so the file stays readable.

Privacy

The application stores everything on your Mac. It sends nothing anywhere. It has no network code at all.

Four rules are always on. No setting turns them off:

  • A password manager marks its clipboard with org.nspasteboard.ConcealedType. The application does not read that clipboard, does not clean it, and does not store it.
  • A clipboard marked as transient or auto-generated belongs to another tool. The application skips it.
  • The cleaner never touches a clipboard that holds a file.
  • The cleaner never touches a picture.

Where the data lives

What Where
Clips ~/Library/Application Support/clipboard-controller/clipboard-controller.store (SwiftData)
Settings ~/Library/Preferences/com.fabrizioballiano.clipboard-controller.plist

The two paths keep the old name of the application, clipboard-controller. That way an update to Clipyard keeps your clips and your settings.

Build from source

You need Xcode 26 or later.

make install     # build the Release app and copy it to /Applications

Other targets:

make build       # build only
make test        # run the unit tests
make run         # build, then launch
make dmg         # build the Release app and pack it into ./dist/*.dmg
make generate    # rebuild ClipboardController.xcodeproj from project.yml (needs xcodegen)
make uninstall   # remove /Applications/Clipyard.app

To work in Xcode, open ClipboardController.xcodeproj and press Run. The project signs ad hoc, which is enough for your own Mac. To sign with your Apple ID, select the ClipboardController target, open Signing & Capabilities, and choose your team.

ClipboardController.xcodeproj is generated from project.yml, but it is committed, so you do not need XcodeGen unless you change the project layout.

A push of a tag v* builds the DMG and publishes a release from GitHub Actions.

How it is built
Part Choice
Language Swift 6, strict concurrency
Interface AppKit NSMenu for the menu, SwiftUI for the windows
Storage SwiftData
Global hot keys KeyboardShortcuts
Login item SMAppService
Tests Swift Testing
Project file XcodeGen
Translations A string catalog, Localizable.xcstrings
Sources/ClipboardController/
├── ClipboardControllerApp.swift  the scenes
├── AppModel.swift                the one controller
├── ClipboardMonitor.swift        the watcher of the clipboard
├── Pasteboard.swift              the clipboard, behind a protocol
├── ClipboardContent.swift        what was read, and the settings that decide
├── Clip.swift                    the stored model
├── ClipStore.swift               read, write, prune, export
├── ImageSupport.swift            the pictures and their small copies
├── Preferences.swift             the settings
├── HotKeys.swift                 the global shortcut names
├── LoginItem.swift               start at login
├── Cleaning/                     the cleaner and its two tables
├── Views/                        the menu, the settings, the history
└── Scripting/                    AppleScript commands and App Intents

Resources/
└── Localizable.xcstrings         the six languages of the interface

Every command has one code path. The menu, a hot key, an AppleScript command and a Shortcuts action all call the same method on AppModel.

A few details worth knowing:

  • macOS sends no notification for a change of the clipboard, so the application reads changeCount four times a second. The timer runs in the common run loop mode, so it keeps working while the menu is open.
  • The watcher stores the changeCount of its own write, so the cleaner never reads its own result and cleans it a second time.
  • The same content does not make a second row. The old row moves to the top and counts one more use.
  • Sanitizer is a pure type: no state, no system, no AppKit. Every rule of the cleaner lives there, so a test reads a rule without a clipboard.
  • A short parameter name like s or ref is a search term on most sites, so it lives in a rule for one host and never in the global table.

Credits

Third-party material is listed in NOTICE.md.

Licence

MIT. See LICENSE.

About

macOS menu bar clipboard history and clipboard cleaner

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages