Create CLI documentation with a Rust script (instead of Python) + style improvement (#10680)

This commit is contained in:
Hendrik Eeckhaut
2024-09-06 21:35:12 +02:00
committed by GitHub
parent 27d4e8c363
commit d1d544e23c
51 changed files with 468 additions and 296 deletions

View File

@ -4,6 +4,8 @@ Write config to stdout
```bash
$ reth config --help
```
```txt
Usage: reth config [OPTIONS]
Options:

2
book/cli/reth/db.md vendored
View File

@ -4,6 +4,8 @@ Database debugging utilities
```bash
$ reth db --help
```
```txt
Usage: reth db [OPTIONS] <COMMAND>
Commands:

View File

@ -4,6 +4,8 @@ Calculates the content checksum of a table
```bash
$ reth db checksum --help
```
```txt
Usage: reth db checksum [OPTIONS] <TABLE>
Arguments:

View File

@ -4,6 +4,8 @@ Deletes all table entries
```bash
$ reth db clear --help
```
```txt
Usage: reth db clear [OPTIONS] <COMMAND>
Commands:

View File

@ -4,6 +4,8 @@ Deletes all database table entries
```bash
$ reth db clear mdbx --help
```
```txt
Usage: reth db clear mdbx [OPTIONS] <TABLE>
Arguments:

View File

@ -4,6 +4,8 @@ Deletes all static file segment entries
```bash
$ reth db clear static-file --help
```
```txt
Usage: reth db clear static-file [OPTIONS] <SEGMENT>
Arguments:

View File

@ -4,6 +4,8 @@ Create a diff between two database tables or two entire databases
```bash
$ reth db diff --help
```
```txt
Usage: reth db diff [OPTIONS] --secondary-datadir <SECONDARY_DATADIR> --output <OUTPUT>
Options:

View File

@ -4,6 +4,8 @@ Deletes all database entries
```bash
$ reth db drop --help
```
```txt
Usage: reth db drop [OPTIONS]
Options:

View File

@ -4,6 +4,8 @@ Gets the content of a table for the given key
```bash
$ reth db get --help
```
```txt
Usage: reth db get [OPTIONS] <COMMAND>
Commands:

View File

@ -4,6 +4,8 @@ Gets the content of a database table for the given key
```bash
$ reth db get mdbx --help
```
```txt
Usage: reth db get mdbx [OPTIONS] <TABLE> <KEY> [SUBKEY]
Arguments:

View File

@ -4,6 +4,8 @@ Gets the content of a static file segment for the given key
```bash
$ reth db get static-file --help
```
```txt
Usage: reth db get static-file [OPTIONS] <SEGMENT> <KEY>
Arguments:

View File

@ -4,6 +4,8 @@ Lists the contents of a table
```bash
$ reth db list --help
```
```txt
Usage: reth db list [OPTIONS] <TABLE>
Arguments:

View File

@ -4,6 +4,8 @@ Returns the full database path
```bash
$ reth db path --help
```
```txt
Usage: reth db path [OPTIONS]
Options:

View File

@ -4,6 +4,8 @@ Lists all the tables, their entry count and their size
```bash
$ reth db stats --help
```
```txt
Usage: reth db stats [OPTIONS]
Options:

View File

@ -4,6 +4,8 @@ Lists current and local database versions
```bash
$ reth db version --help
```
```txt
Usage: reth db version [OPTIONS]
Options:

View File

@ -4,6 +4,8 @@ Various debug routines
```bash
$ reth debug --help
```
```txt
Usage: reth debug [OPTIONS] <COMMAND>
Commands:

View File

@ -4,6 +4,8 @@ Debug block building
```bash
$ reth debug build-block --help
```
```txt
Usage: reth debug build-block [OPTIONS] --prev-randao <PREV_RANDAO> --timestamp <TIMESTAMP> --suggested-fee-recipient <SUGGESTED_FEE_RECIPIENT>
Options:

View File

@ -4,6 +4,8 @@ Debug the roundtrip execution of blocks as well as the generated data
```bash
$ reth debug execution --help
```
```txt
Usage: reth debug execution [OPTIONS] --to <TO>
Options:

View File

@ -4,6 +4,8 @@ Debug in-memory state root calculation
```bash
$ reth debug in-memory-merkle --help
```
```txt
Usage: reth debug in-memory-merkle [OPTIONS]
Options:

View File

@ -4,6 +4,8 @@ Debug the clean & incremental state root calculations
```bash
$ reth debug merkle --help
```
```txt
Usage: reth debug merkle [OPTIONS] --to <TO>
Options:

View File

@ -4,6 +4,8 @@ Debug engine API by replaying stored messages
```bash
$ reth debug replay-engine --help
```
```txt
Usage: reth debug replay-engine [OPTIONS] --engine-api-store <PATH>
Options:

View File

@ -4,6 +4,8 @@ Dumps genesis block JSON configuration to stdout
```bash
$ reth dump-genesis --help
```
```txt
Usage: reth dump-genesis [OPTIONS]
Options:

View File

@ -4,6 +4,8 @@ This syncs RLP encoded blocks from a file
```bash
$ reth import --help
```
```txt
Usage: reth import [OPTIONS] <IMPORT_PATH>
Options:

View File

@ -4,6 +4,8 @@ Initialize the database from a state dump file
```bash
$ reth init-state --help
```
```txt
Usage: reth init-state [OPTIONS] <STATE_DUMP_FILE>
Options:

View File

@ -4,6 +4,8 @@ Initialize the database from a genesis file
```bash
$ reth init --help
```
```txt
Usage: reth init [OPTIONS]
Options:

View File

@ -4,6 +4,8 @@ Start the node
```bash
$ reth node --help
```
```txt
Usage: reth node [OPTIONS]
Options:

View File

@ -4,6 +4,8 @@ P2P Debugging utilities
```bash
$ reth p2p --help
```
```txt
Usage: reth p2p [OPTIONS] <COMMAND>
Commands:

View File

@ -4,6 +4,8 @@ Download block body
```bash
$ reth p2p body --help
```
```txt
Usage: reth p2p body [OPTIONS] <ID>
Arguments:

View File

@ -4,6 +4,8 @@ Download block header
```bash
$ reth p2p header --help
```
```txt
Usage: reth p2p header [OPTIONS] <ID>
Arguments:

View File

@ -4,6 +4,8 @@ RLPx commands
```bash
$ reth p2p rlpx --help
```
```txt
Usage: reth p2p rlpx [OPTIONS] <COMMAND>
Commands:

View File

@ -4,6 +4,8 @@ ping node
```bash
$ reth p2p rlpx ping --help
```
```txt
Usage: reth p2p rlpx ping [OPTIONS] <NODE>
Arguments:

View File

@ -4,6 +4,8 @@ Prune according to the configuration without any limits
```bash
$ reth prune --help
```
```txt
Usage: reth prune [OPTIONS]
Options:

View File

@ -4,6 +4,8 @@ Scripts for node recovery
```bash
$ reth recover --help
```
```txt
Usage: reth recover [OPTIONS] <COMMAND>
Commands:

View File

@ -4,6 +4,8 @@ Recover the node by deleting dangling storage tries
```bash
$ reth recover storage-tries --help
```
```txt
Usage: reth recover storage-tries [OPTIONS]
Options:

View File

@ -4,6 +4,8 @@ Manipulate individual stages
```bash
$ reth stage --help
```
```txt
Usage: reth stage [OPTIONS] <COMMAND>
Commands:

View File

@ -4,6 +4,8 @@ Drop a stage's tables from the database
```bash
$ reth stage drop --help
```
```txt
Usage: reth stage drop [OPTIONS] <STAGE>
Options:

View File

@ -4,6 +4,8 @@ Dumps a stage from a range into a new database
```bash
$ reth stage dump --help
```
```txt
Usage: reth stage dump [OPTIONS] <COMMAND>
Commands:

View File

@ -4,6 +4,8 @@
```bash
$ reth stage dump account-hashing --help
```
```txt
Usage: reth stage dump account-hashing [OPTIONS] --output-datadir <OUTPUT_PATH> --from <FROM> --to <TO>
Options:

View File

@ -4,6 +4,8 @@ Execution stage
```bash
$ reth stage dump execution --help
```
```txt
Usage: reth stage dump execution [OPTIONS] --output-datadir <OUTPUT_PATH> --from <FROM> --to <TO>
Options:

View File

@ -4,6 +4,8 @@ Merkle stage
```bash
$ reth stage dump merkle --help
```
```txt
Usage: reth stage dump merkle [OPTIONS] --output-datadir <OUTPUT_PATH> --from <FROM> --to <TO>
Options:

View File

@ -4,6 +4,8 @@
```bash
$ reth stage dump storage-hashing --help
```
```txt
Usage: reth stage dump storage-hashing [OPTIONS] --output-datadir <OUTPUT_PATH> --from <FROM> --to <TO>
Options:

View File

@ -4,6 +4,8 @@ Run a single stage.
```bash
$ reth stage run --help
```
```txt
Usage: reth stage run [OPTIONS] --from <FROM> --to <TO> <STAGE>
Options:

View File

@ -4,6 +4,8 @@ Unwinds a certain block range, deleting it from the database
```bash
$ reth stage unwind --help
```
```txt
Usage: reth stage unwind [OPTIONS] <COMMAND>
Commands:

View File

@ -4,6 +4,8 @@ Unwinds the database from the latest block, until the given number of blocks hav
```bash
$ reth stage unwind num-blocks --help
```
```txt
Usage: reth stage unwind num-blocks [OPTIONS] <AMOUNT>
Arguments:

View File

@ -4,6 +4,8 @@ Unwinds the database from the latest block, until the given block number or hash
```bash
$ reth stage unwind to-block --help
```
```txt
Usage: reth stage unwind to-block [OPTIONS] <TARGET>
Arguments: