{"id":47164422,"url":"https://github.com/getsavvyinc/upgrade-cli","last_synced_at":"2026-03-13T03:48:50.683Z","repository":{"id":221606262,"uuid":"754868296","full_name":"getsavvyinc/upgrade-cli","owner":"getsavvyinc","description":"Upgrade makes it easy to add an `upgrade` command to your go cli.","archived":false,"fork":false,"pushed_at":"2025-07-25T05:48:13.000Z","size":22,"stargazers_count":45,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-25T10:50:34.867Z","etag":null,"topics":["cli","cmd","cobra-cli","go","go-releaser","release","upgrade"],"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/getsavvyinc.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-02-08T23:02:12.000Z","updated_at":"2025-07-25T05:48:03.000Z","dependencies_parsed_at":"2024-02-18T19:23:09.729Z","dependency_job_id":"7b3f9faa-9c96-4ab7-97d9-a6162ff4234e","html_url":"https://github.com/getsavvyinc/upgrade-cli","commit_stats":null,"previous_names":["getsavvyinc/upgrade-cli"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/getsavvyinc/upgrade-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsavvyinc%2Fupgrade-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsavvyinc%2Fupgrade-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsavvyinc%2Fupgrade-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsavvyinc%2Fupgrade-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getsavvyinc","download_url":"https://codeload.github.com/getsavvyinc/upgrade-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsavvyinc%2Fupgrade-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30457187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T02:22:12.178Z","status":"ssl_error","status_checked_at":"2026-03-13T02:06:49.475Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","cmd","cobra-cli","go","go-releaser","release","upgrade"],"created_at":"2026-03-13T03:48:50.196Z","updated_at":"2026-03-13T03:48:50.675Z","avatar_url":"https://github.com/getsavvyinc.png","language":"Go","readme":"# UpgradeCLI\n\n\u003ch3 align=\"left\"\u003e\n  \u003ca href=\"https://getsavvy.so/discord\"\u003e Join #upgrade-cli on Discord\u003c/a\u003e\n\u003c/h3\u003e\n\n\nUpgradeCLI makes it easy to add an `upgrade` command to your cli.\n\nUpgradeCLI was built to implement the `upgrade` command for [Savvy's](https://getsavvy.so) OSS [CLI](https://github.com/getsavvyinc/savvy-cli).\n\n\u003e Savvy's CLI helps developers create and share high quality runbooks right from the terminal.\n\n## Install\n\n```sh\ngo get github.com/getsavvyinc/upgrade-cli\n\n```\n\n## Usage\n\n```go\npackage cmd\n\nimport (\n\t\"context\"\n\t\"os\"\n\n\t\"github.com/getsavvyinc/savvy-cli/config\"\n\t\"github.com/getsavvyinc/savvy-cli/display\"\n\t\"github.com/getsavvyinc/upgrade-cli\"\n\t\"github.com/spf13/cobra\"\n)\n\nconst owner = \"getsavvyinc\"\nconst repo = \"savvy-cli\"\n\n// upgradeCmd represents the upgrade command\nvar upgradeCmd = \u0026cobra.Command{\n\tUse:   \"upgrade\",\n\tShort: \"upgrade savvy to the latest version\",\n\tLong:  `upgrade savvy to the latest version`,\n\tRun: func(cmd *cobra.Command, args []string) {\n\t\texecutablePath, err := os.Executable()\n\t\tif err != nil {\n\t\t\tdisplay.Error(err)\n\t\t\tos.Exit(1)\n\t\t}\n\t\tversion := config.Version()\n\n\t\tupgrader := upgrade.NewUpgrader(owner, repo, executablePath)\n\n\t\tif ok, err := upgrader.IsNewVersionAvailable(context.Background(), version); err != nil {\n\t\t\tdisplay.Error(err)\n\t\t\treturn\n\t\t} else if !ok {\n\t\t\tdisplay.Info(\"Savvy is already up to date\")\n\t\t\treturn\n\t\t}\n\n\t\tdisplay.Info(\"Upgrading savvy...\")\n\t\tif err := upgrader.Upgrade(context.Background(), version); err != nil {\n\t\t\tdisplay.Error(err)\n\t\t\tos.Exit(1)\n\t\t} else {\n\t\t\tdisplay.Success(\"Savvy has been upgraded to the latest version\")\n\t\t}\n\t},\n}\n\nfunc init() {\n\trootCmd.AddCommand(upgradeCmd)\n}\n```\n\n## Requirements\n\n\u003e `upgrade-cli` is fully compatible with releases generated using [goreleaser](https://github.com/goreleaser/goreleaser).\n\n`upgrade-cli` makes the following assumptions about Relase Assets.\n\n* The checksum file has a `checksums.txt` suffix\n* The checksum file format matches the example below:\n\n```sh\n6796a0fb64d0c78b2de5410a94749a3bfb77291747c1835fbd427e8bf00f6af3  savvy_darwin_arm64\n3853c410eeee629f71a981844975700b2925ac7582bf5559c384c391be8abbcb  savvy_darwin_x86_64\n00637eae6cf7588d990d64113a02caca831ea5391ef6f66c88db2dfa576ca6bd  savvy_linux_arm64\n1e9c98dbb0f54ee06119d957fa140b42780aa330d11208ad0a21c2a06832eca3  savvy_linux_i386\n3040ff4c07dda6c7ff65f9476b57277b14a72d0b33381b35aa8810df3e1785ea  savvy_linux_x86_64\n```\n* The URL to download a binary asset for a particular $os, $arch ends with `$os_$arch`\n\n## Contributing\n\nAll contributions are welcome - bug reports, pull requests and ideas for improving the package.\n\n1. Join the `#upgrade-cli` channel on [Discord](https://getsavvy.so/discord)\n2. Open an [issue on GitHub](https://github.com/getsavvyinc/upgrade-cli/issues/new) to reports bugs or feature requests\n3. Please follow a [\"fork and pull request\"](https://docs.github.com/en/get-started/exploring-projects-on-github/contributing-to-a-project) workflow for submitting changes to the repository.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetsavvyinc%2Fupgrade-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetsavvyinc%2Fupgrade-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetsavvyinc%2Fupgrade-cli/lists"}