Eget is the best way to easily get pre-built binaries for your favorite tools.

Eget: easy pre-built binary installation

Go Report Card Release MIT License

Eget is the best way to easily get pre-built binaries for your favorite tools. It downloads and extracts pre-built binaries from releases on GitHub. To use it, provide a repository and Eget will search through the assets from the latest release in an attempt to find a suitable prebuilt binary for your system. If one is found, the asset will be downloaded and Eget will extract the binary to the current directory. Eget should only be used for installing simple, static prebuilt binaries, where the extracted binary is all that is needed for installation. For more complex installation, you may use the --download-only option, and perform extraction manually.

Eget Demo

For software maintainers, if you provide prebuilt binaries on GitHub, you can list eget as a one-line method for users to install your software.

Eget has a number of detection mechanisms and should work out-of-the-box with most software that is distributed via single binaries on GitHub releases. First try using Eget on your software, it may already just work. Otherwise, see the FAQ a clear set of rules to make your software compatible with Eget.

For more in-depth documentation, see DOCS.md.

Examples

eget zyedidia/micro --tag nightly
eget jgm/pandoc --to /usr/local/bin
eget junegunn/fzf
eget neovim/neovim
eget ogham/exa
eget --system darwin/amd64 sharkdp/fd
eget BurntSushi/ripgrep
eget -f eget.1 zyedidia/eget
eget zachjs/sv2v

How to get Eget

Before you can get anything, you have to get Eget. If you already have Eget and want to upgrade, use eget zyedidia/eget.

Quick-install script

curl -o eget.sh https://zyedidia.github.io/eget.sh
shasum -a 256 eget.sh # verify with hash below
bash eget.sh

Or alternatively (less secure):

curl https://zyedidia.github.io/eget.sh | sh

You can then place the downloaded binary in a location on your $PATH such as /usr/local/bin.

To verify the script, the sha256 checksum is 0e64b8a3c13f531da005096cc364ac77835bda54276fedef6c62f3dbdc1ee919 (use shasum -a 256 eget.sh after downloading the script).

One of the reasons to use eget is to avoid running curl into bash, but unfortunately you can't eget eget until you have eget.

Pre-built binaries

Pre-built binaries are available on the releases page.

From source

Install the latest released version:

go install github.com/zyedidia/eget@latest

or install from HEAD:

git clone https://github.com/zyedidia/eget
cd eget
make build # or go build (produces incomplete version information)

A man page can be generated by cloning the repository and running make eget.1 (requires pandoc). You can also use eget to download the man page: eget -f eget.1 zyedidia/eget.

Usage

The PROJECT argument passed to Eget should either be a GitHub repository, formatted as user/repo, in which case Eget will search the release assets, or a direct URL, in which case Eget will directly download and extract from the given URL.

If Eget downloads an asset called xxx and there also exists an asset called xxx.sha256 or xxx.sha256sum, Eget will automatically verify that the SHA-256 checksum of the downloaded asset matches the one contained in that file, and abort installation if a mismatch occurs.

When installing an executable, Eget will place it in the current directory by default. If the environment variable EGET_BIN is non-empty, Eget will place the executable in that directory.

Usage:
  eget [OPTIONS] PROJECT

Application Options:
  -t, --tag=           tagged release to use instead of latest
      --pre-release    include pre-releases when fetching the latest version
      --to=            move to given location after extracting
  -s, --system=        target system to download for (use "all" for all choices)
  -f, --file=          file name to extract
  -q, --quiet          only print essential output
      --download-only  stop after downloading the asset (no extraction)
      --asset=         download a specific asset containing the given string
      --sha256         show the SHA-256 hash of the downloaded asset
      --verify-sha256= verify the downloaded asset checksum against the one provided
  -v, --version        show version information
  -h, --help           show this help message

FAQ

How is this different from a package manager?

Eget only downloads pre-built binaries uploaded to GitHub by the developers of the repository. It does not maintain a central list of packages, nor does it do any dependency management. Eget does not "install" executables by placing them in system-wide directories (such as /usr/local/bin) unless instructed, and it does not maintain a registry for uninstallation. Eget works best for installing software that comes as a single binary with no additional files needed (CLI tools made in Go, Rust, or Haskell tend to fit this description).

Is this secure?

Eget does not run any downloaded code -- it just finds executables from GitHub releases and downloads/extracts them. If you trust the code you are downloading (i.e. if you trust downloading pre-built binaries from GitHub) then using Eget is perfectly safe. If Eget finds a matching asset ending in .sha256 or .sha256sum, the SHA-256 checksum of your download will be automatically verified. You can also use the --sha256 or --verify-sha256 options to manually verify the SHA-256 checksums of your downloads (checksums are provided in an alternative manner by your download source).

Does this work only for GitHub repositories?

At the moment Eget only supports searching GitHub releases and direct URLs. If you provide a direct URL instead of a GitHub repository, Eget will skip the detection phase and download directly from the given URL.

How can I make my software compatible with Eget?

Eget should work out-of-the-box with many methods for releasing software, and does not require that you build your release process for Eget in particular. However, here are some rules that will guarantee compatibility with Eget.

  • Provide your pre-built binaries as GitHub release assets.
  • Format the system name as OS_Arch and include it in every pre-built binary name. Supported OSes are darwin/macos, windows, linux, netbsd, openbsd, freebsd, android, illumos, solaris, plan9. Supported architectures are amd64, i386, arm, arm64, riscv64.
  • If desired, include *.sha256 files for each asset, containing the SHA-256 checksum of each asset. These checksums will be automatically verified by Eget.
  • Include only a single executable or appimage per system in each release archive.
  • Use .tar.gz, .tar.bz2, .tar.xz, .tar, or .zip for archives. You may also directly upload the executable without an archive, or a compressed executable ending in .gz, .bz2, or .xz.

Contributing

If you find a bug, have a suggestion, or something else, please open an issue for discussion. Pull requests will only be accepted if they close an issue marked as "pr-approved". See DOCS.md for more in-depth documentation.

