eget

command module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2021 License: MIT Imports: 22 Imported by: 0

README

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.

How to get Eget

Before you can get anything, you have to get Eget.

Quick-install script
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.

If you would like to verify the script, the sha256 checksum is 0e64b8a3c13f531da005096cc364ac77835bda54276fedef6c62f3dbdc1ee919 (use shasum -a 256 eget.sh after downloading the script).

Pre-built binaries

Pre-built binaries are available on the releases page.

From source
go get github.com/zyedidia/eget

or

git clone https://github.com/zyedidia/eget
cd eget
make build

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.

Options

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.

Usage:
  eget [OPTIONS] PROJECT

Application Options:
  -t, --tag=           tagged release to use instead of latest
      --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
  -x                   force the extracted file to be executable
      --sha256         show the SHA-256 hash of the downloaded asset
  -v, --version        show version information
  -h, --help           show this help message

Examples

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

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. You can use the --sha256 option to have Eget print the SHA-256 checksum of the downloaded file, and then you can check if this matches the checksum provided by the developers of the tool you downloaded (if they provide one).

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.

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".

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL