{"id":37176841,"url":"https://github.com/xuhe2/github520cli","last_synced_at":"2026-01-14T20:37:40.111Z","repository":{"id":276440932,"uuid":"929275922","full_name":"xuhe2/github520cli","owner":"xuhe2","description":"根据GitHub520项目接口实现一键更新hosts配置文件,支持MAC, Linux, Windows","archived":false,"fork":false,"pushed_at":"2025-05-08T03:21:34.000Z","size":156,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-08T04:25:41.153Z","etag":null,"topics":["config","dns","github","go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xuhe2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-02-08T06:50:00.000Z","updated_at":"2025-05-08T03:21:38.000Z","dependencies_parsed_at":"2025-05-08T04:32:10.729Z","dependency_job_id":null,"html_url":"https://github.com/xuhe2/github520cli","commit_stats":null,"previous_names":["xuhe2/github520cli"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/xuhe2/github520cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuhe2%2Fgithub520cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuhe2%2Fgithub520cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuhe2%2Fgithub520cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuhe2%2Fgithub520cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xuhe2","download_url":"https://codeload.github.com/xuhe2/github520cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuhe2%2Fgithub520cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434485,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["config","dns","github","go"],"created_at":"2026-01-14T20:37:39.547Z","updated_at":"2026-01-14T20:37:40.099Z","avatar_url":"https://github.com/xuhe2.png","language":"Go","readme":"# 是什么\n\ngithub520cli是一个使用GO编写,依赖[github520](https://github.com/521xueweihan/GitHub520)的命令行工具,用于修改hosts文件,解决github访问慢的问题。\n- 支持MAC, Linux和Windows系统\n\n# 为什么\n\n手动修改hosts文件太麻烦了,而且存在出错的可能,所以写了这个工具。\n\n# 怎么安装\n\n## GO\n\n需要先安装GO,安装方法请参考[GO官网](https://golang.org/dl/)\n\n```shell\ngo install github.com/xuhe2/github520cli@latest\n```\n\n# 怎么用\n\n## Linux和mac系统\n\n```shell\nsudo ~/go/bin/github520cli\n```\n\u003e 注意: 在mac和linux系统上需要使用sudo命令,否则会报权限错误.\n\n\u003e 使用`go install`把github520cli安装到了`~/go/bin/`目录下,这个目录在`$PATH`中,为什么不能直接使用`github520cli`命令呢?因为root的`$PATH`和普通用户的`$PATH`不一样,所以需要使用绝对路径来运行。\n\n\u003e 或者先使用`su root`命令切换到root用户,然后再使用`github520cli`命令也是可以的。因为`su root`命令会切换到root用户,会保留原先的`$PATH`环境变量。\n\n![use-case-linux](./docs/imgs/use-case-linux.png)\n\n## Windows系统\n\n- 在Windows系统上需要使用管理员权限运行\n\n![use-case-windows](./docs/imgs/use-case-windows.png)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuhe2%2Fgithub520cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxuhe2%2Fgithub520cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuhe2%2Fgithub520cli/lists"}