commandx
Cut & paste files from the terminal — the way it should have always worked.
No more memorizing Cmd+Option+V in Finder. No more typing out full mv paths. Just cut, navigate, paste.
Install
GONOSUMCHECK=github.com/CitroenGames/commandx GOPROXY=direct go install github.com/CitroenGames/commandx@latest
Or build from source:
git clone https://github.com/CitroenGames/commandx.git
cd commandx
go install .
Usage
Cut files
Mark one or more files (or directories) for moving:
commandx cut myfile.txt photos/ notes.md
Paste files
Navigate to your destination and paste:
cd ~/Documents
commandx paste
Or specify a destination directly:
commandx paste ~/Documents
Finder Shortcuts (macOS)
Set up global keyboard shortcuts so you can cut & paste files directly in Finder:
commandx install
This creates macOS Quick Actions and tells you how to assign shortcuts. After setup:
- Open System Settings → Keyboard → Keyboard Shortcuts → Services
- Find CommandX Cut under General — assign a shortcut (e.g.
⌘⇧X)
- Find CommandX Paste under General — assign a shortcut (e.g.
⌘⇧V)
Then just select files in Finder, hit your cut shortcut, navigate to the destination folder, and hit paste. You'll get a notification confirming each action.
How it works
commandx cut saves the absolute paths of the selected files to ~/.commandx/clipboard.json. When you run commandx paste, it moves them to the target directory and clears the clipboard. Simple as that.
The Finder integration uses AppleScript to grab the selected files and current folder, then calls commandx under the hood.
License
MIT — see LICENSE for details.
Proudly built by Claude, Anthropic's AI assistant. 🤖