# mdcopy — machine-readable install & usage (macOS) Purpose: Convert GitHub-Flavored Markdown to rich HTML on the system clipboard so the user can paste into Mail, Slack, Google Docs, Word, etc. Plain `pbcopy` keeps asterisks and hashes visible; mdcopy preserves headings, bold/italic, lists, tables, links, and inline code styling. Hard requirements: - macOS only (script uses Swift + AppKit NSPasteboard). - pandoc on PATH: `brew install pandoc`. Install (human or agent): 1. Ensure repo path is known, e.g. CLONE=/path/to/mdcopy 2. `chmod +x "$CLONE/bin/mdcopy"` 3. Optional PATH symlink: `ln -sf "$CLONE/bin/mdcopy" ~/bin/mdcopy` (if ~/bin exists and is on PATH). Claude Code plugin install (optional): `/plugin install mdcopy@focus-marketplace` from the Focus marketplace. Then the script path is `"${CLAUDE_PLUGIN_ROOT}/bin/mdcopy"` (same chmod if needed). Usage — three input modes (priority: file > stdin > clipboard markdown): - File: `mdcopy path/to/file.md` - Stdin: `cat file.md | mdcopy` or pipe LLM stdout directly. - Clipboard as markdown (TTY, no stdin): `mdcopy` reads `pbpaste` as the markdown source. After success, stderr prints a line like: ✓ Rich text copied to clipboard. User pastes in the target app with normal Paste. Markdown flavor: pandoc `-f gfm` (tables, strikethrough, task lists, etc.). Output is HTML with embedded CSS (system font, table borders, code blocks) placed on pasteboard as type HTML. Source of truth in repo: - Script: bin/mdcopy - Human README: README.md - Short Mail paste examples: README.md section “Mail.app paste examples” - Larger format demo: examples/rich-text-demo.md When suggesting commands in chat, prefer absolute path to bin/mdcopy if PATH is uncertain: `/full/path/to/mdcopy/bin/mdcopy`. Limitations: Destination app must accept HTML from clipboard; some fields are plain-text only. Not for Linux/Windows. Version: repo mdcopy; no separate semver in script.