Skip to main content

Command line tool for cutting, copying, and pasting files.

Project description


A command line tool to cut, copy, and paste files.


To get the xcp command, install using pip. Only Python >=3.5 is supported.

pip install xcp-tool


usage: xcp <command> <args>

  x|cut   <file>  Move the file into the clipboard. The file is removed from
                  its current location.
  c|copy  <file>  Copy the file into the clipboard. The file also remains in
                  its current location.
  p|paste [name]  Copy the file currently in the clipboard to the current
                  working directory. Optionally rename the file.
  peek            Print the name of the file in the clipboard.
  clean           Clear the clipboard.
  help            Print this message.


xcp allows the user to configure certain properties:

root_dir:    string   Directory to use for clipboard.
max_entries: int > 0  Number of most recent entries to keep backed up.
verbose:     bool     Set to true for verbose output.

These can be set in a yaml file at either ~/.config/xcp/config.yaml or a file path set by the environment variable XCP_CONFIG_PATH (the latter is given priority, if the variable is set).


I actually like to make cp and mv perform xcp's copy and cut operations, respectively, when only a single file is passed to them. I also create a function pst to paste. A script located in the sh directory provides this functionality when sourced. It should work with both bash and zsh.


Testing is done using pytest. Simply run pytest . in the tests/ directory.



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for xcp-tool, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size xcp_tool-0.1.1-py3-none-any.whl (6.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size xcp-tool-0.1.1.tar.gz (7.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page