Skip to main content

A clipboard history manager for your terminal. Track, search, and manage everything you copy.

Project description

yankit mascot

yankit

A clipboard history manager for your terminal.
Yank it, track it, find it.

Features

  • Interactive TUI — Browse, search, and copy entries with keyboard navigation
  • Watch — Monitor your clipboard in real-time (foreground or daemon mode)
  • List — View your clipboard history with timestamps and word counts
  • Search — Find anything you've copied with highlighted results
  • Stats — See statistics about your clipboard usage
  • Copy back — Re-copy any past entry back to your clipboard
  • Export — Export your clipboard history as JSON
  • Prune — Auto-cleanup old entries to keep your database lean
  • Daemon mode — Run in background with stop and status commands

Installation

With uvx (recommended, no install needed)

uvx yankit watch

With uv

uv tool install yankit

With pip

pip install yankit

Quick Start

1. Start watching your clipboard

# Foreground mode (Ctrl+C to stop)
yankit watch

# Background daemon mode
yankit watch --daemon

2. Browse with the Interactive TUI

The primary way to use yankit is through its interactive interface. Simply running yankit without any arguments will launch the TUI, where you can navigate your history, preview long texts, and copy entries back to your clipboard.

# Launch the interactive browser
yankit

# Launch the interactive browser with a pre-filled search query
yankit search "password"

# (Optional) Alias for simply running `yankit`
yankit list

Keybindings:

Key Action
/ Navigate between entries
c Copy highlighted entry to clipboard
Enter / Open detail panel (full content, scrollable)
/ Escape Close detail panel / search
s Open search
d Delete highlighted entry
r Refresh entries
q Quit

3. Check watcher status / stop it

yankit status
yankit stop

4. View statistics

yankit stats

5. Export history

yankit export
yankit export --output history.json

6. Cleanup

# Delete entries older than 30 days
yankit prune --older-than 30

# Delete all history
yankit clear

How It Works

yankit polls your system clipboard every 0.5 seconds and stores new entries in a local SQLite database. It deduplicates consecutive copies and enforces a configurable maximum entry limit (default: 10,000) to prevent unbounded growth.

yankit watch ──► polls clipboard ──► new content? ──► store in SQLite
                   every 0.5s              │
                                    same as last? ──► skip

Database Location

All data is stored locally at ~/.yankit/history.db. No data is ever sent anywhere.

Database Size Management

  • Max entries limit: yankit watch --max-entries 5000
  • Age-based pruning: yankit prune --older-than 30 (days)
  • Full reset: yankit clear
  • Monitor size: yankit stats shows current DB size

Platform Support

Platform Status Notes
macOS Uses pbcopy/pbpaste (pre-installed)
Linux Requires xclip or xsel

Linux Prerequisites

# Debian/Ubuntu
sudo apt-get install xclip

# Arch
sudo pacman -S xclip

# Fedora
sudo dnf install xclip

Development

git clone https://github.com/oktaysabak/yankit.git
cd yankit

uv sync
uv run yankit --help

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yankit-0.3.0.tar.gz (363.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yankit-0.3.0-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file yankit-0.3.0.tar.gz.

File metadata

  • Download URL: yankit-0.3.0.tar.gz
  • Upload date:
  • Size: 363.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for yankit-0.3.0.tar.gz
Algorithm Hash digest
SHA256 e867169f7b2275833048c4c629a20ad7fa45b7de4a0f05c0679d88feaafa04e3
MD5 485bd279637d64d9fb30768defe8424d
BLAKE2b-256 db7c5a0ae8df74d27273cd09858a576228a898a22ce57281be9c72863aebdb76

See more details on using hashes here.

File details

Details for the file yankit-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: yankit-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for yankit-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b19153f2578ba26a5f037165d844cf3834de2583e5ac05f83c451a4fed2b6b1
MD5 9bceeaacd228c5c412bdf70b70f49093
BLAKE2b-256 6fe316f181c29c41f07caa8e09c02b7411b3511450df482edc4d20ce1ee99965

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page