Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
B

bin

> 包管理
Open source

Effortless binary manager

1.3K stars0 likes1 views
WebsiteGitHub

About

Effortless binary manager

bin - Effortless Binary Manager

A lightweight, cross-platform binary manager that simplifies downloading, installing, and managing binaries without requiring root privileges.

Why bin?

Modern development tools are increasingly distributed as single binary releases thanks to languages like Go, Rust, and Deno. While this makes distribution easier, it creates challenges for updates and tracking.

bin solves these problems by:

  • Zero Configuration: Works out of the box without complex setup, scoring & filtering found the right package
  • No Root Required: Install binaries to user directories without sudo
  • Version Management: Track, update, and rollback binary versions
  • Lightweight: Minimal overhead compared to manually download and install releases
  • Multiple Sources:
    • GitHub Releases
    • Gitlab Releases
    • Codeberg Releases
    • Docker Images
    • HTTP Releases (Hashicorp, Helm)
    • Go Install

For a comprehensive list, see the Tools Wiki.

Installation

Quick Install

  1. Download bin from the releases
  2. Run ./bin install github.com/marcosnils/bin so bin is managed by bin itself
  3. Run bin ls to make sure bin has been installed correctly. You can now remove the first file you downloaded.
  4. Enjoy!

Quick install from Scoop (Windows)

Run these commands to install bin from scoop.

bash
scoop bucket add extras
scoop install extras/bin

Commands Reference

Command Description Example
bin install [path] Install binary from GitHub or Docker bin install github.com/cli/cli
bin list List installed binaries and versions bin list
bin update [binary...] Update binaries (all or specified) bin update
bin remove Remove one or more binaries bin remove gh kubectl
bin ensure Ensure all configured binaries are present bin ensure
bin pin Pin current version (prevent updates) bin pin terraform
bin unpin Unpin binaries (allow updates) bin unpin terraform
bin prune Remove missing binaries from database bin prune
bin help Show help for any command bin help install

Tips: if bin is unable to found the right package, try bin install -a to show all possible download options (skip scoring & filtering).

Supported providers

GitHub Releases

Github provider will use Github API to found releases matching your workstation specs.

At the moment, bin does only consider the latest release from Github according to the following definition:

The latest release is the most recent non-prerelease, non-draft release, sorted by the created_at attribute. The created_at attribute is the date of the commit used for the release, and not the date when the release was drafted or published.

You can however install a specific pre-release by specifying the URL for the pre-release, e.g. bin install https://github.com/bufbuild/buf/releases/tag/v0.40.0.

Configuration

Environment Variable Mandatory Description
GITHUB_AUTH_TOKEN no set a token. The access token used with bin does not need any scopes to avoid rate limit or if you need to download from private repo**
GHES_BASE_URL no github enterprise base URL (often is your GitHub Enterprise hostname).
GHES_UPLOAD_URL no github enterprise upload URL (often is your GitHub Enterprise hostname).
GHES_AUTH_TOKEN no github enterprise auth token similar to GITHUB_AUTH_TOKEN.

Usage

bash
# installs latest Kind release
bin install github.com/kubernetes-sigs/kind

# installs a specific release
bin install github.com/kubernetes-sigs/kind/releases/tag/v0.8.0

# installs latest on a specific path
bin install github.com/kubernetes-sigs/kind ~/bin/kind

# installs latest on a specific path and show all possible download options (skip scoring & filtering)
bin install -a github.com/yt-dlp/yt-dlp

or explicit

bash
bin install --provider github github.companyname.com/custom/repo

Gitlab Releases

Gitlab provider will use Gitlab API to found releases matching your workstation specs

Configuration

Environment Variable Mandatory Description
GITLAB_TOKEN yes now gitlab enforce token usage and don't have public api, you could setup a personal access token, a GAT or a PAT

Usage

bash
bin install gitlab.com/gitlab-org/cli

or explicit

bash
bin install --provider gitlab gitlab.companyname.com/custom/repo

Codeberg Releases

Codeberg provider uses the Gitea/Forgejo API (GitHub-compatible) to find releases matching your workstation specs. Codeberg is a free and open-source alternative to GitHub, hosted at codeberg.org.

