{"id":13510003,"url":"https://github.com/crosbymichael/slex","last_synced_at":"2025-10-07T00:14:09.681Z","repository":{"id":21962519,"uuid":"25287207","full_name":"crosbymichael/slex","owner":"crosbymichael","description":"SSH multiplex","archived":false,"fork":false,"pushed_at":"2021-02-03T21:03:14.000Z","size":2225,"stargazers_count":560,"open_issues_count":4,"forks_count":48,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-29T03:07:14.372Z","etag":null,"topics":["multiplexing","ssh"],"latest_commit_sha":null,"homepage":null,"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/crosbymichael.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":"2014-10-16T05:02:48.000Z","updated_at":"2025-03-10T12:45:42.000Z","dependencies_parsed_at":"2022-08-29T15:01:48.563Z","dependency_job_id":null,"html_url":"https://github.com/crosbymichael/slex","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crosbymichael%2Fslex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crosbymichael%2Fslex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crosbymichael%2Fslex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crosbymichael%2Fslex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crosbymichael","download_url":"https://codeload.github.com/crosbymichael/slex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284949,"owners_count":20913704,"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":["multiplexing","ssh"],"created_at":"2024-08-01T02:01:20.819Z","updated_at":"2025-10-07T00:14:04.649Z","avatar_url":"https://github.com/crosbymichael.png","language":"Go","funding_links":[],"categories":["Go","others"],"sub_categories":[],"readme":"## SLEX\n\n[![Build Status](https://travis-ci.org/crosbymichael/slex.svg?branch=master)](https://travis-ci.org/crosbymichael/slex)\n\nslex is a simple binary that allows you to run a command on multiple hosts via SSH.\nIt is very similar to fabric except that it is written in Go so you don't have to \nhave python installed on your system and you don't *have* to write a script or \nconfiguration files if you do not want to.\n\n## Building\n\nTo build `slex` you must have a working Go install then you can run:\n\n```bash\ngo get -u github.com/crosbymichael/slex\n```\n\n```bash\nslex -h\nNAME:\n   slex - SSH commands multiplexed\n\nUSAGE:\n   slex [global options] command [command options] [arguments...]\n\nVERSION:\n   1\n\nAUTHOR:\n  @crosbymichael - \u003ccrosbymichael@gmail.com\u003e\n\nCOMMANDS:\n   help, h  Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --debug                     enable debug output for the logs\n   --host value                SSH host address\n   --hosts value               file containing host addresses separated by a new line\n   --user value, -u value      user to execute the command as (default: \"root\")\n   --identity value, -i value  SSH identity to use for connecting to the host\n   --option value, -o value    SSH client option\n   --agent, -A                 Forward authentication request to the ssh agent\n   --env value, -e value       set environment variables for SSH command\n   --quiet, -q                 disable output from the ssh command\n   --help, -h                  show help\n   --version, -v               print the version\n\n```\n\nFor the list of supported SSH client option, see `SSHClientOptions` on [config.go](https://github.com/crosbymichael/slex/blob/master/config.go)\n\n### Get the uptime for all servers\n```bash\nslex --host 192.168.1.3 --host 192.168.1.4 uptime\n[192.168.1.3:22]  01:05:20 up  4:44,  0 users,  load average: 0.35, 0.39, 0.33\n[192.168.1.4:22]  01:05:20 up  9:45,  0 users,  load average: 0.04, 0.07, 0.06\n```\n\n### Run a docker container on all servers\n```bash\nslex --host 192.168.1.3 --host 192.168.1.4 docker run --rm busybox echo \"hi slex\"\n[192.168.1.3:22] hi slex\n[192.168.1.4:22] hi slex\n```\n\n### Pipe scripts to all servers\n```bash\necho \"echo hi again\" | slex --host 192.168.1.3 --host 192.168.1.4\n[192.168.1.3:22] hi again\n[192.168.1.4:22] hi again\n```\n\n#### License - MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrosbymichael%2Fslex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrosbymichael%2Fslex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrosbymichael%2Fslex/lists"}