A fast, sudo-less package manager for your terminal programs. Downloads directly from GitHub. Supports macOS, Linux, and containers.
- Add a package to the local repository. For example,
~/.grab/repository/fzf.yml
:
apiVersion: grab.noizwaves.com/v1alpha1
kind: Package
metadata:
name: fzf
spec:
gitHubRelease:
org: junegunn
repo: fzf
name: "{{ .Version }}"
versionRegex: \d+\.\d+\.\d+
fileName:
darwin,amd64: fzf-{{ .Version }}-darwin_amd64.zip
darwin,arm64: fzf-{{ .Version }}-darwin_arm64.zip
linux,amd64: fzf-{{ .Version }}-linux_amd64.tar.gz
linux,arm64: fzf-{{ .Version }}-linux_arm64.tar.gz
program:
versionArgs: [--version]
versionRegex: \d+\.\d+\.\d+
- Add the version to install to
~/.grab/config.yml
:
packages:
fzf: "0.45.0"
- Run
go build -o ~/.local/bin/grab main.go
- Run
grab install
to install all programs. - Use the installed program:
❯ which fzf
/home/adam/.local/bin/fzf
- Run
grab update
to update the config file with the latest upstream versions. - Run
grab install
to install the updated versions.
Important
update
uses the GitHub API which has a low rate limit of 60 requests/hour for anonymous users. To avoid the rate limit, generate a token with public read-only permission and set the value via the GH_TOKEN
environment variable.
- Install
goenv
- Run
./setup.sh
- Generate a GitHub token and set it as the
GH_TOKEN
environment variable