{"id":33185704,"url":"https://github.com/kavishgr/getghrel","last_synced_at":"2025-11-22T04:01:34.945Z","repository":{"id":182964693,"uuid":"658415697","full_name":"kavishgr/getghrel","owner":"kavishgr","description":"getghrel(get github release) is a user-friendly command-line tool that fetches and installs the latest release assets from Github for MacOS and Linux (amd64 and arm64 architectures). It automatically detects your operating system and architecture, downloads the release, extracts it(if needed), and keep only the binary.","archived":false,"fork":false,"pushed_at":"2024-07-29T11:58:48.000Z","size":4130,"stargazers_count":20,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-07-29T15:18:56.517Z","etag":null,"topics":["github-downloader","github-downloads","github-releases","golang-cli"],"latest_commit_sha":null,"homepage":"","language":"Go","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/kavishgr.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}},"created_at":"2023-06-25T17:14:48.000Z","updated_at":"2024-07-29T11:58:51.000Z","dependencies_parsed_at":"2024-01-07T21:21:55.723Z","dependency_job_id":"0d445b3f-ee30-48b8-99b1-4519d4cfd907","html_url":"https://github.com/kavishgr/getghrel","commit_stats":null,"previous_names":["kavishgr/getghrel"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/kavishgr/getghrel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kavishgr%2Fgetghrel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kavishgr%2Fgetghrel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kavishgr%2Fgetghrel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kavishgr%2Fgetghrel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kavishgr","download_url":"https://codeload.github.com/kavishgr/getghrel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kavishgr%2Fgetghrel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285731803,"owners_count":27222214,"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-11-22T02:00:05.934Z","response_time":64,"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":["github-downloader","github-downloads","github-releases","golang-cli"],"created_at":"2025-11-16T05:00:20.099Z","updated_at":"2025-11-22T04:01:34.929Z","avatar_url":"https://github.com/kavishgr.png","language":"Go","funding_links":[],"categories":["\u003ca name=\"package-manager\"\u003e\u003c/a\u003ePackage managers"],"sub_categories":[],"readme":"# getghrel\n\ngetghrel is a command-line interface (CLI) tool that locates and downloads the most recent release assets from Github for MacOS and Linux architectures, specifically \"amd64\" and \"arm64\". The tool automatically identifies your operating system and architecture, and downloads the binary. If the release is compressed or in an archive format, it will automatically extract and unpack it, no matter how it's compressed, and keep only the binary.\n\nYou can also choose to skip the extraction and keep the archive itself if the release is a binary or script that needs dependencies available in the archive.\n\n## Installation\n\nDownload the latest binary from the [releases](https://github.com/kavishgr/getghrel/releases) section and place it in your `$PATH`. \n\n### Dependencies\n\n- A GitHub token. By default, it will look for the `GITHUB_TOKEN` environment variable. You can also provide one directly on the command line.\n\n## Usage\n\n```sh\ngetghrel -h\n```\n\nAll the supported flags:\n\n```sh\n-list    list all the releases found\n            Will print the latest release for your OS and Architecture.\n\n-con     \u003cint\u003e set the concurrency level (default: 2)\n\n-ghtoken \u003cstring\u003e provide a GITHUB TOKEN\n            Default is the GITHUB_TOKEN environment variable.\n            Example: cat urls.txt | getghrel -list -ghtoken 'YOUR TOKEN' | sort\n\n-download will download and extract the binary inside `/tmp/getghrel`\n            Example: cat urls_from_list_results.txt | getghrel -download \n\n-skipextraction skip the extraction process\n\t Example: echo \"helix-editor/helix\" | getghrel -list | getghrel -download -skipextraction\n\n-tempdir \u003cstring\u003e specify a a temporary directory to download/extract the binaries\n            Default is `/tmp/getghrel`\n            Example: cat urls_from_list_results.txt | getghrel -download -tempdir /tmp/test\n\n-version display version\n```\n\n### List Found Releases\n\nTo list the found releases, create a text file with a **complete URL** or **owner/repo** per line, and run:\n\n```sh\n# List of URLs\n# e.g \"sharkdp/bat\" or https://github.com/sharkdp/bat\n\ncat urls.txt | getghrel -list -con 3 | tee releases.txt\n\n# Single one\necho \"sharkdp/bat\" | getghrel -list | sort\n```\n\n#### Demo \n\n![-list](examples/list-flag.jpg)\n\n\nThis will display a list of URLs representing the latest release assets found for each repository.\n\nIn rare cases, you may come across additional files like checksums and SBOMs that are specific to your operating system and architecture. I have taken care to exclude them in the regular expression. However, if any such files exist, you can simply filter them out before using the `-download` flag to ensure a clean download. But don't worry, even if you don't filter the output, the tool will automatically keep only the binaries and remove any unnecessary files. Filtering them out can help save bandwidth.\n\nIn the case of `N/A`(not available), it means that the repository doesn't have any release assets available. For Linux releases, there might be separate versions for both Gnu and Musl. You can choose to filter them out based on your preferences.\n\n\u003e **Note**: In the example above, the first line shows that the 'neovim' package is unavailable. But neovim does have a latest release. The reason it's not listed is because my regex always checks for assets containing both the OS and architecture, while neovim's assets only specify the OS. There are ways to resolve this issue, but it involves dealing with regex, which can be a bit complex. Nevertheless, you can be confident that every release will be discoverable, except for this particular case.\n\n\u003e\u003e **update**: On macOS, Neovim is now being listed because the release includes the OS and arch. I haven't tried it on Linux yet.\n\n```\n➜  ~ echo \"neovim/neovim\" | getghrel -list\nhttps://github.com/neovim/neovim/releases/download/v0.10.0/nvim-macos-arm64.tar.gz\n```\nDuplicates are unlikely, but if they do occur, you can easily filter them out using tools like `sort` and `uniq`. That should do the trick.\n\nIn case a repository lacks a latest release tag, the tool will search for the most recent release tag instead. In rare cases this can be an unstable/nightly release.\n\n\u003e If all urls is being listed as `N/A`, maybe your github token has expired:\n\n```\nN/A: https://github.com/neovim/neovim\nN/A: https://github.com/BurntSushi/ripgrep\nN/A: https://github.com/Byron/dua-cli\nN/A: https://github.com/ClementTsang/bottom\nN/A: https://github.com/Macchina-CLI/macchina\nN/A: https://github.com/Elkowar/pipr\nN/A: https://github.com/Orange-OpenSource/hurl\nN/A: https://github.com/PaulJuliusMartinez/jless\n...\n...\n...\n```\n\n### Download Found Assets\n\nTo download the found assets and keep the binaries in a temporary folder (which is `/tmp/getghrel` by default), simply use the `-download` flag:\n\n```sh\n# List of URLS found with -list\ncat releases.txt | getghrel -download\ncat releases.txt | getghrel -download -con 3\n\n# Single one\necho \"https://github.com/sharkdp/bat\" | getghrel -list | getghrel -download\n```\n\nBefore using `-download`, remove any lines starting with 'N/A' from the list of found assets, like shown below.\n\n\u003e `CTRL+C`(signal interupt) during download, will leave all files in `/tmp/getghrel`. You'll have to remove it manually.\n\n#### Demo \n\n![-download](examples/download-flag.jpg)\n\n\nIn the example above, you can observe that the `ClementTsang/bottom` package had two releases due to different versions of GNU. However, the tool only retained one version. You can filter out these additional releases. I included them here for the purpose of this example.\n\nTo download to a different location, use the `-tempdir` flag :\n\n```sh\n# List of URLS\ncat releases.txt | getghrel -download -tempdir '/tmp/tempbin'\n\n# Single one\necho \"https://github.com/sharkdp/bat\" | getghrel -list | getghrel -download -tempdir '/tmp/tempbin'\n```\n\n### Skip Extraction\n\nTo keep the file unarchived or uncompressed, you can simply use the `-skipextraction` option:\n\n```sh\necho \"helix-editor/helix\" | getghrel -list | getghrel -skipextraction -download\n```\n\nIt is useful for releases that require dependencies bundled together in separate files or folders, rather than just a single binary.\n\n#### Demo \n\n![-skipextraction](examples/skipextraction-flag.jpg)\n\n## TODO\n\n- **Optional**: update the regex or add some sort of backup/rescue regex to include releases that contain only the operating system and not the architecture. Most releases do include both the OS and architecture, I'm mentioning it here because of the neovim(solved now) issue discussed earlier.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkavishgr%2Fgetghrel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkavishgr%2Fgetghrel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkavishgr%2Fgetghrel/lists"}