Skip to content

Repository files navigation

ClipboardRecorder

中文文档

A menu-bar clipboard history app for macOS, inspired by Paste. Native Swift, zero third-party dependencies (SwiftUI / AppKit / Foundation / SQLite3 / Vision / Carbon).

Features

Core

Feature Description
Clipboard history Polls NSPasteboard.changeCount; records text / links / images; global dedup & re-timestamp on top; newest first
Open panel Global hotkey ⇧⌘V (recordable in Settings); menu-bar icon (left-click panel / right-click menu)
Panel UI Paste-like floating panel: preview + source app + relative time; footer toolbar; keyboard navigation
Search + filter Real-time filter over name / body / OCR text (LIKE with wildcard escaping); kind filters: all / text / link / image / pinned
Paste Writes back to clipboard + simulated ⌘V (requires Accessibility permission); degrades to copy-only with a prompt when denied
Pinboards ⌘P to pin; pinned items are never auto-purged
Privacy Ignore sources by bundle id; pause recording (⌘T); optional sensitive-content skip (private keys / AWS keys / GitHub PATs / card numbers / SSNs)
Auto cleanup Either by age (1/7/30/90/180/365 days, custom) or by count (10/20/50/100/200, custom) — mutually exclusive; pinned items are never purged

Second-stage

Feature Entry
Edit / rename / create ⌘E edit text, ⌘R rename, ⌘N new text item (context menu too)
OCR Vision-based text extraction on images (⌘O or right-click); extracted text is searchable; optional auto-OCR
Quick paste ⌘1-9 pastes the item at that position
Multi-select paste Multi mode or ⌘A select-all, ⌘⏎ pastes in sequence (0.24s apart)
Fullscreen image viewer Double-click a thumbnail to inspect fullscreen (WeChat-style): click / Esc to close, scroll / pinch to zoom at pointer anchor, drag to pan, double-click to fit
Statistics Menu → Statistics: totals, kind distribution, last 7 days, top sources
Hot update Self-updater: appcast.json → download zip → SHA-256 verify → replace & relaunch

Platform

  • macOS 13+ (LSMinimumSystemVersion 13.0)
  • Apple Silicon (arm64). Intel build is planned (see Roadmap).

Download & Install

DMG (recommended for everyone)

Download the latest ClipboardRecorder.dmg from Releases, open it and drag the app into your Applications folder.

First launch: the app is ad-hoc signed, so Gatekeeper will block it. Right-click the app → Open → click Open again — this only needs to be done once.

One-liner installer (alternative)

curl -sSL https://raw.githubusercontent.com/Badegg404/ClipboardRecorder/main/scripts/download-install.sh | bash

Build from source

git clone https://github.com/Badegg404/ClipboardRecorder.git
cd ClipboardRecorder
./scripts/build.sh
open build/ClipboardRecorder.app

For frictionless distribution (install without any confirmation), the app needs Developer ID signing + notarization — see scripts/make-release.sh.

Build

No Xcode required — Command Line Tools suffice:

cd ClipboardRecorder
./scripts/build.sh          # → build/ClipboardRecorder.app (signed, with icon)
open build/ClipboardRecorder.app

Or open the Swift Package in Xcode on machines with it installed.

Test

./scripts/test.sh
  • Logic tests: store CRUD / dedup / search (incl. OCR, wildcard escaping) / filter / sort / pin / stats / retention / ignore / pause / manual create / update-manifest / sensitive-content — 14 suites
  • Smoke tests: real NSPasteboard end-to-end (text capture / dedup / image capture / empty / paused) — 3 suites
  • App launch smoke: open + pgrep probe

Hot update (appcast)

  1. Build: ./scripts/build.sh, bump version in Info.plist, then ./scripts/make-upload-zip.sh (produces zip + sha256)
  2. Upload the zip to GitHub Releases (or any HTTPS static host)
  3. Publish appcast.json (version / url / sha256 / notes / minOS) — see sample-appcast.json; the in-app default points at this repo
  4. Users check updates in Settings → Update, or it auto-checks at launch

Distribution note: ad-hoc signed builds only run on the same machine. For public distribution you need a Developer ID certificate + notarization (see scripts/make-release.sh).

Data

  • Location: ~/Library/Application Support/ClipboardRecorder/clipboard.db (SQLite, WAL)
  • The data directory is chmod 0700 and files 0600 — history is only readable by the current user.

Key shortcuts

Shortcut Action
⇧⌘V (configurable) Open / close panel
↑ / ↓ Navigate items
Paste selected
⌘⏎ Paste multi-selected in order
⌘1-9 Quick paste by position
⌘F Focus search
⌘E / ⌘R / ⌘N Edit / rename / new
⌘P Pin / unpin
⌘O OCR image
⌘T Pause / resume recording
⌘A / ⌘⌫ Select all / delete selected
Esc Close preview → clear search → leave multi-mode → close panel

Project structure

Sources/
├── Core/      Types / Settings / Store(SQLite) / HistoryManager — pure logic, unit-testable
├── Shared/    Pasteboard(abstraction) / OCR / Util(SHA-256)
├── App/       main / AppDelegate / Hotkey(Carbon) / ClipboardMonitor / PasteHelper / PanelController / Updater
└── UI/        PanelView / ImagePreviewView / AuxViews(Settings, Statistics)
Tests/         Support(assert runner) / Suites / Logic / Smoke + UI-TESTS.md (XCUITest cases)
scripts/       build.sh / test.sh / make-upload-zip.sh / make-release.sh / make-icon.swift

Known limitations

  • No iCloud sync / cross-device (Paste subscription feature)
  • Not signed/notarized for public distribution yet (needs Developer ID + notarization)
  • Intel Macs: arm64-only build at present

Roadmap (short)

  • FTS5 full-text search for large histories
  • Light/dark appearance option
  • Export / import history (JSON/CSV)
  • Drag items out of the panel into other apps
  • VoiceOver / Dynamic Type accessibility pass

License

MIT — see LICENSE.

About

Menu-bar clipboard history for macOS (Paste-like). Native Swift, zero dependencies: SwiftUI/AppKit/SQLite3/Vision/Carbon.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages