{
  "markdown": "# Clippy 📎\n\n[![Homebrew](https://img.shields.io/homebrew/v/clippy?color=FBB040)](https://formulae.brew.sh/formula/clippy)\n[![Release](https://img.shields.io/github/v/release/neilberkman/clippy)](https://github.com/neilberkman/clippy/releases)\n[![CI](https://github.com/neilberkman/clippy/actions/workflows/release.yml/badge.svg)](https://github.com/neilberkman/clippy/actions/workflows/release.yml)\n[![Go Version](https://img.shields.io/github/go-mod/go-version/neilberkman/clippy)](https://go.dev/)\n[![License](https://img.shields.io/github/license/neilberkman/clippy)](https://github.com/neilberkman/clippy/blob/main/LICENSE)\n\nCopy files from your terminal that actually paste into GUI apps. No more switching to Finder.\n\n**macOS only** - built specifically for the Mac clipboard system.\n\n## Why Clippy?\n\n`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.\n\nClippy bridges this gap by detecting what you want and using the right clipboard format:\n\n```bash\n# Copy files as references (paste into any GUI app)\nclippy report.pdf         # ⌘V into Slack/email - uploads the file\nclippy *.jpg             # Multiple files at once\n\n# Pipe data as files\ncurl -sL https://picsum.photos/300 | clippy  # Download → clipboard as file\n\n# Copy your most recent download (immediate)\nclippy -r                # Grabs the file you just downloaded\nclippy -r 3              # Copy 3 most recent downloads\n\n# Interactive picker for recent files\nclippy -i               # Choose from list of recent downloads\nclippy -i 5m            # Show picker for last 5 minutes only\n```\n\nStay in your terminal. Copy anything. Paste anywhere.\n\n**Installation:**\n\n```bash\nbrew install clippy\n```\n\n**The Terminal-First Clipboard Suite:** [Clippy](#core-features) copies files to clipboard, includes an [MCP server](#mcp-server) for AI assistants, [Pasty](#pasty---intelligent-clipboard-pasting) pastes intelligently, and [Draggy](#draggy---visual-clipboard-companion) (optional GUI) bridges drag-and-drop workflows. Use as a [Go library](#library) for custom integrations. All designed to minimize context switching from your terminal.\n\n## Core Features\n\n### 1. Smart File Copying\n\n```bash\nclippy document.pdf    # Copies as file reference (paste into any app)\nclippy notes.txt       # Also copies as file reference\nclippy -t notes.txt    # Use -t flag to copy text content instead\nclippy *.jpg          # Multiple files at once\n```\n\n### 2. Recent Downloads\n\n```bash\n# Immediate copy (no UI)\nclippy -r              # Copy your most recent download\nclippy -r 3            # Copy 3 most recent downloads\nclippy -r 5m           # Copy all downloads from last 5 minutes\n\n# Interactive picker\nclippy -i              # Choose from list of recent downloads\nclippy -i 3            # Show picker with 3 most recent files\nclippy -i 5m           # Show picker for last 5 minutes only\n\n# Copy and paste in one step\nclippy -r --paste      # Copy most recent and paste here\nclippy -i --paste      # Pick file, copy it, and paste here\n```\n\n### 3. Find Files with Spotlight\n\n```bash\nclippy -f invoice      # Search for files matching \"invoice\"\nclippy -f screenshot   # Find screenshots\nclippy -f .pdf         # Find all PDF files (by extension)\nclippy -f report.xlsx  # Find specific file \"report.xlsx\"\n# Shows interactive picker with results\n```\n\nNo more switching to Finder to search for files - find and copy them directly from your terminal.\n\n### 4. Pipe Data as Files\n\n```bash\ncurl -sL https://example.com/image.jpg | clippy\ncat archive.tar.gz | clippy\n```\n\n### 5. Copy and Paste Together\n\n```bash\nclippy ~/Downloads/report.pdf --paste  # Copy to clipboard AND paste here\nclippy -r --paste          # Copy recent download and paste here\nclippy -i --paste           # Pick file, copy it, and paste here\n```\n\n### 6. Clear Clipboard\n\n```bash\nclippy --clear         # Empty the clipboard\necho -n | clippy       # Also clears the clipboard\n```\n\n### 7. Content Type Detection\n\nA 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.\n\n```bash\necho '{\"key\": \"value\"}' | clippy          # Recognized as JSON\nclippy -t page.html                       # Recognized as HTML\nclippy -t file.txt --mime application/json  # Manual override when needed\n```\n\n### 8. Gmail-Ready Markdown Email\n\nCopy Markdown, render it as rich email content, then paste normally into Gmail,\nMimestream, Mail, or another rich composer:\n\n```bash\nclippy md2rich draft.md        # from a file\ncat draft.md | clippy md2rich  # from a pipe\nclippy md2rich                 # render the clipboard in place\n```\n\nThe clipboard carries HTML, RTF, and plain-text representations together. Rich\ncomposers preserve intentional paragraph spacing, emphasis, links, lists,\ninline code, and Mimestream-style fenced code blocks; plain-text targets still\nreceive a readable fallback.\n\n### 9. Native Slack Messages\n\nWrite Markdown, then paste into any Slack composer and get real formatting —\nnot literal asterisks:\n\n```bash\nclippy md2slack notes.md         # from a file\ncat notes.md | clippy md2slack   # from a pipe\nclippy md2slack                  # render the clipboard in place\n```\n\nSlack's composer stores messages as a Quill Delta document and puts that same\ndocument on the clipboard when you copy from it. `md2slack` writes exactly that\nformat, so a normal Command-V produces bold, italic, strikethrough, inline\ncode, code blocks, block quotes, headings, links, and bulleted or numbered\nlists (including nesting) — as though the message had been typed in Slack.\n\nSlack has no table, image, or horizontal-rule construct, so tables become\nunaligned text rows, images become links, and rules become a divider line.\nAnything that does not understand the Slack format receives plain text.\n\nFor aligned columns, use space-padded text inside a fenced code block. Put\nboth fences on their own lines, with real line breaks between the rows:\n\n````markdown\nCurrent values:\n\n```\n  name   value\n  alpha  10\n  beta   20\n```\n````\n\nIndentation inside a fence is preserved; it is not required to create a code\nblock. Keep existing column padding when editing. Input uses CommonMark/GFM\nsyntax (`**bold**`, `~~strikethrough~~`), not Slack's mrkdwn syntax.\n\nThe `copy_slack` MCP tool returns `formatting` counts and `warnings`. Set\n`expected_code_blocks: 1` for a message with one fenced table: a mismatch\nreturns an error before changing the clipboard. `preview: true` reports the\nsame counts and warnings without copying. `clippy --verbose md2slack` reports\ncounts too, and the CLI always prints formatting warnings.\n\nThese counts describe generated formatting, not a verified Slack paste. Use\nnormal Command-V. Plain-text clipboard reads omit formatting and fence markers,\nso they cannot verify code blocks. If the counts are correct but the paste\nis wrong, inspect the clipboard/paste path before changing the Markdown.\nThe MCP tool and CLI use the same renderer.\n\n### 10. Helpful Flags\n\n```bash\nclippy -v file.txt     # Show what happened\nclippy --debug file.txt # Technical details for debugging\n```\n\n## Why \"Clippy\"?\n\nBecause it's a helpful clipboard assistant that knows what you want to do! 📎\n\n---\n\n## MCP Server\n\nClippy includes a built-in MCP (Model Context Protocol) server that lets AI assistants copy generated content directly to your clipboard.\n\nAsk Claude to generate any text - code, emails, documents - and have it instantly available to paste anywhere:\n\n- \"Write a Python script to process CSV files and copy it to my clipboard\"\n- \"Draft an email about the meeting and put it on my clipboard\"\n- \"Generate that regex and copy it so I can paste into my editor\"\n\nNo more manual selecting and copying from the chat interface.\n\nFor email drafts, the dedicated **copy_email** tool is advertised to the model.\nPrefer its explicit `salutation`, `body_markdown`, and `signoff` fields so the\nemail structure is preserved without guessing at language-specific greetings.\nThe complete-body `markdown` field remains available for compatibility. The\ntool only copies the draft; it does not address or send mail.\n\n### Setup\n\n**Claude Code:**\n\n```bash\n# Install for all your projects (recommended)\nclaude mcp add --scope user clippy $(which clippy) mcp-server\n\n# Or for current project only\nclaude mcp add clippy $(which clippy) mcp-server\n```\n\nNote: `$(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`.\n\n**Claude Desktop:**\n\nAdd to your config (`~/Library/Application Support/Claude/claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"clippy\": {\n      \"command\": \"clippy\",\n      \"args\": [\"mcp-server\"]\n    }\n  }\n}\n```\n\n### Metadata Overrides (Optional)\n\nYou can customize MCP tool/prompt/example descriptions without changing behavior:\n\n```bash\nclippy mcp-server \\\n  --tools /path/to/tools.json \\\n  --prompts /path/to/prompts.json \\\n  --examples /path/to/examples.json\n```\n\nBy default, override files can be partial. Add `--strict-metadata` to require full coverage of every tool, prompt, and parameter.\n\n### Available Tools\n\n#### System Clipboard Tools\n\n- **clipboard_copy** - Copy text or files to system clipboard\n- **copy_email** - Copy a structured email draft as Gmail-ready rich text (never sends)\n- **clipboard_paste** - Paste clipboard content to files/directories\n- **get_recent_downloads** - List recently downloaded files\n\n#### Agent Buffer Tools\n\n- **buffer_copy** - Copy file bytes (with optional line ranges) to agent's private buffer\n- **buffer_cut** - Cut lines from file to buffer (copy and delete from source)\n- **buffer_paste** - Paste bytes to file with append/insert/replace modes\n- **buffer_list** - Show buffer metadata (lines, source file, range)\n\n**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.\n\n---\n\n## Pasty - Intelligent Clipboard Pasting\n\nWhen 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.\n\n### Core Use Cases\n\n**1. Copy file in Finder → Paste actual file in terminal**\n\n```bash\n# 1. Copy any file in Finder (⌘C)\n# 2. Switch to terminal and run:\npasty\n# File gets copied to your current directory (not just the filename!)\n```\n\n**2. Smart text file handling**\n\n```bash\n# Copy a text file in Finder (⌘C), then:\npasty                    # Outputs the file's text content to stdout\npasty notes.txt          # Saves the file's text content to notes.txt\n```\n\n**3. Save browser images**\n\n```bash\n# Right-click \"Copy Image\" in any browser, then:\npasty photo.png          # Saves the image (auto-converts TIFF to PNG)\npasty --preserve-format  # Keep original format if needed\n```\n\nAlso handles rich text with embedded images (`.rtfd` bundles from TextEdit/Notes).\n\n**4. Debugging and plain text extraction**\n\n```bash\npasty --inspect          # Show clipboard types + paste priority (metadata only)\npasty --plain notes.txt  # Force plain text, strip all formatting\npasty -f existing.txt    # Overwrite existing files instead of creating duplicates\n```\n\nBy default, pasty uses Finder-style duplicate naming if a file already exists.\n\n---\n\n## Draggy - Visual Clipboard Companion\n\nDraggy 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.\n\n**Important:** Draggy is a separate, optional tool. It's not automatically installed with clippy.\n\n### Features\n\n#### Core Functionality\n\n- **Drag & Drop Bridge** - Makes clipboard files draggable to web browsers, Slack, and other apps\n- **Recent Downloads Viewer** - Toggle between clipboard and recent downloads with one click\n- **File Thumbnails** - Visual previews for images and PDFs right in the file list\n- **Quick Preview** - Hold ⌥ Option while hovering to see larger previews\n- **Zero Background Activity** - No polling or battery drain, only activates on demand\n\n#### User Experience\n\n- **Double-Click to Open** - Quick access to files without leaving the menu\n- **Keyboard Shortcuts** - ESC to close, Space to refresh\n\n#### Design Philosophy\n\n- **Not a clipboard manager** - No history, no database, no complexity\n- **Terminal-first workflow** - Designed to complement terminal usage, not replace it\n- **Minimal but complete** - Every feature serves a specific workflow need\n\n### Installation\n\n```bash\n# Separate brew install (not included with clippy)\nbrew install --cask neilberkman/clippy/draggy\n```\n\n**⚠️ 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\":\n\n- The Homebrew cask automatically removes the quarantine flag during installation\n- If the warning persists, run: `xattr -dr com.apple.quarantine /Applications/Draggy.app`\n- Or right-click Draggy.app and select \"Open\" to bypass Gatekeeper\n\n### Usage\n\n```bash\n# Copy files in terminal:\nclippy ~/Downloads/*.pdf    # Copy PDFs with clippy\ncurl -sL image.jpg | clippy # Pipe downloads to clipboard\nclippy -r                   # Copy most recent download\n\n# Use Draggy GUI:\n# 1. Click Draggy icon in menu bar\n# 2. Drag files to browser upload fields, Slack, etc.\n# 3. Toggle to Recent Downloads view with clock icon\n# 4. Hold ⌥ Option to preview files\n# 5. Double-click to open files\n```\n\n### Workflow Examples\n\n**Upload screenshots to GitHub:**\n\n```bash\n# Take screenshot (macOS saves to Desktop)\n# In terminal: clippy ~/Desktop/Screenshot*.png\n# In Draggy: Drag to GitHub comment box\n```\n\n**Quick file sharing:**\n\n```bash\n# Terminal: clippy ~/Downloads/report.pdf\n# Draggy: Shows thumbnail, drag to Slack or email\n```\n\n**Recent downloads workflow:**\n\n```bash\n# Download file in browser\n# Click Draggy → Click clock icon → See your download\n# Drag where needed or double-click to open\n```\n\n### Philosophy\n\nDraggy 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.\n\n---\n\n## Build from Source\n\n```bash\n# Clone and build\ngit clone https://github.com/neilberkman/clippy.git\ncd clippy\ngo build -o clippy ./cmd/clippy\ngo build -o pasty ./cmd/pasty\nsudo mv clippy pasty /usr/local/bin/\n\n# Or use go install\ngo install github.com/neilberkman/clippy/cmd/clippy@latest\ngo install github.com/neilberkman/clippy/cmd/pasty@latest\n```\n\n## Library\n\n[Clippy](#core-features) can be used as a Go library in your own applications:\n\n```bash\ngo get github.com/neilberkman/clippy\n```\n\n### High-Level API\n\n```go\nimport \"github.com/neilberkman/clippy\"\n\n// Smart copy - automatically detects text vs binary files\nerr := clippy.Copy(\"document.pdf\")\n\n// Copy multiple files as references\nerr := clippy.CopyMultiple([]string{\"image1.jpg\", \"image2.png\"})\n\n// Copy text content\nerr := clippy.CopyText(\"Hello, World!\")\n\n// Copy data from reader (handles text/binary detection)\nreader := strings.NewReader(\"Some content\")\nerr := clippy.CopyData(reader)\n\n// Copy from stdin\nerr := clippy.CopyData(os.Stdin)\n\n// Get clipboard content\ntext, ok := clippy.GetText()\nfiles := clippy.GetFiles()\n```\n\n### Features\n\n- **Smart Detection**: Automatically determines whether to copy as file reference or text content\n- **Multiple Files**: Copy multiple files in one operation\n- **Reader Support**: Copy from any io.Reader with automatic format detection\n- **Clipboard Access**: Read current clipboard content (text or file paths)\n- **Cross-Platform Types**: Uses standard Go types, handles platform-specific clipboard internally\n\n## License\n\nMIT\n",
  "bytes": 16281,
  "sha": "8babc20e88bf4877a04cf9d6084e96be4277dd7c529529ac1c4ea08a76ea94c4",
  "repo_slug": "neilberkman/clippy",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_neilberkman_clippy_dcf606e0/readme"
}