Cross-platform tee-to-clipboard CLI with history management
Project description
teeclip
Like Unix tee, but for your clipboard — with history and encryption. One command, every platform.
Why teeclip?
Platform clipboard tools (clip.exe, pbcopy, xclip) are sinks — they consume stdin and produce no output. That means cmd | clip | tee doesn't work the way you'd expect: clip eats the data and nothing reaches tee.
# What you'd expect to work (but doesn't):
echo hello | clip | tee output.txt # output.txt is EMPTY — clip ate stdin
# The workaround (but you lose stdout):
echo hello | tee output.txt | clip # works, but you can't see the output
# With teeclip — stdout + clipboard + file, one command:
echo hello | teeclip output.txt
teeclip is a filter, not a sink. Data flows through it to stdout while being copied to the clipboard. It also keeps an encrypted local history so you can recall past clips, and it works identically on Windows, macOS, Linux, and WSL — your scripts stay portable.
| Task | Without teeclip | With teeclip |
|---|---|---|
| Copy + see output | cmd | tee /dev/tty | clip |
cmd | teeclip |
| Copy + file + stdout | cmd | tee file | tee /dev/tty | clip |
cmd | teeclip file |
| Recall a previous copy | Not possible | teeclip --get 2 |
| Encrypted history at rest | Not possible | Automatic with config |
| Same script, any OS | Requires platform detection | Just works |
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 - Encrypted storage: AES-256-GCM encryption with OS-integrated key management (DPAPI, Keychain, Secret Service)
- Cross-platform: Windows, macOS, Linux (X11 + Wayland), and WSL — auto-detected, one command everywhere
- Configurable:
~/.teeclip/config.tomlfor persistent settings (history size, encryption, backend) - Zero core dependencies: Uses only Python stdlib and native OS clipboard commands
- File output: 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 [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 [N], -l [N]
show recent clipboard history (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. For database internals and encryption details, see docs/database.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.2.tar.gz.
File metadata
- Download URL: teeclip-0.2.2.tar.gz
- Upload date:
- Size: 52.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
237b74c87d7a4c86cef4a754704ce314bfe029555226da3954e378552d2ff46a
|
|
| MD5 |
556213eb55d76afc0d8a31db5d685de5
|
|
| BLAKE2b-256 |
1f4fd2b0d10a4fc7949f5541e93d91f2dab711c5ece7fec1dca8f0bc2231d2b6
|
Provenance
The following attestation bundles were made for teeclip-0.2.2.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.2.tar.gz -
Subject digest:
237b74c87d7a4c86cef4a754704ce314bfe029555226da3954e378552d2ff46a - Sigstore transparency entry: 962612458
- Sigstore integration time:
-
Permalink:
DazzleTools/teeclip@26fd5a8fed270ca0a79250adab9630bd0d812ecb -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/DazzleTools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@26fd5a8fed270ca0a79250adab9630bd0d812ecb -
Trigger Event:
push
-
Statement type:
File details
Details for the file teeclip-0.2.2-py3-none-any.whl.
File metadata
- Download URL: teeclip-0.2.2-py3-none-any.whl
- Upload date:
- Size: 39.7 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 |
0af9553077ca06bc30ec39823e0e850b078a454a448a1949a536298b9a73c5fc
|
|
| MD5 |
259c03d4a6530fcab7357f3a1fc58ffc
|
|
| BLAKE2b-256 |
3b736118952606f79b1955389efdbcc86f9702b97cbeb019d57ad98ba54d46d6
|
Provenance
The following attestation bundles were made for teeclip-0.2.2-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.2-py3-none-any.whl -
Subject digest:
0af9553077ca06bc30ec39823e0e850b078a454a448a1949a536298b9a73c5fc - Sigstore transparency entry: 962612461
- Sigstore integration time:
-
Permalink:
DazzleTools/teeclip@26fd5a8fed270ca0a79250adab9630bd0d812ecb -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/DazzleTools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@26fd5a8fed270ca0a79250adab9630bd0d812ecb -
Trigger Event:
push
-
Statement type: