Skip to content

tmiland/shlink.sh

Repository files navigation

Shellcheck CI GH Language GH stars GH tag GH License

shlink.sh

Shorten url using shlink via REST API.

🔥 Usage

Program: shlink.sh 0.0.1 by @tmiland
Updated: 2022-11-30
Description: Shorten url using shlink via REST API.
Usage   : shlink.sh [-h] [-q] [-v] [-f] [-l <log_dir>] [-t <tmp_dir>] <action>
Flags, options and parameters:
    -h|--help        : [flag] show usage [default: off]
    -q|--quiet       : [flag] no output [default: off]
    -v|--verbose     : [flag] also show debug messages [default: off]
    -f|--force       : [flag] do not ask for confirmation (always yes) [default: off]
    -l|--log_dir <?> : [option] folder for log files   [default: $HOME/.shlink.sh/log]
    -t|--tmp_dir <?> : [option] folder for temp files  [default: /tmp/shlink.sh]
    <action>         : [choice] action to perform  [options: shorten,info,check,env,update]

⚡️ Examples

> ./shlink.sh shorten
# Shorten url using shlink via REST API

or symlink run

ln -s ~/.shlink.sh/shlink.sh ~/.local/bin/shlink
export PATH=$HOME/.local/bin:$PATH
# Add to .bashrc / .zshrc

then

> shlink shorten
# Shorten url using shlink via REST API

shlink.sh.gif

🚀 Installation

with git

git clone https://github.com/tmiland/shlink.sh.git $HOME/.shlink.sh
cd $HOME/.shlink.sh

with install script

curl -sSL https://tmiland.github.io/shlink.sh/install | bash
  • You will be prompted for API key and domain, if not set in .env on first run
    • A .env file will be created and sourced automatically.

📝 CHANGELOG

All notable changes to this project will be documented in this file.

✍ Acknowledgements

Donations

Coindrop.to me

Web Hosting

Sign up for web hosting using this link, and receive $200 in credit over 60 days

DigitalOcean Referral Badge

Disclaimer

*** Use at own risk ***

License

MIT License Image

MIT License

© 2022 Tommy Miland