clipbridge runs as a background daemon or one-shot command that formats clipboard HTML using the unipaste engine.
When you copy rich text or tables from Slack, Microsoft Teams, Discord, Google Chrome, or other web apps, the clipboard receives rich HTML and a plain-text fallback. Most apps generate flat plain text with missing table columns, lost code block indentation, broken lists, and missing URLs.
When you paste into plain-text targets (Notepad, terminals, vim, code editors), the target app reads the plain-text slot and outputs unaligned text.
clipbridge listens for clipboard updates with native OS event hooks. When an application puts HTML on the clipboard, clipbridge runs the HTML through the unipaste engine and writes formatted plain text (tables, code blocks, lists, links) into the plain-text clipboard slot. It leaves the original HTML slot unchanged.
- Uses the
unipasteC99 parsing and formatting engine. - Zero external runtime dependencies.
- Leaves the rich HTML slot untouched while updating the plain-text slot.
- Skips clipboard updates marked private by password managers (
Clipboard Viewer Ignore,CanIncludeInClipboardHistory, andorg.nspasteboard.ConcealedTypefrom 1Password, Bitwarden, KeePassXC, and Apple Keychain). - Platform support:
- macOS: Native Cocoa/AppKit
NSPasteboardchangeCount tracking. - Windows: Native Win32
AddClipboardFormatListenerevent loop. - Linux (Wayland): Uses
wl-clipboard(wl-pasteandwl-copy). - Linux (X11): Uses
xcliporxsel.
- macOS: Native Cocoa/AppKit
- Modes:
- Background daemon (
clipbridge -w). - One-shot hotkey sync (
clipbridge -1). - Direct terminal paste (
clipbridge -p).
- Background daemon (
git clone https://github.com/riccivr/clipbridge.git
cd clipbridge
make
sudo make installOn macOS, make links against -framework AppKit -framework Foundation using clang.
brew tap riccivr/tap
brew install clipbridge
# To start as a background service:
brew services start clipbridgeyay -S clipbridgesudo dpkg -i clipbridge_1.1.0_amd64.debchoco install clipbridgeDownload pre-built packages from GitHub Releases:
- macOS:
ClipBridge-1.1.0.dmg(ClipBridge.appplus a daemon installer script). - Windows:
clipbridge-v1.1.0-windows-x64.zip(clipbridge.exe). - Linux:
clipbridge-v1.1.0-linux-x86_64.tar.gz. - Debian / Ubuntu:
clipbridge_1.1.0_amd64.deb.
To run clipbridge automatically on login without third-party app wrappers:
mkdir -p ~/Library/LaunchAgents
cat << 'EOF' > ~/Library/LaunchAgents/com.riccivr.clipbridge.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.riccivr.clipbridge</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/clipbridge</string>
<string>-w</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
EOF
launchctl load ~/Library/LaunchAgents/com.riccivr.clipbridge.plistTo format on demand (clipbridge -1) using a keyboard shortcut:
- With
skhd(~/.config/skhd/skhdrc):cmd + alt - v : /usr/local/bin/clipbridge -1 - With Shortcuts.app: Create a Quick Action that runs
/usr/local/bin/clipbridge -1and assign a shortcut.
- i3 / Sway (
~/.config/sway/config):bindsym $mod+Alt+v exec clipbridge -1 - Hyprland (
~/.config/hypr/hyprland.conf):bind = $mainMod ALT, V, exec, clipbridge -1 - Systemd user service (
~/.config/systemd/user/clipbridge.service):Enable and start:[Unit] Description=Clipboard formatting daemon After=graphical-session.target [Service] ExecStart=/usr/local/bin/clipbridge -w Restart=always [Install] WantedBy=graphical-session.target
systemctl --user enable --now clipbridge
clipbridge [-w1pruv] [-m mode] [-t table] [-l link]
-w: Watch clipboard continuously in background and format updates (default).-1: Format current clipboard once and exit (for hotkey bindings).-p: Print formatted clipboard content to stdout.
-m mode: Output mode:plain(default),markdown,terminal.-t table: Table format:grid(default),markdown,tsv,simple.-l link: Link format:bracket(default),inline,text,footnote.-u: Use Unicode box-drawing characters for tables (┌─┬─┐).-r: Emit Windows CRLF (\r\n) line endings.-v: Print version.-h: Display help message.
MIT License. See LICENSE file for details.