Cross-platform tee-to-clipboard CLI with history management
Project description
teeclip
Like Unix tee, but for your clipboard. Pipe any command's output to both stdout and the system clipboard simultaneously.
Overview
teeclip reads from stdin and writes to stdout — just like tee — but instead of (or in addition to) writing to a file, it copies the output to your system clipboard. No more | pbcopy, | xclip, or | clip.exe — one tool, every platform.
Features
- Tee-style pass-through: stdin flows to stdout unmodified while being copied to clipboard
- Clipboard history: Automatically saves piped content to a local SQLite database
- History recall: Browse (
--list), retrieve (--get N), and manage (--clear) past clips - Optional encryption: AES-256-GCM encryption for stored clips via
pip install teeclip[secure] - Configurable:
~/.teeclip/config.tomlfor persistent settings (history size, encryption, backend) - Cross-platform: Windows, macOS, Linux (X11 + Wayland), and WSL — auto-detected
- Zero core dependencies: Uses only Python stdlib and native OS clipboard commands
- File output too: Supports writing to files just like standard
tee - Paste mode: Read clipboard contents back to stdout with
--paste
Installation
pip install teeclip
For encrypted clipboard history:
pip install teeclip[secure]
Or install from source:
git clone https://github.com/DazzleTools/teeclip.git
cd teeclip
pip install -e ".[secure]"
Usage
# Copy command output to clipboard (and still see it)
echo "hello world" | teeclip
# Pipe a diff to clipboard for pasting into a PR comment
git diff | teeclip
# Copy to clipboard AND write to a file
cat data.csv | teeclip output.csv
# Append to a log file while copying to clipboard
make build 2>&1 | teeclip -a build.log
# Print current clipboard contents
teeclip --paste
# Pipe clipboard into another command
teeclip --paste | grep "error"
# Skip clipboard (act as plain tee)
echo test | teeclip --no-clipboard output.txt
# Browse clipboard history
teeclip --list
# Retrieve the 2nd most recent clip
teeclip --get 2
# Save clipboard to history (for content copied outside teeclip)
teeclip --save
# Show current config
teeclip --config
# Encrypt all stored clips (requires teeclip[secure])
teeclip --encrypt
Platform Support
| Platform | Clipboard Tool | Notes |
|---|---|---|
| Windows | clip.exe / PowerShell |
Built-in, no setup needed |
| macOS | pbcopy / pbpaste |
Built-in, no setup needed |
| Linux (X11) | xclip or xsel |
Install: sudo apt install xclip |
| Linux (Wayland) | wl-copy / wl-paste |
Install: sudo apt install wl-clipboard |
| WSL | Windows clipboard via /mnt/c/ |
Auto-detected, no setup needed |
Options
usage: teeclip [-h] [-a] [--paste] [--backend NAME] [--no-clipboard] [-q]
[--list] [--list-count N] [--get N] [--clear [SELECTOR]]
[--save] [--config] [--no-history] [--encrypt] [--decrypt]
[-V] [FILE ...]
positional arguments:
FILE also write to FILE(s), like standard tee
options:
-a, --append append to files instead of overwriting
--paste, -p print current clipboard contents to stdout
--backend NAME force clipboard backend
--no-clipboard, -nc
skip clipboard (act as plain tee)
-q, --quiet suppress warning messages
--list, -l show recent clipboard history
--list-count N number of entries to show with --list (default: 10)
--get N, -g N retrieve Nth clip from history (1 = most recent)
--clear [SELECTOR]
delete history entries (all, or by index/range/combo)
--save, -s save current clipboard contents to history
--config show current configuration
--no-history skip history save for this invocation
--encrypt enable AES-256-GCM encryption (requires teeclip[secure])
--decrypt decrypt all stored clips
-V, --version show version and exit
For detailed documentation on all options and the config file, see docs/configuration.md.
Contributions
Contributions are welcome! Please read our Contributing Guide for details.
Like the project?
License
teeclip, Copyright (C) 2025 Dustin Darcy
This project is licensed under the GNU General Public License v3.0 — see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file teeclip-0.2.2a1.tar.gz.
File metadata
- Download URL: teeclip-0.2.2a1.tar.gz
- Upload date:
- Size: 50.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0ea99777ac4f6367642d5b9d42968fb5b2830842b2dca06d1334d9be90759a7
|
|
| MD5 |
b901de36ac6260d100bd9011c345e3c2
|
|
| BLAKE2b-256 |
f684bc6cf72ba249f31cd70a667b9309d8684c847e5c938aa469c5425bf5aba0
|
Provenance
The following attestation bundles were made for teeclip-0.2.2a1.tar.gz:
Publisher:
release.yml on DazzleTools/teeclip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
teeclip-0.2.2a1.tar.gz -
Subject digest:
c0ea99777ac4f6367642d5b9d42968fb5b2830842b2dca06d1334d9be90759a7 - Sigstore transparency entry: 957373937
- Sigstore integration time:
-
Permalink:
DazzleTools/teeclip@8879256f44800788105669708ebcc1e3e41980f7 -
Branch / Tag:
refs/tags/v0.2.2a1 - Owner: https://github.com/DazzleTools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8879256f44800788105669708ebcc1e3e41980f7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file teeclip-0.2.2a1-py3-none-any.whl.
File metadata
- Download URL: teeclip-0.2.2a1-py3-none-any.whl
- Upload date:
- Size: 38.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b56c6e41f5c028dd32db3515fcdc4e9d458ebfbc3fe2eaa2318dec724200afb7
|
|
| MD5 |
4b0f0d87ea31ad4d71ea4277a047f51e
|
|
| BLAKE2b-256 |
d0d7526b2cdcdfed15543e294a3d5b19bf2ca2df8895975a7a21a4312b764f85
|
Provenance
The following attestation bundles were made for teeclip-0.2.2a1-py3-none-any.whl:
Publisher:
release.yml on DazzleTools/teeclip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
teeclip-0.2.2a1-py3-none-any.whl -
Subject digest:
b56c6e41f5c028dd32db3515fcdc4e9d458ebfbc3fe2eaa2318dec724200afb7 - Sigstore transparency entry: 957373944
- Sigstore integration time:
-
Permalink:
DazzleTools/teeclip@8879256f44800788105669708ebcc1e3e41980f7 -
Branch / Tag:
refs/tags/v0.2.2a1 - Owner: https://github.com/DazzleTools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8879256f44800788105669708ebcc1e3e41980f7 -
Trigger Event:
push
-
Statement type: