A generic CLI for connecting humans to host interfaces.
Why remember or write an alias for
mysql -hmaster-service-db.example.com -ume -p -A
ssh -t api.example.com 'cd /logs; bash -l'
when you can type
hi master db
hi api
- You find yourself frequently interacting with a relatively small set of static hosts.
- You want to interact with auto-scaling or otherwise frequently changing hosts. Use existing solutions for centralizing your data (like logstash) and incident management across multiple hosts at once.
This project is available on PyPI.
pip install hicli
By default the hi CLI looks for configuration files at $HOME/.hi
. Edit $HOME/.hi/hosts
to add hosts using the YAML format.
- host: api.example.com
command: ssh
Hosts may be assigned to groups which run the same command. By default the hi CLI looks for group configuration at $HOME/.hi/groups
.
mysql:
command: mysql -ume -p -A -h
And in the hosts file:
- host: master-db.example.com
group: mysql
- host: slave-db.example.com
group: mysql
To add on to the end of the command being run, use the args property in your hosts or groups config.
- host: api.example.com
command: ssh -t
args: '''cd /logs; bash -l'''