{"id":13500398,"url":"https://github.com/marcosnils/bin","last_synced_at":"2026-04-18T06:12:16.846Z","repository":{"id":37499408,"uuid":"266547868","full_name":"marcosnils/bin","owner":"marcosnils","description":"Effortless binary manager","archived":false,"fork":false,"pushed_at":"2025-04-23T03:59:53.000Z","size":353,"stargazers_count":758,"open_issues_count":61,"forks_count":48,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-23T04:32:53.774Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcosnils.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-24T13:35:11.000Z","updated_at":"2025-04-23T03:59:39.000Z","dependencies_parsed_at":"2023-10-02T19:56:41.623Z","dependency_job_id":"4a2b4206-01dc-476a-b711-3f554ae2d94d","html_url":"https://github.com/marcosnils/bin","commit_stats":{"total_commits":178,"total_committers":30,"mean_commits":5.933333333333334,"dds":0.4719101123595506,"last_synced_commit":"94bbdcac69f74abb8b3d9e5dcc0fcb22d72d6782"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosnils%2Fbin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosnils%2Fbin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosnils%2Fbin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosnils%2Fbin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcosnils","download_url":"https://codeload.github.com/marcosnils/bin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254270646,"owners_count":22042859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T22:00:58.767Z","updated_at":"2026-04-18T06:12:16.840Z","avatar_url":"https://github.com/marcosnils.png","language":"Go","funding_links":[],"categories":["Go","others","📦 Package Managers","\u003ca name=\"package-manager\"\u003e\u003c/a\u003ePackage managers"],"sub_categories":["☸️ Kubernetes"],"readme":"# bin - Effortless Binary Manager\n\n[![GitHub release](https://img.shields.io/github/release/marcosnils/bin.svg)](https://github.com/marcosnils/bin/releases)\n[![Go Report Card](https://goreportcard.com/badge/github.com/marcosnils/bin)](https://goreportcard.com/report/github.com/marcosnils/bin)\n[![License](https://img.shields.io/github/license/marcosnils/bin.svg)](https://github.com/marcosnils/bin/blob/main/LICENSE)\n\nA lightweight, cross-platform binary manager that simplifies downloading, installing, and managing binaries without requiring root privileges.\n\n![bin](https://user-images.githubusercontent.com/1578458/87901619-ee629a80-ca2d-11ea-8609-8a8eb39801d2.gif)\n\n## 🚀 Why bin?\n\nModern development tools are increasingly distributed as single binary releases thanks to languages like Go, Rust, and Deno.\nWhile this makes distribution easier, it creates challenges for updates and tracking.\n\n`bin` solves these problems by:\n\n- **Zero Configuration**: Works out of the box without complex setup, scoring \u0026 filtering found the right package\n- **No Root Required**: Install binaries to user directories without `sudo`\n- **Version Management**: Track, update, and rollback binary versions\n- **Lightweight**: Minimal overhead compared to manually download and install releases\n- **Multiple Sources**:\n  - [GitHub Releases](#github-releases)\n  - [Gitlab Releases](#gitlab-releases)\n  - [Codeberg Releases](#codeberg-releases)\n  - [Docker Images](#docker-images)\n  - [Hashicorp Releases](#hashicorp-releases)\n  - [Go Install](#go-install)\n\nFor a comprehensive list, see the [Tools Wiki](https://github.com/marcosnils/bin/wiki/Tools-list).\n\n## 📦 Installation\n\n### Quick Install\n\n1. Download `bin` from the [releases](https://github.com/marcosnils/bin/releases)\n2. Run `./bin install github.com/marcosnils/bin` so `bin` is managed by `bin` itself\n3. Run `bin ls` to make sure bin has been installed correctly. You can now remove the first file you downloaded.\n4. Enjoy!\n\n### Quick install from Scoop (Windows)\n\nRun these commands to install `bin` from `scoop`.\n\n```bash\nscoop bucket add extras\nscoop install extras/bin\n```\n\n## 📚 Commands Reference\n\n| Command                     | Description                                | Example                          |\n| --------------------------- | ------------------------------------------ | -------------------------------- |\n| `bin install \u003crepo\u003e [path]` | Install binary from GitHub or Docker       | `bin install github.com/cli/cli` |\n| `bin list`                  | List installed binaries and versions       | `bin list`                       |\n| `bin update [binary...]`    | Update binaries (all or specified)         | `bin update`                     |\n| `bin remove \u003cbinary...\u003e`    | Remove one or more binaries                | `bin remove gh kubectl`          |\n| `bin ensure`                | Ensure all configured binaries are present | `bin ensure`                     |\n| `bin pin \u003cbinary...\u003e`       | Pin current version (prevent updates)      | `bin pin terraform`              |\n| `bin unpin \u003cbinary...\u003e`     | Unpin binaries (allow updates)             | `bin unpin terraform`            |\n| `bin prune`                 | Remove missing binaries from database      | `bin prune`                      |\n| `bin help`                  | Show help for any command                  | `bin help install`               |\n\n**Tips**: if `bin` is unable to found the right package, try `bin install -a` to show all possible download options (skip scoring \u0026 filtering).\n\n## 🎯 Supported providers\n\n### GitHub Releases\n\nGithub provider will use Github API to found releases matching your workstation specs.\n\nAt the moment, `bin` does only consider the [latest release from Github](https://docs.github.com/en/rest/reference/repos#get-the-latest-release) according to the following definition:\n\n\u003e 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.\n\nYou _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`.\n\n#### Configuration\n\n| Environment Variable | Mandatory | Description                                                                                                                                                                                                                                |\n| -------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `GITHUB_AUTH_TOKEN`  | no        | set a [token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-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\\*\\* |\n| `GHES_BASE_URL`      | no        | [github enterprise](https://github.com/github/gh-es) base URL (often is your GitHub Enterprise hostname).                                                                                                                                  |\n| `GHES_UPLOAD_URL`    | no        | [github enterprise](https://github.com/github/gh-es) upload URL (often is your GitHub Enterprise hostname).                                                                                                                                |\n| `GHES_AUTH_TOKEN`    | no        | [github enterprise](https://github.com/github/gh-es) auth token similar to `GITHUB_AUTH_TOKEN`.                                                                                                                                            |\n\n#### Usage\n\n```shell\n# installs latest Kind release\nbin install github.com/kubernetes-sigs/kind\n\n# installs a specific release\nbin install github.com/kubernetes-sigs/kind/releases/tag/v0.8.0\n\n# installs latest on a specific path\nbin install github.com/kubernetes-sigs/kind ~/bin/kind\n\n# installs latest on a specific path and show all possible download options (skip scoring \u0026 filtering)\nbin install -a github.com/yt-dlp/yt-dlp\n```\n\nor explicit\n\n```shell\nbin install --provider github github.companyname.com/custom/repo\n```\n\n### Gitlab Releases\n\nGitlab provider will use Gitlab API to found releases matching your workstation specs\n\n#### Configuration\n\n| Environment Variable | Mandatory | Description                                                                                                                                                                                                                                                                                                                   |\n| -------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `GITLAB_TOKEN`       | yes       | now gitlab enforce token usage and don't have public api, you could setup a [personal access token](https://docs.gitlab.com/user/profile/personal_access_tokens/), a [GAT](https://docs.gitlab.com/user/group/settings/group_access_tokens/) or a [PAT](https://docs.gitlab.com/user/project/settings/project_access_tokens/) |\n\n#### Usage\n\n```shell\nbin install gitlab.com/gitlab-org/cli\n```\n\nor explicit\n\n```shell\nbin install --provider gitlab gitlab.companyname.com/custom/repo\n```\n\n### Codeberg Releases\n\nCodeberg 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](https://codeberg.org).\n\n#### Configuration\n\n| Environment Variable | Mandatory | Description                                                                                                               |\n| -------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------- |\n| `CODEBERG_TOKEN`     | no        | set a [token](https://docs.codeberg.org/advanced/access-token/) for authentication. Useful for rate limiting or private repos |\n\n#### Usage\n\n```shell\n# installs latest mergiraf release\nbin install codeberg.org/mergiraf/mergiraf\n\n# installs a specific release\nbin install codeberg.org/mergiraf/mergiraf/releases/tag/v1.0.0\n\n# installs latest on a specific path\nbin install codeberg.org/mergiraf/mergiraf ~/bin/mergiraf\n```\n\nor explicit\n\n```shell\nbin install --provider codeberg codeberg.org/custom/repo\n```\n\n### Docker Images\n\nDocker is also supported or any Docker client compatible runtime.\n\n#### Configuration\n\nAny variable supported by Docker, see [https://docs.docker.com/reference/cli/docker/](https://docs.docker.com/reference/cli/docker/)\n\n#### Usage\n\n```shell\n# install the `light` tag for terraform\nbin install docker://hashicorp/terraform:light\n\n# install the latest version of calico/node\nbin install docker://quay.io/calico/node\n```\n\nFor other runtime (like Podman) or for remote docker engine, simply export `DOCKER_HOST` envvar:\n\n```shell\nexport DOCKER_HOST=\"unix:///path/to/unix/socket\"\nbin install docker://quay.io/calico/node\n```\n\n### Hashicorp Releases\n\n#### Configuration\n\nNone.\n\n#### Usage\n\nHashicorp have a [dedicated releases](https://releases.hashicorp.com) page and don't use github/lab releases, `bin` support it.\n\n```shell\nbin install --provider hashicorp https://releases.hashicorp.com/terraform/1.12.1\n```\n\nIf you need multiple versions, specify a destination\n\n```shell\nbin install --provider hashicorp https://releases.hashicorp.com/terraform/1.5.7 ~/bin/terraform-1.5.7\nbin install --provider hashicorp https://releases.hashicorp.com/terraform/1.12.1 ~/bin/terraform-1.12.1\n```\n\n### Go Install\n\n#### Configuration\n\nEnsure `go` is present in your `PATH`.\n\n#### Usage\n\n`bin` will run go install, and copy the file from `GOPATH` to your dest.\n\n```shell\nbin install goinstall://github.com/jrhouston/tfk8s@v0.1.8\n```\n\n## 🔧 Configuration\n\n### Configuration file\n\n`bin` maintains a configuration file to track installed binaries.\n\n#### Linux/MacOS\n\nPath to the configuration directory respects the `XDG Base Directory specification` using the following strategy:\n\n- Honor `BIN_CONFIG` is set\n- To prevent breaking of existing configurations, check if `$HOME/.bin/config.json` exists and return `$HOME/.bin`\n- If `XDG_CONFIG_HOME` is set, return `$XDG_CONFIG_HOME/bin`\n- If `$HOME/.config` exists, return `$home/.config/bin`\n- Default to `$HOME/.bin/`\n\n#### Windows\n\nSame than linux but uses `%USERPROFILE%` without `XDG_CONFIG_HOME`.\n\n### Binary Storage\n\nBy default, `bin` stores binaries in:\n\n- **Linux/macOS**: `~/.local/bin/`\n- **Windows**: `%LOCALAPPDATA%\\bin\\`\n\nEnsure this directory is in your `$PATH`.\n\n## 🤝 Contributing\n\nThere 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.\n\n- Report bugs or request features via [GitHub Issues](https://github.com/marcosnils/bin/issues)\n- Submit pull requests for improvements\n- Update documentation\n\n### Development Setup\n\n```shell\n# Clone the repository\ngit clone https://github.com/marcosnils/bin.git\ncd bin\n\n# Clean and init\nmake clean download\n\n# Run syntax check\nmake lint verify\n\n# Run tests\nmake test\n\n# Build from source\nmake build\n```\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 📋 Rationale\n\n`bin` started as an idea given the popularity of single binary releases due to the surge of languages like Go, Rust, Deno, etc which can easily produce dynamically and statically compiled binaries.\n\nI found myself downloading binaries (or tarballs) directly from VCS (Github mostly) and then it was hard to keep control and update such dependencies whenever a new version was released. So, with the objective to solve that problem and also looking for something that will allow me to get the latest releases, I created `bin`.\n\nIn addition to that, I was also looking for something that doesn't require `sudo` or `root` privileges to install these binaries as downloading, making them executable and storing it somewhere in your PATH would be sufficient.\n\nAfter I finished the first MVP, a friend pointed out that [brew](https://brew.sh) was now supported in linux which almost made me abandon the project. After checking out brew (never been an osx user), I found it a bit bloated and seems to be doing way more than what I'm actually needing. So, I've decided to continue `bin` and hopefully add more features that could result useful to someone else.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcosnils%2Fbin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcosnils%2Fbin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcosnils%2Fbin/lists"}