Crates.io | file_clipper |
lib.rs | file_clipper |
version | 0.1.2 |
created_at | 2025-07-06 21:35:11.302696+00 |
updated_at | 2025-08-22 16:11:59.154212+00 |
description | A command-line utility that provides intuitive and efficient file management capabilities, mimicking the familiar “copy,” “cut,” and “paste” operations found in graphical user interfaces. |
homepage | |
repository | https://github.com/ruiiiijiiiiang/file_clipper |
max_upload_size | |
id | 1740460 |
size | 6,970,020 |
file_clipper
is a command-line utility written in Rust that provides intuitive and efficient file management capabilities, mimicking the familiar "copy," "cut," and "paste" operations found in graphical user interfaces. It also includes features for managing a clipboard and viewing operation history, with an interactive terminal user interface (TUI) for enhanced usability.
clp copy <path>...
cp
, c
, y
clp cut <path>...
mv
, x
, d
clp link <path>...
ln
, s
clp paste [destination_path]
p
, v
destination_path
is omitted, files are pasted into the current directory.clp list
l
clp history
h
clp clear
list
and history
commands launch an interactive terminal interface, allowing you to select specific files for pasting and manage entries with ease.*.txt
, src/**/*.rs
).When files are cut or copied, they are placed into a temporary clipboard. Upon a successful paste operation, these files are automatically removed from the clipboard and recorded in the history, providing a persistent log of all file operations.
To install file_clipper
, you need to have Rust and Cargo installed on your system.
cargo install file_clipper
Here are some basic examples of how to use clp
:
# Copy a single file
clp copy my_document.txt
# Copy multiple files using a glob pattern
clp cp 'images/*.png'
# Cut a directory
clp cut my_folder/
# Copy a file as a symlink
clp ln .dotfile
# Paste files to the current directory
clp paste
# Paste files to a specific destination
clp p /home/user/documents/
# List current clipboard contents (launches TUI)
clp list
# View operation history (launches TUI)
clp history
# Remove all clipboard and history entries
clp clear
When the TUI is launched (e.g., with clp list
or clp history
):
j
or k
(or arrow keys) to move up and down. Use Ctrl+d
and Ctrl+u
to scroll half a page, and Ctrl+f
and Ctrl+b
to scroll a full page. Press g
to go to the top and G
to go to the bottom.space
to select/unselect individual entries. Press a
to select/unselect all entries.p
or Enter
: Paste the selected filesx
or d
: Remove the selected entry from the clipboard (only available in clipboard mode).q
or Ctrl+c
: Exit the TUI.file_clipper
stores record files at $HOME/.local/state/file_clipper
. You should run clp clear
prior to uninstalling to remove these files.
After clearing the records, you can uninstall the application using Cargo:
cargo uninstall file_clipper
Contributions are welcome! Please feel free to open issues or submit pull requests.
This project is licensed under the MIT License.