Katana
ready to go heroku hosted URL shortener based on guillotine
Install / Use
/learn @mrtazz/KatanaREADME
Katana 
Overview
Opinionated personal URL shortener which runs on Heroku and uses Redis to go as a backend. Shortening is done through the fabulous Guillotine engine and its Redis adapter.
If you set HTTP_USER and HTTP_PASS all methods except GETs require basic
authentication.
If you set ROOT_REDIRECTS_TO_URL traffic that GETs '/' will get redirected there.
Usage
You can use it exactly as any other guillotine app:
curl -X POST http://sho.rt --user foo:bar -i -F"url=http://github.com" -F"code=gh"
Features
- Authentication
- Custom Tweetbot compatible endpoint
Setup
git clone git://github.com/mrtazz/katana.git
cd katana
heroku create
heroku addons:add redistogo
# or if you want to use Heroku redis
heroku addons:create heroku-redis:hobby-dev
heroku domains:add sho.rt
git push heroku master
# for authentication
heroku config:add HTTP_USER="theuser"
heroku config:add HTTP_PASS="thepass"
# for redirection
heroku config:add ROOT_REDIRECTS_TO_URL="http://www.yourlongerdomain.io"
Tweetbot
There is a custom endpoint which is compatible with how tweetbot expects custom URL shorteners to behave. Activate it by setting
TWEETBOT_API=true
in your environment variables. After that you can add URLs with a GET to
http://sho.rt/api/create/?url=http://github.com
Keep in mind that this endpoint is not authenticated.
Thanks
@technoweenie for the awesome guillotine and @roidrage for s3itch which somehow got me started wanting a personal URL shortener.
Related Skills
node-connect
350.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
350.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
350.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
