clipmem
A private clipboard memory for your Mac.
clipmem watches the macOS clipboard, saves every observed state in a local
SQLite archive, and lets you search, recall, inspect, restore, and export what
you copied later. It works as a terminal tool, a native menu bar app, and an
agent-friendly memory layer for OpenClaw, Hermes Agent, and other local
automation.
Use it when you want to:
- recover the command, URL, snippet, file path, or message you copied earlier
- ask a coding agent "what did I copy?" without dumping your whole clipboard archive into the prompt
- restore an older clipboard item exactly, including rich clipboard formats
- filter history by time, app, content type, size, URL, image, PDF, or file URL
- make copied screenshots searchable with opt-in Apple Vision OCR, fully on-device
Requirements
- macOS — clipboard capture uses
NSPasteboardviaobjc2 - Apple Silicon for the prebuilt Homebrew package
- Rust 1.88+ for building from source
Install
Choose one path:
CLI only (Apple Silicon):
CLI + native menu bar app (Apple Silicon):
If Homebrew says tristanmanchester/tap is not trusted, trust only the
clipmem install surfaces and rerun the install command:
The cask installs the CLI, runs clipmem setup, and enables launch at login.
See docs/installation.md for Cargo, source builds,
upgrades, and Intel Mac support.
Start using it
Copy something new, then ask for it:
|
Use the snapshot id from recent to inspect or restore a previous clipboard
state:
See docs/getting-started.md for a full walkthrough.
Everyday commands
| Task | Command |
|---|---|
| Best-first recall | clipmem recall "what was that shell command?" |
| Exact text for pasting | clipmem recall "the copied API URL" --quote --full |
| Recent unique clipboard states | clipmem recent --hours 24 --human |
| Direct lexical search | clipmem search "invoice" --hours 168 |
| Chronological event history | clipmem timeline --hours 24 --format json |
| Detailed snapshot view | clipmem get <snapshot-id> --human |
| Restore an old clipboard state | clipmem restore <snapshot-id> |
| Archive health check | clipmem doctor |
| Agent context preflight | clipmem agents context --format json |
For screenshots and image-only clipboard items:
Privacy model
- Clipboard data stays on this Mac in
~/Library/Application Support/clipmem/clipmem.sqlite3. - OCR uses Apple Vision locally; image data is not sent to a hosted service.
- The database directory is created with
0700permissions and the database file with0600permissions. - The archive is not encrypted by
clipmem; use FileVault or equivalent disk encryption for at-rest protection. - Use
clipmem forget,clipmem purge,clipmem settings pause, and ignored app rules to control what is retained.
Documentation
- Installation — all install methods, requirements, and upgrades
- Getting started — setup, background capture, and first queries
- Searching and filtering — recall, search, timeline, OCR text, filters, and pagination
- Output formats — JSON envelope, TOON, exit codes, and script-friendly guarantees
- Managing your archive — restore, delete, export, and capture policy
- Command reference — exhaustive flag-level reference for every command
- Agent integration — OpenClaw, Hermes Agent, and portable skill usage
- Menu bar app — native SwiftUI menu bar frontend
- Privacy and security — local-only guarantees, file permissions, and uninstall
- Architecture — capture model, deduplication, search strategy, and limitations
- Troubleshooting — diagnose empty results, watcher issues, and database problems
- Contributing — project layout, build, test, and release workflow
License
clipmem is released under the MIT License. See LICENSE.