Owner
Comments
  • 403 Forbidden: API rate limit exceeded

    403 Forbidden: API rate limit exceeded

    I have got the following error :

    403 Forbidden: API rate limit exceeded for 183.82.157.82. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.): https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting
    
  • cli/cli: too many candidates found

    cli/cli: too many candidates found

    Using latest version of Eget on Ubuntu 21.10.

    ❯ eget --asset=deb cli/cli
    4 candidates found for asset `deb`: please select manually
    (1) gh_2.11.3_linux_386.deb
    (2) gh_2.11.3_linux_amd64.deb
    (3) gh_2.11.3_linux_arm64.deb
    (4) gh_2.11.3_linux_armv6.deb
    Enter selection number: ^C
    
    ❯ eget --asset=deb --system=amd64 cli/cli
    4 candidates found for asset `deb`: please select manually
    (1) gh_2.11.3_linux_386.deb
    (2) gh_2.11.3_linux_amd64.deb
    (3) gh_2.11.3_linux_arm64.deb
    (4) gh_2.11.3_linux_armv6.deb
    Enter selection number: ^C
    
    ❯ eget --asset=deb --system=linux/amd64 cli/cli
    4 candidates found for asset `deb`: please select manually
    (1) gh_2.11.3_linux_386.deb
    (2) gh_2.11.3_linux_amd64.deb
    (3) gh_2.11.3_linux_arm64.deb
    (4) gh_2.11.3_linux_armv6.deb
    Enter selection number: ^C
    

    I'd expect Eget to detect which package to download in all of the above cases.

    Cheers, and thanks for your work !

  • Add config file support

    Add config file support

    This PR adds support for using a configuration file with Eget.

    Summary

    This adds supports for a TOML configuration file located at ~/.eget.toml, or one located in the same directory as the eget binary. Note that using command line flags will always override any configuration file settings that have been configured.

    Implementation

    Both global settings can be configured, as well as setting on a per-repository basis.

    Sections can be named either global or "owner/repo", where owner and repo are the owner and repository name of the target repository (not that the owner/repo format is quoted).

    Sections can be named either global or "owner/repo", where owner and repo are the owner and repository name of the target repository (not that the owner/repo format is quoted).

    For example, the following configuration file will set the --to flag to ~/bin for all repositories, and will set the --to flag to ~/.local/bin for the zyedidia/micro repository.

    [global]
        target = "~/bin"
    
    ["zyedidia/micro"]
        target = "~/.local/bin"
    

    Example configuration

    [global]
        github_token = "ghp_1234567890"
        quiet = false
        show_hash = false
        upgrade_only = true
        target = "./test"
    
    ["zyedidia/micro"]
        upgrade_only = false
        show_hash = true
        asset_filters = [ "static", ".tar.gz" ]
        target = "~/.local/bin/micro"
    

    By using the configuration above, you could run the following command to download the latest release of micro:

    eget zyedidia/micro
    

    Without the configuration, you would need to run the following command instead:

    export EGET_GITHUB_TOKEN=ghp_1234567890 &&\
    eget zyedidia/micro --to ~/.local/bin/micro --sha256 --asset static --asset .tar.gz
    

    Available settings

    | Setting | Related Flag | Description | Default | | --- | --- | --- | --- | | github_token | N/A | GitHub API token to use for requests | "" | | all | --all | Whether to extract all candidate files. | false | | asset_filters | --asset | An array of partial asset names to filter the available assets for download. | [] | | download_only | --download-only | Whether to stop after downloading the asset (no extraction). | false | | download_source | --source | Download only the source code | false | | file | --file | The glob to select files for extraction. | * | | quiet | --quiet | Whether to only print essential output. | false | | show_hash | --sha256 | Whether to show the SHA-256 hash of the downloaded asset. | false | | system | --system | The target system to download for. | all | | target | --to | The directory to move the downloaded file to after extraction. | . | | upgrade_only | --upgrade-only | Whether to only download if release is more recent than current version. | false |

  • Feature request: download only if hash doesn't match

    Feature request: download only if hash doesn't match

    I'm downloading packages for later installation (eget --download-only zyedidia/eget). This downloads the same file every time it's executed even if there is no newer version (which I cannot know in advance).

    Would it be possible to only download the file if the hashes of the file eget is going to download does not match the file that is already there?

  • Add downloading of configuration-defined projects

    Add downloading of configuration-defined projects

    Overview

    This PR adds an additional flag, -D/--download-all, which adds new functionality:

    When specifying the --download-all flag, all projects/repositories defined in the configuration file are downloaded in the order they exist within the config file.

    If this flag is specified, no other parameters are required.

    Implementation

    This functionality was implemented by using exec.Command() to execute the currently running binary (which is an eget binary) sequentially for each of the configuration-defined repositories, and the output from the process is streamed in real time to the current stdout pipe by redirecting the process.stderr to the os.stderr.

    This allows a complete implementation of batch downloading with a minimal amount of additional code, as it leverages eget functionality itself.

    Example Usage

    Given the following configuration file:

    [global]
        github_token = ""
        quiet = false
        show_hash = true
        upgrade_only = true
        target = "./test"
    
    ["zyedidia/micro"]
        name = "micro"
        upgrade_only = false
        show_hash = false
        asset_filters = [ "static.tar.gz" ]
    
    ["zyedidia/eget"]
        name = "eget"
        upgrade_only = false
        show_hash = false
        asset_filters = [ ".tar.gz" ]
    
    ["junegunn/fzf"]
        name = "fzf"
        upgrade_only = false
        quiet = false
    

    The following output is displayed when running eget --download-all: image

    Notes

    Original Notes: I'm not 100% sure that --download-config is the best name for this flag, so please suggest alternatives if anything comes to mind. I feel that it could be confusing if an end user thinks that the flag means a configuration file will be downloaded.

    Alternatives could be --batch-download, --download-configured, or something similar. Thoughts?

    Updated Notes: The flag has been renamed to --download-all per suggestion.

  • Add support for eget environment variable

    Add support for eget environment variable

    This PR adds support for EGET_GITHUB_TOKEN as an environment variable containing a GitHub token. If both EGET_GITHUB_TOKEN and GITHUB_TOKEN environment variables are set, EGET_GITHUB_TOKEN is used.

    Additionally, the documentation has been updated to reflect this addition.

  • Ability to filter out matching candidates

    Ability to filter out matching candidates

    Consider the following scenario:

    ❯ eget --asset=deb --asset=amd64 sharkdp/fd
    2 candidates found for asset chain: please select manually
    (1) fd-musl_8.4.0_amd64.deb
    (2) fd_8.4.0_amd64.deb
    Enter selection number: 
    

    Here, as often in the Rust ecosystem, the binaries come as either (1) statically linked to musl (fd-musl_8.4.0_amd64.deb) or (2) dynamically linked to glibc (fd_8.4.0_amd64.deb). By common practice, when nothing is specified within the asset name, the latter is implied.

    Since I encountered problems with programs linked to musl in rare occasions, I wish to prefer programs dynamically linked to glibc, when available.

    Hence, I wish there was such -x | --exclude option that would allow me to --exclude=musl and thus lead me to the desired asset.

  • eget 1.3.0 config file issues

    eget 1.3.0 config file issues

    From what I see when testing eget-1.3.0, https://github.com/zyedidia/eget#configuration shows an invalid config file: to should be target, as in Example configuration below, and ~ is not interpreted as the user's home but used litterally instead.

  • Remove some platform-specific suffixes

    Remove some platform-specific suffixes

    I tried to install https://github.com/editorconfig-checker/editorconfig-checker and it worked, but the binary carries some suffixes, which could be stripped off automatically: ec-darwin-amd64, i.e. the proper executable must be just ec.

  • Bug: some tbz-packed binaries are not extracted correctly

    Bug: some tbz-packed binaries are not extracted correctly

    Looks like binaries packed within tbz tarballs are not (always?) extracted correctly. As an example, see the btop tool. On issuing an eget aristocratos/btop, the correct asset for my system was identified ("btop-x86_64-linux-musl.tbz"), and a btop executable is extracted, but it is not binary-accurate and attempting to run it will result in an error.

    Manually pulling the tarball via eget --download-only aristocratos/btop followed by a tar -xjf btop-x86_64-linux-musl.tbz does yield a correctly extracted binary as "bin/btop", however.

  • [Feature,flag suggest]direct unzip(unzip keep layout+keepallfiles)

    [Feature,flag suggest]direct unzip(unzip keep layout+keepallfiles)

    reason for example.eget keepassxreboot/keepassxc what you will get is the 3 exe without any dll. (keep all files,include exe. flag?)

    if any users wants to follow the repo layout / likes to use windows C drive program files. its a must.Imagine you do eget xxx/xxx --to "thesweetfolder"&eget yyy/yyy --to "thesweetfolder" The next time you open the "thesweetfolder" OMG,its keepassxc+eget+fzf+yyy+(manually installed obs)+(10 manually installed apps) they probably need to pray for the dll being compatible. (keep zip inner layout flag?)

    I think most zip extraction api should have a -keep layout option built-in.

  • upgrade_only glitches

    upgrade_only glitches

    The following config file

    [global]
      target = "~/bin"
      upgrade_only = true
    
    ["fatedier/frp"]
       all = true
    
    ["zyedidia/eget"]
    
    ["zyedidia/micro"]
    
    

    used with the command eget -D will re-download frpc and frps every time.

    Same is, when all = true is replaced with file = "frpc". (OK, not exactly the same, as only frpc is downloaded).

  • usage of asset_filter breaks target

    usage of asset_filter breaks target

    With the following simple config file

    [global]
      target = "~/bin"
      upgrade_only = true
    

    the command eget neovim/neovim downloads the appimage and places it in ~/bin.

    But when I add

    ["neovim/neovim"]
       asset_filters = "nvim.appimage"
    

    the download ends up in ./ (i.e. the current directory).

  • regex support for -a

    regex support for -a

    Hi

    Thanks for a great tool; makes so many things easier on various machines!

    Some of my eget commands appear to be using asset filtering like -a tar.gz -a ^sig (e.g., caddyserver/caddy is one example off the top of my head).

    Would be nice to be able to say -a tar.gz$. I saw some mention of regex in various issues, but they all appeared to be more about priority between --system and --asset.

    Please note this is only about convenience, so I'm OK if your response is a WONTFIX, but had to ask anyway :)

  • Getting dist file for Archlinux while running from Fedora

    Getting dist file for Archlinux while running from Fedora

    Happened here https://github.com/contour-terminal/contour/releases/tag/v0.3.2.202

    eget https://github.com/contour-terminal/contour
    https://github.com/contour-terminal/contour/releases/download/v0.3.2.202/contour_0.3.2.202-archlinux_x86_64
    Downloading 100% [========================================================================================================================================] (1.2/1.2 MB, 557.055 kB/s)        
    Extracted `contour_0.3.2.202-archlinux_x86_64` to `contour`
    

    Should have got the .rpm

