Repolode
miantiao-me

miantiao-me/Sink

A self-hostable link shortener with analytics that runs entirely on Cloudflare Workers, D1, and KV, with no traditional server.

Open-source alternative to:Bitly

Stars
7,228
Forks
5,349
Open issues
24
Last commit
24 days ago

What is it?

Sink is a URL shortener and link management app built with Nuxt that deploys to Cloudflare Workers. Cloudflare D1 serves as the authoritative link store, with Workers KV acting as a write-through read cache, and Workers Analytics Engine records visit data for the analytics dashboard.

Beyond basic shortening, Sink supports custom slugs, UTM parameters, link expirations, passwords, unsafe-link warning pages, and redirects based on device or country. Link analytics include a live 3D globe and event logs that refresh through periodic polling. Links can be exported as QR codes, imported and exported as JSON, and analytics exported as CSV.

Sink ships with a REST API, a built-in MCP endpoint for AI clients, and optional Workers AI features that generate slugs and OpenGraph metadata. Its maintainers position it for individuals and small teams; the project is licensed under AGPL-3.0.

Key features

  • 01Shortens URLs with custom slugs, UTM parameters, and optional case-sensitive matching.
  • 02Sets link expirations, passwords, and unsafe-link warning pages.
  • 03Redirects visitors by device or country.
  • 04Shows link analytics including a 3D globe and event logs.
  • 05Imports and exports links as JSON and analytics as CSV.
  • 06Provides a REST API and a built-in MCP endpoint.

Use cases

  • Running a branded, self-hosted short domain on Cloudflare without managing servers.
  • Tracking clicks and geographic distribution for marketing links.
  • Giving an AI assistant programmatic access to create and query short links via MCP.

Quick start

  1. 1

    Install AI Skills with npx

    npx skills add miantiao-me/sink
  2. 2

    Read the deployment guide for Cloudflare Workers (recommended)

Things to know

  • Designed for Cloudflare: it runs only on Cloudflare Workers, D1, and KV, so you need a Cloudflare account.
  • Licensed under AGPL-3.0, a copyleft license that requires sharing modified source code when offered as a network service.
  • Cloudflare Pages deployment is deprecated; Workers is the recommended path.

Topics

FAQ

What is Sink?
A self-hostable link shortener with analytics that runs entirely on Cloudflare Workers, D1, and KV, with no traditional server. Sink is a URL shortener and link management app built with Nuxt that deploys to Cloudflare Workers. Cloudflare D1 serves as the authoritative link store, with Workers KV acting as a write-through read cache, and Workers Analytics Engine records visit data for the analytics dashboard.
Is Sink free to use? What license does it have?
Sink is open source under the AGPL-3.0 license. Check the license terms before using it in commercial products.
Is Sink still maintained?
Actively maintained. The last commit to Sink was on Sep 27, 2026.
What can I use Sink for?
Running a branded, self-hosted short domain on Cloudflare without managing servers. Tracking clicks and geographic distribution for marketing links. Giving an AI assistant programmatic access to create and query short links via MCP.
How do I install Sink?
Install AI Skills with npx: npx skills add miantiao-me/sink Read the deployment guide for Cloudflare Workers (recommended)
Where can I get Sink?
The source code and installation instructions are on GitHub: https://github.com/miantiao-me/Sink

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects