cpw: copypaste.wiki in your terminal

Upload files and command output, read pastes, and manage your account from the terminal on Windows, macOS and Linux. One small program, nothing else to install. Encryption is done on your computer and works with the website both ways.

Windows

Download cpw.exe v1.3.0 · 5.9 MB · Windows 10/11, 64-bit

Then open PowerShell in the folder where you saved it and run:

PowerShell
.\cpw.exe install

It copies itself to %LOCALAPPDATA%\Programs\cpw and adds that folder to your PATH; open a new terminal and cpw works anywhere. If Windows says "Windows protected your PC" (the file is not code-signed), click More info → Run anyway.

Linux and macOS

One command in Terminal: picks the right build for your system and CPU (Intel or Apple Silicon on Mac), checks its SHA-256 and installs it to ~/.local/bin (no sudo):

Terminal
curl -fsSL https://copypaste.wiki/install.sh | sh

No curl? Use wget -qO- https://copypaste.wiki/install.sh | sh. You can read the script first. On Linux the clipboard works if wl-clipboard or xclip is installed; on macOS it just works. Installing this way avoids the macOS "unidentified developer" warning, which only applies to files downloaded in a browser.

All downloads

FileForSizeSHA-256
cpw.exeWindows 10/11, 64-bit5.9 MB3820e54cb742c8c08ef43e84f25d2b9a62c01dd1b3277a90b154e796c02d30d1
cpw-linux-amd64Linux x86_645.8 MB1c395fc731928cd366960ca46c86ea455eb081125c5ba8fa5068ae226fab3594
cpw-linux-arm64Linux ARM64 (Raspberry Pi 4/5, ARM servers)5.4 MBbf43e2b33af2a426233cfac7e137fab30a653381956edb2836fff6169ff5f522
cpw-darwin-arm64macOS, Apple Silicon (M1–M4)5.5 MB23c7233da2aefe3f60cb023f85f35480f15521a106d6f0bf442ec6072f1472fd
cpw-darwin-amd64macOS, Intel5.9 MBa7693ba7b78e5b25f4297c7c26b1939ed0f0c2b004846defc363409154ca3b6f

Check a file: Get-FileHash .\cpw.exe on Windows, sha256sum cpw-linux-amd64 on Linux. Manual Linux install: chmod +x cpw-linux-amd64 && ./cpw-linux-amd64 install.

Upload

Terminal
cpw script.lua
cpw clip -s luau                           # whatever is in the clipboard
Get-Content log.txt | cpw -t "build log"   # PowerShell
cat log.txt | cpw -t "build log"           # Linux / macOS
cpw dump.json -u -e 1D
cpw secret.txt -x
OptionWhat it does
-t, --title <text>Title (default: file name)
-s, --syntax <lang>luau, lua, json, python, cpp… (default: from the file extension)
-e, --expire <time>N, 10M, 1H, 1D, 1W, 2W, 1M, 6M, 1Y
-u, --unlistedOnly people with the link can open it
--privateOnly you (needs cpw login)
-b, --burnDelete after the first view
-x, --encryptEnd-to-end encrypt on your computer; the key goes in the link after #
-P, --password <text>Password-protect (with -x: encrypt with this password)
-f, --folder <name>Put it in a folder (needs cpw login)
--open / --no-copyOpen in the browser / don’t copy the link

The link is printed and copied to the clipboard.

Tab completion

Press Tab to complete commands, options, languages (-s lu → luau), expiry times and even your own paste ids after cpw get or cpw delete.

bash: set up by cpw install. PowerShell: also set up by cpw install when your PC allows profile scripts; if it tells you they are blocked, run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned and then cpw install again. zsh (default on macOS):

Terminal
echo 'source <(cpw completion zsh)' >> ~/.zshrc

Read

Terminal
cpw get k3Fq9xAb
cpw get "https://copypaste.wiki/k3Fq9xAb#key"     # decrypts encrypted pastes
cpw get k3Fq9xAb -o script.lua
cpw open k3Fq9xAb

Your pastes

Log in once with your API key from the API page:

Terminal
cpw login
cpw list
cpw list -f deobf
cpw delete k3Fq9xAb
cpw script.lua --private -f deobf

Updates

cpw checks for a new version once a day and tells you after a command. To update:

Terminal
cpw update

It downloads the new build from this site, checks its SHA-256 and replaces itself. Turn the daily check off with the environment variable CPW_NO_UPDATE_CHECK=1.

The key is saved in %APPDATA%\copypaste\config.json (Windows) or ~/.config/copypaste/config.json (Linux) or ~/Library/Application Support/copypaste/config.json (macOS). cpw logout removes it. cpw help lists everything.