#file-path #relative-path #clipboard #file #file-content #filename #command-line-tool

app cliperge

A CLI tool to combine the contents of multiple files and copy to the clipboard

6 releases

0.3.0 Dec 13, 2024
0.2.0 Nov 11, 2024
0.1.3 Jul 20, 2024

#1162 in Command line utilities

Download history 2/week @ 2024-09-22 3/week @ 2024-10-13 1/week @ 2024-11-03 128/week @ 2024-11-10 10/week @ 2024-11-17 1/week @ 2024-11-24 124/week @ 2024-12-08 23/week @ 2024-12-15 1/week @ 2024-12-22

148 downloads per month

MIT license

12KB
241 lines

Cliperge

📋 Cliperge is a CLI tool to combine the contents of multiple files and copy them to the clipboard.

Features

  • Combine contents of multiple files
  • Copy combined contents to the clipboard
  • Support for full paths (starting from ~/), relative paths, or file names
  • Exclude specific files using patterns

Installation

To install Cliperge, you'll need to have Rust and Cargo installed. Then you can build and install the tool from source:

cargo install cliperge

or

git clone https://github.com/mei28/cliperge.git
cd cliperge
cargo install --path .

Usage

cliperge [OPTIONS] <file1> <file2> ...

Options

  • -f, --full: Use full file paths (starting from ~/ if applicable)
  • -r, --relative: Use relative paths
  • -e, --exclude <pattern>: Exclude files matching the specified pattern
  • Default behavior: Use file names only

Examples

Combine files using only file names:

cliperge file1.txt file2.txt
cliperge file{1..3}.txt 
cliperge src/**/*.rs 

Combine files with relative paths:

cliperge -r file1.txt file2.txt

Combine files with full paths:

cliperge -f file1.txt file2.txt

Exclude specific files:

cliperge src/*.rs -f -e log file1.txt file2.txt logs/error.log

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Dependencies

~1.3–8.5MB
~70K SLoC