{ "info": { "author": "Dane Summers", "author_email": "", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3" ], "description": "Introduction\n============\n\nConnect to multiple ssh/docker hosts \"in tmux\".\n\nintmux is a command line application to connect to multiple ssh/docker hosts\nwithin a tmux session. Supports connections to SSH hosts, local docker and\ndocker-compose.\n\nFor each matching host intmux will create a new pane (up to `--tmux-panes` per\nwindow) and set the tmux synchronize-panes options (pass --tmux-no-sync to turn\nthis off), and run a shell (configurable via `--command`, `--script` or\nother switches specific to the connection method).\n\nYou can intmux inside a tmux session (creates a new session within it) or out.\n\n**SSH**\n\nThe following command creates a new tmux session with one window with two panes\n(one ssh'd to host1, another to user@host2):\n\n intmux ssh host1 user@host2\n\n # Connect to hosts listed in inputfile.txt\n intmux -i inputfile.txt ssh\n\n # Connect to hosts, with a separate window for each host\n intmux --tmux-panes 1 ssh host1 user@host2\n\n # Connect and tail the syslogs:\n intmux --command 'sudo tail -f /var/log/syslog' ssh host1 user@host2\n\n # Run a script (copies local script to remote host, and executes it)\n intmux --script ./local_script.sh ssh host1 user@host2\n\n**Docker**\n\nintmux can also be used to connect to all running local docker instances:\n\n # Connect to all local containers\n intmux docker\n\n # Connect to specific containers\n intmux docker a_name f947ff94a995\n\n # Look at logs on hosts:\n intmux docker --docker-command 'logs -f' a_name f947ff94a995\n\nDocker containers can also be connected to over SSH:\n\n # Connect to all remote containers on two different hosts\n intmux ssh-docker host1 user@host2\n\n # Connect to specific containers\n intmux ssh-docker --docker-containers \"a_name,f947ff94a995\" host1 user@host2\n\n # Look at logs on hosts:\n intmux ssh-docker --docker-command 'logs -f' --docker-containers \"a_name,f947ff94a995\" host1 user@host2\n\n**Docker-compose**\n\nAll running services of the docker-compose in your current working directory can\nalso be connected to:\n\n # Connect to all containers\n intmux compose\n\n # Connect to specific containers:\n intmux compose db web\n\n\nInstallation\n------------\n\nExecute:\n\n pip install intmux\n\nHelp\n----\n\nMain help:\n\n intmux --help\n\n usage: intmux [-h] [--log LOG] [--command COMMAND] [--input INPUT]\n [--script SCRIPT] [--tmux-panes PANES] [--tmux-sync]\n [--tmux-session SESSION]\n {ssh,docker,ssh-docker,compose} ...\n\n Connect to several hosts in a tmux session.\n\n positional arguments:\n {ssh,docker,ssh-docker,compose}\n sub-command help\n ssh Connect to hosts via SSH\n docker Connect to docker containers via 'docker exec'\n ssh-docker Connect to docker containers on remote SSH hosts\n compose Connect to docker containers associated with current\n docker-compose via 'docker exec'\n\n optional arguments:\n -h, --help show this help message and exit\n --log LOG, -l LOG Log level (default: WARN)\n --command COMMAND, -c COMMAND\n Command to execute when connecting to a remote host\n --input INPUT, -i INPUT\n Read list of hosts from input file when provided.\n --script SCRIPT, -s SCRIPT\n Execute commands in local file remotely (executes over\n --command option)\n --tmux-panes PANES, -p PANES\n Max tmux panes per window (default: 6)\n --tmux-no-sync, -S Do not run tmux's set-option synchronize-panes\n --tmux-session SESSION, -t SESSION\n tmux session name (default: intmux)\n\nSSH help:\n\n intmux ssh -h\n\n usage: intmux ssh [-h] [--ssh-options SSH_OPTIONS] [hosts [hosts ...]]\n\n Connect to the provided hosts.\n\n positional arguments:\n hosts SSH hosts to connect to.\n\n optional arguments:\n -h, --help show this help message and exit\n --ssh-options SSH_OPTIONS, -so SSH_OPTIONS\n Options to pass to SSH connection.\n\nDocker help:\n\n intmux docker -h\n\n usage: intmux docker [-h] [--docker-command DOCKER_COMMAND] [--approximate]\n [hosts [hosts ...]]\n\n Connect to the provided running containers\n\n positional arguments:\n hosts List of docker containers to connect to (default:\n connect to all containers)\n\n optional arguments:\n -h, --help show this help message and exit\n --docker-command DOCKER_COMMAND, -dc DOCKER_COMMAND\n Docker command to execute (default: 'exec -it {}\n bash'). If '{}' is included in the command, the docker\n host is substituted there, the host is appended. NOTE:\n may invalidate any --script/--command parameters if a\n shell is not provided.\n --approximate, -a Include any docker container names that only partially\n match hosts.\n\nDocker Compose help:\n\n intmux compose -h\n\n usage: intmux compose [-h] [--docker-command DOCKER_COMMAND] [--approximate]\n [hosts [hosts ...]]\n\n Connect to containers associated with the docker-compose in the current\n directory.\n\n positional arguments:\n hosts List of docker containers to connect to (default:\n connect to all containers)\n\n optional arguments:\n -h, --help show this help message and exit\n --docker-command DOCKER_COMMAND, -dc DOCKER_COMMAND\n Docker command to execute (default: 'exec -it {}\n bash'). If '{}' is included in the command, the docker\n host is substituted there, the host is appended.\n --approximate, -a Include any docker container names that only partially\n match hosts.\n\nSSH Docker help:\n\n intmux ssh-docker -h\n\n usage: intmux ssh-docker [-h] [--ssh-options SSH_OPTIONS]\n [--docker-containers DOCKER_CONTAINERS]\n [--docker-command DOCKER_COMMAND] [--approximate]\n [hosts [hosts ...]]\n\n Connect to docker containers on provided SSH hosts\n\n positional arguments:\n hosts SSH hosts to connect to.\n\n optional arguments:\n -h, --help show this help message and exit\n --ssh-options SSH_OPTIONS, -so SSH_OPTIONS\n Options to pass to SSH connection.\n --docker-containers DOCKER_CONTAINERS, -dC DOCKER_CONTAINERS\n Comma separated list of docker containers to connect\n to (default: connect to all containers)\n --docker-command DOCKER_COMMAND, -dc DOCKER_COMMAND\n Docker command to execute (default: 'exec -it {}\n bash'). If '{}' is included in the command, the docker\n host is substituted there, the host is appended. NOTE:\n may invalidate any --script/--command parameters if a\n shell is not provided.\n --approximate, -a Include any docker container names that only partially\n match hosts.\n\nNotes\n-----\n\n`--script` and `--command` will make multiple connections over SSH (one can send\nkeys over tmux, but not easily track success of without capturing the result of\n$?, so shell commands have been string together with &&). Maybe I'll fix that\nsome day, but in the meantime, to limit the number of connections I suggest\nturning on SSH ControlMaster settings by adding the following to your\n.ssh/config file:\n\n ControlMaster auto\n ControlPersist 60s\n ControlPath /tmp/ssh-%h-%p-%r", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dsummersl/intmux", "keywords": "ssh tmux docker cli", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "intmux", "package_url": "https://pypi.org/project/intmux/", "platform": "", "project_url": "https://pypi.org/project/intmux/", "project_urls": { "Homepage": "https://github.com/dsummersl/intmux" }, "release_url": "https://pypi.org/project/intmux/0.7.0/", "requires_dist": null, "requires_python": ">=3", "summary": "Connect to multiple hosts simultaneously \"in tmux\" via ssh and docker.", "version": "0.7.0" }, "last_serial": 4845398, "releases": { "0.4.0": [ { "comment_text": "", "digests": { "md5": "e5c618e6f304bb06d91cd9eeb4e0befb", "sha256": "c5241d3dd26a3081f5f74cb46bb01cff9b8f1c311fc2c2484e6b8d91c3a6944f" }, "downloads": -1, "filename": "intmux-0.4.0-py3.6.egg", "has_sig": false, "md5_digest": "e5c618e6f304bb06d91cd9eeb4e0befb", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 9474, "upload_time": "2019-02-07T03:30:51", "url": "https://files.pythonhosted.org/packages/63/bf/f47e2c212f586ad1b448c14721af3f9987a95f778bea7327635941b5a051/intmux-0.4.0-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "731b295f5f94028e17f797f4a8b6f4ef", "sha256": "dbe173a91383206b11290972656cd4f39f0ee4a3a3c097b71d6a823ac82d5e07" }, "downloads": -1, "filename": "intmux-0.4.0.tar.gz", "has_sig": false, "md5_digest": "731b295f5f94028e17f797f4a8b6f4ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5201, "upload_time": "2019-02-07T03:30:53", "url": "https://files.pythonhosted.org/packages/bc/fb/29cd962d9bec571c0dec154b79d886b6c954a5d85eac2a24133e5757764a/intmux-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "dea863470c96f3003afbbaeabc9611f3", "sha256": "40f7940aefb83187f09a70bb1f9bd00d527b35f685fa4416e0242620ca33e696" }, "downloads": -1, "filename": "intmux-0.5.0-py3.6.egg", "has_sig": false, "md5_digest": "dea863470c96f3003afbbaeabc9611f3", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 11301, "upload_time": "2019-02-10T02:55:05", "url": "https://files.pythonhosted.org/packages/62/70/82bb4c421485ef72c770e5cd8c4bfb497513bb75fb0a25f4b3834beb7fde/intmux-0.5.0-py3.6.egg" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "73506b9f56483515a8e4e88085e10189", "sha256": "76853e0ce6d6c7f701bbafa01c45f5b6a45495a518c4149df84ec99cd30388de" }, "downloads": -1, "filename": "intmux-0.6.0-py3.6.egg", "has_sig": false, "md5_digest": "73506b9f56483515a8e4e88085e10189", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": ">=3", "size": 16387, "upload_time": "2019-02-17T19:52:06", "url": "https://files.pythonhosted.org/packages/57/02/3e88f3df9d8b6069ac0bfbfa4589bb61276d232e1c8eea3e7efae09a6772/intmux-0.6.0-py3.6.egg" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "77de205217daf475434ad0cf99c843c8", "sha256": "1f11ff24db99f88e648c56605cb9b1f6249c1f26f2922756da8ffbf20d6610c3" }, "downloads": -1, "filename": "intmux-0.6.1-py3.6.egg", "has_sig": false, "md5_digest": "77de205217daf475434ad0cf99c843c8", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": ">=3", "size": 16406, "upload_time": "2019-02-17T20:29:06", "url": "https://files.pythonhosted.org/packages/e8/6a/f88ec0ad5c970ea8d21c81932c37caad1101e6b232c63dfc6a4e3b000ec7/intmux-0.6.1-py3.6.egg" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "833686b1f4a082185939c2a3259dca1f", "sha256": "e20c7c92653d139ccfb45b06cedcc7859302d8da676fa815dbeaf3b582cc0eaa" }, "downloads": -1, "filename": "intmux-0.7.0-py3.6.egg", "has_sig": false, "md5_digest": "833686b1f4a082185939c2a3259dca1f", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": ">=3", "size": 16607, "upload_time": "2019-02-20T13:01:27", "url": "https://files.pythonhosted.org/packages/07/8f/7401c0423cf20b9721ce254c68f0b0958fe55566b2e6a429c668ebe2c58c/intmux-0.7.0-py3.6.egg" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "833686b1f4a082185939c2a3259dca1f", "sha256": "e20c7c92653d139ccfb45b06cedcc7859302d8da676fa815dbeaf3b582cc0eaa" }, "downloads": -1, "filename": "intmux-0.7.0-py3.6.egg", "has_sig": false, "md5_digest": "833686b1f4a082185939c2a3259dca1f", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": ">=3", "size": 16607, "upload_time": "2019-02-20T13:01:27", "url": "https://files.pythonhosted.org/packages/07/8f/7401c0423cf20b9721ce254c68f0b0958fe55566b2e6a429c668ebe2c58c/intmux-0.7.0-py3.6.egg" } ] }