#clipboard #cli #tool

app bp

cross-platform clipboard tool

4 releases

0.1.1 Nov 16, 2022
0.1.0 Apr 14, 2022
0.0.1 Apr 13, 2022
0.0.0 Apr 13, 2022

#565 in Command line utilities

GPL-3.0-or-later

19KB
108 lines

bp

bp is a cross-platform clipboard tool written in Rust, based on cb. It can automatically detect whether to copy or paste, and is optimised to work in pipes. Its behavior is based on the tee command.

Installation

bp is on crates.io, so you can install it by running:

cargo install bp

Usage

Copy

# copy some text
echo "some text" | bp

# copy the HTML from `example.com`
curl https://example.com | bp

# copy the contents of `file.txt`
bp file.txt

# you can also pipe in a file
bp <file.txt

Paste

# paste to standard output
bp

# paste to a pipe
bp | jq | less

# paste to `out.txt`
bp >out.txt

Chaining

# remove formatting from copied text
bp | bp

# prettify, copy and view `example.json`
cat example.json | jq | bp | less

# hex-encode contents of the clipboard
bp | xxd | bp

Dependencies

~84KB