Skip to content

releaselink

Give people the link they want! A download redirector for GitHub releases built with Elysia.js and Bun.

  • Works on any public repo
  • Automatic redirection based on user agent
  • Send users to the right download for their OS
  • Falls back to the releases page if an appropriate asset can’t be fetched

A free instance is hosted at: releaselink.mikn.dev. Feel free to use it!

  • This project can be directly deployed to Vercel with no additional configuration needed.
  • Click the button below to deploy:

Deploy with Vercel

  • Docker images are available on GHCR.
  1. Install dependencies:

    Terminal window
    bun install
  2. Start the server:

    Terminal window
    bun start

    The server will start on port 3000 by default.

Every endpoint responds with a 302 redirect. The target is chosen from the repository’s GitHub release assets based on the caller’s User-Agent (macOS, Windows, Linux, Android, or iOS) and CPU architecture. If the device can’t be identified, or no matching asset exists, the caller is redirected to the corresponding GitHub Releases page instead.

Endpoint: GET /:user/:repo/latest

Redirects to the correct asset from the repository’s latest release.

Path Parameters:

Parameter Type Required Description
user string Yes The GitHub user or organization.
repo string Yes The repository name.

Example Request:

Terminal window
curl -IL "http://localhost:3000/mikndotdev/SiBuster/latest"

A Windows visitor is redirected to the Windows asset of the latest mikndotdev/SiBuster release; a macOS visitor to the macOS asset, and so on.

Endpoint: GET /:user/:repo/tag/:tag

Redirects to the correct asset from the release matching a specific tag.

Path Parameters:

Parameter Type Required Description
user string Yes The GitHub user or organization.
repo string Yes The repository name.
tag string Yes The release tag (e.g. app-v0.1.1).

Example Request:

Terminal window
curl -IL "http://localhost:3000/mikndotdev/SiBuster/tag/app-v0.1.1"

If the tag or an appropriate asset can’t be found, the caller is redirected to https://github.com/mikndotdev/SiBuster/releases/tag/app-v0.1.1.

Requests to the GitHub API are unauthenticated by default (60 requests/hour per IP). To raise the limit to 5,000 requests/hour, set a GITHUB_TOKEN environment variable with a GitHub token; it is sent as a bearer token automatically when present.

GitHub API responses can be cached in Redis so repeated requests for the same repository don’t re-query GitHub and burn through the rate limit. Set a REDIS_URL environment variable pointing at your Redis instance to enable it; when unset, caching is disabled and every request queries GitHub directly. Tagged releases are cached for 30 days (their assets never change), while latest is cached for 10 minutes so new releases show up quickly. Override the durations (in seconds) with the optional CACHE_TTL_TAG and CACHE_TTL_LATEST variables.