copypath
Copies an absolute path to the clipboard.
$ copypath # copies $PWD
$ copypath dist/index.html # copies /Users/joestump/…/dist/index.html
One command instead of pwd | pbcopy — and unlike pwd | pbcopy, it resolves
a relative argument to an absolute path first.
Pro tips
- The everyday move:
copypathin a deep directory, then paste into a Claude prompt, a Finder ⌘⇧G "Go to Folder" box, or anscpcommand on another tab. - It works on files, not just directories —
copypath some.logthen paste intotail -f ⌘Velsewhere. - Cross-platform: uses
pbcopyon macOS andxclip/wl-copyon the Linux nodes, so the muscle memory transfers. - Sibling plugin:
copyfilecopies a file's contents instead of its path.