A lightweight terminal-based clipboard history manager, built with Go and the Bubble Tea TUI framework.
- 📋 Automatic Clipboard Monitoring - Continuously tracks clipboard changes in real-time
- 🕒 Persistent History - Saves clipboard history to disk across sessions
- 🎯 Duplicate Detection - Automatically filters out duplicate entries using SHA-256 hashing
- ⌨️ Keyboard Navigation - Navigate through history with vim-style keybindings
- 📱 Clean Terminal UI - Beautiful, responsive interface that fits your workflow
- 🔄 Instant Copy - Copy any historical item back to clipboard with a single keypress
- Go 1.20 or later
- MacOS
- Linux with X11 or Wayland (uses
xcliporwl-clipboard)
git clone https://github.com/bvdwalt/clippy.git
cd clippy
go build -o clippy ./cmd/clippy
sudo mv clippy /usr/local/bin/For X11:
sudo apt install xclip # Ubuntu/Debian
sudo dnf install xclip # FedoraFor Wayland:
sudo apt install wl-clipboard # Ubuntu/Debian
sudo dnf install wl-clipboard # FedoraStart the clipboard history manager:
clippy| Key | Action |
|---|---|
↑ / k |
Navigate up through history |
↓ / j |
Navigate down through history |
Enter / c |
Copy selected item to clipboard |
d |
Delete selected item from history |
/ |
Enter search mode |
r |
Refresh/clear search results |
Esc |
Exit search mode (when in search) |
q / Ctrl+C |
Quit application |
When you press /, you'll enter search mode where you can:
- Type to filter clipboard history using fuzzy search (similar to fzf)
- Press
Enterto apply the search filter - Press
Escto cancel and return to normal view
Clippy monitors your system clipboard every 2 seconds and automatically captures any new content. Each clipboard entry is:
- Hashed using SHA-256 to detect duplicates
- Timestamped for chronological organization
- Persisted to
history.jsonin the current directory - Displayed in a scrollable terminal interface
The application shows a preview of each clipboard entry (truncated to 60 characters) and replaces newlines with spaces for clean display.
clippy/
├── cmd/clippy/ # Main application entry point
│ ├── main.go # Application entry point
│ └── main_test.go # Main package tests
├── demo/ # Demo application
│ └── main.go # Demo runner
├── internal/
│ ├── history/ # Clipboard history management
│ │ ├── history.go # History manager implementation
│ │ ├── types.go # Data structures and types
│ │ └── *_test.go # History package tests
│ ├── search/ # Fuzzy search functionality
│ │ ├── fuzzy.go # Fuzzy search implementation
│ │ └── *_test.go # Search package tests
│ └── ui/ # Terminal user interface
│ ├── model.go # Bubble Tea model
│ ├── commands.go # UI commands and messaging
│ ├── styles/ # UI styling and themes
│ │ └── theme.go # Color themes and styling
│ ├── table/ # Table display management
│ │ └── manager.go # Table rendering and state
│ └── *_test.go # UI package tests
├── history.json # Persistent clipboard history (created at runtime)
├── go.mod # Go module definition
├── go.sum # Go module dependencies
└── README.md # Project documentation
- Bubble Tea - Terminal UI framework
- Bubbles - TUI components for Bubble Tea
- Lipgloss - TUI styling
- clipboard - Cross-platform clipboard access
- Clipboard history is stored locally in
history.json - No data is transmitted over the network
- SHA-256 hashes are used only for duplicate detection, not security
- All clipboard content is stored in plain text locally
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
- Built with Bubble Tea by Charm
- As well as Clipboard
