Skip to main content

teeclip

PyPI Release Date Python 3.8+ License: GPL v3 GitHub Discussions Platform

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.toml for 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?

"Buy Me A Coffee"

License

teeclip, Copyright (C) 2025 Dustin Darcy

This project is licensed under the GNU General Public License v3.0 — see LICENSE for details.

Metadata

Release files for teeclip 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for teeclip 0.2.2
File Size Uploaded Provenance Actions
teeclip-0.2.2.tar.gz 52.1 kB With provenance Details for teeclip-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for teeclip 0.2.2
File Interpreter ABI Platform Actions
teeclip-0.2.2-py3-none-any.whl Python 3 none any Details for teeclip-0.2.2-py3-none-any.whl

Total release size: 91.8 kB

Release files / teeclip-0.2.2.tar.gz

Download URL teeclip-0.2.2.tar.gz
Size 52.1 kB
Tags Source
SHA-256 checksum
How to use checksums
237b74c87d7a4c86cef4a754704ce314bfe029555226da3954e378552d2ff46a
BLAKE2b-256 checksum
How to use checksums
1f4fd2b0d10a4fc7949f5541e93d91f2dab711c5ece7fec1dca8f0bc2231d2b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 18, 2026.

Transparency log

Release files / teeclip-0.2.2-py3-none-any.whl

Download URL teeclip-0.2.2-py3-none-any.whl
Size 39.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0af9553077ca06bc30ec39823e0e850b078a454a448a1949a536298b9a73c5fc
BLAKE2b-256 checksum
How to use checksums
3b736118952606f79b1955389efdbcc86f9702b97cbeb019d57ad98ba54d46d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 18, 2026.

Transparency log

Security for teeclip 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for teeclip-0.2.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page