{"id":13713696,"url":"https://github.com/kevincobain2000/gobrew","last_synced_at":"2025-05-15T10:00:27.304Z","repository":{"id":40488390,"uuid":"339000543","full_name":"kevincobain2000/gobrew","owner":"kevincobain2000","description":"Go version manager, written in Go. Super simple tool to install and manage Go versions. Install go without root. Gobrew doesn't require shell rehash.","archived":false,"fork":false,"pushed_at":"2025-05-06T19:01:32.000Z","size":446,"stargazers_count":392,"open_issues_count":0,"forks_count":28,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-06T20:19:46.000Z","etag":null,"topics":["env","go","goenv","golang","golang-cli","golang-package","golang-tools","install","management"],"latest_commit_sha":null,"homepage":"https://medium.com/web-developer/go-version-manager-gobrew-c8750157dfe6","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/kevincobain2000.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-02-15T07:40:25.000Z","updated_at":"2025-04-28T13:04:40.000Z","dependencies_parsed_at":"2023-10-10T20:46:18.924Z","dependency_job_id":"940dfdbb-92a1-4232-bc42-bf75d45015f3","html_url":"https://github.com/kevincobain2000/gobrew","commit_stats":null,"previous_names":[],"tags_count":77,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevincobain2000%2Fgobrew","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevincobain2000%2Fgobrew/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevincobain2000%2Fgobrew/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevincobain2000%2Fgobrew/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevincobain2000","download_url":"https://codeload.github.com/kevincobain2000/gobrew/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319715,"owners_count":22051072,"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":["env","go","goenv","golang","golang-cli","golang-package","golang-tools","install","management"],"created_at":"2024-08-02T23:01:42.294Z","updated_at":"2025-05-15T10:00:26.756Z","avatar_url":"https://github.com/kevincobain2000.png","language":"Go","funding_links":[],"categories":["Software Packages","Go","软件包","Repositories","Go Tools"],"sub_categories":["DevOps Tools","DevOps 工具"],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/kevincobain2000/gobrew\"\u003e\n    \u003cimg alt=\"gobrew\" src=\"https://imgur.com/WkKYQPI.png\" width=\"360\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  Go version manager, written in Go\u003cbr\u003e\n  Update and switch Go versions easily\u003cbr\u003e\n  Install Go on Linux or Mac (intel) or Mac with Apple chip (M1 to M4) or Windows\n\u003c/p\u003e\n\n**Quick Setup:** One command to install Go and manage versions.\n\n**Hassle Free:** Doesn't require root or sudo, or shell re-hash.\n\n**Platform:** Supports (arm64, arch64, Mac, Mac M1, Ubuntu and Windows).\n\n**Flexible:** Manage multiple Go versions including beta and rc.\n\n**Colorful:** Colorful output.\n\n![CI](https://github.com/kevincobain2000/gobrew/actions/workflows/build.yml/badge.svg)\n\n## Install or update\n\n### Step 1\n\n**Using** curl (mac, linux) - recommended\n\n```sh\ncurl -sL https://raw.githubusercontent.com/kevincobain2000/gobrew/master/git.io.sh | bash\n```\n\n**Using** powershell (windows)\n\n```powershell\nSet-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/kevincobain2000/gobrew/master/git.io.ps1'))\n\n```\n\n**Using** go\n\n```sh\ngo install github.com/kevincobain2000/gobrew/cmd/gobrew@latest\n```\n\n### Step 2\n\nNow add `PATH` setting your shell config file (`.bashrc` or `.zshrc`).\n\n ```sh\nexport PATH=\"$HOME/.gobrew/current/bin:$HOME/.gobrew/bin:$PATH\"\n```\n\n**All DONE!**\n\nExecute `gobrew` command from any dir.\n\n```sh\ngobrew\n```\n\n### Quick Usage\n\nSimply use command `gobrew` from any dir. It will auto detect if Go version is set, or not latest, or not same as `go.mod` file.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/kevincobain2000/gobrew\"\u003e\n    \u003cimg alt=\"gobrew command\" src=\"https://imgur.com/vaqbS5o.png\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\n### Full Usage\n\n\n**Smart command**\n\n```sh\ngobrew\n```\n\n**Specific commands**\n\nWill install and set Go\n\n```sh\ngobrew use 1.16\n```\n\nWill automatically install and set Go\n\n```sh\ngobrew use mod #from go.mod\ngobrew use latest #latest stable\ngobrew use dev-latest #latest of latest including rc|beta\n```\n\nWill only install it\n\n```sh\ngobrew install 1.16\ngobrew use 1.16\n```\n\nUninstall a version\n\n```sh\ngobrew uninstall 1.16\n```\n\nList installed versions `gobrew ls`\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/kevincobain2000/gobrew\"\u003e\n    \u003cimg alt=\"gobrew command\" src=\"https://imgur.com/qCuaUMD.png\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\n\nList available versions `gobrew ls-remote`\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/kevincobain2000/gobrew\"\u003e\n    \u003cimg alt=\"gobrew command\" src=\"https://imgur.com/5FcBGUA.png\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\n# All commands\n\n```sh\n╰─$ gobrew help\n\ngobrew 1.10.7\n\nUsage:\n\n    gobrew use \u003cversion\u003e           Install and set \u003cversion\u003e\n    gobrew ls                      Alias for list\n    gobrew ls-remote               List remote versions (including rc|beta versions)\n\n    gobrew install \u003cversion\u003e       Only install \u003cversion\u003e (binary from official or GOBREW_REGISTRY env)\n    gobrew uninstall \u003cversion\u003e     Uninstall \u003cversion\u003e\n    gobrew list                    List installed versions\n    gobrew self-update             Self update this tool\n    gobrew prune                   Uninstall all go versions except current version\n    gobrew version                 Show gobrew version\n    gobrew help                    Show this message\n\nExamples:\n    gobrew use 1.16                # use go version 1.16\n    gobrew use 1.16.1              # use go version 1.16.1\n    gobrew use 1.16rc1             # use go version 1.16rc1\n\n    gobrew use 1.16@latest         # use go version latest of 1.16\n\n    gobrew use 1.16@dev-latest     # use go version latest of 1.16, including rc and beta\n                                   # Note: rc and beta become no longer latest upon major release\n\n    gobrew use mod                 # use go version listed in the go.mod file\n    gobrew use latest              # use go version latest available\n    gobrew use dev-latest          # use go version latest avalable, including rc and beta\n\nInstallation Path:\n\n# Add gobrew to your ~/.bashrc or ~/.zshrc\nexport PATH=\"$HOME/.gobrew/current/bin:$HOME/.gobrew/bin:$PATH\"\nexport GOROOT=\"$HOME/.gobrew/current/go\"\n```\n\n# Uninstall gobrew\n\n```sh\nrm -rf $HOME/.gobrew\n```\n\n# Use it in Github Actions\n\nFor more details: https://github.com/kevincobain2000/action-gobrew\n\n```yaml\non: [push]\nname: CI\njobs:\n  test:\n    strategy:\n      matrix:\n        go-version: [1.13, 1.18, 1.18@latest, 1.19beta1, 1.19@dev-latest, latest, dev-latest, mod]\n        os: [ubuntu-latest, macos-latest]\n    runs-on: ${{ matrix.os }}\n    steps:\n      - uses: actions/checkout@v2\n      - uses: kevincobain2000/action-gobrew@v2\n        with:\n          version: ${{ matrix.go-version }}\n\n      - name: Go\n        run: go version\n```\n\n# Using Bash completions\n\n```sh\ncurl https://raw.githubusercontent.com/kevincobain2000/gobrew/master/completions/bash/gobrew-completion \u003e /usr/local/etc/bash_completion.d/gobrew\n\n# or\ncurl https://raw.githubusercontent.com/kevincobain2000/gobrew/master/completions/bash/gobrew-completion \u003e\u003e ~/.zshrc\n\n# or\ncurl https://raw.githubusercontent.com/kevincobain2000/gobrew/master/completions/bash/gobrew-completion \u003e\u003e ~/.bashrc\n```\n\n# Customization\n\nBy default, gobrew is installed in `$HOME` as `$HOME/.gobrew`.\n\nYou can change this by setting the `GOBREW_ROOT` environment variable.\n\n```sh\n# optionally set\necho \"export GOBREW_ROOT=/usr/local/share\" \u003e\u003e ~/.bashrc\n# optionally set\necho \"export GOBREW_ROOT=/usr/local/share\" \u003e\u003e ~/.zshrc\n\n\n#then\ncurl -sLk https://raw.githubusercontent.com/kevincobain2000/gobrew/master/git.io.sh | sh\n```\n\nSet `GOROOT` and `GOPATH` in your shell config file (`.bashrc` or `.zshrc`).\n\n```sh\n# optionally set\nexport GOROOT=\"$HOME/.gobrew/current/go\"\n# optionally set\nexport GOPATH=\"$HOME/.gobrew/current/go\"\n```\n\n# CHANGELOG\n\n- **v1.2.0** - Added rc|beta versions, appended at the end of list\n- **v1.5.0** - Mac M1 support\n- **v1.5.5** - arm|M1|darwin support added\n- **v1.5.8** - Show download progress and use Go's compression instead of tar command\n- **v1.6.0** - Added support for @latest and @dev-latest and progress bar for download\n- **v1.6.2** - Using goreleaser #35 by @juev\n- **v1.6.3** - Added latest and dev-latest\n- **v1.6.4** - Github action publish\n- **v1.6.7** - Fixes rate limit issue\n- **v1.7.4** - Added 2 new options `gobrew version` and `gobrew prune`\n- **v1.7.5** - Fixes strange output on `gobrew use latest`\n- **v1.7.8** - Windows support, self-update fixes\n- **v1.7.9** - Windows fix ups and bash-completions\n- **v1.8.0** - Windows support, including actions\n- **v1.8.4** - Light background terminal support\n- **v1.8.6** - Fixes where 1.20.0 was detected as 1.20\n- **v1.9.0** - v1.8.6 ~ v1.9.0, updates colors packages, fixes UT issues for Github status codes\n- **v1.9.4** - `gobrew` interactive\n- **v1.9.8** - bug fix where 1.21 is not detected as 1.21.0\n- **v1.10.10** - `ls-remote` is blazing fast, cached.\n- **v1.10.11** - Optional options for cache and ttl.\n- **v1.10.12** - Icons on `gobrew` and install command.\n\n\n# DEVELOPMENT NOTES\n\n```sh\ngo run ./cmd/gobrew -h\ngolangci-lint run ./...\ngo test -v ./...\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevincobain2000%2Fgobrew","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevincobain2000%2Fgobrew","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevincobain2000%2Fgobrew/lists"}