Skip to content

Commit 50b58d3

Browse files
author
Sandeep Jadoonanan
committed
Update README.md with new changes.
1 parent cbf4a63 commit 50b58d3

File tree

1 file changed

+49
-21
lines changed

1 file changed

+49
-21
lines changed

README.md

Lines changed: 49 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# Konnect - connect to thing!
1+
# Konnect
2+
3+
*Simple remote host management*
4+
5+
<img src="https://img.shields.io/github/release/exitshell/konnect.svg" /> <img src="https://img.shields.io/github/license/exitshell/konnect.svg" />
26

37
Konnect is a tool for managing and connecting to remote hosts. By defining a list of hosts in a configuration file, Konnect allows you to connect and run commands on the defined hosts.
48

@@ -17,13 +21,10 @@ You can also download and install Konnect via brew.
1721
Usage
1822
--------------
1923

24+
#### Defining hosts in the config file
2025

21-
Using Konnect is _really_ simple:
22-
1. Define hosts in a `konnect.yml` config file.
23-
1. Connect to a defined host.
24-
25-
26-
A `konnect.yml` config file looks like this:
26+
The configuration file for konnect should be named `konnect.yml`.
27+
In this `konnect.yml` config, we define two hosts: **app**, and **database**.
2728

2829
```
2930
hosts:
@@ -39,51 +40,78 @@ hosts:
3940
key: ~/.ssh/id_rsa
4041
```
4142

43+
#### Connecting to hosts
44+
In order to connect to a host you would run: `konnect to <host>`
4245

46+
- _example_: **`konnect to app`**
4347

44-
### Isn't this like an ssh config file?
45-
Yup, Konnect is very much like an ssh config file.
48+
Alternatively, you can just run `konnect`, and it would start an interactive prompt for you to choose a host to connect to.
4649

47-
However, Konnect aims to be more portable and configurable by providing additional functionality on a per-host / multi-host basis.
50+
#### Defining tasks
51+
Tasks are essentially bash commands which execute remotely on a host. We can define tasks in the `konnect.yml` file, and then run them on a specific host.
4852

49-
Examples
50-
--------------
53+
In this `konnect.yml` config, we define one host (**app**) and one task (**tailsys**).
5154

52-
- **Create an empty konnect.yml config file**
55+
```
56+
hosts:
57+
app:
58+
user: root
59+
host: 192.168.99.100
60+
port: 22
61+
key: /home/app/key
5362
54-
`konnect init <dir>`
63+
tasks:
64+
tailsys: tail -f -n 100 /var/log/syslog
65+
```
66+
67+
#### Running tasks
68+
In order to connect to run a task on a host you would run: `konnect to <host> and <task>`
5569

70+
- _example_: **`konnect to app and tailsys`**
71+
72+
73+
Commands
74+
--------------
5675

5776
- **View all defined hosts**
5877

59-
`konnect ls`
78+
`konnect list`
6079

6180

6281
- **Connect to a defined host**
6382

6483
`konnect to <host>`
6584

6685

86+
- **Connect to a host and run a task**
87+
88+
`konnect to <host> and <task>`
89+
90+
6791
- **Display the SSH command for a host**
6892

6993
`konnect args <host>`
7094

7195

72-
- **Check the status of one or more hosts**
96+
- **Create an empty konnect.yml config file**
7397

74-
`konnect status <host1> <host2>`
98+
`konnect init <dir>`
7599

76-
`konnect status --all`
100+
- **Edit the konnect.yml config file**
101+
102+
`konnect edit`
77103

78104

79-
### Why use konnect?
80-
...why not? 🤓
105+
- **Check the status of one or more hosts**
106+
107+
`konnect status <host1> <host2>`
81108

109+
`konnect status --all`
82110

83111

84112
Authors
85113
--------------
86-
Konnect was created by [Sandeep Jadoonanan](https://github.com/TunedMystic)
114+
Konnect was created by [Sandeep Jadoonanan](https://github.com/TunedMystic) 🤓
87115

88116
License
89117
--------------

0 commit comments

Comments
 (0)