11 releases

0.3.0 Dec 31, 2022
0.2.0 Oct 4, 2022
0.1.11 Jun 18, 2022
0.1.7 May 29, 2022
0.1.2 Sep 19, 2021

#1070 in Command line utilities

44 downloads per month

MIT license

413 lines

A CLI tool for rustypaste.




cargo install rustypaste-cli

Arch Linux

pacman -S rustypaste-cli

Binary releases

See the available binaries on releases page.

Build from source

git clone https://github.com/orhun/rustypaste-cli.git
cd rustypaste-cli/
cargo build --release


rpaste [options] <file(s)>

-h, --help          prints help information
-v, --version       prints version information
-o, --oneshot       generates one shot links
-p, --pretty        prettifies the output
-c, --config CONFIG sets the configuration file
-s, --server SERVER sets the address of the rustypaste server
-a, --auth TOKEN    sets the authentication token
-u, --url URL       sets the URL to shorten
-r, --remote URL    sets the remote URL for uploading
-e, --expire TIME   sets the expiration time for the link

Set credentials

Either set the credentials on the command line (not recommended):

rpaste -s "https://paste.example.com" -a "<token>"

or specify them in the configuration file.

Upload files

rpaste awesome.txt other.txt

Shorten URLs

rpaste -u https://example.com/some/long/url

Paste from URL

rpaste -r https://example.com/file.txt

One shot

rpaste -o disappear_after_seen.txt


rpaste -e 10min expires_in_10_minutes.txt
rpaste -e 1hour -u https://example.com/expire/1hour

* Supported units: ns, us, ms, sec, min, hours, days, weeks, months, years


  • Show a prettier output: rpaste -p [...]
  • Disable colors in the output: NO_COLOR=1 rpaste -p [...]


The configuration file can be specified via --config argument and RPASTE_CONFIG environment variable or it can be placed to the following global locations:

  • $HOME/.config/rustypaste/config.toml
  • $HOME/.rustypaste/config.toml

See config.toml for configuration options.


Pull requests are welcome!


All code is licensed under The MIT License.


~228K SLoC