English | 简体中文
Every snippet of text, image, or file you copy leaves a trace you can recall at any moment.
Vestige is a native macOS menu bar clipboard history and instant recall utility built with Swift and AppKit (pure Swift Package Manager, macOS 13+). Running as an LSUIElement menu bar app with no Dock icon, it opens on ⌘⌥C with fuzzy search, content-type filtering, and direct ↩ paste into your active app.
Naming Note: The project brand is Vestige (
余痕), while code targets, bundle artifacts, and storage paths retain theClipboardHistoryidentifier (ClipboardHistory.app,~/Library/Application Support/ClipboardHistory/,CLIPBOARD_HISTORY_DB) to match the codebase and preserve existing user history.
- Download the Universal (
arm64+x86_64).dmgor.ziparchive (plusSHA256SUMS) from GitHub Releases (requires macOS 13+). - Optionally verify checksums in the download directory:
shasum -a 256 -c SHA256SUMS
- Quit any running instance, open the
.dmg(or extract the.zip), and dragClipboardHistory.appinto/Applications. - First Launch (Gatekeeper): Release packages are ad-hoc signed and not Apple-notarized. On first launch, double-click
ClipboardHistory.appin/Applications, dismiss the warning dialog, open System Settings › Privacy & Security, scroll to Security, and click Open Anyway. (Seepackaging/安装说明.txtfor step-by-step details.)
./build.sh
# Quit any running instance first, then copy the bundle to /Applications:
cp -R build/ClipboardHistory.app /Applications/Pressing ↩ to automatically paste (⌘V) into the active application requires macOS Accessibility permission:
- Open System Settings › Privacy & Security › Accessibility (or click the menu bar icon › 辅助功能设置 / Accessibility Settings).
- Enable
ClipboardHistory(or click+to add it from/Applications). - Without Accessibility permission, Vestige still copies the selected entry to the clipboard for manual
⌘Vpasting and displays a⚠️indicator in the panel status bar.
| Shortcut / Action | Behavior |
|---|---|
⌘⌥C |
Show or hide the clipboard panel (customizable) |
| Type directly | Fuzzy-search clipboard history |
| Filter dropdown | Filter by All / Text / Links / Images / Files (combined with search query) |
↑ / ↓ |
Move selection up / down |
↩ or click row |
Paste selected item directly into the previous active app |
⌘↩ |
Copy selected item to the clipboard without auto-pasting |
⌘⌫ |
Delete selected item |
⇧⌘P |
Pin or unpin selected item |
Esc |
Clear the search query first; press again to close the panel |
- Content-Type Filtering: Filter by All, Text, Links, Images, or Files alongside fuzzy search. Switching filter types preserves the search query and selects the first match; incoming copies keep the active filter; reopening the panel resets to All and clears the search box. (Links matches a single complete HTTP/HTTPS URL after trimming whitespace; paragraphs containing URLs or other protocols remain Text.)
- Global Hotkey Customization: Open menu bar › 设置全局快捷键… (Configure Global Hotkey) to pick any
A–Z/0–9physical ANSI key combined with at least one ofCommand,Option, orControl. Changes take effect immediately and persist across restarts viaUserDefaults(globalHotkey). If registration fails (for example, due to a conflict), an alert is shown and the previous hotkey is preserved. - Menu Bar Actions: Open Panel, Configure Global Hotkey…, Launch at Login (requires
/Applications), Accessibility Settings, Clear Unpinned History… (keeps pinned items), and Quit. - Local SQLite Storage: History is stored locally at
~/Library/Application Support/ClipboardHistory/history.dbwith SHA256 content deduplication. Unpinned entries are kept for 90 days up to 1,000 items; pinned entries are kept indefinitely. Sensitive or transient items flagged by password managers are ignored. Override the database location for testing withCLIPBOARD_HISTORY_DB=/path/to/test.db.
Sources/ClipboardCore: Pure Swift logic (no AppKit dependency) —Fuzzy,RowText,Store(SQLite), content SHA256,HistoryFilter,HotkeySettings,PanelModel,PasteFlow, andStatusMenu.Sources/ClipboardCapture: Pasteboard reading/writing and thumbnail generation (AppKit, no UI).Sources/ClipboardHistory: AppKit menu bar shell, floating panel, Carbon global hotkey, and simulated⌘V.Tests: XCTest unit test suites (ClipboardCoreTestsandClipboardCaptureTests).design/panel.html: High-fidelity HTML prototype of the main panel.assets/icon-1024.png&make-icon.swift: Source square icon and programmatic.icnsbuilder.Info.plist,build.sh,package.sh,packaging/安装说明.txt: App bundle manifest, local universal build/sign script, ZIP/DMG packaging script, and user guide.scripts/: Release verification and CI smoke-test scripts (ci-capture-smoke.sh,ci-panel-smoke.sh,ci-hotkey-smoke.sh,ci-verify-package.sh,smoke-release.sh,verify-release-app.py,check-release-version.sh).
Requires Xcode Command Line Tools (macOS 13 SDK or later):
swift build -c release --arch arm64
swift build -c release --arch x86_64
swift testOutputs for each architecture live under .build/<triple>/release/ (do not rely on the .build/release symlink).
./build.sh # Signs with local code-signing identity if present; falls back to ad-hoc
SIGN=adhoc ./build.sh # Force ad-hoc signingbuild.sh compiles both arm64 and x86_64 release binaries, combines them via lipo, generates AppIcon.icns from assets/icon-1024.png, assembles build/ClipboardHistory.app, and verifies codesign.
Self-signed certificate setup (preserve Accessibility permission across rebuilds)
macOS ties Accessibility permissions to the app's code signature. Ad-hoc signatures change on every rebuild, requiring you to re-grant Accessibility permission after replacing /Applications/ClipboardHistory.app. Signing locally with a persistent self-signed certificate avoids re-authorization across rebuilds (create once locally; never run this in CI):
cd "$(mktemp -d)"
cat > cert.cnf <<'EOF'
[req]
distinguished_name = dn
x509_extensions = ext
prompt = no
[dn]
CN = ClipboardHistory Self-Signed
[ext]
basicConstraints = critical, CA:false
keyUsage = critical, digitalSignature
extendedKeyUsage = critical, codeSigning
EOF
/usr/bin/openssl req -x509 -newkey rsa:2048 -nodes -days 3650 -config cert.cnf -keyout key.pem -out cert.pem
/usr/bin/openssl pkcs12 -export -inkey key.pem -in cert.pem -name "ClipboardHistory Self-Signed" -out cert.p12 -passout pass:tmp
security import cert.p12 -k ~/Library/Keychains/login.keychain-db -P tmp -T /usr/bin/codesign
security add-trusted-cert -r trustRoot -p codeSign -k ~/Library/Keychains/login.keychain-db cert.pem
security find-identity -v -p codesigning # Should list "ClipboardHistory Self-Signed"
rm -f key.pem cert.p12- Uses macOS system
/usr/bin/openssl(LibreSSL). With Homebrew OpenSSL 3, add-legacytopkcs12 -exportso Keychain can import the.p12. add-trusted-certprompts for your login password; on the first sign, Keychain may ask permission forcodesignto use the private key (select Always Allow).- To use a different certificate name, run
SIGN_IDENTITY="Your Certificate Name" ./build.sh. - The first time you switch from ad-hoc to certificate signing, remove the old entry in System Settings › Privacy & Security › Accessibility and re-add it once; subsequent replacements keep the permission.
./package.shBuilds a forced ad-hoc universal app and outputs dist/ClipboardHistory-<version>.zip, dist/ClipboardHistory-<version>.dmg (with /Applications symlink and 安装说明.txt), and dist/SHA256SUMS. It unpacks the ZIP and mounts the DMG to verify signatures and architectures before cleaning up intermediate .app bundles. Version comes from CFBundleShortVersionString in Info.plist.
.github/workflows/ci.yml: Runs onpull_requestandpushtomain(skipping doc-only changes).macos-15builds universal binaries (-warnings-as-errors), runs unit tests, executes pasteboard/panel/hotkey smoke tests against an isolated temporary DB, packages ZIP/DMG, and verifies signatures;macos-26verifies release build + unit tests on the macOS 26 SDK..github/workflows/release.yml: Builds universal packages and verifies native launch on bothmacos-15(arm64) andmacos-15-intel(x86_64) runners. Pushing av<major>.<minor>.<patch>tag matchingInfo.plistcreates a draft Release for manual review and publishing. (CI validates macOS 13 deployment targets on each Mach-O slice and plist; physical macOS 13 hardware is not tested in CI.)