A CLI tool for rustypaste

Overview

A CLI tool for rustypaste.

demo

Installation

From crates.io

cargo install 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

Usage

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
-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

One shot

rpaste -o disappear_after_seen.txt

Expiration

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

Extras

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

Configuration

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

  • $HOME/.rustypaste/config.toml

See config.toml for configuration options.

Contributing

Pull requests are welcome!

License

All code is licensed under The MIT License.
You might also like...
CLI tool for displaying table
CLI tool for displaying table

tv Format json into table display $ cat test.json [ { "name": "test", "age": 10, "lang": "ja" }, { "name": "uzimaru", "age":

CLI tool to convert numbers from one base to another

changebase A CLI tool for changing the base of numbers. changebase -h numeric base converter USAGE: changebase [FLAGS] [OPTIONS] value FLAG

A CLI tool for getting screenshots of URLs using headless chrome

rustywitness 🦀 🌐 📸 Web screenshot utility A CLI tool for getting screenshots of URLs using headless chrome Built with ❤︎ by swanandx and contributo

A CLI tool to aid Dungeons and Dragons players with math(tm).

calcdnd A CLI tool to aid Dungeons and Dragons players with math(tm). Character Joe imported sucessfully. +--------------------------+----------------

CLI tool and crate to download FTDC data from mongodb clusters.

Download mongodb FTDC data Command line tool and lib crate to download FTDC data from mongodb clusters to investigate with e.g. keyhole. Crate For the

A cli tool to automate the building and deployment of Bitcoin nodes
A cli tool to automate the building and deployment of Bitcoin nodes

ℹ️ Automate Bitcoin builds, speed up deployment Shran is an open-source cli tool being developed to address the needs of DMG Blockchain Solutions. It

Cli tool for git productivity written in Rust and packaged for consumption via NPM
Cli tool for git productivity written in Rust and packaged for consumption via NPM

crust 🍞 cli tool for git productivity written in Rust and packaged for consumption via NPM This repo is identical with @skyneticist/golee in terms of

koyo is a cli tool that lets you run commands as another user. It is similar to doas or sudo.

koyo is a cli tool that lets you run commands as another user. It is similar to doas or sudo.

CLI tool for mass tweet deletion

Damae Damae is a simple CLI tool for mass-deleting tweets. Its name comes from the Latin phrase "damnatio memoriae", which means "condemnation of memo

Comments
  • Add progress bar for large files

    Add progress bar for large files

    Uploading large files takes quite some time sometimes and it'd be great to have some kind of progress indicator. I think it would add a lot of usability while not being too hard to implement. Besides, there are some really pretty progress bars around!

    opened by svenstaro 3
  • Respecting XDG_CONFIG_HOME?

    Respecting XDG_CONFIG_HOME?

    Hi,

    I've now switching from shell function to this tool (thanks btw) and realized config file location is directly under $HOME. Would you consider switching to place/search under .config folder by default?

    opened by seqizz 2
  • Ship a manpage

    Ship a manpage

    I think it'd be cool for rustypaste to ship a manpage. Clap (which rustypaste is sadly not using) allows to generate manpages nowadays. Might be worth looking into.

    opened by svenstaro 0
Releases(v0.3.0)
Owner
Orhun Parmaksız
FOSS developer, @archlinux packager, oxidizing things with @rust-lang
Orhun Parmaksız
CLI Tool for tagging and organizing files by tags.

wutag ?? ??️ CLI tool for tagging and organizing files by tags. Install If you use arch Linux and have AUR repositories set up you can use your favour

Wojciech Kępka 32 Dec 6, 2022
CLI tool to bake your fresh and hot MD files

At least once in your Rust dev lifetime you wanted to make sure all code examples in your markdown files are up-to-date, correct and code is formated, but you couldn't make that done with already existing tools - fear not!

Patryk Budzyński 39 May 8, 2021
A CLI tool that allow you to create a temporary new rust project using cargo with already installed dependencies

cargo-temp A CLI tool that allow you to create a new rust project in a temporary directory with already installed dependencies. Install Requires Rust

Yohan Boogaert 61 Oct 31, 2022
qsv - Performant CLI tool to query CSVs through SQL

qsv Performant CLI tool to query CSVs through SQL Installation After cloning the repository, you can install a binary locally using cargo install --pa

Dermot Haughey 3 Oct 28, 2021
😎 A CLI tool for fetching data and displaying it nicely

?? A CLI tool for fetching data and displaying it nicely. (The neofetch for remote data fetching)

Milo 6 Aug 24, 2022
kwctl is the go-to CLI tool for Kubewarden users.

kwctl kwctl is the go-to CLI tool for Kubewarden users. Think of it as the docker CLI tool if you were working with containers. How does kwctl help me

Kubewarden 45 Dec 21, 2022
A Rust CLI tool that helps you enforce Git policies through Git hooks both server and client side

GitPolicyEnforcer This is a command line utility written in Rust, that helps you utilize Git hooks, to enforce various policies. It currently supports

Vagelis Prokopiou 4 Aug 14, 2022
miniserve - a CLI tool to serve files and dirs over HTTP

?? For when you really just want to serve some files over HTTP right now!

Sven-Hendrik Haase 4.1k Jan 6, 2023
A cli tool to download specific GitHub directories or files

cloneit A cli tool to download specific GitHub directories or files. Installation From git git clone https://github.com/alok8bb/cloneit cd cloneit car

Alok 54 Dec 20, 2022
Voila is a domain-specific language launched through CLI tool for operating with files and directories in massive amounts in a fast & reliable way.

Voila is a domain-specific language designed for doing complex operations to folders & files. It is based on a CLI tool, although you can write your V

Guillem Jara 86 Dec 12, 2022