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
  • Partial Selection — Select and copy specific parts of text in the detail view
  • Watch — Monitor your clipboard in real-time (foreground or daemon mode)
  • 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 search through everything you've copied.

# Launch the interactive browser
yankit

Keybindings:

Key Action
/ Navigate between entries / scroll text
c Copy highlighted entry (or selection if in detail view)
Enter / Open detail panel / Focus content
/ Escape Return to list / Close search
TAB / Shift+TAB Cycle focus between Search, List, and Detail
Enter / Jump to results (when in search)
Alt + / Switch focus directly between List and Detail
s Open search
d Delete highlighted entry
r Refresh entries
q Quit

3. Check watcher status / stop it

yankit status
yankit stop

4. Configuration

You can view and update your configuration directly from the CLI.

# View current config
yankit config view

# Update settings
yankit config set --max-entries 5000 --always-show-detail True

Available Settings

Setting Default Description
max_entries 10000 Maximum number of entries to keep in the database.
auto_prune_days 30 Number of days after which entries are automatically deleted.
enable_auto_prune True Whether to automatically prune old entries when the watcher is running.
always_show_detail False If True, the detail panel stays open in the TUI even when no entry is selected.
auto_start_watcher True Automatically start the background watcher when you open the TUI if it's not running.

5. View statistics

yankit stats

6. Export history

yankit export
yankit export --output history.json

7. 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 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. Your configuration is at ~/.yankit/config.json. No data ever leaves your machine.

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.4.3.tar.gz (365.9 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.4.3-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yankit-0.4.3.tar.gz
  • Upload date:
  • Size: 365.9 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.4.3.tar.gz
Algorithm Hash digest
SHA256 f363af1e9da3497deb2a96b83a780bb4517f98585af0e07c570ae676d71e2e63
MD5 9bf8e48f7e1be28136f11bced26c88ea
BLAKE2b-256 394f4454d192ed374bdb2290c635f41b4b9a0d408ba412516d1d25b611e4baae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yankit-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 20.9 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.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d567e90fe144dce18cbacfb1f8b0bf0d2a3be94cb99652828d6dbd89121035cb
MD5 657872a3628b72ad32d29ec7bd7a0563
BLAKE2b-256 21c1babedaddd10d88325206a3df4a6ed9d53e7daf8761c254db805025652673

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