Crates.io | rustypaste-cli |
lib.rs | rustypaste-cli |
version | |
source | src |
created_at | 2021-09-18 22:25:48.023298 |
updated_at | 2024-12-11 16:18:26.692287 |
description | A CLI tool for rustypaste |
homepage | https://github.com/orhun/rustypaste |
repository | https://github.com/orhun/rustypaste-cli |
max_upload_size | |
id | 453426 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
A CLI tool for rustypaste.
cargo install rustypaste-cli
use-native-certs
: makes the default TLS implementation use the OS' trust store. * (disabled)To enable crate features, use the --features
flag as follows:
cargo install rustypaste-cli --features use-native-certs
pacman -S rustypaste-cli
rustypaste-cli
is available for Alpine Edge. It can be installed via apk after enabling the testing repository.
apk add rustypaste-cli
See the available binaries on releases page.
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
-V, --server-version retrieves the server version
-l, --list lists files on the server
-d, --delete delete files from server
-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 or delete 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
-n, --filename NAME sets and overrides the filename
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.
rpaste awesome.txt other.txt
echo "Hello World" | rpaste -
rpaste -u https://example.com/some/long/url
rpaste -r https://example.com/file.txt
rpaste -o disappear_after_seen.txt
rpaste -ou https://example.com/some/long/url
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
rpaste -l
* Use -p
for table output instead of JSON.
rpaste -d awesome.UA86.txt other.JSNI.txt
rpaste -n filename-on-server.txt awesome.txt
* rustypaste >=0.15.0 is required for this argument to work, otherwise the filename will not be overridden.
rpaste -p [...]
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:
<config_dir>
/
rustypaste/config.toml
<home_dir>
/
.rustypaste/config.toml
<config_dir>
depends on the platform as shown in the following table:
Platform | Value | Example |
---|---|---|
Linux | $XDG_CONFIG_HOME or $HOME /.config |
/home/alice/.config |
macOS | $HOME /Library/Application Support |
/Users/Alice/Library/Application Support |
Windows | {FOLDERID_RoamingAppData} |
C:\Users\Alice\AppData\Roaming |
See config.toml for configuration options.
Pull requests are welcome!