Skip to main content

Cross-platform tee-to-clipboard CLI with history management

Project description

teeclip

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

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
  • Cross-platform: Windows, macOS, Linux (X11 + Wayland), and WSL — auto-detected
  • Zero 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

Or install from source:

git clone https://github.com/DazzleTools/teeclip.git
cd teeclip
pip install -e .

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

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] [-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 (windows, macos, xclip, xsel, wayland, wsl)
  --no-clipboard, -nc
                    skip clipboard (act as plain tee)
  -q, --quiet       suppress warning messages
  -V, --version     show version and exit

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.

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

teeclip-0.1.1.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

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

teeclip-0.1.1-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file teeclip-0.1.1.tar.gz.

File metadata

  • Download URL: teeclip-0.1.1.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for teeclip-0.1.1.tar.gz
Algorithm Hash digest
SHA256 38f3a4b0418a7214d6c0bba163bb7f1f6c293a35dba2edc9e57faa2719f71716
MD5 0748aa339dca379c758ff1ca86196386
BLAKE2b-256 bc16d21fb52f7e9869bda4e742b321a47273f3f552ee45a4514d6fa31f1d4f6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for teeclip-0.1.1.tar.gz:

Publisher: release.yml on DazzleTools/teeclip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file teeclip-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: teeclip-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for teeclip-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5bece53545acb20f9388f76276c0be0f60207507eb3ed6d29fd47ce5088d8c6a
MD5 9246676528d45600a3e3fd638af3b440
BLAKE2b-256 8e39d4f2c0bbe892267d4474b770e725474913b6ae0760e25b54dc8ccd9936ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for teeclip-0.1.1-py3-none-any.whl:

Publisher: release.yml on DazzleTools/teeclip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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