Golang binaries compiled on-demand for your system
Golang binaries compiled on-demand for your system

Go Binaries Go Binaries is an on-demand binary server, allowing non-Go users to quickly install tools written in Go without installing go itself, and

Dec 3, 2022
Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.
Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.

#1 Golang live reload and task runner Content - ⭐️ Top Features - ???? Get started - ?? Config sample - ?? Commands List - ?? Support and Suggestions

Jan 6, 2023
Embed static files in Go binaries (replacement for gobuffalo/packr)

Pkger github.com/markbates/pkger is a tool for embedding static files into Go binaries. It will, hopefully, be a replacement for github.com/gobuffalo/

Dec 29, 2022
Package binaries for different operating systems in a single script, executable everywhere.

CrossBin Packages MacOS, Linux and Windows binaries, into a single script that is executable everywhere and executes the correct binary for the system

Oct 24, 2022
Moldy CLI the best project starter and manager of the world
Moldy CLI the best project starter and manager of the world

Moldy The best project starter of the world ?? What is Moldy ? Hey I present Moldy this beautiful tool that will solve your life in creating, managing

Oct 17, 2022
Frictionless way of managing project-specific commands
Frictionless way of managing project-specific commands

1build is an automation tool used for research and development projects that arms you with the convenience to configure project-local command line ali

