2026-01-27 22:03:51 -06:00
2026-01-27 22:01:30 -06:00
2026-01-27 22:01:30 -06:00
2026-01-27 22:01:30 -06:00
2026-01-27 22:01:30 -06:00
2026-01-27 22:01:30 -06:00
2026-01-27 22:01:30 -06:00
2026-01-27 22:01:30 -06:00
2026-01-27 22:01:30 -06:00
2026-01-27 22:01:30 -06:00
2026-01-27 22:01:30 -06:00
2026-01-27 22:03:51 -06:00
2026-01-27 22:01:30 -06:00

klp

A clipboard history manager for Linux (X11 and Wayland).

Installation

./install.sh

This builds the binary, installs it to ~/.local/bin, and starts the background daemon.

Ensure ~/.local/bin is in your PATH:

export PATH="$HOME/.local/bin:$PATH"

Auto-start on Login

Option 1: systemd (recommended)

make service-install
systemctl --user enable --now klp

Option 2: Desktop autostart

make autostart-install

Usage

Command Description
klp Interactive list (navigate with j/k, select with Enter, delete with d)
klp -l Non-interactive list
klp -l -n 10 Non-interactive list, 10 entries
klp --limit 10 Interactive list, 10 entries
klp <id> Copy entry to clipboard
klp -s "query" Search (interactive)
klp -s "query" -l Search (non-interactive)
klp -d <id> Delete entry
klp -v Print version

Service Management

klp service start    # Start daemon (backgrounds automatically)
klp service stop     # Stop daemon
klp service status   # Check if running

Configuration

Config file: ~/.config/klp/config.json

{
  "defaultLimit": 20,
  "dbLocation": "/home/user/.klp.db",
  "maxEntrySize": 0
}
  • defaultLimit: Default number of entries to show
  • dbLocation: Path to the clipboard history database
  • maxEntrySize: Maximum entry size in bytes (0 = unlimited)

Development

Build

make build

Install locally

make install

Project Structure

klp/
├── main.go
├── cmd/
│   ├── root.go      # CLI commands
│   └── service.go   # Daemon management
└── internal/
    ├── config/      # Viper configuration
    ├── database/    # NDJSON storage
    ├── clipboard/   # X11/Wayland clipboard access
    ├── service/     # Clipboard monitoring
    ├── search/      # Text search
    └── tui/         # Interactive UI (Bubble Tea)

Dependencies

Wayland Requirements

For Wayland support, ensure wl-paste and wl-copy are installed:

# Fedora
sudo dnf install wl-clipboard

# Ubuntu/Debian
sudo apt install wl-clipboard
Description
No description provided
Readme 5.1 MiB
Languages
Go 93.3%
Shell 3.7%
Makefile 3%