Skip to main content

urleap

URL shortener via bit.ly, etc.

build
Coverage Status
codebeat badge
Go Report Card

MIT License
Version

🗣 Overview #

There are several URL shortening services such as bit.ly and TinyURL. To use these services, users need to open a browser and enter the URL. We would like to make it easier to shorten the url from the CLI.

🏄‍♂️ Demo #

urleap -t $(cat token) https://tamada.github.io/ # shorten the given url.
https://bit.ly/43gj5S9 (Bl9h5Cg7gvc) # shorten url (group)
urleap -t $(cat token) # list available shorten urls in the default group.
https://bit.ly/43gj5S9 (Bl9h5Cg7gvc): (https://tamada.github.io/)    # shorten (group): original url
https://bit.ly/3pZy7hf (Bl9h5Cg7gvc): (https://tamadalab.github.io/) # shorten (group): original url

🏃‍♂️ Usage #

urleap [OPTIONS] [URLs...]
OPTIONS
  -t, --token <TOKEN>      specify the token for the service. This option is mandatory.
  -q, --qrcode <FILE>      include QR-code of the URL in the output.
  -c, --config <CONFIG>    specify the configuration file.
  -g, --group <GROUP>      specify the group name for the service. Default is "urleap"
  -d, --delete             delete the specified shorten URL.
  -h, --help               print this mesasge and exit.
  -v, --version            print the version and exit.
ARGUMENT
  URL     specify the url for shortening. this arguments accept multiple values.
          if no arguments were specified, urleap prints the list of available shorten urls.

⚙️ Configuration File #

Location #

urleap reads the following list of files in order and overwrites the settings. If the file does not exist, it is simply ignored.

  • /opt/homebrew/opt/urleap/config.json
  • /usr/local/opt/urleap/config.json
  • $URLEAP_HOME/config.json
  • ~/.config/urleap/config.json
  • ./.urleap.json
  • files specified by --config option

Format #

{
  "providers": [
    {
      "api": "bit.ly",
      "api_version": "v4",
    }
  ]
}

⚓ Installation #

🍺 Homebrew #

brew install tamada/tap/urleap

🐳 Docker #

docker run -it --rm tamada/urleap:latest -t <token> <url...>

tags #

  • 0.5.0, latest

😄 About #

📜 License #

MIT License

  • Permitted
    • 🙆‍♀️ Commercial use
    • 🙆‍♀️ Modification
    • 🙆‍♀️ Distribution
    • 🙆‍♀️ Private use
  • Limitations
    • 🙅‍♂️ Liability
    • 🙅‍♂️ Warranty

👨‍💼 Developers 👩‍💼 #

🎃 Icon #

Icon