This is my first Swift project. It is a command line tool to copy piped input to the macOS clipboard.
swift build -c release
The binary is placed in .build/release/ by default.
cat example.txt | .build/release/to-clipboard
This copies the contents of example.txt to the clipboard.