scoop update scoop bucket add extras scoop info eget scoop install eget
Ongoing
According to
Repology,
the latest
packaged Eget
is
.
2023-August-23 Published this evolving[1] article.
Because there are new releases of Hugo all the time and because I always want the latest Hugo, I need an easy way to get the latest Hugo on all my systems (Linux, Windows, and WSL).
I recently stumbled upon Eget and, so far, I think I ❤️ it!
This article assumes you know how to…
use the command line and
check your path.
💡 | To learn about checking your path in cmd.exe, PowerShell, and Unix-like shells, see the section called Find out your path in Infinite Ink’s Installing Extended Hugo. |
Eget is a command-line tool written in Go that downloads pre-built binaries[2] from GitHub. Note that…
“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).”
To read all about Eget, including the above excerpt from the FAQ, see:
In general, I prefer to use a package manager to install, update, and uninstall an app, but…
if the app is available on GitHub,
if the app is a single binary,
if the app has no dependencies,
and if the latest version of the app is not available through my package manager,[3]
…then I use Eget.
You can install Eget with some package managers, including the ones listed in this Repology[4] badge:
For details about how to install Eget, see github.com/zyedidia/eget#how-to-get-eget.
On Windows, I use this sequence of commands to install Eget:
scoop update scoop bucket add extras scoop info eget scoop install eget
To learn about Scoop, see Infinite Ink’s Scoop: A Windows Package Manager.
On Linux, I install Eget with:
brew install eget
To learn about Homebrew on Linux, see docs.brew.sh/Homebrew-on-Linux.
To check if Eget is on your path, run one of these commands:
eget eget -h eget --help
Each of these three equivalent commands should produce something like this:
Usage:
eget [OPTIONS] TARGET
Application Options:
-t, --tag= tagged release to use instead of latest
--pre-release include pre-releases when fetching the latest version
--source download the source code for the target repo instead of a release
--to= move to given location after extracting
-s, --system= target system to download for (use "all" for all choices)
-f, --file= glob to select files for extraction
--all extract all candidate files
-q, --quiet only print essential output
-d, --download-only stop after downloading the asset (no extraction)
--upgrade-only only download if release is more recent than current version
-a, --asset= download a specific asset containing the given string; can be specified multiple times for additional filtering; use ^ for anti-match
--sha256 show the SHA-256 hash of the downloaded asset
--verify-sha256= verify the downloaded asset checksum against the one provided
--rate show GitHub API rate limiting information
-r, --remove remove the given file from $EGET_BIN or the current directory
-v, --version show version information
-h, --help show this help message
-D, --download-all download all projects defined in the config file
-k, --disable-ssl disable SSL verification for download
cd to a directory on your pathOn my Windows devices, I do this:
cd C:\AppsB4Scoop
Note that
C:\AppsB4Scoop
is a directory on my
path[5]
and
is where I want Eget to install
extended Hugo.
eget gohugoio/hugo
-------------
GitHub repoThis is displayed in my terminal:
PS C:\AppsB4Scoop> eget gohugoio/hugo 2 matches found: please select manually (1) hugo_0.117.0_windows-amd64.zip (2) hugo_extended_0.117.0_windows-amd64.zip Enter selection number: 2 https://github.com/gohugoio/hugo/releases/download/v0.117.0/hugo_extended_0.117.0_windows-amd64.zip Downloading 100% [=============================================================] (21/21 MB, 7.580 MB/s) Extracted `hugo.exe` to `hugo.exe`
💡 | eget gohugoio/hugo --sha256
👆
Note |
PS C:\AppsB4Scoop> hugo version hugo v0.117.0-b2f0696cad918fb61420a6aff173eb36662b406e+extended windows/amd64 BuildDate=2023-08-07T12:49:48Z VendorInfo=gohugoio PS C:\AppsB4Scoop> where.exe hugo C:\AppsB4Scoop\hugo.exe C:\Scoop\shims\hugo.exe
Since
C:\AppsB4Scoop\hugo.exe
is listed first in the above where.exe output, this is the binary that’s launched
by a
(pathless)
hugo
command.
cd to a directory on your pathOn my Linux device, I do this:
cd ~/bin
Note that
~/bin,
which is
sometimes
known as
$HOME/bin
or
/home/USERNAME/bin,
is a directory on my
path[5]
and
is where I want Eget to install
extended Hugo.
eget gohugoio/hugo
-------------
GitHub repoThis is what’s displayed in my terminal:
$ eget gohugoio/hugo 4 matches found: please select manually (1) hugo_0.117.0_linux-amd64.deb (2) hugo_0.117.0_linux-amd64.tar.gz (3) hugo_extended_0.117.0_linux-amd64.deb (4) hugo_extended_0.117.0_linux-amd64.tar.gz Enter selection number: 4 https://github.com/gohugoio/hugo/releases/download/v0.117.0/hugo_extended_0.117.0_linux-amd64.tar.gz Downloading 100% [=============================================================] (20/20 MB, 8.058 MB/s) Extracted `hugo` to `hugo`
💡 | eget gohugoio/hugo --sha256
👆
Note |
$ hugo version hugo v0.117.0-b2f0696cad918fb61420a6aff173eb36662b406e+extended linux/amd64 BuildDate=2023-08-07T12:49:48Z VendorInfo=gohugoio $ which hugo /home/USERNAME/bin/hugo
Eget makes it easy to get and install single-binary apps.🎉👏
For more related to productivity, see Infinite Ink’s…
@nm@mathstodon.xyz
or
#InfiniteInk
in it.