Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
haxjump committed Oct 8, 2024
1 parent 21acbae commit 131dbfe
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ default = []
# vsdb = { path = "../vsdb/wrappers" }

[patch."https://github.com/rust-util-collections/chaindev"]
chaindev = { path = "../chaindev" }
# chaindev = { path = "../chaindev" }

[profile.release]
lto = "thin"
Expand Down
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ build:
release:
cargo build --release --bins

install:
cargo install --path .

lint:
cargo clippy

update:
cargo update

fmt:
cargo fmt

fmtall:
bash tools/fmt.sh

lint:
cargo clippy
85 changes: 84 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,84 @@
# nbnet
# nbnet

### Usage

```shell
# nbnet -h

Usage: nbnet <COMMAND>

Commands:
dev Manage development clusters on local host
ddev Manage development clusters on remote hosts
help Print this message or the help of the given subcommand(s)

Options:
-h, --help Print help
-V, --version Print version
```

```shell
# nbnet dev -h

Manage development clusters on a local host

Usage: nbnet dev [OPTIONS] [COMMAND]

Commands:
create Create a new ENV
destroy Destroy an existing ENV
destroy-all Destroy all existing ENVs
protect Protect an existing ENV
unprotect Unprotect an existing ENV
start Start an existing ENV
start-all Start all existing ENVs
stop Stop an existing ENV
stop-all Stop all existing ENVs
push-node Push a new node to an existing ENV
kick-node Remove an existing node from an existing ENV
show Default operation, show the information of an existing ENV
show-all Show informations of all existing ENVs
list Show names of all existing ENVs
help Print this message or the help of the given subcommand(s)

Options:
-e, --env-name <ENV_NAME>
-h, --help Print help
```

```shell
# nbnet ddev -h

Manage development clusters on various distributed hosts

Usage: nbnet ddev [OPTIONS] [COMMAND]

Commands:
create Create a new ENV
destroy Destroy an existing ENV
destroy-all Destroy all existing ENVs
protect Protect an existing ENV
unprotect Unprotect an existing ENV
start Start an existing ENV
start-all Start all existing ENVs
stop Stop an existing ENV
stop-all Stop all existing ENVs
push-node Push a new node to an existing ENV
migrate-node Migrate an existing node to another host
kick-node Remove an existing node from an existing ENV
push-host Add a new host to the cluster
kick-host Remove a host from the cluster
show Default operation, show the information of an existing ENV
show-all Show informations of all existing ENVs
list Show names of all existing ENVs
host-put-file Put a local file to all remote hosts
host-get-file Get a remote file from all remote hosts
host-exec Execute commands on all remote hosts
get-logs Get the remote logs from all nodes of the ENV
dump-vc-data Dump the validator client data from all nodes of the ENV
help Print this message or the help of the given subcommand(s)

Options:
-e, --env-name <ENV_NAME>
-h, --help Print help
```
11 changes: 7 additions & 4 deletions src/cfg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ pub struct Cfg {

#[derive(Debug, Subcommand)]
pub enum Commands {
#[clap(about = "Manage development clusters on local host")]
#[clap(about = "Manage development clusters on a local host")]
Dev(DevCfg),
#[clap(name = "ddev", about = "Manage development clusters on remote hosts")]
#[clap(
name = "ddev",
about = "Manage development clusters on various distributed hosts"
)]
DDev(DDevCfg),
}

Expand Down Expand Up @@ -358,7 +361,7 @@ pub enum DDevOp {
)]
hosts: Option<HostExpression>,
},
#[clap(about = "Get all node logs from remote hosts")]
#[clap(about = "Get the remote logs from all nodes of the ENV")]
GetLogs {
#[clap(short = 'e', long)]
env_name: Option<String>,
Expand All @@ -369,7 +372,7 @@ pub enum DDevOp {
)]
local_base_dir: Option<String>,
},
#[clap(about = "Get all node configurations from remote hosts")]
#[clap(about = "Dump the validator client data from all nodes of the ENV")]
DumpVcData {
#[clap(short = 'e', long)]
env_name: Option<String>,
Expand Down

0 comments on commit 131dbfe

Please sign in to comment.