{"id":17720215,"url":"https://github.com/Gelio/go-global-update","last_synced_at":"2025-03-14T04:30:41.532Z","repository":{"id":39912252,"uuid":"400968257","full_name":"Gelio/go-global-update","owner":"Gelio","description":"A command to update globally installed go executables","archived":false,"fork":false,"pushed_at":"2024-09-13T10:27:16.000Z","size":134,"stargazers_count":141,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-13T23:48:17.079Z","etag":null,"topics":["cli","go","golang","update-checker"],"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/Gelio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2021-08-29T06:27:11.000Z","updated_at":"2024-09-13T10:24:47.000Z","dependencies_parsed_at":"2024-06-10T09:29:12.888Z","dependency_job_id":"c876128e-a256-46ca-840e-7e5b11b5d2bb","html_url":"https://github.com/Gelio/go-global-update","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gelio%2Fgo-global-update","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gelio%2Fgo-global-update/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gelio%2Fgo-global-update/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gelio%2Fgo-global-update/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gelio","download_url":"https://codeload.github.com/Gelio/go-global-update/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243526246,"owners_count":20305107,"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":["cli","go","golang","update-checker"],"created_at":"2024-10-25T15:26:31.943Z","updated_at":"2025-03-14T04:30:36.494Z","avatar_url":"https://github.com/Gelio.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# go-global-update\n\n![go-global-update screenshot](https://user-images.githubusercontent.com/889383/161372879-8cf4bd33-ced2-45ad-a27d-888b15ae0dbc.png)\n\nUpdate globally installed go binaries.\n\nThe missing go command similar to `npm -g update` or\n[cargo install-update](https://github.com/nabijaczleweli/cargo-update).\n\n## Table of contents\n\n\u003c!-- toc --\u003e\n\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Upgrading `go-global-update`](#upgrading-go-global-update)\n- [Troubleshooting](#troubleshooting)\n- [How it works](#how-it-works)\n- [Alternative tools](#alternative-tools)\n- [Contributing](#contributing)\n\n\u003c!-- tocstop --\u003e\n\n## Requirements\n\n- Go 1.16 or higher\n\n## Installation\n\n```sh\ngo install github.com/Gelio/go-global-update@latest\n```\n\n## Usage\n\nRunning\n\n```sh\ngo-global-update\n```\n\nwill print information about currently installed global binaries and attempt to\nupgrade those that have newer versions.\n\nYou can also do a dry run without update the binaries:\n\n```sh\ngo-global-update --dry-run\n```\n\nor update just a handful of binaries:\n\n```sh\ngo-global-update gofumpt\n```\n\nFor more information, see\n\n```sh\ngo-global-update --help\n```\n\n## Upgrading `go-global-update`\n\n`go-global-update` will take care of updating itself when it updates other\nbinaries.\n\n## Troubleshooting\n\nDo you have problems updating some binaries using `go-global-update`? Take a\nlook at [TROUBLESHOOTING.md](./TROUBLESHOOTING.md) for more information.\n\n## How it works\n\n`go-global-update` consists of the following steps:\n\n1. Determine binaries to inspect.\n\n   Either use the list of provided arguments or all executables installed in\n   your `go env GOBIN` (or `$(go env GOPATH)/bin`).\n\n1. Inspect where each executable came from (by running\n   `go version -m [executable name]` and checking the `path`),\n\n1. Check the latest version for each binary using\n   `go list -m -f \"{{.Version}}\" [path]`\n\n1. If the binary has a newer version, run `go install [package path]@latest` to\n   update it.\n\n## Alternative tools\n\n`go-global-update` is not the only tool trying to solve the problem of updating\nglobally-installed go binaries. The alternatives are:\n\n- [gup](https://github.com/nao1215/gup)\n\n  Advantages:\n\n  - includes desktop notifications\n  - has a subcommand to remove a binary\n  - has a way to export/import a list of binaries\n\n  Disadvantages:\n\n  - does not offer troubleshooting information when an upgrade fails\n  - does not report error logs from failed updates\n  - updates binaries installed from source (potentially overwrites locally-made\n    changes)\n\n- [binstale](https://github.com/shurcooL/binstale)\n\n  Disadvantages:\n\n  - seems not to detect globally-installed binaries using go modules\n\n    ```sh\n    $ binstale\n    binstale\n         (no source package found)\n    go-global-update\n         stale: github.com/Gelio/go-global-update (stale dependency: github.com/Gelio/go-global-update/internal/colors)\n    gofumpt\n         (no source package found)\n    gotop\n         (no source package found)\n    misspell\n         (no source package found)\n    shfmt\n    ```\n\n## Contributing\n\nContributions are welcome! See [CONTRIBUTING.md](./CONTRIBUTING.md) for more\ninformation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGelio%2Fgo-global-update","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGelio%2Fgo-global-update","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGelio%2Fgo-global-update/lists"}