The install
Command
The install
command installs packages. You can specify the package name and version to install, install multiple packages at once, install the latest version of a package without specifying the
version, and install packages from a file generated by the load command.
$ huber install --help
Install packages
Usage: huber install [OPTIONS] <NAME_VERSION>...
Arguments:
<NAME_VERSION>... Package name (e.g. 'package-name', 'package-name@version')g. 'owner/repo', 'owner/repo@version') for unmanaged packages by repositories
Options:
-l, --log-level <LOG_LEVEL>
Log level [default: OFF]
--prefer-stdlib <PREFER_STDLIB>
Prefer standard library (only for Linux or Windows) [default: gnu] [possible values: gnu, musl]
--github-token <GITHUB_TOKEN>
GitHub token; Optional until reaching the rate limit of GitHub API [env: GITHUB_TOKEN=]
--github-key <GITHUB_KEY>
Github SSH key path; Optional, if you want to use SSH to clone the Huber repository [env: GITHUB_KEY=]
--huber-dir <HUBER_DIR>
Huber directory [default: /home/davidko/.huber]
--github-base-uri <GITHUB_BASE_URI>
GitHub base URI [env: GITHUB_BASE_URI=] [default: https://api.github.com]
-h, --help
Print help
Examples
Install a package
$ huber install k9s
[INFO ] k9s version not specified, getting the latest version (v0.32.7)
[INFO ] Installing package k9s@latest/v0.32.7
[INFO ] Downloading https://github.com/derailed/k9s/releases/download/v0.32.7/k9s_Linux_amd64.tar.gz
[INFO ] Installed executables of k9s:
[
"/home/davidko/.huber/bin/k9s",
]
[INFO ] k9s@latest/v0.32.7 installed
$ huber install k9s@v0.32.5
[INFO ] Installing package k9s@v0.32.5
[INFO ] Downloading https://github.com/derailed/k9s/releases/download/v0.32.5/k9s_Linux_amd64.tar.gz
[INFO ] Installed executables of k9s:
[
"/home/davidko/.huber/bin/k9s",
]
[INFO ] k9s@v0.32.5 installed
$ huber show
Name Version Current Kind
k9s v0.32.5 true Release
$ huber show --all
Name Version Current Kind
k9s v0.32.7 false Release
k9s v0.32.5 true Release
Install multiple packages
$ huber install k9s kubectl
[INFO ] kubectl version not specified, getting the latest version (v1.32.1)
[INFO ] Installing package kubectl@latest/v1.32.1
[INFO ] k9s version not specified, getting the latest version (v0.32.7)
[INFO ] Installing package k9s@latest/v0.32.7
[INFO ] Installed executables of k9s:
[
"/home/davidko/.huber/bin/k9s",
]
[INFO ] k9s@latest/v0.32.7 installed
[INFO ] Installed executables of kubectl:
[
"/home/davidko/.huber/bin/kubectl",
]
[INFO ] kubectl@latest/v1.32.1 installed
Install an unmanaged package directly from a repository
$ huber install rancher/rke
[INFO ] rancher/rke version not specified, getting the latest version (v1.7.2)
[INFO ] Installing package rancher/rke@latest/v1.7.2
[INFO ] Prefer downloading assets belonging to the specified stdlib: gnu
[INFO ] Downloading https://github.com/rancher/rke/releases/download/v1.7.2/rke_linux-amd64
[INFO ] Installed executables of rancher/rke:
[
"/home/davidko/.huber/bin/rke",
]
[INFO ] rancher/rke@latest/v1.7.2 installed
$ huber show
Name Version Current Kind
rancher/rke v1.7.2 true Release
Install a tag-only package which has no release
note
This kind of package is not supported by the update
command.
To install a different version, you need to specify the version to install the package.
$ huber install go
[WARN ] Failed to get the latest release version of go: GitHub
[INFO ] go version not specified, getting the latest version ()
[ERROR] Failed to get the latest release version of go to install; Use debug log to get more detailed error info
$ huber install go@go1.24.0
[WARN ] Failed to get the latest release version of go: GitHub
[INFO ] Installing package go@go1.24.0
[INFO ] Prefer downloading assets belonging to the specified stdlib: gnu
[INFO ] Downloading https://golang.org/dl/go1.24.0.linux-amd64.tar.gz
[INFO ] Installed executables of go:
[
"/home/davidko/.huber/bin/gofmt",
"/home/davidko/.huber/bin/go",
]
[INFO ] go@go1.24.0 installed
$ huber show
Name Version Current Kind
go go1.24.0 true