eget helps locate, download, and extract prebuilt binaries from GitHub.
Forked from https://github.com/zyedidia/eget Refactored and enhanced the tool's functionality.
- Explicit subcommand CLI: uses the consistent
eget <command> --options... arguments...form, with clear command boundaries and better automation ergonomics. - Multiple target types:
installanddownloadacceptowner/repo, GitHub repository URLs, direct download URLs, and local files. - Unified download, verify, and extract flow: built-in asset discovery, system/asset selection, SHA-256 verification, and archive extraction reduce manual steps.
- Cache and proxy support: supports
cache_dirfor download reuse andproxy_urlfor both GitHub lookups and remote download requests. - Managed package lifecycle: supports
add,list,update, anduninstallfor package definitions, installed state, and cleanup workflows. - Traceable installed state: keeps a dedicated installed store with the latest asset, install time, and extracted files for each package.
- Layered configuration merging: supports
global, repo sections, andpackages.<name>with predictable option precedence. - Unified default config directory: configuration and installed-state files default to
~/.config/eget/, while legacy paths remain readable.
- Download from Releases https://github.com/inherelab/eget/releases
- Install by
go installcommand(require Go sdk)
go install github.com/inherelab/eget/cmd/eget@latesteget <command> --options... arguments...example:
eget install --tag nightly owner/repoInstall Examples
eget install --tag nightly inhere/markview
# Install and override the executable name
eget install --name chlog gookit/gitw
# Install to a custom directory
eget install --to ~/.local/bin/fzf junegunn/fzf
# Install and record the package definition
eget install --add junegunn/fzf
eget install --add --name rg BurntSushi/ripgrepOthers Examples
# download
eget download --file go --to ~/go1.17.5 https://go.dev/dl/go1.17.5.linux-amd64.tar.gz
# uninstall
eget uninstall fzf
eget list
# update
eget update fzf
eget update --allConfig Examples
# config
eget add --name fzf --to ~/.local/bin junegunn/fzf
eget config init
eget config list|show
eget config get global.target
eget config set global.target ~/.local/binThe target argument accepted by install and download can be:
owner/repo- GitHub repository URL
- Direct download URL
- Local file
install (aliases: i, ins)
- Resolve, download, verify, and extract a target, then record installation state.
--namecan be used to override the installed executable name; without--to, it also acts as the rename hint for single-file assets.- With
--add, a successful install also writes the repo target to[packages.<name>]; use--nameto override the package name.
download (alias: dl)
- Reuses the install pipeline, but only downloads/extracts and does not record installed state.
add
- Writes a managed package definition to
[packages.<name>]in the config file.
uninstall (aliases: uni, remove, rm)
- Removes installed files and clears the installed store entry without deleting
[packages.<name>].
list (alias: ls)
- Lists the union of local managed packages and installed-store entries, and attaches recent installed-state details when available.
update (alias: up)
- Updates a single managed package, or all managed packages with
--all.
config (alias: cfg)
- Supports
init,list/ls/show,get KEY, andset KEY VALUE.
install, download, and add share these installation-related options:
--tag: Select a release tag; defaults tolatestwhen omitted.--system: Override the target OS/arch, for examplewindows/amd64orlinux/arm64.--to: Set the install or download output path; accepts either a directory or a full file path.--cache-dir: Set the remote download cache directory and reuse cached files on subsequent runs.--file: Select a file to extract from an archive when multiple candidates exist.--asset: Filter release assets by keyword; multiple filters can be separated by commas.--source: Download the source archive instead of a prebuilt binary release.--all: Extract all files from the archive instead of selecting a single target file.--quiet: Reduce normal command output for scripting or batch use.
install additionally supports:
--add: After a successful install, append the repo target to[packages.<name>]managed config.--name: Override the managed package name; for single executable assets, it also acts as the default output-name hint.
update additionally supports:
--all: Update all managed packages instead of a single target.--dry-run: Preview the update plan without performing installation changes.--interactive: Interactively select which managed packages to update.
Global options:
-v,--verbose: Show more execution details such as API requests, response summaries, asset selection, cache hits, and key workflow steps.
Notes:
install --namecan rename a single executable asset, for example installingchlog-windows-amd64.exeaschlog.exe.install --addonly applies to repo targets and appends the managed package definition after a successful install.- Argument order follows the
cflag/cappparser constraint and must beCMD --OPTIONS... ARGUMENTS....
The config file is resolved in this order:
EGET_CONFIG~/.config/eget/eget.toml- XDG / LocalAppData fallback path
- Legacy
~/.eget.toml
Supported config sections:
[global]["owner/repo"][packages.<name>]
Example:
[global]
target = "~/.local/bin"
cache_dir = "~/.cache/eget"
proxy_url = "http://127.0.0.1:7890"
system = "windows/amd64"
["inhere/markview"]
tag = "nightly"
[packages.markview]
repo = "inhere/markview"
target = "~/.local/bin"
tag = "nightly"
asset_filters = ["windows"]Common fields:
targetcache_dirproxy_urlsystemtagfileasset_filtersdownload_sourceallquietupgrade_only
Default initialization:
eget config initThis writes:
global.target = "~/.local/bin"global.cache_dir = "~/.cache/eget"global.proxy_url = ""
By default, the file is created at ~/.config/eget/eget.toml.
Directory semantics:
targetis the default install directorycache_diris the default download cache directoryproxy_urlis the global proxy for remote requests; both GitHub lookups and remote downloads use itdownloadusescache_dirby default when--tois not providedinstallanddownloadwill reuse cached remote download contents fromcache_dirwhen available
The installed-state store also defaults to ~/.config/eget/installed.toml.
make build
make testThe current version has been restructured into an explicit subcommand CLI, with the entry point in cmd/eget/main.go and business logic concentrated under internal/.
cmd/eget: command entry pointinternal/cli:cappcommand registration and argument bindinginternal/app: install/add/list/update/config use-case orchestrationinternal/install: find, download, verify, and extract execution pipelineinternal/config: config loading, merging, and persistenceinternal/installed: installed-state storageinternal/source/github: GitHub asset discovery
For more details, see docs/DOCS.md.