{"id":28904827,"url":"https://github.com/apix0n/rinko","last_synced_at":"2026-04-18T01:06:46.070Z","repository":{"id":299919874,"uuid":"1004619428","full_name":"apix0n/rinko","owner":"apix0n","description":"a url shortener built on cloudflare workers \u0026 kv","archived":false,"fork":false,"pushed_at":"2025-12-22T12:56:43.000Z","size":156,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-23T23:49:54.979Z","etag":null,"topics":["bitly","cloudflare","cloudflare-workers","cloudflare-workers-kv","hono","link","link-shortener","shortener","shorty","shrty","workers"],"latest_commit_sha":null,"homepage":"https://s.aapix.me/_","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apix0n.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-18T23:18:26.000Z","updated_at":"2025-12-23T16:02:15.000Z","dependencies_parsed_at":"2025-06-19T01:39:49.250Z","dependency_job_id":null,"html_url":"https://github.com/apix0n/rinko","commit_stats":null,"previous_names":["apix0n/rinko"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/apix0n/rinko","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apix0n%2Frinko","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apix0n%2Frinko/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apix0n%2Frinko/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apix0n%2Frinko/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apix0n","download_url":"https://codeload.github.com/apix0n/rinko/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apix0n%2Frinko/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31952211,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"ssl_error","status_checked_at":"2026-04-18T00:39:20.671Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitly","cloudflare","cloudflare-workers","cloudflare-workers-kv","hono","link","link-shortener","shortener","shorty","shrty","workers"],"created_at":"2025-06-21T13:02:37.339Z","updated_at":"2026-04-18T01:06:46.037Z","avatar_url":"https://github.com/apix0n.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rinko (りんこ)\n\na url shortener built using [hono](https://hono.dev/) on the [cloudflare developer platform](https://developers.cloudflare.com) (workers \u0026 kv).\n\n## semi-one-click deploy*\n\n[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https%3A%2F%2Fgithub.com%2Fapix0n%2Frinko)\n\nusing this button, you can deploy rinko to cloudflare workers, but it won't have a defined `API_SECRET`; learn more just below.\n\n## link management\n\nto manage your links, go to `/_` or click on \"admin panel\".\n\n\u003e in local development, the api is protected by the token specified in `.dev.vars`.\n\u003e\n\u003e when deploying, you need to use the cloudflare dashboard or `wrangler` to add an `API_SECRET` environment variable to your worker. [worker secrets / cloudflare docs \u003e](https://developers.cloudflare.com/workers/configuration/secrets/#secrets-on-deployed-workers)\n\n---\n\n### `/_/set` | `POST`\n\n\u003e this endpoint accepts both `application/json` \u0026 `application/x-www-form-urlencoded` payloads.\n\n#### options / parameters\n\n* `slug`: the short link itself; if you put `123` as slug, you'd go to `hxxps://[rinko]/123`. if empty or not given, it creates a random 4-character slug.\n* `url`: the destination link.\n* `overwrite: true/false`: if true, overwrites the link if there was one. if no `url` given, it deletes the specified short link.\n\n#### curl examples\n\n```bash\n$ curl hxxps://[rinko]/_/set -d \"url=https://google.com\" -H \"Authorization: Bearer {api token}\"\n{\"slug\":\"oNcK\",\"url\":\"https://google.com\",\"link\":\"/oNcK\"}\n```\n\n```bash\n$ curl hxxps://[rinko]/_/set -d \"url=https://google.com\u0026slug=google\" -H \"Authorization: Bearer {api token}\"\n{\"slug\":\"google\",\"url\":\"https://google.com\",\"link\":\"/google\"}\n\n$ curl hxxps://[rinko]/_/set -d \"url=https://google.co.jp\u0026slug=google\" -H \"Authorization: Bearer {api token}\" \n{\"slug\":\"google\",\"url\":\"https://google.com\",\"link\":\"/google\",\"message\":\"Did not update google because it already was pointing to https://google.com and overwrite was set to false.\"}\n\n$ curl hxxps://[rinko]/_/set -d \"url=https://google.co.jp\u0026slug=google\u0026overwrite=true\" -H \"Authorization: Bearer {api token}\"\n{\"slug\":\"google\",\"url\":\"https://google.co.jp\",\"link\":\"/google\"}\n```\n\n```bash\n$ curl hxxps://[rinko]/_/set -d \"slug=google\u0026overwrite=true\" -H \"Authorization: Bearer {api token}\"\n{\"slug\":\"google\",\"message\":\"Deleted link google\"}\n```\n\n---\n\n### `/_/list` | `GET`\n\n* returns the list of all short links with their destinations.\n\n```json\n[\n\t{\n\t\t\"slug\": \"google\",\n\t\t\"url\": \"https://google.co.jp\",\n\t\t\"link\": \"/google\"\n\t},\n\t{\n\t\t\"slug\": \"github\",\n\t\t\"url\": \"https://github.com/apix0n\",\n\t\t\"link\": \"/github\"\n\t},\n\t{\n\t\t\"slug\": \"yt/video\",\n\t\t\"url\": \"https://www.youtube.com/watch?v=shs0rAiwsGQ\",\n\t\t\"link\": \"/yt/video\"\n\t}\n]\n```\n\n---\n\n### special links\n\n* use `_` as a slug that matches the root page,\n* use `_404` as a slug to replace where the 404 redirects to\n\n### restricted links / cannot use\n\n* `_/` prefixes (e.g., _/something),\n* `.`, `..`, `../`, `./` relative urls links,\n* `favicon.ico`\n\n## search\n\nrinko can behave as a \"search engine\" for browsers using the format `hxxps://[rinko]/_/search?q=%s` where %s is the url encoded query, and where a space becomes a trailing slash; which redirects to `hxxps://[rinko]/query`.\n\nto register rinko as a search engine, go to `hxxps://[rinko]/` and it should install to your browser automatically.\nif it doesn't work, copy the given link and add it as a custom search engine.\n\n### examples\n\n* `hxxps://[rinko]/_/search?q=google` redirects to `hxxps://[rinko]/google` which itself redirects to `https://google.co.jp`\n* `hxxps://[rinko]/_/search?q=github` redirects to `hxxps://[rinko]/github` which itself redirects to `https://github.com/apix0n`\n* `hxxps://[rinko]/_/search?q=yt%20video` (`hxxps://[rinko]/_/search?q=yt video`) redirects to `hxxps://[rinko]/yt/video` which itself redirects to `https://www.youtube.com/watch?v=shs0rAiwsGQ`\n\n## host your own\n\n### setup\n\n```bash\nnpm install\n```\n\n* create a new `kv` service to keep the links:\n\n```bash\nnpx wrangler kv namespace create LINKS\n```\n\n* replace the `kv_namespaces` section of the `wrangler.jsonc` file\n* copy the [.dev.vars.example](./.dev.vars.example) to `.dev.vars` (for local development) and change the values\n* regenerate types:\n\n```bash\nnpm run cf-typegen\n```\n\n## develop\n\n```bash\nnpm run dev\n```\n\n## deploy\n\n```bash\nnpm run deploy\n```\n\n### made by [apix](https://github.com/apix0n) with ❤️","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapix0n%2Frinko","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapix0n%2Frinko","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapix0n%2Frinko/lists"}