Clippy ๐

Copy files from your terminal that actually paste into GUI apps. No more switching to Finder.
macOS only - built specifically for the Mac clipboard system.
Why Clippy?
pbcopy copies file contents, but GUI apps need file references. When you pbcopy < image.png, you can't paste it into Slack or email - those apps expect files, not raw bytes.
Clippy bridges this gap by detecting what you want and using the right clipboard format:
clippy report.pdf
clippy *.jpg
curl -sL https://picsum.photos/300 | clippy
clippy -r
clippy -r 3
clippy -i
clippy -i 5m
Stay in your terminal. Copy anything. Paste anywhere.
Installation:
The Terminal-First Clipboard Suite: Clippy copies files to clipboard, includes an MCP server for AI assistants, Pasty pastes intelligently, and Draggy (optional GUI) bridges drag-and-drop workflows. Use as a Go library for custom integrations. All designed to minimize context switching from your terminal.
Core Features
1. Smart File Copying
clippy document.pdf
clippy notes.txt
clippy -t notes.txt
clippy *.jpg
2. Recent Downloads
clippy -r
clippy -r 3
clippy -r 5m
clippy -i
clippy -i 3
clippy -i 5m
clippy -r --paste
clippy -i --paste
3. Find Files with Spotlight
clippy -f invoice
clippy -f screenshot
clippy -f .pdf
clippy -f report.xlsx
No more switching to Finder to search for files - find and copy them directly from your terminal.
4. Pipe Data as Files
curl -sL https://example.com/image.jpg | clippy
cat archive.tar.gz | clippy
5. Copy and Paste Together
clippy ~/Downloads/report.pdf --paste
clippy -r --paste
clippy -i --paste
6. Clear Clipboard
clippy --clear
echo -n | clippy
7. Content Type Detection
A nice bonus: clippy auto-detects content types (JSON, HTML, XML) so receiving apps handle them properly - something pbcopy can't do. This means when you paste into apps that support rich content, they'll handle it correctly - JSON viewers will syntax highlight, HTML will render, etc.
echo '{"key": "value"}' | clippy
clippy -t page.html
clippy -t file.txt --mime application/json
8. Gmail-Ready Markdown Email
Copy Markdown, render it as rich email content, then paste normally into Gmail,
Mimestream, Mail, or another rich composer:
clippy md2rich
clippy md2rtf
The clipboard carries HTML, RTF, and plain-text representations together. Rich
composers preserve intentional paragraph spacing, emphasis, links, lists,
inline code, and Mimestream-style fenced code blocks; plain-text targets still
receive a readable fallback.
9. Helpful Flags
clippy -v file.txt
clippy --debug file.txt
Why "Clippy"?
Because it's a helpful clipboard assistant that knows what you want to do! ๐
MCP Server
Clippy includes a built-in MCP (Model Context Protocol) server that lets AI assistants copy generated content directly to your clipboard.
Ask Claude to generate any text - code, emails, documents - and have it instantly available to paste anywhere:
- "Write a Python script to process CSV files and copy it to my clipboard"
- "Draft an email about the meeting and put it on my clipboard"
- "Generate that regex and copy it so I can paste into my editor"
No more manual selecting and copying from the chat interface.
For email drafts, the dedicated copy_email tool is advertised to the model.
Prefer its explicit salutation, body_markdown, and signoff fields so the
email structure is preserved without guessing at language-specific greetings.
The complete-body markdown field remains available for compatibility. The
tool only copies the draft; it does not address or send mail.
Setup
Claude Code:
claude mcp add --scope user clippy $(which clippy) mcp-server
claude mcp add clippy $(which clippy) mcp-server
Note: $(which clippy) finds the clippy binary on your system. On Apple Silicon Macs this is typically /opt/homebrew/bin/clippy, on Intel Macs it's /usr/local/bin/clippy.
Claude Desktop:
Add to your config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"clippy": {
"command": "clippy",
"args": ["mcp-server"]
}
}
}
You can customize MCP tool/prompt/example descriptions without changing behavior:
clippy mcp-server \
--tools /path/to/tools.json \
--prompts /path/to/prompts.json \
--examples /path/to/examples.json
By default, override files can be partial. Add --strict-metadata to require full coverage of every tool, prompt, and parameter.
- clipboard_copy - Copy text or files to system clipboard
- copy_email - Copy a structured email draft as Gmail-ready rich text (never sends)
- clipboard_paste - Paste clipboard content to files/directories
- get_recent_downloads - List recently downloaded files
- buffer_copy - Copy file bytes (with optional line ranges) to agent's private buffer
- buffer_cut - Cut lines from file to buffer (copy and delete from source)
- buffer_paste - Paste bytes to file with append/insert/replace modes
- buffer_list - Show buffer metadata (lines, source file, range)
Why buffer tools? Solves the LLM "remember and re-emit" problem. The MCP server reads/writes file bytes directly - agents never generate tokens for copied content. Enables surgical refactoring (copy lines 17-32, paste to replace lines 5-8) with byte-for-byte accuracy, without touching your system clipboard.
Pasty - Intelligent Clipboard Pasting
When you copy a file in Finder and press โV in terminal, you just get the filename as text. Pasty actually copies the file itself to your current directory.
Core Use Cases
1. Copy file in Finder โ Paste actual file in terminal
2. Smart text file handling
3. Save browser images
pasty photo.png
pasty --preserve-format
Also handles rich text with embedded images (.rtfd bundles from TextEdit/Notes).
4. Debugging and plain text extraction
pasty --inspect
pasty --plain notes.txt
pasty -f existing.txt
By default, pasty uses Finder-style duplicate naming if a file already exists.
Draggy - Visual Clipboard Companion
Draggy is a menu bar app that brings visual functionality to your clipboard workflow. While clippy handles copying from the terminal, Draggy provides a visual interface for dragging files to applications and viewing recent downloads.
Important: Draggy is a separate, optional tool. It's not automatically installed with clippy.
Features
Core Functionality
- Drag & Drop Bridge - Makes clipboard files draggable to web browsers, Slack, and other apps
- Recent Downloads Viewer - Toggle between clipboard and recent downloads with one click
- File Thumbnails - Visual previews for images and PDFs right in the file list
- Quick Preview - Hold โฅ Option while hovering to see larger previews
- Zero Background Activity - No polling or battery drain, only activates on demand
User Experience
- Double-Click to Open - Quick access to files without leaving the menu
- Keyboard Shortcuts - ESC to close, Space to refresh
Design Philosophy
- Not a clipboard manager - No history, no database, no complexity
- Terminal-first workflow - Designed to complement terminal usage, not replace it
- Minimal but complete - Every feature serves a specific workflow need
Installation
brew install --cask neilberkman/clippy/draggy
โ ๏ธ First Launch: macOS may show a security warning since Draggy isn't code-signed. If you see "Draggy is damaged and can't be opened":
- The Homebrew cask automatically removes the quarantine flag during installation
- If the warning persists, run:
xattr -dr com.apple.quarantine /Applications/Draggy.app
- Or right-click Draggy.app and select "Open" to bypass Gatekeeper
Usage
clippy ~/Downloads/*.pdf
curl -sL image.jpg | clippy
clippy -r
Workflow Examples
Upload screenshots to GitHub:
Quick file sharing:
Recent downloads workflow:
Philosophy
Draggy is intentionally not a clipboard manager. No history, no search, no database. It's a visual bridge between your terminal clipboard workflow and GUI applications. For terminal users who occasionally need to see what's on their clipboard or drag files somewhere, then get back to work.
Build from Source
git clone https://github.com/neilberkman/clippy.git
cd clippy
go build -o clippy ./cmd/clippy
go build -o pasty ./cmd/pasty
sudo mv clippy pasty /usr/local/bin/
go install github.com/neilberkman/clippy/cmd/clippy@latest
go install github.com/neilberkman/clippy/cmd/pasty@latest
Library
Clippy can be used as a Go library in your own applications:
go get github.com/neilberkman/clippy
High-Level API
import "github.com/neilberkman/clippy"
err := clippy.Copy("document.pdf")
err := clippy.CopyMultiple([]string{"image1.jpg", "image2.png"})
err := clippy.CopyText("Hello, World!")
reader := strings.NewReader("Some content")
err := clippy.CopyData(reader)
err := clippy.CopyData(os.Stdin)
text, ok := clippy.GetText()
files := clippy.GetFiles()
Features
- Smart Detection: Automatically determines whether to copy as file reference or text content
- Multiple Files: Copy multiple files in one operation
- Reader Support: Copy from any io.Reader with automatic format detection
- Clipboard Access: Read current clipboard content (text or file paths)
- Cross-Platform Types: Uses standard Go types, handles platform-specific clipboard internally
License
MIT