mirror of
https://github.com/house-of-vanity/khm.git
synced 2025-07-08 07:44:08 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
b4c2fae778 | |||
61552a3d70 |
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "khm"
|
name = "khm"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["AB <ab@hexor.cy>", "ChatGPT-4o"]
|
authors = ["AB <ab@hexor.cy>", "ChatGPT-4o"]
|
||||||
|
|
||||||
|
26
README.MD
26
README.MD
@ -24,21 +24,23 @@ khm --server --ip 127.0.0.1 --port 8080 --db-host 127.0.0.1 --db-name khm --db-u
|
|||||||
To run the application in client mode, use the following command:
|
To run the application in client mode, use the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
khm --host http://khm.example.com:8080 --known-hosts ~/.ssh/known_hosts --in-place
|
khm --host http://khm.example.com:8080/<FLOW_NAME>/ --known-hosts ~/.ssh/known_hosts --in-place
|
||||||
```
|
```
|
||||||
|
|
||||||
### Arguments
|
### Arguments
|
||||||
- `--server`: Run in server mode (default: false).
|
Options:
|
||||||
- `--ip`: IP address to bind the server or client to (default: 127.0.0.1).
|
- `--server` Run in server mode
|
||||||
- `--port`: Port to bind the server or client to (default: 8080).
|
- `--in-place` Server mode: Sync the known_hosts file with keys from the server
|
||||||
- `--db-host`: Hostname or IP address of the PostgreSQL database (default: 127.0.0.1).
|
- `--flows <FLOWS>...` Server mode: Comma-separated list of flows to manage [default: default]
|
||||||
- `--db-name`: Name of the PostgreSQL database (default: khm).
|
- `-i, --ip <IP>` Server mode: IP address to bind the server to [default: 127.0.0.1]
|
||||||
- `--db-user`: Username for the PostgreSQL database (required in server mode).
|
- `-p, --port <PORT>` Server mode: Port to bind the server to [default: 8080]
|
||||||
- `--db-password`: Password for the PostgreSQL database (required in server mode).
|
- `--db-host <DB_HOST>` Server mode: Hostname or IP address of the PostgreSQL database [default: 127.0.0.1]
|
||||||
- `--host`: Host address of the server to connect to in client mode (required in client mode).
|
- `--db-name <DB_NAME>` Server mode: Name of the PostgreSQL database [default: khm]
|
||||||
- `--known-hosts`: Path to the `known_hosts` file (default: ~/.ssh/known_hosts).
|
- `--db-user <DB_USER>` Server mode: Username for the PostgreSQL database
|
||||||
- `--in-place`: Update the `known_hosts` file with keys from the server after sending keys (default: false).
|
- `--db-password <DB_PASSWORD>` Server mode: Password for the PostgreSQL database
|
||||||
- `--flows`: Comma-separated list of flows to manage (default: default).
|
- `--host <HOST>` Client mode: Full host address of the server to connect to. Like `https://khm.example.com/<FLOW_NAME>`
|
||||||
|
- `--known-hosts <KNOWN_HOSTS>` Client mode: Path to the known_hosts file [default: ~/.ssh/known_hosts]
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
@ -19,8 +19,8 @@ use log::{error, info};
|
|||||||
Running in server mode:\n\
|
Running in server mode:\n\
|
||||||
khm --server --ip 0.0.0.0 --port 1337 --db-host psql.psql.svc --db-name khm --db-user admin --db-password <SECRET> --flows work,home\n\
|
khm --server --ip 0.0.0.0 --port 1337 --db-host psql.psql.svc --db-name khm --db-user admin --db-password <SECRET> --flows work,home\n\
|
||||||
\n\
|
\n\
|
||||||
Running in client mode to send diff and sync ~/.ssh/known_hosts with remote flow in place:\n\
|
Running in client mode to send diff and sync ~/.ssh/known_hosts with remote flow `work` in place:\n\
|
||||||
khm --host https://khm.example.com/default/keys --known-hosts ~/.ssh/known_hosts --in-place\n\
|
khm --host https://khm.example.com/work --known-hosts ~/.ssh/known_hosts --in-place\n\
|
||||||
\n\
|
\n\
|
||||||
"
|
"
|
||||||
)]
|
)]
|
||||||
@ -94,7 +94,7 @@ struct Args {
|
|||||||
#[arg(
|
#[arg(
|
||||||
long,
|
long,
|
||||||
required_if_eq("server", "false"),
|
required_if_eq("server", "false"),
|
||||||
help = "Client mode: Full host address of the server to connect to. Like https://khm.example.com/flow_name/keys"
|
help = "Client mode: Full host address of the server to connect to. Like https://khm.example.com/<FLOW_NAME>"
|
||||||
)]
|
)]
|
||||||
host: Option<String>,
|
host: Option<String>,
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user