{"id":34122197,"url":"https://github.com/vinbyte/netshort","last_synced_at":"2026-06-01T00:31:34.244Z","repository":{"id":42486221,"uuid":"298741470","full_name":"vinbyte/netshort","owner":"vinbyte","description":"Netlify url shortener CLI","archived":false,"fork":false,"pushed_at":"2022-04-03T16:00:40.000Z","size":41573,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-17T07:53:53.494Z","etag":null,"topics":[],"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/vinbyte.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":"2020-09-26T05:06:53.000Z","updated_at":"2022-04-03T15:13:04.000Z","dependencies_parsed_at":"2022-09-06T01:50:13.045Z","dependency_job_id":null,"html_url":"https://github.com/vinbyte/netshort","commit_stats":null,"previous_names":["rabbitmeow/netshort"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/vinbyte/netshort","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinbyte%2Fnetshort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinbyte%2Fnetshort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinbyte%2Fnetshort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinbyte%2Fnetshort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinbyte","download_url":"https://codeload.github.com/vinbyte/netshort/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinbyte%2Fnetshort/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33755369,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"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":[],"created_at":"2025-12-14T21:59:13.347Z","updated_at":"2026-06-01T00:31:34.238Z","avatar_url":"https://github.com/vinbyte.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# netshort\n\n## Overview\n\n**netshort** is a Netlify url shortener build using Go. Inspired by [netlify-shortener](https://github.com/kentcdodds/netlify-shortener). You can build your own url shortener using Github and Netlify.\n\n## Why\n\nSimple reason, I love Go. I prefer using Go for CLI rather than NodeJS. Beside that, when I want deploy [this](https://github.com/kentcdodds/netlify-shortener) in my DO server, I got this error :\n\n```\nError: Both xsel and fallback failed\n    at makeError (/home/gavinda/tes-shortener/node_modules/clipboardy/lib/linux.js:16:11)\n    at xselWithFallbackSync (/home/gavinda/tes-shortener/node_modules/clipboardy/lib/linux.js:43:10)\n    at Object.copySync (/home/gavinda/tes-shortener/node_modules/clipboardy/lib/linux.js:53:3)\n    at Object.exports.writeSync (/home/gavinda/tes-shortener/node_modules/clipboardy/index.js:45:14)\n    at Object.\u003canonymous\u003e (/home/gavinda/tes-shortener/node_modules/netlify-shortener/dist/index.js:56:12)\n    at Module._compile (internal/modules/cjs/loader.js:1137:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)\n    at Module.load (internal/modules/cjs/loader.js:985:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:878:14)\n    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {\n  xselError: Error: Command failed: xsel --clipboard --input\n  xsel: Can't open display: (null)\n  : Inappropriate ioctl for device\n```\nSo, I make the decision to build my own shortener CLI. Then, the **netshort** was born.\n\n## Prerequisite\n\n1. Make sure you have your app in different directory included **_redirects** file inside. If you don't have, please create it first. For example :\n`mkdir shortener \u0026\u0026 cd shortener \u0026\u0026 touch _redirects`\n1. Add the basic redirection. Add this line to your **_redirects** file\n`/*             [your_website_or_social_media]`\n1. Make your repository in github (public or private up to you) and add it to your Netlify account. You read [this blog](https://www.netlify.com/blog/2016/10/27/a-step-by-step-guide-deploying-a-static-site-or-single-page-app/) for step by step setup your Netlify.\n1. Commit and push your **_redirects** file to your github repo.\n1. [optional] Setup the local git config. **netshort** will use this to auto push to your repository. For example:\n`git config user.name \"YOUR_NAME\"`\n`git config user.email \"YOUR_EMAIL\"`\n`git config credential.helper store`\n`git pull`\nBut if you don't mind to use the current global git config, you can skip this step.\n1. Copy `netshort.yaml` config to your $HOME/netshort.yaml. You can also put it different location, but you need to add flags `--config [YOUR_CONFIG_PATH]` whenever you run **netshort**.\n\n## Config\n\n- `app.path` is used to defined your **_redirects** file location (mandatory)\n- `shortlink.length` is used to generate the length of short link (optional, default : 5)\n\n## Install\n\n1. Download the binary [here](https://github.com/vinbyte/netshort/releases)\n2. For macOS/Linux change permission of binary. Example :\n`chmod +x netshort_darwin_amd64`\n3. Additional step for macOS Catalina :\n\n- Go to your download folder, right click the file. Then choose \"Open\"\n- A popup will appear, click the \"Open\" button\n- Close the terminal\n\n4. If you are using macOS/Linux, you can move the binary to `/usr/local/bin` to make it global to access. Example :\n`mv ./netshort_darwin_amd64 /usr/local/bin/netshort`\n5. **netshort** ready to use\n\n## Command\n\n- `netshort shorten [long_url] [custom_short_link]`\nThis used for add the url to your **_redirect** file in your app directory (defined in config file). The second args is optional. **netshort** will generate for you if you don't have the second args\n- `netshort list`\nThis used for listing your link. It will read all your link in **_redirects** file\n\n## Tips\n\n- Buy a short domain to use on Netlify\n- You can combine with [telegram-bot](https://github.com/botgram/shell-bot) to execute via telegram chat. So, you can shorten link anywhere, anytime using a telegram app.\nDemo :\n![netshort-telegram-demo](netshort-telegram-demo.gif)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinbyte%2Fnetshort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinbyte%2Fnetshort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinbyte%2Fnetshort/lists"}