Caleb’s new project called shorty is super awesome! I even made a little raycast script for it to randomly generate a name for the url and copy it to the clipboard:
#!/bin/bash
# @raycast.schemaVersion 1
# @raycast.title Add Shorty Link (Automatic)
# @raycast.mode silent
# @raycast.packageName Shorty
#
# Documentation:
# @raycast.author Matthew Gleich
# @raycast.authorURL <https://mattglei.ch>
# @raycast.argument1 { "type": "text", "placeholder": "URL" }
# token
SHORTY_TOKEN=""
# e.g. <https://clb.li>
SHORTY_DOMAIN=""
RANDOM_NUMBER="$RANDOM"
curl "$SHORTY_DOMAIN/api/link/$RANDOM_NUMBER" -d "url=$1" -H "Authorization: Bearer $SHORTY_TOKEN" >>/dev/null
URL="$SHORTY_DOMAIN/$RANDOM_NUMBER"
echo $URL | pbcopy
echo "Copied $URL to clipboard"