Dec 25, 2022
An experimental way to apply patches to the Go runtime at build time.

go-patch-overlay An experimental way to apply patches to the Go runtime at build time. Assuming you have a directory of patches to apply to the Go sou

Oct 31, 2022
Various tools for usage with Golang like installer, github tool and cloud features.

Gopei2 (Go Programming Environment Installer) Gopei shell install Go compiler, LiteIDE and configure for you the entire environment, variables, paths,

Dec 23, 2022
SCons Tools for Go

#goscons goscons is a set of SCons tools for building Go code. goscons supports Cgo. goscons includes a helper application based on the one from sc

Aug 19, 2022
🚀 gowatch is a command line tool that builds and (re)starts your go project everytime you save a Go or template file.
🚀 gowatch is a command line tool that builds and (re)starts your go project everytime you save a Go or template file.

gowatch 中文文档 gowatch is a command line tool that builds and (re)starts your go project everytime you save a Go or template file. Installation To insta

Dec 30, 2022
It is a proxy to improve article readability, a directory for your favorite articles, and a way to make the internet lighter and more accessible.

timoneiro It is a work in progress. Some features are unimplemented yet. The helmsman's goal is to be a way to browse articles without all the distrac

Jun 13, 2022
Get cloud instances with your favourite software pre-loaded

This Golang package can be used to provision cloud hosts using a simple CRUD-style API along with a cloud-init user-data script. It could be used to automate anything from k3s clusters, to blogs, or CI runners. We use it to create the cheapest possible hosts in the cloud with a public IP address.

Dec 14, 2022
htf (Host That File) is a tool to make serving up your favorite pentest tools simpler and faster.
htf (Host That File) is a tool to make serving up your favorite pentest tools simpler and faster.

htf htf (Host That File) is a tool to make serving up your favorite pentest tools simpler and faster. All you need to do is populate the htf configura

Nov 28, 2021
Are you programming and suddenly your stomach is rumbling? No problem, order your Ifood without leaving your favorite text editor ❤️

vim-ifood Você ta programando e de repente bateu aquela fome? Sem problemas, peça seu Ifood sem sair do seu editor de texto favorito ❤️ Are you progra

Jun 2, 2022
Easily kick-start your python project with very opinionated best practices.

Pyproject Easily kickstart your Python project with very opionionated best practices. Manage your project using poetry https://python-poetry.org/ Add

Jan 24, 2022
Search and store the best cryptos for the best scalable and modern application development.

Invst Hunt Search and store the best cryptos for the best scalable and modern application development. Layout Creating... Project Challenge The Techni

Nov 12, 2021
A tool that helps you write code in your favorite IDE: your word processor!
A tool that helps you write code in your favorite IDE: your word processor!

WordIDE Have you ever wondered: How would it feel like to write code in a word processor? Me neither. But after months minutes of planning, I present

Jul 21, 2022
GoReleaser builds Go binaries as fast and easily as possible
GoReleaser builds  Go binaries as fast and easily as possible

GoReleaser builds Go binaries for several platforms, creates a GitHub release and then pushes a Homebrew formula to a tap repository. All that wrapped in your favorite CI.

Jan 7, 2023
siusiu (suite-suite harmonics) a suite used to manage the suite, designed to free penetration testing engineers from learning and using various security tools, reducing the time and effort spent by penetration testing engineers on installing tools, remembering how to use tools.
siusiu (suite-suite harmonics) a suite used to manage the suite, designed to free penetration testing engineers from learning and using various security tools, reducing the time and effort spent by penetration testing engineers on installing tools, remembering how to use tools.

siusiu (suite-suite harmonics) a suite used to manage the suite, designed to free penetration testing engineers from learning and using various security tools, reducing the time and effort spent by penetration testing engineers on installing tools, remembering how to use tools.

Dec 12, 2022
Best microservices framework in Go, like alibaba Dubbo, but with more features, Scale easily.
Best microservices framework in Go, like alibaba Dubbo, but with more features, Scale easily.

Best microservices framework in Go, like alibaba Dubbo, but with more features, Scale easily.

Dec 30, 2022