{
"$type": "site.standard.document",
"description": "shotpath is my Swift CLI for copying new macOS screenshot paths automatically, so I can paste screenshots into Claude Code, Droid, or Codex.",
"path": "/shotpath-automatically-copy-macos-screenshot-paths/",
"publishedAt": "2026-03-07T11:39:00.000Z",
"site": "at://did:plc:bryys25pc2fnagnyxqgsglhd/site.standard.publication/3mn26bjkkmh23",
"tags": [
"macOS",
"Tools",
"Projects"
],
"textContent": "I wrote a fish function that watches for new macOS screenshots and copies the file path to the clipboard. I use it all the time — take a screenshot, paste the path into Claude Code or Droid. No dragging, no Exposé, no waiting for the desktop to refresh.\n\nI turned it into a CLI utility called shotpath.\n\nWHAT CHANGED\n\nThe fish function worked fine, but it had a couple of annoyances. It needed a terminal window running fish, and it depended on fswatch and terminal-notifier being installed. It was also hard to share with others — telling someone \"paste this fish function and install these two dependencies\" isn't great.\n\nshotpath is a single Swift binary. It uses FSEvents directly — no dependencies. Notifications use osascript, which is available on every Mac. And it can run as a background service via Homebrew.\n\nINSTALL\n\nbrew tap hboon/tap\nbrew install shotpath\n\nUSAGE\n\nRun it manually:\n\nshotpath\n\nOr start it at login so you never have to think about it:\n\nbrew services start hboon/tap/shotpath\n\nThat's it. Take a screenshot with cmd+shift+4, and the path is in your clipboard ready to paste into your coding agent.\n\nWHY NOT JUST COPY TO CLIPBOARD?\n\nmacOS can be configured to copy screenshots to the clipboard instead of saving to a file — but not both. I want to keep all my screenshots. shotpath gives me both: the file is saved, and the path is in my clipboard.\n\nHOW IT WORKS\n\nshotpath monitors ~/Desktop using FSEvents with file-level granularity. When a new file appears that matches the macOS screenshot naming pattern (Screenshot ... at ... .png), it copies the absolute path to the clipboard and shows a notification.\n\nThe whole thing is about 70 lines of Swift.",
"title": "shotpath: Automatically Copy macOS Screenshot Paths",
"updatedAt": "2026-06-04T00:00:00.000Z"
}