{"id":15345872,"url":"https://github.com/niklasmerz/gistdirect","last_synced_at":"2026-07-16T03:31:23.093Z","repository":{"id":64305000,"uuid":"170758278","full_name":"NiklasMerz/gistdirect","owner":"NiklasMerz","description":"Redirect to urls from a gist with a hostfile. Ready for serverless and Containers","archived":false,"fork":false,"pushed_at":"2023-01-30T20:52:01.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T14:52:56.040Z","etag":null,"topics":["gist","github-gist","golang","redirect","serverless","url-shortener"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NiklasMerz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-14T21:08:05.000Z","updated_at":"2023-05-25T19:14:30.000Z","dependencies_parsed_at":"2023-02-16T11:31:20.490Z","dependency_job_id":null,"html_url":"https://github.com/NiklasMerz/gistdirect","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/NiklasMerz/gistdirect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasMerz%2Fgistdirect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasMerz%2Fgistdirect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasMerz%2Fgistdirect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasMerz%2Fgistdirect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NiklasMerz","download_url":"https://codeload.github.com/NiklasMerz/gistdirect/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasMerz%2Fgistdirect/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280052728,"owners_count":26264240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-20T02:00:06.978Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["gist","github-gist","golang","redirect","serverless","url-shortener"],"created_at":"2024-10-01T11:16:55.680Z","updated_at":"2025-10-20T08:20:02.623Z","avatar_url":"https://github.com/NiklasMerz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gistdirect\n\n## Gistdirect is a simple URL redirection service / URL shortener. \n\n\u003e Imagine bitly.com or goo.gl and your hosts file combined\n\n[![Run on Google Cloud](https://storage.googleapis.com/cloudrun/button.svg)](https://console.cloud.google.com/cloudshell/editor?shellonly=true\u0026cloudshell_image=gcr.io/cloudrun/button\u0026cloudshell_git_repo=https://github.com/niklasmerz/gistdirect)\n\nCreate a Github Gist or just any plain file hosted somewhere. Gistdirect will grap that file and redirect the alias to the full url.\n\nSample \"host\" file:\n```\ngh https://github.com\n```\n\n[Test File](https://gist.github.com/NiklasMerz/a9b5905f742b5863197a0af0465a39f6)\n\n**The URL to the file is provided as an environment variable**: `GIST_URL`. Make sure to provide an URL that is a raw textfile. If you use a GitHub Gist click on the raw button before grabbing the URL like `https://gist.githubusercontent.com/NiklasMerz/a9b5905f742b5863197a0af0465a39f6/raw/`.\n\nIt is a simple Go function which is easy to run on any serverless platform. You can also run the binary somewhere and it will listen on port 8080. Executables are avaible from [releases](https://github.com/NiklasMerz/gistdirect/releases).\n\nI got it running with Google Cloud Functions and Firebase hosting. You can deploy the function from \"function.go\" via the web interface or gcloud CLI. Firebase can be used to assign a [custom domain](https://firebase.google.com/docs/hosting/custom-domain) to the function. Firebase CLI and the \"firebase.json\" file help you to assing the function to the root of the domain.\n\n## Using the Dockerfile\n\nGistdirect is on Docker Hub so you can just run:\n\n```\ndocker run -p 8080:8080 -e GIST_URL='https://gist.github.com/NiklasMerz/a9b5905f742b5863197a0af0465a39f6/raw/' niklasmerz/gistdirect\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklasmerz%2Fgistdirect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniklasmerz%2Fgistdirect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklasmerz%2Fgistdirect/lists"}