{"id":21011563,"url":"https://github.com/zhuzilin/nezha","last_synced_at":"2025-05-15T03:32:22.872Z","repository":{"id":57446000,"uuid":"436584193","full_name":"zhuzilin/NeZha","owner":"zhuzilin","description":"Organizing ssh servers in one shell.","archived":false,"fork":false,"pushed_at":"2021-12-13T08:49:30.000Z","size":20,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-02T05:47:47.273Z","etag":null,"topics":["shell","ssh"],"latest_commit_sha":null,"homepage":"","language":"Python","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/zhuzilin.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}},"created_at":"2021-12-09T11:02:42.000Z","updated_at":"2023-06-13T16:00:53.000Z","dependencies_parsed_at":"2022-09-26T17:30:27.996Z","dependency_job_id":null,"html_url":"https://github.com/zhuzilin/NeZha","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhuzilin%2FNeZha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhuzilin%2FNeZha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhuzilin%2FNeZha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhuzilin%2FNeZha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhuzilin","download_url":"https://codeload.github.com/zhuzilin/NeZha/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254266375,"owners_count":22042098,"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":["shell","ssh"],"created_at":"2024-11-19T09:29:33.722Z","updated_at":"2025-05-15T03:32:22.605Z","avatar_url":"https://github.com/zhuzilin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NeZha (哪吒)\n\n[NeZha](https://en.wikipedia.org/wiki/Nezha) is a famous chinese deity who can have three heads and six arms if he wants. And my NeZha tool is hoping to bring developer such multitask ability when handling multiple remote ssh servers.\n\nNeZha is built upon [Fabric](https://github.com/fabric/fabric).\n\n## Installation\n\n```bash\npip3 install nezha-ssh\n```\n\n## Usage\n\nNeZha will simultaneously connect the ssh servers you configed and run command on all of them.\n\nTo run certain command:\n\n```bash\npython3 -m nezha -H ./test_config --cmd pwd\n```\n\nAnd if you need different commands for different server, you can pass the command line as a format string in python:\n\n```bash\npython3 -m nezha -H ./test_config --cmd \"echo {NEZHA_ID}\"\n```\n\nThe `{NEZHA_ID}` will be interpreted as 0 to n, corresponding the order of host in the host file (the file you send to `-H`). Other possible values are `{NEZHA_IP}`.\n\nAnd you can run shell script with:\n\n```bash\npython3 -m nezha -H ./test_config --file test.sh\n```\n\nTo use REPL:\n\n```bash\npython3 -m nezha -H ./test_config --repl\n```\n\nThe `host_config`(`-H`) file should be similar to the ssh config, for example:\n\n```\n# lines started with hash sign will be treated as comment.\nHost A\n  User alice\n  HostName 127.0.0.1\n\nHost B\n  User bob\n  HostName 127.0.0.1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhuzilin%2Fnezha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhuzilin%2Fnezha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhuzilin%2Fnezha/lists"}