https://github.com/tmiland/shlink.sh
Shorten url using shlink via REST API.
https://github.com/tmiland/shlink.sh
bash bash-script bash-scripting rest-api shell shell-script shell-scripting shell-scripts shellscript shlink
Last synced: 3 months ago
JSON representation
Shorten url using shlink via REST API.
- Host: GitHub
- URL: https://github.com/tmiland/shlink.sh
- Owner: tmiland
- License: mit
- Created: 2022-12-02T12:25:46.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-02T14:14:26.000Z (over 2 years ago)
- Last Synced: 2025-02-09T23:27:53.704Z (4 months ago)
- Topics: bash, bash-script, bash-scripting, rest-api, shell, shell-script, shell-scripting, shell-scripts, shellscript, shlink
- Language: Shell
- Homepage: https://sh.tmiland.com/shlink.sh
- Size: 159 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README




# shlink.sh
Shorten url using [shlink](https://github.com/shlinkio/shlink) via REST API.
## 🔥 Usage
```bash
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 ] [-t ]
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]
: [choice] action to perform [options: shorten,info,check,env,update]
```## ⚡️ Examples
```bash
> ./shlink.sh shorten
# Shorten url using shlink via REST API
```
or symlink
run
```bash
ln -s ~/.shlink.sh/shlink.sh ~/.local/bin/shlink
export PATH=$HOME/.local/bin:$PATH
# Add to .bashrc / .zshrc
```
then
```bash
> shlink shorten
# Shorten url using shlink via REST API
```
## 🚀 Installation
with `git`
```bash
git clone https://github.com/tmiland/shlink.sh.git $HOME/.shlink.sh
cd $HOME/.shlink.sh
```
with [install](install) script
```bash
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](CHANGELOG.md).## ✍ Acknowledgements
- source script from [gflorian/shlinkify](https://github.com/gflorian/shlinkify)
- script created with [bashew](https://github.com/pforret/bashew)## Web Hosting
Sign up for web hosting using this link, and receive $200 in credit over 60 days
### Disclaimer
*** ***Use at own risk*** ***
### License
[](https://github.com/tmiland/shlink.sh/blob/master/LICENSE)
[MIT License](https://github.com/tmiland/shlink.sh/blob/master/LICENSE)
© 2022 Tommy Miland