Configuration

Environment Variable Mandatory Description
CODEBERG_TOKEN no set a token for authentication. Useful for rate limiting or private repos

Usage

bash
# installs latest mergiraf release
bin install codeberg.org/mergiraf/mergiraf

# installs a specific release
bin install codeberg.org/mergiraf/mergiraf/releases/tag/v1.0.0

# installs latest on a specific path
bin install codeberg.org/mergiraf/mergiraf ~/bin/mergiraf

or explicit

bash
bin install --provider codeberg codeberg.org/custom/repo

Docker Images

Docker is also supported or any Docker client compatible runtime.

Configuration

Any variable supported by Docker, see https://docs.docker.com/reference/cli/docker/

Usage

bash
# install the `light` tag for terraform
bin install docker://hashicorp/terraform:light

# install the latest version of calico/node
bin install docker://quay.io/calico/node

For other runtime (like Podman) or for remote docker engine, simply export DOCKER_HOST envvar:

bash
export DOCKER_HOST="unix:///path/to/unix/socket"
bin install docker://quay.io/calico/node

HTTP Releases

Configuration

None.

Usage

Some projects distribute their binaries from a plain HTTP download page instead of GitHub-style release assets. bin supports these through dedicated HTTP providers, selected automatically by host:

  • releases.hashicorp.com (Terraform, Vault, ...)
  • get.helm.sh (Helm)
bash
bin install releases.hashicorp.com/terraform
bin install get.helm.sh

To install a specific version, use the versioned URL (the binary matching your platform is selected automatically):

bash
bin install https://releases.hashicorp.com/terraform/1.5.7 ~/bin/terraform-1.5.7
bin install https://get.helm.sh/helm-v3.16.3-linux-amd64.tar.gz ~/bin/helm-3.16.3

Go Install

Configuration

Ensure go is present in your PATH.

Usage

bin runs go install @ into a private GOBIN, reads the installed version from the binary's build info and copies it to your dest. Your own GOPATH/bin or GOBIN is not touched.

The path can point at a package inside a module (for example cmd/), go resolves the containing module. The ref defaults to latest and can be a tag, branch or commit; bin update follows that ref, so @main tracks the branch and @v0.1.8 stays put.

bash
bin install goinstall://github.com/jrhouston/[email protected]
bin install goinstall://github.com/googleapis/api-linter/v2/cmd/api-linter

Version resolution goes through the go toolchain, so GOPROXY, GOPRIVATE and GOFLAGS are honoured.

Configuration

Configuration file

bin maintains a configuration file to track installed binaries.

Linux/MacOS

Path to the configuration directory respects the XDG Base Directory specification using the following strategy:

  • Honor BIN_CONFIG is set
  • To prevent breaking of existing configurations, check if $HOME/.bin/config.json exists and return $HOME/.bin
  • If XDG_CONFIG_HOME is set, return $XDG_CONFIG_HOME/bin
  • If $HOME/.config exists, return $home/.config/bin
  • Default to $HOME/.bin/

Windows

Same than linux but uses %USERPROFILE% without XDG_CONFIG_HOME.

Binary Storage

By default, bin stores binaries in:

  • Linux/macOS: ~/.local/bin/
  • Windows: %LOCALAPPDATA%\bin\

Ensure this directory is in your $PATH.

Contributing

There are some bugs, and the code has not been tested due to a lack of time, but contributions are welcome, and I’ll be happy to discuss and review them.

  • Report bugs or request features via GitHub Issues
  • Submit pull requests for improvements
  • Update documentation

Development Setup

bash
# Clone the repository
git clone https://github.com/marcosnils/bin.git
cd bin

# Clean and init
make clean download

# Run syntax check
make lint verify

# Run tests
make test

# Build from source
make build

License

This proj

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Goclipackage-managerprebuilt-binariesreleases

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category包管理
PricingOpen source

> Related tools

N
npm
Node.js 默认包管理器
P
pnpm
高效节省磁盘的 Node 包管理器
I
is-gif
Check if a Buffer/Uint8Array is a GIF image