Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/polishmatt/hi
A generic CLI for connecting humans to host interfaces.
https://github.com/polishmatt/hi
Last synced: 10 days ago
JSON representation
A generic CLI for connecting humans to host interfaces.
- Host: GitHub
- URL: https://github.com/polishmatt/hi
- Owner: polishmatt
- License: gpl-3.0
- Created: 2017-05-18T23:03:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-07-06T04:00:07.000Z (over 1 year ago)
- Last Synced: 2024-11-03T06:25:39.909Z (13 days ago)
- Language: Python
- Homepage: https://pypi.python.org/pypi/hicli
- Size: 71.3 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# hi
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
```* [Getting started](#getting-started)
* [Advanced configuration](#advanced-configuration)## Why should I use this?
* You find yourself frequently interacting with a relatively small set of static hosts.
## Why shouldn't I use this?
* You want to interact with auto-scaling or otherwise frequently changing hosts.
Use existing solutions for centralizing your data (like [logstash](https://github.com/elastic/logstash)) and incident management across multiple hosts at once.## Getting started
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](http://yaml.org) format.
```
- host: api.example.com
command: ssh
```## Advanced configuration
### Groups
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
```### Complex commands
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'''
```