Extension Icon

Clip - URL Shortener

Shorten URLs using multiple services (bit.ly, cutt.ly, tinyurl, is.gd, v.gd)
Overview

CLIP - URL Shortener

A Raycast extension for shortening URLs with your choice of service. Automatically reads URLs from your clipboard, shortens them in one step, and copies the result back to your clipboard.

Ported from the alfred-shorturl Alfred workflow.


Commands

CommandDescription
Shorten URLPick a service and shorten the active URL
URL HistoryBrowse, copy, and manage previously shortened URLs

Features

  • Clipboard detection — opens with the URL already populated if your clipboard contains a valid http(s) link
  • Five shortening services — three require no account at all; two offer branded/trackable links with an API key
  • Persistent history — stores up to 100 entries in Raycast local storage, with per-entry delete and clear-all
  • HUD confirmation — after shortening, the result is displayed via Raycast HUD and written to your clipboard
  • Graceful degradation — services missing an API key are shown with a badge and open preferences on action

Supported Services

ServiceAPI Key RequiredNotes
bit.lyYesAnalytics dashboard, custom back-halves
cutt.lyYesClick tracking, QR codes
TinyURLNoNo account needed
is.gdNoNo account needed
v.gdNoVariant of is.gd, no account needed

Setup

Prerequisites

Local Development

npm install
npm run dev

npm run dev launches the extension in Raycast development mode with hot-reload.

Configuring API Keys

API keys are optional. The three keyless services (TinyURL, is.gd, v.gd) work immediately without any configuration.

To use bit.ly or cutt.ly, add your key in Raycast:

  1. Open Raycast and search for CLIP
  2. Press Cmd+, to open extension preferences (or select "Configure API Key" from any unconfigured service)
  3. Paste your key into the corresponding field
ServiceWhere to get the key
bit.lyapp.bitly.com/settings/api/
cutt.lycutt.ly/edit

Usage

  1. Copy a URL to your clipboard
  2. Open Raycast and run Shorten URL — the URL is pre-filled automatically
  3. Select a service from the list
  4. The shortened URL is copied to your clipboard and saved to history

To retrieve a past result, run URL History. From any history entry you can copy the short URL, copy the original URL, open it in the browser, or delete the entry.


Development

npm run build      # production build
npm run lint       # ESLint
npm test           # run 55 Vitest unit + integration tests
npm run test:watch # run tests in watch mode

License

MIT — see LICENSE for details.

Author: benbenbang


Acknowledgements

Extension icon created by Freepik - Flaticon.