{"id":29550129,"url":"https://github.com/neilberkman/clippy","last_synced_at":"2026-02-02T07:54:57.064Z","repository":{"id":304887716,"uuid":"1020430215","full_name":"neilberkman/clippy","owner":"neilberkman","description":"Unified clipboard tool for macOS that intelligently handles both text and file copying","archived":false,"fork":false,"pushed_at":"2026-01-11T01:26:12.000Z","size":5196,"stargazers_count":191,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-11T09:24:49.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neilberkman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-15T21:25:10.000Z","updated_at":"2026-01-11T01:21:16.000Z","dependencies_parsed_at":"2025-07-17T02:43:47.327Z","dependency_job_id":"4b457695-69cc-4191-ad22-7828256f6b2f","html_url":"https://github.com/neilberkman/clippy","commit_stats":null,"previous_names":["neilberkman/clippy"],"tags_count":59,"template":false,"template_full_name":null,"purl":"pkg:github/neilberkman/clippy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neilberkman%2Fclippy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neilberkman%2Fclippy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neilberkman%2Fclippy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neilberkman%2Fclippy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neilberkman","download_url":"https://codeload.github.com/neilberkman/clippy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neilberkman%2Fclippy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28526574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-18T01:02:43.868Z","updated_at":"2026-02-02T07:54:57.054Z","avatar_url":"https://github.com/neilberkman.png","language":"Go","funding_links":[],"categories":["Go","Utilities","others"],"sub_categories":["macOS"],"readme":"# 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 \u003c 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. 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\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- **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 what's on clipboard and what pasty will use\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 \u0026 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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneilberkman%2Fclippy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneilberkman%2Fclippy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneilberkman%2Fclippy/lists"}