This provides a command line interface to the Shareit service. Shareit is a link shortner, file uploader and pastebin.
-
Download the executable (or click here):
wget https://github.com/pls-shareit/cli/releases/latest/download/shareit-linux -qO shareit -
Make the file executable:
chmod +x shareit -
Add the executable to your PATH, for example:
sudo mv shareit /usr/bin
-
Download the executable (or click here):
wget https://github.com/pls-shareit/cli/releases/latest/download/shareit-macos -qO shareit -
Make the file executable:
chmod +x shareit -
Add the executable to your PATH, for example:
sudo mv shareit /usr/bin
-
Download the executable with Power shell (or click here):
iwr -outf clique-collector.exe https://github.com/pls-shareit/cli/releases/latest/download/shareit.exe -
Add the executable to your PATH, for example:
Move-Item -Path .\shareit.exe -Destination C:\Windows\system32 -
You may need to restart your shell or computer.
If you don't want to use a pre-compiled executable, you can compile one using Rust:
- Install Rust.
- Run
cargo install --git https://github.com/pls-shareit/cliin the same directory as this README. - The binary should have been automatically added to your PATH as
shareit.
First, you should configure the tool with the URL of the Shareit server you'll
be using. For example, to use https://share.example.com, run:
shareit --config base_url https://share.example.comIf the instance is password protected, you can configure your password like so:
shareit --config password super-secret-passwordComplete documentation on command behavior and every option is available by
running shareit --help. You can get abbreviated help by running shareit -h.
Here are some examples:
-
shareit --file ./image.png --name cool-imgUploads the file
./image.pngwith the namecool-imgand maximum expiry. Will output the URL to the file if successful. -
shareit --link https://example.com --to-clipboardCreate a shortlink with a random name to the URL
https://example.com, with maximum expiry. Copies the shortened URL to your clipboard if successful. -
shareit --paste --from-clipboard --syntax python --expire-after 1dayUploads the contents of your clipboard as a paste with a random name and python syntax highlighting. Sets the paste to expire after one day. Will output the URL to the paste if successful.
Use shareit --help for more information on the above options, shorter
aliases for them, and other options.
Currently, the CLI does not support deleting, updating or fetching information on shares - only creating them.