clipknot
Private, local clipboard history for macOS — searchable, grouped by session, secrets kept in the Keychain. Menu bar app in Swift with an encrypted SQLCipher store.
ActiveCI failing- macOS & Shell
- appkit
- clipboard
- clipboard-history
- clipboard-manager
- keychain
- macos
- menu-bar-app
- privacy
- sqlcipher
- swift
★ 0 · Last push 3 Dec 2026
Installation
brew install --cask JtheGunner/tap/clipknotReleases
Show changes
Added
The main window. Clicking the Dock icon opens one window with a sidebar for the areas Zwischenablage, Snippets, Notizen, Pasteboards, Templates and Einstellungen (⌘1 to ⌘6). Each area lists its entries on the left and shows the selected one on the right, with a list width you can drag, a search field in the toolbar and the same fonts and cards everywhere. The menu bar menu is shortened to a few entries that open the window on the matching area.
Settings in the main window: pausing, launch at login, pasting, capture, retention, privacy rules, Bitwarden, appearance, the filter editor and the shortcuts window. The import of text files is a section of the settings.
Modules. Snippets, Notizen, Pasteboards and Templates can each be switched off in the settings (all on by default). A switched-off module leaves the sidebar, the menus, the palette (including the Pasteboard filter and
@Name) and the shortcut list, snippet collection stops, and its data stays and returns when the module is switched on again.Export of all data from the settings: a re-importable backup (
.clipknot-backup, with images and formatted notes), readable JSON, or CSV (one file per module, safe against spreadsheet formulas). Parked secrets and anything the secret detector flags are never exported (texts you declared "not a secret" are). "Sicherung importieren" merges a backup into the existing data without duplicates; importing the same backup twice changes nothing.Secret exceptions can be added in the settings: a text you declare "not a secret" is stored as a keyed fingerprint only.
The clipboard lists load 200 entries and the next 200 when you scroll to the end, for all lists, searches and the pasteboard filter.
Snippets can be edited in the Snippets area (the text of the shown variant, anonymised again on saving), and the table has a "Varianten" column with the variant count.
Pasteboards show image thumbnails and colour swatches like the clipboard list.
A note can be turned back into a floating note from the Notes area ("Als schwebende Notiz lösen").
In the palette, hovering an image row shows a larger preview to the left of the palette.
Templates and the filter editor explain what they are for in the window itself.
Option shortcuts, Swiss phone numbers and hyphenated commands are recognised.
A sandbox mode (
./scripts/sandbox.sh) starts a copy of the app with demo data in a separate directory and takes screenshots, without touching the real data.Filter shortcuts work in the palette. In the filter menu (⌥Return) "Kürzel eingeben …" asks for the shortcut of a custom filter (case does not matter) and applies that filter to the selected entry; an unknown shortcut applies nothing and shows "Kein Filter mit dem Kürzel …". A custom filter you applied is remembered as the last filter, so ⌃⌥F pastes the newest entry through it, also after a restart. It is kept by id, so renaming the filter does not lose it; after it was deleted, ⌃⌥F says the filter no longer exists. The size limits of custom filters (input over 4 MB, output over the cap) apply there as well and abort with a notice. A last filter saved by an earlier version is read as before.
Custom filters. "Filter verwalten …" in the menu bar menu opens a filter window: a list of the built-in filters and your own, in groups, with a search (by name or shortcut), the steps of the selected filter and a live "Before" / "After" preview on a sample text you can edit. A custom filter is a chain of steps: any built-in filter, "Präfix", "Suffix" or "Ersetzen" (literal text, case-sensitive), reordered with the arrow buttons; there is no scripting. A shortcut per filter (one word of letters, digits, - or _, not case sensitive) is checked while you type: one that another filter or a built-in filter name already uses is reported with its holder and refused on save. "Exportieren …" writes your filters to a JSON file; "Importieren …" reads one and adds its filters under new ids, and a file that is not a ClipKnot filter file, has an unknown version or step, an invalid filter, a taken shortcut or a name twice, or is over 1 MB is rejected as a whole with the reason. The filters appear in the palette's filter menu (⌥Return) below the built-in ones. A custom filter is not run on a text over 4 MB, and a filter whose steps would blow the text up beyond ten times its size (at least 1 MB, at most 8 MB) is aborted; the editor preview works on the first 20 000 characters of the sample: the editor preview says "Ergebnis zu gross" and the palette pastes nothing and shows a notice. They are stored in the settings of the encrypted database; no schema migration is needed.
Two more global shortcuts and a settings window for all of them. ⌃⌥P ("Vorheriges Element einfügen") pastes the history entry copied before the newest one, with its formatting or image; ⌃⌥F ("Aktuellen Eintrag mit letztem Filter einfügen") pastes the newest entry through the filter you picked last with ⌥Return in the palette (kept across restarts; a note says so when none was used yet, and for images). Parked secrets are never pasted. Both items are in the menu with their combination, and the menu says "Kurzbefehl … ist belegt" when another app holds it. "Kurzbefehle …" lists every shortcut (palette, snippets, queue, new note and the two new ones); click one and press the new combination, Esc cancels. A combination without ⌃ or ⌘ (⌥ only counts together with ⇧), one macOS keeps for itself (for example ⌘Space) and one that another ClipKnot action already uses are refused with a message, and so is one another app holds. "Zurücksetzen" restores the defaults. The choices are stored in the encrypted settings.
Colours and images show a preview. A colour entry shows a swatch and its hex value (
#RRGGBB, or#RRGGBBAAwith transparency; read from hex,rgb()andhsl()text), an image entry a thumbnail with its pixel size, in the palette, in the history area list and large above the text in its detail. Thumbnails are made with ImageIO from the stored bytes without decoding the full image, at low priority off the main thread, and cached in memory (200 at most), so the palette opens without waiting. A row shows a grey placeholder until its thumbnail is ready, and keeps the type icon when a colour text cannot be read.Formatting is kept. A text copied from a document or a web page is stored with its RTF and HTML next to the plain text, and pasting it from the palette (Return in history mode) or with the copy button of the history window writes the plain text and the formatting to the clipboard, so a word processor gets the formatted text and a terminal the plain one. Search, duplicate detection and the paste queue stay on the plain text. «Plain Text» in the filter menu (⌥Return) pastes without formatting; filters, templates, snippets and the queue are plain as before. The history detail says «Enthält Formatierung (RTF, HTML)». The formatting is stored in the encrypted database (schema migration 21) with limits: 1 MB per format, no formatting for a text over 200 KB, 200 MB for all formatting together (the oldest goes first, the text stays). A new copy replaces the formatting of the same text, and a plain re-copy removes it. The formatting passes the secret check as well: the markup is read in several ways (as is, with entities decoded, with tags removed, RTF escapes decoded) and your ignore rules apply too. If anything looks like a secret, or the markup carries embedded data (a base64 URI, an RTF object) or is not UTF-8 text, all formatting of that copy is dropped and only the plain text is stored. Limits: formatting is not exported, a text you marked «kein Secret» loses its formatting when the markup also matches, and the secret check cannot catch every secret hidden in markup (a random-looking value in an attribute such as
titleordata-*with no known prefix and no label liketoken=is not recognised, because identifiers in attributes would otherwise block most formatting).The text in copied images is recognised and searchable. After an image is captured, ClipKnot reads its text on the device (Vision framework, German and English, no network) at low priority, and a search for a word in a screenshot finds the entry. Images stored before are read in the background after the start. In the palette and the history window such an entry carries "Text aus Bild"; the history detail shows the recognised text below the label. The menu item "Text in Bildern erkennen" (on by default) switches it off; switching off also deletes the recognised text from the database and the search index, and switching on reads the images again. The recognised text goes through a stricter secret check than copied text (lines are also joined, whitespace and dash look-alikes are normalised, long mixed tokens and a credential label next to a value count) and through your ignore rules. If it matches, no text is stored for that image and the detail says so; the image itself is still stored, as before. A failed recognition is tried again up to three times. The database gets three columns and an index (schema migration 20). Reading handwriting, low-contrast or tiny text is unreliable, and the secret check cannot catch every secret that OCR garbles.
Images from the history can be pasted again. Return on an entry of the type "Bild" in the palette puts the stored PNG or TIFF on the clipboard and pastes it into the app you came from; the copy button in the history window copies the image instead of its label. "Vorherige Zwischenablage wiederherstellen" brings back the previous clipboard even when it held an image, and the paste is not captured again as a new entry. ⌥Return (filters) and ⌘Return (paste queue) show a notice on an image, because both work on text. If the stored image cannot be read, the palette says so and pastes nothing.
Changed
- "Verlauf" is now called "Zwischenablage" everywhere in the app and the code.
- The Import area is gone from the sidebar; the import lives in the settings.
- The two migration key errors ("Schlüssel passt nicht", "Schlüssel fehlt") no longer fill the menu with a 200-character line. The menu shows a short title ending in "Details …"; clicking it opens a dialog with the full explanation and the recovery steps.
- Upgrading from Clipkeep: before macOS asks for the Keychain password for the old database key, ClipKnot shows a short dialog that explains why. It appears once, and only when the old database key is waiting to be copied. If the prompt is declined or cancelled, the menu says "Zugriff erlauben und ClipKnot neu starten" instead of the generic "Datenbank oder Einstellungen nicht lesbar".
Fixed
- A declined Keychain prompt for the previous version's parked secrets is no longer repeated. ClipKnot asks once per start; after a refusal the vault stays unusable until the next start, so macOS does not prompt again for every detected secret. As before, nothing is cached as empty and the new Keychain item is not created. A detected secret that cannot be parked is not stored, and a notification now says so ("Secret nicht gesichert").
- A
{{clipboard}}template field stays empty when the clipboard is marked concealed or transient (for example by a password manager), not only when the secret detector flags the text. The check shares one list of markers with the clipboard backup of palette pastes.
Show changes
Added
- Sticky notes: «Neue Notiz» in the menu or ⌃⌥K opens a floating note that stays above other windows and can be moved and resized. Notes support bold, italic, bullet lists, checklists (☐ / ☑ marker lines, a click on the box ticks it) and simple tab-aligned tables, in five colours. Content, position, size and colour survive a restart; they are stored as RTF in a new
notestable of the encrypted database (schema migration 17). Notes are separate from the clipboard history and are never searched, exported or cleaned up by retention. A stored position that is off every screen is moved onto the first screen, a damaged colour falls back to yellow. The close button hides a note; «Alle Notizen anzeigen» shows hidden ones again. A table is a tab-separated block with tab stops, not a real table object, and a checklist is a text marker line. - The palette suggests what to paste next. When it opens without a query, up to three entries stand at the top with the subtitle "Vorschlag: …" and the signals behind them: the entry that followed the one you pasted last in earlier pastes ("Folge", within half an hour of that paste), entries you pasted into the app that is about to receive the paste ("Ziel-App"), entries copied in the running session ("Sitzung") and entries copied in earlier sessions of the same topic ("Thema"). It is a count over your local history, with no model and no network. Pastes from the palette are now logged (entry id, time and target app only, never text; removed together with the entry). The menu item "Nächste Einfügung vorschlagen" (on by default) switches the suggestions and the logging off.
./scripts/eval.sh --suggestionsreplays fictional pastes and compares the hit rate with a palette that lists the latest copies; with--realit does the same on your own history, read-only and with numbers only (seeeval/README.md). Apple Intelligence stays a possible optional follow-up. - Copied images are captured. A PNG or TIFF on the clipboard (a screenshot, an image copied from a browser or an editor) becomes a history entry of the type "Bild" with the source app, shown in the history window and the palette with a label such as "Bild PNG, 12 KB (3fa9c1d2)". The bytes are stored in the encrypted database. Copying the same image again counts as a duplicate of the earlier entry. "Maximale Bildgrösse" in the "Erfassung" menu (1, 5, 10, 50 MB; default 10 MB) skips larger images. A copy that also carries text, a URL or files is still stored as text. The secret detector does not look into images, so a screenshot with a password is stored unchanged. Previews, text recognition and pasting images are not part of this change. The database gets a new column (schema version 16).
- Pasteboards group history entries under a name. The menu item "Pasteboards" creates, renames and deletes them and lists their entries; in the history window the "Pasteboard" button adds the selected entry to a pasteboard or removes it again, also into a new one. Entries in a pasteboard are never removed by retention or by emptying deleted items; deleting a pasteboard only ungroups its entries. Every entry in a pasteboard can have a shortcut (one word of letters, digits, - or _, not case sensitive) that is unique across all pasteboards: setting one that another entry already uses is refused and names the pasteboard that holds it. Typing a shortcut in the palette puts that entry on top, and
@Nameat the start of the palette query (for example@Work docker) searches that pasteboard only. The history window has a pasteboard filter in its toolbar. Pinned entries now always stand at the top of the palette and say "angeheftet". The database gets two tables (schema version 15); nothing existing changes. - Global templates with fields. "Templates verwalten …" in the menu opens a window to create, edit and delete templates (a name and a text). Fields are written in double braces:
{{name}}is free text,{{name:date}}a date (also{{date}}),{{name:clipboard}}the clipboard text (also{{clipboard}}) and{{name:choice:a|b|c}}one of the options; a name used twice is asked once. Templates are found in the palette (Tab switches between history, snippets and templates; "Template-Suche öffnen" in the menu opens it directly). Return on a template opens a form with one input per field (Tab moves on, "Abbrechen" or Esc pastes nothing) and pastes the filled text like any palette entry. Anything that is not a valid field, including a field without a value, stays as written. Templates are stored in their own table and never enter the history, the snippets or the secret handling, and the pasted result is not captured as a new copy. A clipboard field stays empty when the clipboard holds a secret. Database migration 14 adds the table. - A paste queue fills several fields one after another. The menu item "Warteschlange" shows how many entries are queued and holds "Sequenz-Modus (neue Kopien anhängen)", "Nächsten Eintrag einfügen (⌃⌥N)", "Warteschlange anzeigen …" and "Warteschlange leeren". With the sequence mode on, every copy that is stored is appended to the queue (skipped copies, secrets and ClipKnot's own pastes are not). In the palette ⌘Return puts the selected history or snippet entry at the end of the queue and keeps the palette open; Tab now also cycles to the queue view, where ⌥↑ and ⌥↓ reorder the selected entry, ⌘Delete removes it and Return pastes it. ⌃⌥N pastes the first queued entry into the app in front and moves on; a short note shows how many are left and says when the queue is empty. Like the palette paste it needs the Accessibility permission; without it the entry is only copied, and the queue still moves on so you can paste it by hand. The queue holds up to 100 entries and lives in memory only: it is gone after a restart, and switching the sequence mode off keeps it.
- ⌥Return in the palette opens the menu "Einfügen mit Filter …" and pastes the selected entry transformed by the chosen filter: Kleinbuchstaben, Grossbuchstaben, Titelschreibweise, Plain Text (strips HTML tags and decodes common entities), URL kodieren, URL dekodieren, Liste als HTML (one
<li>per line, bullets and numbers dropped), Absatz-Tag (<p>per block,<br>for single line breaks) and Leerzeichen trimmen. The history entry is not changed. The filters are pure functions that can be chained, which later custom filters will build on. - The menu item "Aufbewahrung" ("Für immer" by default, "30 Tage", "90 Tage", "365 Tage") deletes history entries whose last copy is older than the chosen period; the background maintenance does it, together with the entity, band and link data of the entries and sessions that become empty. Pinned and starred entries, entries in the bin (they follow their own 30-day undo window), live parked secrets, entries in a pasteboard and snippets are never deleted. Choosing a period that would delete entries first asks with their number; the question comes once per period, and not at all when nothing would be deleted. The choice and the confirmations are saved, a missing or invalid saved value falls back to "Für immer".
- «Erscheinungsbild …» in the menu opens a settings window with light / dark / system, accent colour, text size and row density. The palette, history window, snippet explorer and import window follow the choice without a restart, it is saved with the other settings, and «Zurücksetzen» restores the defaults. Every accent colour keeps at least a 3:1 contrast against the window background in light and dark. The accent colour tints only the type icons in the palette and history window, which turn white in the selected row (not selection, links, buttons or the explorer); the system choice uses the macOS accent colour and falls back to a neutral grey when that colour would have less than 3:1 contrast.
- The menu item "Erfassung" sets how copies are captured: "Leerraum am Rand trimmen" (on by default, as before) switches the trimming of surrounding whitespace off, so a copy is stored and hashed with its leading and trailing spaces and line breaks (line endings are still unified), and "Mindestlänge" (1, 2, 5, 10; default 2) and "Maximallänge" (10 000, 100 000, 1 000 000; default 1 000 000) keep shorter or longer texts out of the history. Lengths count characters after trimming, so an emoji or a letter with a combining mark counts once. A text that is detected as a secret is still handled as a secret when it is outside the length limits. Entries stored earlier are not changed; a missing or invalid saved value falls back to its default.
- Colors and phone numbers are recognised as their own content types. Hex values (#BF5AF2, #fff, with alpha), rgb()/rgba() and hsl()/hsla() values and copies that carry a color on the pasteboard become "Farbe"; international numbers (+41 79 123 45 67, 0041 …) and national numbers with a leading zero and separators (079 123 45 67, 030/123456) become "Telefonnummer". Both have their own icon and can be filtered by type. Plain digit runs, dates, versions, hashes and commit IDs keep their type, and secrets still win. No database migration is needed; copies stored earlier keep their type.
- Return in the palette pastes the entry into the app that was in front when the palette opened: the palette closes, that app gets the focus back and receives ⌘V. The paste is not captured as a new copy. This needs the Accessibility permission; without it, or when no other app was in front, the entry is only copied and a short note says so. The menu item "Zwischenablage nach dem Einfügen wiederherstellen" (off by default) puts the previous clipboard content back after the paste, unless something else was copied in the meantime. Concealed or transient content (for example a password copied from a password manager) is never put back; the clipboard is left empty instead, and so is text the secret detector flags (for example an API key) even when its source set no marker.
- The snippet explorer colours the text of the selected snippet for shell, SQL and YAML (keywords, strings, numbers, comments, operators, variables and flags, keys), in light and dark appearance. Only the colours change; the copied text stays exactly as shown.
- The snippet explorer checks the syntax of the shown snippet and starts its info line with "✓ Syntax gültig" or "✗ Syntax ungültig:" and a short reason: unclosed quotes and brackets and dangling
|or&&in shell, unclosed strings and parentheses andUPDATEwithoutSETorINSERTwithout values in SQL, tab or inconsistent indentation and unclosed brackets in YAML. Constructs the check does not understand (shell functions andcase, dialect-specific SQL, Helm or Jinja templates with{{or{%, …) get no verdict rather than a wrong one. The snippet is never run. "Neu …" shows the same check while you type and still saves an invalid snippet. - A snippet can carry a comment. The snippet explorer has a "Kommentar" field under the info line; the comment is saved when you leave the field, trimmed and capped at 2000 characters, and is found by the explorer search and the snippet palette. A secret in a comment is replaced by a placeholder like in the snippet text; a comment that still contains one is refused with "Der Kommentar enthält ein Geheimnis, das nicht entfernt werden konnte." A comment being edited is also saved when the window closes or moves to the background.
- "Neu …" in the snippet explorer adds a snippet by hand: text, language (guessed from the text until you pick one) and an optional comment. The text is anonymised like every other snippet; one that is empty, too large or still contains a secret after anonymising is refused and the sheet says why. A text that matches the shape of an existing snippet joins it as a variant and the explorer says so, and also when that snippet's existing comment was kept instead of the typed one; a snippet you deleted before comes back.
Changed
- The app is renamed from Clipkeep to ClipKnot, because the old name is shared by many clipboard managers. The bundle identifier is now
li.wuermli.clipknot, the data lives in~/Library/Application Support/ClipKnot/clipknot.db, the release archive isClipKnot-<version>.zipand the Homebrew cask isclipknot(it replaces the caskclipkeep). - On the first launch ClipKnot copies the history database and its key from Clipkeep, and the preferences kept outside the database (such as whether Safari addresses are read). The parked secrets are carried over the first time ClipKnot uses them; if the old Keychain item cannot be read then (a declined prompt, a locked keychain), ClipKnot changes nothing, drops a newly copied secret instead of parking it, and tries again the next time it needs the parked secrets, at the latest on the next launch. Files imported in Clipkeep can still be removed with "Import löschen …". The old data is not deleted or changed. If Clipkeep is still running, or the old database cannot be opened with its key (for example after moving to a new Mac), the menu says so and nothing is copied.
- Because of the new bundle identifier, macOS may ask for the Keychain password more than once (the database key and the parked secrets are separate items), and the Accessibility, Automation, notification and launch-at-login approvals have to be granted again.
- Bitwarden notes that Clipkeep marked are still recognised; new notes carry the ClipKnot marker.
- Snippets that differ only in their values (paths, numbers, quoted strings, URLs, IP addresses, hashes; SQL literals; YAML scalar values) are merged into one snippet that keeps every concrete text as a variant.
ls -la ~/a/plugin/andls -la ~/b/prefs/ 2>/dev/nullbecome one snippet; stderr redirections, fd duplications such as2>&1and redirections to/dev/nulldo not count, while the program, flags, pipes and any other redirection (with its target masked) do. Code is never treated as a value:$( … ), backticks, process substitution, the argument of-c,-e,--command,--evaland--exec, the command or script run bysudo,env,bash,python3and similar wrappers, and the remote command ofsshstay literal, sosudo ./deploy.shandsudo ./wipe.shremain separate snippets. The snippet shows the most recently copied variant, counts the copies of all variants, is found by any variant's text, and deleting it keeps every variant from being collected again. Existing snippets are merged once on the first start after the update. The snippet explorer lists one row per merged snippet with a variant menu that selects which text is shown and copied, and the palette row shows the number of variants.
- Sticky notes: «Neue Notiz» in the menu or ⌃⌥K opens a floating note that stays above other windows and can be moved and resized. Notes support bold, italic, bullet lists, checklists (☐ / ☑ marker lines, a click on the box ticks it) and simple tab-aligned tables, in five colours. Content, position, size and colour survive a restart; they are stored as RTF in a new
Show changes
Added
- Shell, SQL and YAML snippets are collected automatically from your copies, with secrets replaced by placeholders before anything is stored. Copies that capture skips (pause, ignored or password manager apps, ignore rules, Clipkeep's own copies) are never collected, and "Snippets automatisch erfassen" in the menu switches collection off.
- The palette searches snippets too: Control+Option+S opens it in snippet mode, Tab switches between history and snippets, Return copies the snippet and Command+Delete removes it so it is not collected again.
- "Als Snippet speichern" in the history window stores the selected entry as a snippet, anonymised, even when automatic collection would skip it; Clipkeep asks for Shell, SQL or YAML when it cannot tell. "Snippets aus Verlauf übernehmen …" in the menu seeds the collection once from the existing history, imported entries included, using the same anonymiser and filter as automatic collection (ignore rules added after an entry was recorded are not applied again); parked secrets are never read, deleted snippets stay deleted and running it again adds nothing twice.
- "Snippet-Explorer öffnen …" in the menu opens a window with every snippet. It filters by language, topic (the program of a shell command, the first SQL table, the kind or first key of a YAML document, read from the text) and search text, sorts by any column including last use and how often a snippet was captured, shows the full text and copies or deletes the selected snippet. "Snippet-Suche öffnen" opens the snippet palette from the menu, and the menu says when its shortcut ⌃⌥S is taken by another app.
- The Clipkeep logo: the app icon in Finder, Launchpad, dialogs and notifications, the menu bar icon (dimmed while capture is paused) and the README header.
Fixed
- Transferring parked secrets to Bitwarden no longer asks for the Keychain password every few seconds. All parked secrets now live in one Keychain item, so macOS asks at most once and "Always Allow" covers every secret. Secrets parked by earlier versions are moved over on first use, which can ask once more for items an older build created.
- While unlocking or transferring, a small panel with a spinner appears at the top of the screen the pointer is on, the menu bar item shows the same state and the Bitwarden actions are disabled, so it is clear that something is in progress.
Show changes
Added
- A GitHub Actions workflow publishes a release when a version tag lands on
main: it builds and signs the archive, creates the GitHub release and opens the cask pull request in the tap.
Fixed
- Commands that hang, such as a stuck
bw, now time out on schedule even when the app is busy with other work.
- A GitHub Actions workflow publishes a release when a version tag lands on
Show changes
Added
- Menu-bar app with a launch-at-login toggle.
- Encrypted SQLCipher database with schema and migrations; the key lives in the Keychain.
- Clipboard capture with normalisation, content filters, window title and browser address as context.
- Pause and ignore rules for capture.
- Secret detection (token formats, key/value hints, entropy); detected secrets are parked in the Keychain and replaced by a placeholder, with optional transfer to Bitwarden through the
bwCLI and a "not a secret" undo. - Content classifier with entity extraction, and normalised and near-duplicate detection.
- Trigram full-text search with filters.
- Explainable importance score, tiers and opt-in retention; pin, star and undoable delete.
- Sessions grouped by pause, app and context, and topics clustered with TF-IDF and structural signals.
- Global hotkey with a floating search palette, and a history window with day, session and topic views.
- Markdown export of a session, a day or a topic.
- Import of collected text files with preview, secret handling and duplicate detection.
- Background maintenance jobs for sessions, topics and ranking.
- Evaluation harness with a synthetic gold set (
./scripts/eval.sh). - "Import löschen …" in the menu deletes the entries of one imported file at once, keeps entries that existed before and offers an undo right after.
- Release script with optional Developer ID signing and notarisation (
./scripts/release.sh). - One-click installation of the Bitwarden CLI through Homebrew from the Bitwarden menu, offered only when Homebrew is available.
- Installation without an Apple Developer ID: download with right click → "Open", or
brew install --cask JtheGunner/tap/clipkeep../scripts/release.shnow also writes a SHA-256 checksum next to the zip.
Changed
bundle-app.shsigns with a local self-signed certificate when one exists (./scripts/create-signing-identity.sh), so rebuilds keep the Keychain approval and the privacy grants. Without it the bundle stays ad-hoc signed.Safari tab addresses are read by default; SSH targets are kept out of e-mail detection.
The clipboard is polled every 250 ms.
Fixed
- Near-duplicate detection no longer slows down quadratically on many almost identical texts, and CJK text gets a usable fingerprint.
- The menu shows a hint when macOS restricts clipboard reading.
- The import preview warns when secrets take large blocks of text with them.
- The Markdown export runs in the background, and the import reports secrets that could not be parked instead of counting them as saved.
- Imported text files are dated by their structure: entries under a date heading (
2024-03-05,5.3.2024,5. März 2024,March 5, 2024) get that day, and a file without headings gets one session per block. The preview says which applies. - The history window can rename, merge and move topics, fetch a parked secret from Bitwarden (copied as concealed and cleared after 60 s) and undo "not a secret".
- An open history window now picks up new copies and changed entries (for example after "Kein Secret" in a notification) and keeps selection and scroll position.
- The "Ignorieren" menu lists ignored apps by name instead of bundle identifier; an app that is not installed still shows its identifier.
README
ClipKnot
A private, local clipboard history for macOS — searchable, grouped by session, secrets kept out of sight.
copy → capture → encrypt → find again
✨ What it is
ClipKnot lives in the menu bar and the Dock and remembers what you copy. Copies are grouped into work sessions and topics, so you can find "that snippet from yesterday's Kubernetes debugging" instead of scrolling a flat list.
Everything stays on your Mac. There is no cloud, no account and no AI at runtime.
| Feature | Notes | |
|---|---|---|
| 🔎 | Palette | Global hotkey ⌃⌥V, full-text search over your clipboard history; Return pastes the entry into the app you came from (needs Accessibility, otherwise it only copies and says so) and can put your previous clipboard back; ⌥Return pastes it through a filter (case, plain text, URL encode/decode, HTML list or paragraphs, trim) without changing the entry; entries that probably come next are listed first (see Next-paste suggestions) |
| 📋 | Paste queue | Fill form fields one after another: with the sequence mode on (Settings area) every copy is appended, ⌘Return in the palette queues the selected entry, Tab shows the queue where ⌥↑ / ⌥↓ reorder it, and ⌃⌥N pastes the next entry into the app in front and moves on; the Settings area shows the count, opens the queue and can empty it (kept in memory only, needs Accessibility to paste) |
| 🧾 | Snippets | Shell, SQL and YAML copies are collected with secrets replaced by placeholders, and copies that differ only in values such as paths or numbers merge into one snippet that keeps each text as a variant; ⌃⌥S opens the palette on them, and the Snippets area of the main window (menu bar menu → "Snippets öffnen") lists them all with filters for language and topic, sortable columns and the variant count, lets you edit a snippet's text (anonymised again on saving), colours the selected snippet's syntax and checks it (valid, invalid with a short reason, or no verdict when unsure; nothing is ever run). Add a snippet by typing it in (the plus button in the Snippets area; secrets are replaced by placeholders and an over-long text or one that still holds a secret is refused), save any clipboard history entry («Als Snippet speichern») or seed the collection once from the clipboard history, with the same anonymiser and filter («Snippets aus der Zwischenablage übernehmen …») |
| 📌 | Pasteboards | Named groups of clipboard history entries that no automatic cleanup removes. Create, rename and delete them in the main window (the Pasteboards area), add an entry from the clipboard area, give it a shortcut (conflicts are reported) and type the shortcut or @Name in the palette; pinned entries are listed first in the palette, and both palette and clipboard area can filter by pasteboard; image and colour entries show their thumbnail or swatch |
| 🧩 | Templates | Global templates with fields ({{name}}, {{name:date}}, {{name:clipboard}}, {{name:choice:a|b|c}}), managed in the main window (the Templates area) and found in the palette (Tab cycles clipboard history, snippets, templates, queue); Return opens a form for the fields and pastes the result, cancelling pastes nothing. Templates never enter the clipboard history or secret handling |
| 🗓️ | Clipboard | The first area of the main window: the entries grouped by day with day, topic, entity and pasteboard filters in the header bar, search, entry detail, copy / pin / star / delete with undo, Markdown export |
| 🖼️ | Images | Copied PNG and TIFF images are kept as «Bild» entries in the clipboard history and the palette (a label such as "Bild PNG, 12 KB" plus a thumbnail, see Previews); Return in the palette and the copy button of the clipboard area put the image itself on the clipboard and paste it, never its label (no filters, no paste queue); «Als Datei speichern …» in the clipboard area writes the image unchanged to a file you choose; the same image copied again counts as a duplicate, and images over the size limit (default 10 MB, «Erfassung» › «Maximale Bildgrösse») are skipped |
| 🖋️ | Formatting | A text copied from a document or page keeps its RTF and HTML next to the plain text; pasting from the palette or copying from the clipboard area puts both on the clipboard, so a word processor gets the formatted text and a terminal the plain one. «Plain Text» in the filter menu pastes without formatting. Search and duplicates stay on the plain text. The formatting is encrypted with the rest, limited in size, and dropped for the whole copy if the markup looks like it holds a secret |
| 🖼️ | Previews | A colour entry shows a swatch and its hex value, an image entry a thumbnail with its pixel size, in the palette, the clipboard area list and (large) in its detail. Thumbnails are made with ImageIO at low priority and cached, so the palette never waits for an image |
| 🪄 | Filter editor | "Filter verwalten …" in the Settings area opens a window to build your own filters from the built-in ones plus prefix, suffix and replace steps, with a live before/after preview, groups, search and a shortcut per filter (conflicts are reported). Export and import as JSON; invalid files are rejected with the reason. Your filters show up in the palette's filter menu (⌥Return), where "Kürzel eingeben …" applies the filter whose shortcut you type (an unknown one applies nothing and says so); a custom filter you applied is also what ⌃⌥F pastes with next |
| 🔎 | Text in images | The text in a captured image is read on the device (Vision, German and English, no network) and becomes searchable; the entry shows «Text aus Bild» in the palette and the clipboard history. «Text in Bildern erkennen» in the Settings area switches it off and deletes the recognised text. The text passes a stricter secret check than copied text and your ignore rules; if it matches, no text is stored for that image |
| 🔐 | Secret handling | Detected secrets are moved to the Keychain; the clipboard history keeps only a placeholder |
| 🎨 | Appearance | The Appearance section of the Settings area (⌘,) sets light, dark or system, accent colour (tints the type icons in the palette only), text size and row density; the palette follows at once (the areas of the main window use the system look), «Zurücksetzen» restores the defaults |
| ⌨️ | Shortcuts | Besides ⌃⌥V (palette), S (snippets), N (next queued entry) and K (new note), ⌃⌥P pastes the previous clipboard history entry (the one copied before the newest) and ⌃⌥F pastes the newest entry through the filter you used last in the palette. Both need Accessibility, otherwise they only copy. «Kurzbefehle …» in the menu changes every shortcut; a combination another action or macOS already uses is refused, and the menu says «Kurzbefehl … ist belegt» when another app holds one. |
| 🗒️ | Sticky notes | «Neue Notiz» in the menu bar menu or ⌃⌥K puts a floating note above other windows; move it by its background, resize it at the edges. Bold, italic, bullet lists, checklists (☐ / ☑, click the box to tick; Return continues the list) and simple tables, in one of five colours. The close button hides a note, «Alle Notizen anzeigen» opens the Notes area (where «Als schwebende Notiz lösen» turns a listed note into a floating one again), the trash button deletes. Content, position, size and colour are stored as RTF in the encrypted database and restored at launch (a note that would be off-screen after a display change moves onto the main screen). Notes live in their own table: they are not part of the clipboard history, search, Markdown export or cleanup (the all-data export includes them). Limitation: a table is a tab-separated block with tab stops (columns do not wrap or resize), not a real table object, and a checklist is a text marker line, not a control |
| ⏸️ | Control | Pause capture, ignore apps, add content rules, set trimming and minimum / maximum length |
| 📥 | Import | Split a text file into entries, dated by its date headings (the Import section of the Settings area); an import can be deleted again there, with undo |
| 📤 | Export | A session, a topic or a day as Markdown (clipboard area); all data from the Settings area as a backup ClipKnot can import again (.clipknot-backup, with images and formatted notes), as JSON, or as CSV (one file per module). Parked secrets and detected secrets are never exported; a backup merges into existing data and importing it twice adds nothing. CSV cells that start with =, +, - or @ get a leading apostrophe so spreadsheets do not run them |
| 🧩 | Modules | Snippets, Notes, Pasteboards and Templates can be switched off in the Settings area. A switched-off module leaves the sidebar, the menus, the palette and the shortcut list, and snippet collection stops; its data stays and returns when the module is switched on again |
| 💻 | Scripting | The clipknot command searches, reads and adds clipboard history entries from the terminal and from scripts. Off by default; see Scripting |
| 🧹 | Upkeep | Sessions, topics and ranking are maintained in the background |
💡 Next-paste suggestions
When the palette opens without a query, up to three entries that probably come next are listed first, marked "Vorschlag" with the signals behind them. They come from a count over your local clipboard history, with no model and no network:
| Signal | Label | Meaning |
|---|---|---|
| 🔗 | Folge | It followed the entry you pasted last in earlier pastes (within half an hour of that paste) |
| 🎯 | Ziel-App | You pasted it into the app that is about to receive the paste |
| 🗂️ | Sitzung | It was copied in the session that is still going on |
| 🏷️ | Thema | It was copied in an earlier session of the same topic |
Each paste from the palette is logged with the entry id, the time and the target app, never the text. The setting "Nächste Einfügung vorschlagen" in the Settings area (on by default) switches the suggestions and the logging off. ./scripts/eval.sh --suggestions measures the quality on fictional pastes, and --suggestions --real on your own clipboard history (read-only, numbers only); see eval/README.md.
Note
Apple Intelligence could rank the suggestions better, but it needs macOS 26 and a model at runtime, which ClipKnot does not use. It stays a possible, optional follow-up that would sit behind its own switch, with this heuristic as the fallback.
💻 Scripting
The clipknot command talks to the running app over a local socket. It is off by default: switch on "Skript-Schnittstelle aktivieren" in the Skript-Schnittstelle section of the Settings area. The app must be running; while the switch is off or the app is closed, the command exits with code 3.
The command ships inside the app as ClipKnot.app/Contents/Helpers/clipknot. To call it as clipknot, link it onto your PATH (or use a shell alias):
ln -s /Applications/ClipKnot.app/Contents/Helpers/clipknot /usr/local/bin/clipknot
| Command | Purpose | |
|---|---|---|
| 🔎 | clipknot search <query> [--kind KIND] [--limit N] |
Search the clipboard history. --kind is an entry kind such as text, url, command or json; --limit is 1 to 100 (default 20) |
| 📄 | clipknot get <id> [--filter NAME] |
Print an entry's text, optionally through a filter |
| ➕ | clipknot add (--stdin | <text>) |
Add text as a new entry: added <id>, duplicate <id> or not stored: <reason> |
| 📋 | clipknot copy <id> [--filter NAME] |
Put an entry on the system clipboard (prints copied) |
| 🪄 | clipknot filters |
List the filter names, one per line |
search prints one line per entry: id, kind, date (ISO 8601, UTC) and preview, separated by tabs.
Add --json to any command to get the reply as one line of JSON on standard output, with sorted keys and dates in ISO 8601 UTC. When the app answers with an error, standard output is a JSON error object and the message is also printed to standard error. A failure without an answer from the app (ClipKnot not running or the socket missing, a timeout, an unreadable reply, too large input, a usage error) prints nothing on standard output, only a fixed message on standard error.
| Command | JSON on standard output |
|---|---|
search |
{"entries":[{"copiedAt":"2026-11-29T12:00:00Z","id":1,"kind":"text","preview":"…"}]} |
get |
{"text":"…"} |
add |
{"duplicate":false,"id":7} or {"reason":"secret","stored":false} |
copy |
{"copied":true} |
filters |
{"filters":["lowercase","trim"]} |
| error answered by the app | {"error":"secret","message":"…"} (error is one of interfaceOff, notFound, secret, invalidArgument, tooLarge; interfaceOff appears only when the app itself answers it, otherwise exit code 3 comes with no JSON) |
clipknot search "kubectl rollout" --limit 5
clipknot search deploy --kind command --json | jq -r '.entries[0].id'
clipknot get 1234 > snippet.txt
clipknot get 1234 --filter lowercase
pbpaste | clipknot add --stdin
clipknot copy 1234
| Exit code | Meaning |
|---|---|
0 |
Success (also for add replies such as duplicate or not stored) |
1 |
The request failed: the app answered with an error (for example an unknown id, a secret or an unknown filter), did not answer in time, or sent a reply that could not be read |
2 |
Usage error: unknown command or option, missing or invalid argument |
3 |
The interface is switched off or ClipKnot is not running |
Set CLIPKNOT_SOCKET to an absolute path to use a different socket than the default one in ~/Library/Application Support/ClipKnot/run/.
🛠️ Build and run
Requirements: macOS 14 or newer and the Xcode Command Line Tools (full Xcode is not needed).
swift build # debug build
./scripts/bundle-app.sh # release build, assembled as build/ClipKnot.app
open build/ClipKnot.app
A bundle is required for "launch at login". See Installation for how the app is signed and installed.
To build a distributable zip and its SHA-256 checksum, run VERSION=1.0.0 ./scripts/release.sh. With a Developer ID certificate (CODESIGN_IDENTITY) it signs with the hardened runtime, and with a notarytool keychain profile (NOTARY_PROFILE) it also notarises and staples the app. See the header of the script.
| Command | Purpose | |
|---|---|---|
| 🔏 | ./scripts/create-signing-identity.sh |
Create the local code-signing certificate, once |
| 🧪 | ./scripts/test.sh |
Run the test suite (-c release -Xswiftc -enable-testing for release mode) |
| 🧫 | ./scripts/sandbox.sh start |
Run a throwaway copy with demo data, see Sandbox |
| 🎨 | ./scripts/lint.sh |
Check formatting with swift-format (--fix rewrites files) |
| 📏 | ./scripts/eval.sh |
Search-quality and next-paste suggestion evaluation, see eval/README.md |
🧫 Sandbox
To look at the app without touching your real data, run it as a sandbox: its own data directory, demo data (clipboard entries of every kind, snippets with variants, notes, pasteboards, templates), no Keychain and therefore no password prompts, and preferences apart from the installed app.
./scripts/sandbox.sh start --fresh # build, reset the data, start
./scripts/sandbox.sh area 3 # select a sidebar area (1-7)
./scripts/sandbox.sh shot overview # save a screenshot of the window to build/sandbox/shots/
./scripts/sandbox.sh stop
The sandbox is switched on by the environment variable CLIPKNOT_SANDBOX_DIR (an absolute path), which only the script sets. Selecting an area needs the Accessibility permission and taking screenshots the Screen Recording permission for your terminal.
📦 Installation
ClipKnot is not notarised (there is no Apple Developer ID yet), so macOS shows a Gatekeeper warning the first time you open a downloaded copy. Two ways to install it:
Download
- Download
ClipKnot-<version>.zipfrom the latest release and unzip it. - Move
ClipKnot.appto/Applications. - Right-click the app and choose Open, then confirm Open in the warning dialog. You only need to do this once. If macOS offers no Open button, go to System Settings → Privacy & Security and choose Open Anyway.
- Grant the permissions the app asks for (see Permissions).
Homebrew
brew install --cask JtheGunner/tap/clipknot
The cask prints the same Gatekeeper note after the install. Remove the app with brew uninstall --cask clipknot. The cask clipknot replaces the old cask clipkeep; if you installed the old one, see Upgrading from Clipkeep.
Note
Releases are signed with a self-signed certificate, which macOS does not trust on other Macs. That is why the first launch needs Open. The Keychain approval and the Accessibility and Automation grants are bound to the signing certificate and the bundle identifier, so they survive updates signed with the same certificate. They have to be granted again if a release is ever signed with another identity or the bundle identifier changes, as it did once with the rename to ClipKnot.
From source
- Create a signing certificate once:
./scripts/create-signing-identity.sh. It makes a self-signed code-signing certificate in your login keychain and asks for your login password to trust it. - Build and install:
./scripts/bundle-app.sh, then copybuild/ClipKnot.appto/Applications. A bundle built on your own Mac has no quarantine flag, so Gatekeeper does not warn. - Rebuild freely:
bundle-app.shsigns with that certificate automatically, so the Keychain approval and the privacy grants survive a rebuild. Without the certificate the bundle is signed ad hoc, and macOS asks again after every build.
Maintainers: see docs/releasing.md for how a release is built and published.
⬆️ Upgrading from Clipkeep
ClipKnot was called Clipkeep in earlier releases. On the first launch it copies the clipboard history database (~/Library/Application Support/Clipkeep/ including its write-ahead log files) to ~/Library/Application Support/ClipKnot/clipknot.db and the database key to its new Keychain service name. The parked secrets are carried over to the new Keychain item the first time ClipKnot uses them. Preferences kept outside the database, such as whether Safari addresses are read, are carried over too; window sizes and positions are not.
The old data is never deleted or changed, so Clipkeep keeps working. Each step runs again whenever its target is missing: the database is copied again if ~/Library/Application Support/ClipKnot/ (or the clipknot.db in it) is removed, which replaces everything recorded in ClipKnot since the upgrade with the old Clipkeep clipboard history; the key and the parked secrets are copied again only if their ClipKnot Keychain items are removed. Remove the old app and its data yourself once you are happy with ClipKnot.
- Quit Clipkeep first and turn off its "Beim Anmelden starten". While Clipkeep is running, ClipKnot refuses to migrate and the menu asks you to quit Clipkeep and start ClipKnot again. If Clipkeep still starts at login, both apps record from then on, and Clipkeep keeps writing to the old database and Keychain item, which ClipKnot no longer reads.
- Start ClipKnot. The bundle identifier changed to
li.wuermli.clipknot. The database key and the parked secrets are separate Keychain items, each approved for Clipkeep only, so macOS may ask for your Keychain password more than once. Before the first prompt ClipKnot shows a short dialog that explains why; it appears once, and only when the old database key is waiting to be copied. The Accessibility, Automation, notification and launch-at-login approvals have to be granted again. - Homebrew: once ClipKnot shows your clipboard history, run
brew uninstall --cask clipkeepandbrew install --cask JtheGunner/tap/clipknot. The caskclipkeepis replaced byclipknot.
Warning
Do not runbrew uninstall --zap --cask clipkeepbefore ClipKnot has migrated. The zap removes~/Library/Application Support/Clipkeep/, which is where the migration copies from.
Bitwarden notes that Clipkeep created are still recognised, and files imported in Clipkeep can still be removed in the Import section of the Settings area.
If the migration cannot finish, the menu shows a message and nothing is copied or installed:
The two key errors show a short menu line ("Aufzeichnung inaktiv: Schlüssel passt nicht – Details …" and "Aufzeichnung inaktiv: Schlüssel fehlt – Details …"). Click it to open a dialog with the full explanation and the recovery steps.
| Menu line says | Cause and fix | |
|---|---|---|
| 🔑 | Schlüssel passt nicht – Details … (the old database cannot be opened with the key stored for ClipKnot) | A key for ClipKnot already exists but does not match the old database. In Keychain Access delete the item with service li.wuermli.clipknot and account database-key, then restart ClipKnot. |
| 🔓 | Zugriff erlauben und ClipKnot neu starten | You declined or cancelled the Keychain password prompt for the old database key. Restart ClipKnot and allow the access (preferably "Always Allow"). |
| 🚚 | Schlüssel fehlt – Details … (the key of the old database is missing from this Mac's Keychain) | Typical after moving to a new Mac: the key does not travel with Migration Assistant or a backup restore, and without it the old clipboard history cannot be opened. The only way to continue is to start fresh: remove the folder ~/Library/Application Support/Clipkeep/. This discards the old clipboard history for good. ClipKnot never deletes it on its own, and the message keeps appearing until the folder is removed or the key is available again. |
Note
Parked secrets are carried over the first time ClipKnot uses them. If the old Keychain item cannot be read, for example because you declined the Keychain prompt or the keychain is locked, ClipKnot changes nothing: the parked secrets count as unavailable, a newly copied secret is dropped instead of parked (it is never stored as plain text), and the carry-over is tried again the next time ClipKnot needs the parked secrets, at the latest on the next launch. macOS may ask for the password again then.
🔒 Privacy
- Local only. ClipKnot makes no network connections and uses no AI model.
- Scripting interface, off by default. While "Skript-Schnittstelle aktivieren" is on, every program that runs under your macOS user account can read the non-secret clipboard history and add entries through the socket. Secrets are never handed out: entries marked as secret or flagged by the secret detector cannot be read or copied, and search leaves flagged entries out. In plain output, control characters are written as escapes such as
\x1B(on a terminal, also ingettext), so a copied entry cannot drive your terminal; JSON output uses the standard JSON string escapes. The socket is a local file (directory mode 0700, socket 0600) and is removed when the switch goes off or the app quits; the interface makes no network connection. - Encrypted clipboard history. The database is SQLCipher-encrypted at
~/Library/Application Support/ClipKnot/clipknot.db. Its key is stored in the macOS Keychain. - Secrets are parked. Passwords, tokens and keys that ClipKnot recognises are stored in the Keychain; the database only holds a placeholder and a fingerprint for duplicate detection.
- Optional Bitwarden transfer. If the
bwcommand-line client is installed, a parked secret can be handed to your Bitwarden vault. If it is missing and Homebrew is available, the Bitwarden section of the Settings area offers to install it. - Images are encrypted too, but not scanned for secrets. Image bytes are stored in the same encrypted database, and a screenshot that shows a password or token is stored as it is; pause capture or ignore the app for sensitive work. Only the text read from an image is checked: if it looks like a secret, it is not stored or searchable. Text recognition can garble characters, so this check cannot catch every secret.
- Content is never logged. Error logs contain error descriptions only.
Note
ClipKnot records everything you copy that it does not recognise as a secret. Use "pause" and the ignore rules for sensitive workflows.
🧩 Permissions
| Permission | Why | Required | |
|---|---|---|---|
| 🔑 | Keychain | Database key and parked secrets | Yes |
| 🔔 | Notifications | Tell you when a secret was moved out of the clipboard history | Optional |
| ♿ | Accessibility | Read the title of the front window as context | Optional |
| 🌐 | Automation (Apple Events) | Read the address of the active browser tab | Optional |
Reading Safari tab addresses is on by default and can be switched off in the Settings area; Safari cannot tell private windows apart, so their addresses are recorded too.
🏗️ Architecture
clipboard ─▶ ClipboardPoller ─▶ CapturePipeline ─▶ ContentStore ─▶ SQLCipher DB
│ normalise ▲
│ detect secrets ─▶ Keychain │
▼ │
context (app, window, URL) MaintenanceService
sessions · topics · ranking
menu bar · palette · clipboard area ◀── search / browse ◀────────────┘
The code is split into a testable library and thin app targets:
| Target | Role | |
|---|---|---|
| 📦 | ClipKnotCore |
Capture, storage, sessions, topics, ranking, search, import, export, evaluation |
| 🧩 | ClipKnotUI |
SwiftUI main window: navigation model and views |
| 🖥️ | ClipKnot |
macOS app: menu-bar item, Dock icon, main window host |
| ⌨️ | clipknot-cli |
The clipknot command-line tool (product name; installed as Contents/Helpers/clipknot) |
| 📏 | clipknot-eval |
Command-line evaluation harness |
🤝 Contributing
Issues and pull requests are welcome. See CONTRIBUTING.md for how to report problems, propose changes and run the project locally.
📝 Changelog
Notable changes are listed in CHANGELOG.md.
📄 License
Released under the MIT License.