feat(book): update CLI section (#6097)

This commit is contained in:
Alexey Shekhirin
2024-01-16 21:33:05 +00:00
committed by GitHub
parent 5a623a9c12
commit afa860757d
37 changed files with 1176 additions and 301 deletions

View File

@ -2,7 +2,7 @@
Deletes all table entries
```text
```bash
$ reth db clear --help
Usage: reth db clear [OPTIONS] <TABLE>
@ -46,6 +46,36 @@ Options:
Print help (see a summary with '-h')
Logging:
--log.stdout.format <FORMAT>
The format to use for logs written to stdout
[default: terminal]
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
--log.stdout.filter <FILTER>
The filter to use for logs written to stdout
[default: info]
--log.file.format <FORMAT>
The format to use for logs written to the log file
[default: terminal]
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--log.file.directory <PATH>
The path to put log files in
@ -61,11 +91,6 @@ Logging:
[default: 5]
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--log.journald
Write logs to journald

View File

@ -2,7 +2,7 @@
Create a diff between two database tables or two entire databases
```text
```bash
$ reth db diff --help
Usage: reth db diff [OPTIONS] --secondary-datadir <SECONDARY_DATADIR> --output <OUTPUT>
@ -65,6 +65,36 @@ Database:
The output directory for the diff report.
Logging:
--log.stdout.format <FORMAT>
The format to use for logs written to stdout
[default: terminal]
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
--log.stdout.filter <FILTER>
The filter to use for logs written to stdout
[default: info]
--log.file.format <FORMAT>
The format to use for logs written to the log file
[default: terminal]
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--log.file.directory <PATH>
The path to put log files in
@ -80,11 +110,6 @@ Logging:
[default: 5]
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--log.journald
Write logs to journald

View File

@ -2,7 +2,7 @@
Deletes all database entries
```text
```bash
$ reth db drop --help
Usage: reth db drop [OPTIONS]
@ -45,6 +45,36 @@ Options:
Print help (see a summary with '-h')
Logging:
--log.stdout.format <FORMAT>
The format to use for logs written to stdout
[default: terminal]
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
--log.stdout.filter <FILTER>
The filter to use for logs written to stdout
[default: info]
--log.file.format <FORMAT>
The format to use for logs written to the log file
[default: terminal]
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--log.file.directory <PATH>
The path to put log files in
@ -60,11 +90,6 @@ Logging:
[default: 5]
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--log.journald
Write logs to journald

View File

@ -2,9 +2,9 @@
Gets the content of a table for the given key
```text
```bash
$ reth db get --help
Usage: reth db get [OPTIONS] <TABLE> <KEY>
Usage: reth db get [OPTIONS] <TABLE> <KEY> [SUBKEY]
Arguments:
<TABLE>
@ -15,6 +15,9 @@ Arguments:
<KEY>
The key to get content for
[SUBKEY]
The subkey to get content for
Options:
--datadir <DATA_DIR>
The path to the data dir for all reth files and subdirectories.
@ -54,6 +57,36 @@ Options:
Print help (see a summary with '-h')
Logging:
--log.stdout.format <FORMAT>
The format to use for logs written to stdout
[default: terminal]
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
--log.stdout.filter <FILTER>
The filter to use for logs written to stdout
[default: info]
--log.file.format <FORMAT>
The format to use for logs written to the log file
[default: terminal]
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--log.file.directory <PATH>
The path to put log files in
@ -69,11 +102,6 @@ Logging:
[default: 5]
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--log.journald
Write logs to journald

View File

@ -2,7 +2,7 @@
Lists the contents of a table
```text
```bash
$ reth db list --help
Usage: reth db list [OPTIONS] <TABLE>
@ -88,6 +88,36 @@ Options:
Print help (see a summary with '-h')
Logging:
--log.stdout.format <FORMAT>
The format to use for logs written to stdout
[default: terminal]
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
--log.stdout.filter <FILTER>
The filter to use for logs written to stdout
[default: info]
--log.file.format <FORMAT>
The format to use for logs written to the log file
[default: terminal]
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--log.file.directory <PATH>
The path to put log files in
@ -103,11 +133,6 @@ Logging:
[default: 5]
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--log.journald
Write logs to journald

View File

@ -2,7 +2,7 @@
Returns the full database path
```text
```bash
$ reth db path --help
Usage: reth db path [OPTIONS]
@ -42,6 +42,36 @@ Options:
Print help (see a summary with '-h')
Logging:
--log.stdout.format <FORMAT>
The format to use for logs written to stdout
[default: terminal]
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
--log.stdout.filter <FILTER>
The filter to use for logs written to stdout
[default: info]
--log.file.format <FORMAT>
The format to use for logs written to the log file
[default: terminal]
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--log.file.directory <PATH>
The path to put log files in
@ -57,11 +87,6 @@ Logging:
[default: 5]
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--log.journald
Write logs to journald

View File

@ -2,7 +2,7 @@
Snapshots tables from database
```text
```bash
$ reth db snapshot --help
Usage: reth db snapshot [OPTIONS] [SEGMENTS]...
@ -63,8 +63,13 @@ Options:
-c, --compression <COMPRESSION>
Compression algorithms to use
[default: lz4]
[possible values: lz4, zstd, zstd-with-dictionary, uncompressed]
[default: uncompressed]
Possible values:
- lz4: LZ4 compression algorithm
- zstd: Zstandard (Zstd) compression algorithm
- zstd-with-dictionary: Zstandard (Zstd) compression algorithm with a dictionary
- uncompressed: No compression, uncompressed snapshot
--with-filters
Flag to enable inclusion list filters and PHFs
@ -91,6 +96,36 @@ Options:
Print help (see a summary with '-h')
Logging:
--log.stdout.format <FORMAT>
The format to use for logs written to stdout
[default: terminal]
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
--log.stdout.filter <FILTER>
The filter to use for logs written to stdout
[default: info]
--log.file.format <FORMAT>
The format to use for logs written to the log file
[default: terminal]
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--log.file.directory <PATH>
The path to put log files in
@ -106,11 +141,6 @@ Logging:
[default: 5]
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--log.journald
Write logs to journald

View File

@ -2,7 +2,7 @@
Lists all the tables, their entry count and their size
```text
```bash
$ reth db stats --help
Usage: reth db stats [OPTIONS]
@ -42,6 +42,36 @@ Options:
Print help (see a summary with '-h')
Logging:
--log.stdout.format <FORMAT>
The format to use for logs written to stdout
[default: terminal]
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
--log.stdout.filter <FILTER>
The filter to use for logs written to stdout
[default: info]
--log.file.format <FORMAT>
The format to use for logs written to the log file
[default: terminal]
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--log.file.directory <PATH>
The path to put log files in
@ -57,11 +87,6 @@ Logging:
[default: 5]
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--log.journald
Write logs to journald

View File

@ -2,7 +2,7 @@
Lists current and local database versions
```text
```bash
$ reth db version --help
Usage: reth db version [OPTIONS]
@ -42,6 +42,36 @@ Options:
Print help (see a summary with '-h')
Logging:
--log.stdout.format <FORMAT>
The format to use for logs written to stdout
[default: terminal]
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
--log.stdout.filter <FILTER>
The filter to use for logs written to stdout
[default: info]
--log.file.format <FORMAT>
The format to use for logs written to the log file
[default: terminal]
Possible values:
- json: Represents JSON formatting for logs. This format outputs log records as JSON objects, making it suitable for structured logging
- log-fmt: Represents logfmt (key=value) formatting for logs. This format is concise and human-readable, typically used in command-line applications
- terminal: Represents terminal-friendly formatting for logs
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--log.file.directory <PATH>
The path to put log files in
@ -57,11 +87,6 @@ Logging:
[default: 5]
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--log.journald
Write logs to journald