{"id":13509594,"url":"https://github.com/zyedidia/eget","last_synced_at":"2025-05-15T08:06:22.052Z","repository":{"id":38804008,"uuid":"397091905","full_name":"zyedidia/eget","owner":"zyedidia","description":"Easily install prebuilt binaries from GitHub.","archived":false,"fork":false,"pushed_at":"2024-07-09T06:03:04.000Z","size":99,"stargazers_count":1200,"open_issues_count":35,"forks_count":45,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-14T13:08:33.432Z","etag":null,"topics":["command-line-tool","go","golang","installer","prebuilt-binaries"],"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/zyedidia.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-17T04:09:38.000Z","updated_at":"2025-04-13T11:35:22.000Z","dependencies_parsed_at":"2023-10-21T01:15:12.521Z","dependency_job_id":"17dcf7fb-2cae-497c-a447-888ae8cad9c1","html_url":"https://github.com/zyedidia/eget","commit_stats":{"total_commits":168,"total_committers":8,"mean_commits":21.0,"dds":0.08333333333333337,"last_synced_commit":"760f5151eb17fbd1bb592bce7cce57cf9657ce7d"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyedidia%2Feget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyedidia%2Feget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyedidia%2Feget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyedidia%2Feget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zyedidia","download_url":"https://codeload.github.com/zyedidia/eget/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254301431,"owners_count":22047904,"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","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":["command-line-tool","go","golang","installer","prebuilt-binaries"],"created_at":"2024-08-01T02:01:10.061Z","updated_at":"2025-05-15T08:06:21.935Z","avatar_url":"https://github.com/zyedidia.png","language":"Go","funding_links":[],"categories":["Go","Go程序设计","golang","\u003ca name=\"package-manager\"\u003e\u003c/a\u003ePackage managers","📦 Package Managers"],"sub_categories":["资源传输下载","☸️ Kubernetes"],"readme":"# Eget: easy pre-built binary installation\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/zyedidia/eget)](https://goreportcard.com/report/github.com/zyedidia/eget)\n[![Release](https://img.shields.io/github/release/zyedidia/eget.svg?label=Release)](https://github.com/zyedidia/eget/releases)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/zyedidia/eget/blob/master/LICENSE)\n\n**Eget** is the best way to easily get pre-built binaries for your favorite\ntools. It downloads and extracts pre-built binaries from releases on GitHub. To\nuse it, provide a repository and Eget will search through the assets from the\nlatest release in an attempt to find a suitable prebuilt binary for your\nsystem. If one is found, the asset will be downloaded and Eget will extract the\nbinary to the current directory. Eget should only be used for installing\nsimple, static prebuilt binaries, where the extracted binary is all that is\nneeded for installation. For more complex installation, you may use the\n`--download-only` option, and perform extraction manually.\n\n![Eget Demo](https://github.com/zyedidia/blobs/blob/master/eget-demo.gif)\n\nFor software maintainers, if you provide prebuilt binaries on GitHub, you can\nlist `eget` as a one-line method for users to install your software.\n\nEget has a number of detection mechanisms and should work out-of-the-box with\nmost software that is distributed via single binaries on GitHub releases. First\ntry using Eget on your software, it may already just work. Otherwise, see the\nFAQ for a clear set of rules to make your software compatible with Eget.\n\nFor more in-depth documentation, see [DOCS.md](DOCS.md).\n\n# Examples\n\n```\neget zyedidia/micro --tag nightly\neget jgm/pandoc --to /usr/local/bin\neget junegunn/fzf\neget neovim/neovim\neget ogham/exa --asset ^musl\neget --system darwin/amd64 sharkdp/fd\neget BurntSushi/ripgrep\neget -f eget.1 zyedidia/eget\neget zachjs/sv2v\neget https://go.dev/dl/go1.17.5.linux-amd64.tar.gz --file go --to ~/go1.17.5\neget --all --file '*' ActivityWatch/activitywatch\n```\n\n# How to get Eget\n\nBefore you can get anything, you have to get Eget. If you already have Eget and want to upgrade, use `eget zyedidia/eget`.\n\n### Quick-install script\n\n```\ncurl -o eget.sh https://zyedidia.github.io/eget.sh\nshasum -a 256 eget.sh # verify with hash below\nbash eget.sh\n```\n\nOr alternatively (less secure):\n\n```\ncurl https://zyedidia.github.io/eget.sh | sh\n```\n\nYou can then place the downloaded binary in a location on your `$PATH` such as `/usr/local/bin`.\n\nTo verify the script, the sha256 checksum is `0e64b8a3c13f531da005096cc364ac77835bda54276fedef6c62f3dbdc1ee919` (use `shasum -a 256 eget.sh` after downloading the script).\n\nOne of the reasons to use eget is to avoid running curl into bash, but unfortunately you can't eget eget until you have eget.\n\n### Homebrew\n\n```\nbrew install eget\n```\n\n### Chocolatey\n\n```\nchoco install eget\n```\n\n### Pre-built binaries\n\nPre-built binaries are available on the [releases](https://github.com/zyedidia/eget/releases) page.\n\n### From source\n\nInstall the latest released version:\n\n```\ngo install github.com/zyedidia/eget@latest\n```\n\nor install from HEAD:\n\n```\ngit clone https://github.com/zyedidia/eget\ncd eget\nmake build # or go build (produces incomplete version information)\n```\n\nA man page can be generated by cloning the repository and running `make eget.1`\n(requires pandoc). You can also use `eget` to download the man page: `eget -f eget.1 zyedidia/eget`.\n\n# Usage\n\nThe `TARGET` argument passed to Eget should either be a GitHub repository,\nformatted as `user/repo`, in which case Eget will search the release assets, a\ndirect URL, in which case Eget will directly download and extract from the\ngiven URL, or a local file, in which case Eget will extract directly from the\nlocal file.\n\nIf Eget downloads an asset called `xxx` and there also exists an asset called\n`xxx.sha256` or `xxx.sha256sum`, Eget will automatically verify that the\nSHA-256 checksum of the downloaded asset matches the one contained in that\nfile, and abort installation if a mismatch occurs.\n\nWhen installing an executable, Eget will place it in the current directory by\ndefault. If the environment variable `EGET_BIN` is non-empty, Eget will\nplace the executable in that directory.\n\nDirectories can also be specified as files to extract, and all files within\nthem will be extracted. For example:\n\n```\neget https://go.dev/dl/go1.17.5.linux-amd64.tar.gz --file go --to ~/go1.17.5\n```\n\nGitHub limits API requests to 60 per hour for unauthenticated users. If you\nwould like to perform more requests (up to 5,000 per hour), you can set up a\npersonal access token and assign it to an environment variable named either\n`GITHUB_TOKEN` or `EGET_GITHUB_TOKEN` when running Eget. If both are set,\n`EGET_GITHUB_TOKEN` will take precedence. Eget will read this variable and\nsend the token as authorization with requests to GitHub. It is also possible\nto read the token from a file by using `@/path/to/file` as the token value.\n\n```\nUsage:\n  eget [OPTIONS] TARGET\n\nApplication Options:\n  -t, --tag=           tagged release to use instead of latest\n      --pre-release    include pre-releases when fetching the latest version\n      --source         download the source code for the target repo instead of a release\n      --to=            move to given location after extracting\n  -s, --system=        target system to download for (use \"all\" for all choices)\n  -f, --file=          glob to select files for extraction\n      --all            extract all candidate files\n  -q, --quiet          only print essential output\n  -d, --download-only  stop after downloading the asset (no extraction)\n      --upgrade-only   only download if release is more recent than current version\n  -a, --asset=         download a specific asset containing the given string; can be specified multiple times for additional filtering; use ^ for anti-match\n      --sha256         show the SHA-256 hash of the downloaded asset\n      --verify-sha256= verify the downloaded asset checksum against the one provided\n      --rate           show GitHub API rate limiting information\n  -r, --remove         remove the given file from $EGET_BIN or the current directory\n  -v, --version        show version information\n  -h, --help           show this help message\n  -D, --download-all   download all projects defined in the config file\n  -k, --disable-ssl    disable SSL verification for download\n```\n\n# Configuration\n\nEget can be configured using a TOML file located at `~/.eget.toml` or it will fallback to the expected `XDG_CONFIG_HOME` directory of your os. Alternatively,\nthe configuration file can be located in the same directory as the Eget binary or the path specified with the environment variable `EGET_CONFIG`.\n\nBoth global settings can be configured, as well as setting on a per-repository basis.\n\nSections can be named either `global` or `\"owner/repo\"`, where `owner` and `repo`\nare the owner and repository name of the target repository (not that the `owner/repo`\nformat is quoted).\n\nFor example, the following configuration file will set the `--to` flag to `~/bin` for\nall repositories, and will set the `--to` flag to `~/.local/bin` for the `zyedidia/micro`\nrepository.\n\n```toml\n[global]\ntarget = \"~/bin\"\n\n[\"zyedidia/micro\"]\ntarget = \"~/.local/bin\"\n```\n\n## Available settings - global section\n\n| Setting | Related Flag | Description | Default |\n| --- | --- | --- | --- |\n| `github_token` | `N/A` | GitHub API token to use for requests | `\"\"` |\n| `all` | `--all` | Whether to extract all candidate files. | `false` |\n| `download_only` | `--download-only` | Whether to stop after downloading the asset (no extraction). | `false` |\n| `download_source` | `--source` | Whether to download the source code for the target repo instead of a release. | `false` |\n| `file` | `--file` | The glob to select files for extraction. | `*` |\n| `quiet` | `--quiet` | Whether to only print essential output. | `false` |\n| `show_hash` | `--sha256` | Whether to show the SHA-256 hash of the downloaded asset. | `false` |\n| `system` | `--system` | The target system to download for. | `all` |\n| `target` | `--to` | The directory to move the downloaded file to after extraction. | `.` |\n| `upgrade_only` | `--upgrade-only` | Whether to only download if release is more recent than current version. | `false` |\n\n## Available settings - repository sections\n\n| Setting | Related Flag | Description | Default |\n| --- | --- | --- | --- |\n| `all` | `--all` | Whether to extract all candidate files. | `false` |\n| `asset_filters` | `--asset` |  An array of partial asset names to filter the available assets for download. | `[]` |\n| `download_only` | `--download-only` | Whether to stop after downloading the asset (no extraction). | `false` |\n| `download_source` | `--source` | Whether to download the source code for the target repo instead of a release. | `false` |\n| `file` | `--file` | The glob to select files for extraction. | `*` |\n| `quiet` | `--quiet` | Whether to only print essential output. | `false` |\n| `show_hash` | `--sha256` | Whether to show the SHA-256 hash of the downloaded asset. | `false` |\n| `system` | `--system` | The target system to download for. | `all` |\n| `target` | `--to` | The directory to move the downloaded file to after extraction. | `.` |\n| `upgrade_only` | `--upgrade-only` | Whether to only download if release is more recent than current version. | `false` |\n| `verify_sha256` | `--verify-sha256` | Verify the sha256 hash of the asset against a provided hash. | `\"\"` |\n\n\n## Example configuration\n\n```toml\n[global]\n    github_token = \"ghp_1234567890\"\n    quiet = false\n    show_hash = false\n    upgrade_only = true\n    target = \"./test\"\n\n[\"zyedidia/micro\"]\n    upgrade_only = false\n    show_hash = true\n    asset_filters = [ \"static\", \".tar.gz\" ]\n    target = \"~/.local/bin/micro\"\n```\n\nBy using the configuration above, you could run the following command to download the latest release of `micro`:\n\n```bash\neget zyedidia/micro\n```\n\nWithout the configuration, you would need to run the following command instead:\n\n```bash\nexport EGET_GITHUB_TOKEN=ghp_1234567890 \u0026\u0026\\\neget zyedidia/micro --to ~/.local/bin/micro --sha256 --asset static --asset .tar.gz\n```\n\n# FAQ\n\n### How is this different from a package manager?\n\nEget only downloads pre-built binaries uploaded to GitHub by the developers of\nthe repository. It does not maintain a central list of packages, nor does it do\nany dependency management. Eget does not \"install\" executables by placing them\nin system-wide directories (such as `/usr/local/bin`) unless instructed, and it\ndoes not maintain a registry for uninstallation. Eget works best for installing\nsoftware that comes as a single binary with no additional files needed (CLI\ntools made in Go, Rust, or Haskell tend to fit this description).\n\n### Does Eget keep track of installed binaries?\n\nEget does not maintain any sort of manifest containing information about\ninstalled binaries. In general, Eget does not maintain any state across\ninvocations. However, Eget does support the `--upgrade-only` option, which\nwill first check `EGET_BIN` to determine if you have already downloaded the\ntool you are trying to install -- if so it will only download a new version if\nthe GitHub release is newer than the binary on your file system.\n\n### Is this secure?\n\nEget does not run any downloaded code -- it just finds executables from GitHub\nreleases and downloads/extracts them. If you trust the code you are downloading\n(i.e. if you trust downloading pre-built binaries from GitHub) then using Eget\nis perfectly safe. If Eget finds a matching asset ending in `.sha256` or\n`.sha256sum`, the SHA-256 checksum of your download will be automatically\nverified. You can also use the `--sha256` or `--verify-sha256` options to\nmanually verify the SHA-256 checksums of your downloads (checksums are provided\nin an alternative manner by your download source).\n\n### Does this work only for GitHub repositories?\n\nAt the moment Eget supports searching GitHub releases, direct URLs, and local\nfiles. If you provide a direct URL instead of a GitHub repository, Eget will\nskip the detection phase and download directly from the given URL. If you\nprovide a local file, Eget will skip detection and download and just perform\nextraction from the local file.\n\n### How can I make my software compatible with Eget?\n\nEget should work out-of-the-box with many methods for releasing software, and\ndoes not require that you build your release process for Eget in particular.\nHowever, here are some rules that will guarantee compatibility with Eget.\n\n- Provide your pre-built binaries as GitHub release assets.\n- Format the system name as `OS_Arch` and include it in every pre-built binary\n  name. Supported OSes are `darwin`/`macos`, `windows`, `linux`, `netbsd`,\n  `openbsd`, `freebsd`, `android`, `illumos`, `solaris`, `plan9`. Supported\n  architectures are `amd64`, `i386`, `arm`, `arm64`, `riscv64`.\n- If desired, include `*.sha256` files for each asset, containing the SHA-256\n  checksum of each asset. These checksums will be automatically verified by\n  Eget.\n- Include only a single executable or appimage per system in each release archive.\n- Use `.tar.gz`, `.tar.bz2`, `.tar.xz`, `.tar`, or `.zip` for archives. You may\n  also directly upload the executable without an archive, or a compressed\n  executable ending in `.gz`, `.bz2`, or `.xz`.\n\n### Does this work with monorepos?\n\nYes, you can pass a tag or tag identifier with the `--tag TAG` option. If no\ntag exactly matches, Eget will look for the latest release with a tag that\ncontains `TAG`. So if your repository contains releases for multiple different\nprojects, just pass the appropriate tag (for the project you want) to Eget, and\nit will find the latest release for that particular project (as long as\nreleases for that project are given tags that contain the project name).\n\n# Contributing\n\nIf you find a bug, have a suggestion, or something else, please open an issue\nfor discussion. I am sometimes prone to leaving pull requests unmerged, so\nplease double check with me before investing lots of time into implementing a\npull request. See [DOCS.md](DOCS.md) for more in-depth documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyedidia%2Feget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzyedidia%2Feget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyedidia%2Feget/lists"}