Max/individual command autodocs (#5018)

* updated autodoc script

* updated autodoc script for fix + reintroduced gitignore file for generated markdown

* auto commit generated command files

* auto commit generated command files

* added command-outputs to autodoc script

* fix merge conflicts

* repush components
This commit is contained in:
mx
2024-10-23 08:55:42 +00:00
committed by mfahampshire
parent c1659a235e
commit bf05930fa8
33 changed files with 496 additions and 61 deletions
+1
View File
@@ -0,0 +1 @@
autodoc-generated-markdown/*
+42 -2
View File
@@ -1,4 +1,44 @@
# `autodoc`
# Autodoc
Command output documentation generator WIP
WIP command output documentation generator. Run via `../scripts/next-scripts/autodoc.sh` to create a bunch of markdown files which are then moved around for importing into the documentation.
## `Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }`
If you run into this error, make sure that you have the following directory structure:
```sh
autodoc/
├── autodoc-generated-markdown/
│ └── commands/
├── Cargo.toml
├── README.md
└── src
└── main.rs
```
And if you don't - create it and re-run.
If you are encountering this error with this dir structure in place, check that all Nym binaries that are listed in `main.rs` also exist in `nym/target/release/`.
Run this crate on its own with `debug` logging and it should panic on the missing binary:
```sh
RUST_LOG="debug" cargo run --release
Finished `release` profile [optimized] target(s) in 0.20s
Running `/home/______/src/nym/target/release/autodoc`
[2024-10-23T08:11:01Z DEBUG autodoc] now running Some(
"nym-api",
)
[2024-10-23T08:11:01Z DEBUG autodoc] stderr: " 2024-10-23T08:11:01.981Z INFO nym_api > Starting nym api...\n"
[2024-10-23T08:11:01Z DEBUG autodoc] stderr: " 2024-10-23T08:11:01.985Z INFO nym_api > Starting nym api...\n"
[2024-10-23T08:11:01Z INFO autodoc] SKIPPING ../../target/release/nym-api init
[2024-10-23T08:11:01Z INFO autodoc] creating own file for ../../target/release/nym-api init --help
[2024-10-23T08:11:01Z DEBUG autodoc] stderr: " 2024-10-23T08:11:01.993Z INFO nym_api > Starting nym api...\n"
< snip >
[2024-10-23T08:11:02Z DEBUG autodoc] now running Some(
"nym-cli",
)
Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
```
+6 -7
View File
@@ -7,7 +7,6 @@ use std::{fs, vec};
const WRITE_PATH: &str = "./autodoc-generated-markdown/";
const COMMAND_PATH: &str = "./autodoc-generated-markdown/commands/";
fn main() -> io::Result<()> {
env_logger::init();
@@ -205,7 +204,7 @@ fn execute_command_own_file(main_command: &str, subcommand: &str) -> io::Result<
.map(|metadata| metadata.is_dir())
.unwrap_or(false)
{
fs::create_dir_all(WRITE_PATH)?;
fs::create_dir_all(COMMAND_PATH)?;
}
let mut file = File::create(format!(
"{}/{}-{}.md",
@@ -220,11 +219,11 @@ fn execute_command_own_file(main_command: &str, subcommand: &str) -> io::Result<
"creating own file for {} {} --help",
main_command, subcommand,
);
if !fs::metadata(WRITE_PATH)
if !fs::metadata(COMMAND_PATH)
.map(|metadata| metadata.is_dir())
.unwrap_or(false)
{
fs::create_dir_all(WRITE_PATH)?;
fs::create_dir_all(COMMAND_PATH)?;
}
let mut help_file = File::create(format!(
"{}/{}-{}-help.md",
@@ -247,15 +246,15 @@ fn execute_command_own_file(main_command: &str, subcommand: &str) -> io::Result<
"creating own file for {} {} --help",
main_command, subcommand,
);
if !fs::metadata(WRITE_PATH)
if !fs::metadata(COMMAND_PATH)
.map(|metadata| metadata.is_dir())
.unwrap_or(false)
{
fs::create_dir_all(WRITE_PATH)?;
fs::create_dir_all(COMMAND_PATH)?;
}
let mut help_file = File::create(format!(
"{}/{}-{}-help.md",
WRITE_PATH,
COMMAND_PATH,
last_word.unwrap(),
subcommand
))?;
@@ -1,10 +1,10 @@
```sh
Binary Name: nym-api
Build Timestamp: 2024-10-22T15:51:54.341993905Z
Build Timestamp: 2024-10-23T08:50:32.539144092Z
Build Version: 1.1.42
Commit SHA: 0e7bbbf93b909bbf3fecd594213bc9b92aec24f1
Commit Date: 2024-10-22T17:18:51.000000000+02:00
Commit SHA: b960cbd978b9ffa17c884bce22f0e59c20b9aa01
Commit Date: 2024-10-23T10:49:01.000000000+02:00
Commit Branch: max/individual-command-autodocs
rustc Version: 1.80.0
rustc Channel: stable
@@ -0,0 +1,25 @@
```sh
Initialise a Nym Api instance with persistent config.toml file
Usage: nym-api init [OPTIONS]
Options:
--id <ID>
Id of the nym-api we want to initialise. if unspecified, a default value will be used. default: "default" [default: default]
-m, --enable-monitor
Specifies whether network monitoring is enabled on this API default: false
-r, --enable-rewarding
Specifies whether network rewarding is enabled on this API default: false
--nyxd-validator <NYXD_VALIDATOR>
Endpoint to nyxd instance used for contract information. default: http://localhost:26657
--mnemonic <MNEMONIC>
Mnemonic of the network monitor used for sending rewarding and zk-nyms transactions default: None
--enable-zk-nym
Flag to indicate whether credential signer authority is enabled on this API default: false
--announce-address <ANNOUNCE_ADDRESS>
Announced address that is going to be put in the DKG contract where zk-nym clients will connect to obtain their credentials default: None
--monitor-credentials-mode
Set this nym api to work in a enabled credentials that would attempt to use gateway with the bandwidth credential requirement
-h, --help
Print help
```
@@ -1,10 +1,10 @@
```sh
Binary Name: nym-client
Build Timestamp: 2024-10-22T15:51:54.341993905Z
Build Timestamp: 2024-10-23T08:50:32.539144092Z
Build Version: 1.1.39
Commit SHA: 0e7bbbf93b909bbf3fecd594213bc9b92aec24f1
Commit Date: 2024-10-22T17:18:51.000000000+02:00
Commit SHA: b960cbd978b9ffa17c884bce22f0e59c20b9aa01
Commit Date: 2024-10-23T10:49:01.000000000+02:00
Commit Branch: max/individual-command-autodocs
rustc Version: 1.80.0
rustc Channel: stable
@@ -0,0 +1,11 @@
```sh
Generate shell completions
Usage: nym-client completions <SHELL>
Arguments:
<SHELL> [possible values: bash, elvish, fish, power-shell, zsh]
Options:
-h, --help Print help
```
@@ -0,0 +1,15 @@
```sh
Import a pre-generated credential
Usage: nym-client import-credential --id <ID> <--credential-data <CREDENTIAL_DATA>|--credential-path <CREDENTIAL_PATH>>
Options:
--id <ID>
Id of client that is going to import the credential
--credential-data <CREDENTIAL_DATA>
Explicitly provide the encoded credential data (as base58)
--credential-path <CREDENTIAL_PATH>
Specifies the path to file containing binary credential data
-h, --help
Print help
```
@@ -0,0 +1,27 @@
```sh
Initialise a Nym client. Do this first!
Usage: nym-client init [OPTIONS] --id <ID>
Options:
--id <ID>
Id of client we want to create config for
--gateway <GATEWAY>
Id of the gateway we are going to connect to
--force-tls-gateway
Specifies whether the client will attempt to enforce tls connection to the desired gateway
--latency-based-selection
Specifies whether the new gateway should be determined based by latency as opposed to being chosen uniformly
--nym-apis <NYM_APIS>
Comma separated list of rest endpoints of the API validators
--disable-socket <DISABLE_SOCKET>
Whether to not start the websocket [possible values: true, false]
-p, --port <PORT>
Port for the socket (if applicable) to listen on in all subsequent runs
--host <HOST>
Ip for the socket (if applicable) to listen for requests
-o, --output <OUTPUT>
[default: text] [possible values: text, json]
-h, --help
Print help
```
@@ -0,0 +1,10 @@
```sh
List all registered with gateways
Usage: nym-client list-gateways [OPTIONS] --id <ID>
Options:
--id <ID> Id of client we want to list gateways for
-o, --output <OUTPUT> [default: text] [possible values: text, json]
-h, --help Print help
```
@@ -0,0 +1,21 @@
```sh
Run the Nym client with provided configuration client optionally overriding set parameters
Usage: nym-client run [OPTIONS] --id <ID>
Options:
--id <ID>
Id of client we want to create config for
--gateway <GATEWAY>
Id of the gateway we want to connect to. If overridden, it is user's responsibility to ensure prior registration happened
--nym-apis <NYM_APIS>
Comma separated list of rest endpoints of the API validators
--disable-socket <DISABLE_SOCKET>
Whether to not start the websocket [possible values: true, false]
-p, --port <PORT>
Port for the socket to listen on
--host <HOST>
Ip for the socket (if applicable) to listen for requests
-h, --help
Print help
```
@@ -0,0 +1,10 @@
```sh
Change the currently active gateway. Note that you must have already registered with the new gateway!
Usage: nym-client switch-gateway --id <ID> --gateway-id <GATEWAY_ID>
Options:
--id <ID> Id of client we want to list gateways for
--gateway-id <GATEWAY_ID> Id of the gateway we want to switch to
-h, --help Print help
```
@@ -1,3 +1,3 @@
```sh
2024-10-22T15:54:46.983520Z ERROR nym-node/src/config/upgrade_helpers.rs:16: Failed to finish upgrade - failed to load config file using path '/home/m/.nym/nym-nodes/default-nym-node/config/config.toml'. detailed message: No such file or directory (os error 2)
2024-10-23T08:52:51.392471Z ERROR nym-node/src/config/upgrade_helpers.rs:16: Failed to finish upgrade - failed to load config file using path '/home/m/.nym/nym-nodes/default-nym-node/config/config.toml'. detailed message: No such file or directory (os error 2)
```
@@ -1,10 +1,10 @@
```sh
Binary Name: nym-node
Build Timestamp: 2024-10-22T15:51:54.341993905Z
Build Timestamp: 2024-10-23T08:50:32.539144092Z
Build Version: 1.1.6
Commit SHA: 0e7bbbf93b909bbf3fecd594213bc9b92aec24f1
Commit Date: 2024-10-22T17:18:51.000000000+02:00
Commit SHA: b960cbd978b9ffa17c884bce22f0e59c20b9aa01
Commit Date: 2024-10-23T10:49:01.000000000+02:00
Commit Branch: max/individual-command-autodocs
rustc Version: 1.80.0
rustc Channel: stable
@@ -0,0 +1,68 @@
```sh
Attempt to migrate an existing mixnode or gateway into a nym-node
Usage: nym-node migrate [OPTIONS] <--id <ID>|--config-file <CONFIG_FILE>> <NODE_TYPE>
Arguments:
<NODE_TYPE> Type of node (mixnode or gateway) to migrate into a nym-node [possible values: mixnode, gateway]
Options:
--id <ID>
Id of the node that's going to get migrated
--config-file <CONFIG_FILE>
Path to a configuration file of the node that's going to get migrated
--preserve-id
Specify whether to preserve id of the imported node
--public-ips <PUBLIC_IPS>
Comma separated list of public ip addresses that will be announced to the nym-api and subsequently to the clients. In nearly all circumstances, it's going to be identical to the address you're going to use for bonding [env: NYMNODE_PUBLIC_IPS=]
--hostname <HOSTNAME>
Optional hostname associated with this gateway that will be announced to the nym-api and subsequently to the clients [env: NYMNODE_HOSTNAME=]
--location <LOCATION>
Optional **physical** location of this node's server. Either full country name (e.g. 'Poland'), two-letter alpha2 (e.g. 'PL'), three-letter alpha3 (e.g. 'POL') or three-digit numeric-3 (e.g. '616') can be provided [env: NYMNODE_LOCATION=]
--http-bind-address <HTTP_BIND_ADDRESS>
Socket address this node will use for binding its http API. default: `0.0.0.0:8080` [env: NYMNODE_HTTP_BIND_ADDRESS=]
--landing-page-assets-path <LANDING_PAGE_ASSETS_PATH>
Path to assets directory of custom landing page of this node [env: NYMNODE_HTTP_LANDING_ASSETS=]
--http-access-token <HTTP_ACCESS_TOKEN>
An optional bearer token for accessing certain http endpoints. Currently only used for prometheus metrics [env: NYMNODE_HTTP_ACCESS_TOKEN=]
--expose-system-info <EXPOSE_SYSTEM_INFO>
Specify whether basic system information should be exposed. default: true [env: NYMNODE_HTTP_EXPOSE_SYSTEM_INFO=] [possible values: true, false]
--expose-system-hardware <EXPOSE_SYSTEM_HARDWARE>
Specify whether basic system hardware information should be exposed. default: true [env: NYMNODE_HTTP_EXPOSE_SYSTEM_HARDWARE=] [possible values: true, false]
--expose-crypto-hardware <EXPOSE_CRYPTO_HARDWARE>
Specify whether detailed system crypto hardware information should be exposed. default: true [env: NYMNODE_HTTP_EXPOSE_CRYPTO_HARDWARE=] [possible values: true, false]
--mixnet-bind-address <MIXNET_BIND_ADDRESS>
Address this node will bind to for listening for mixnet packets default: `0.0.0.0:1789` [env: NYMNODE_MIXNET_BIND_ADDRESS=]
--nym-api-urls <NYM_API_URLS>
Addresses to nym APIs from which the node gets the view of the network [env: NYMNODE_NYM_APIS=]
--nyxd-urls <NYXD_URLS>
Addresses to nyxd chain endpoint which the node will use for chain interactions [env: NYMNODE_NYXD=]
--wireguard-enabled <WIREGUARD_ENABLED>
Specifies whether the wireguard service is enabled on this node [env: NYMNODE_WG_ENABLED=] [possible values: true, false]
--wireguard-bind-address <WIREGUARD_BIND_ADDRESS>
Socket address this node will use for binding its wireguard interface. default: `0.0.0.0:51822` [env: NYMNODE_WG_BIND_ADDRESS=]
--wireguard-private-ip <WIREGUARD_PRIVATE_IP>
Private IP address of the wireguard gateway. default: `10.1.0.1` [env: NYMNODE_WG_IP=]
--wireguard-announced-port <WIREGUARD_ANNOUNCED_PORT>
Port announced to external clients wishing to connect to the wireguard interface. Useful in the instances where the node is behind a proxy [env: NYMNODE_WG_ANNOUNCED_PORT=]
--wireguard-private-network-prefix <WIREGUARD_PRIVATE_NETWORK_PREFIX>
The prefix denoting the maximum number of the clients that can be connected via Wireguard. The maximum value for IPv4 is 32 and for IPv6 is 128 [env: NYMNODE_WG_PRIVATE_NETWORK_PREFIX=]
--verloc-bind-address <VERLOC_BIND_ADDRESS>
Socket address this node will use for binding its verloc API. default: `0.0.0.0:1790` [env: NYMNODE_VERLOC_BIND_ADDRESS=]
--entry-bind-address <ENTRY_BIND_ADDRESS>
Socket address this node will use for binding its client websocket API. default: `0.0.0.0:9000` [env: NYMNODE_ENTRY_BIND_ADDRESS=]
--announce-ws-port <ANNOUNCE_WS_PORT>
Custom announced port for listening for websocket client traffic. If unspecified, the value from the `bind_address` will be used instead [env: NYMNODE_ENTRY_ANNOUNCE_WS_PORT=]
--announce-wss-port <ANNOUNCE_WSS_PORT>
If applicable, announced port for listening for secure websocket client traffic [env: NYMNODE_ENTRY_ANNOUNCE_WSS_PORT=]
--enforce-zk-nyms <ENFORCE_ZK_NYMS>
Indicates whether this gateway is accepting only coconut credentials for accessing the mixnet or if it also accepts non-paying clients [env: NYMNODE_ENFORCE_ZK_NYMS=] [possible values: true, false]
--mnemonic <MNEMONIC>
Custom cosmos wallet mnemonic used for zk-nym redemption. If no value is provided, a fresh mnemonic is going to be generated [env: NYMNODE_MNEMONIC=]
--upstream-exit-policy-url <UPSTREAM_EXIT_POLICY_URL>
Specifies the url for an upstream source of the exit policy used by this node [env: NYMNODE_UPSTREAM_EXIT_POLICY=]
--open-proxy <OPEN_PROXY>
Specifies whether this exit node should run in 'open-proxy' mode and thus would attempt to resolve **ANY** request it receives [env: NYMNODE_OPEN_PROXY=] [possible values: true, false]
-h, --help
Print help
```
@@ -1,3 +1,3 @@
```sh
2024-10-22T15:54:46.996863Z ERROR nym-node/src/config/upgrade_helpers.rs:16: Failed to finish upgrade - failed to load config file using path '/home/m/.nym/nym-nodes/default-nym-node/config/config.toml'. detailed message: No such file or directory (os error 2)
2024-10-23T08:52:51.411416Z ERROR nym-node/src/config/upgrade_helpers.rs:16: Failed to finish upgrade - failed to load config file using path '/home/m/.nym/nym-nodes/default-nym-node/config/config.toml'. detailed message: No such file or directory (os error 2)
```
@@ -0,0 +1,13 @@
```sh
Use identity key of this node to sign provided message
Usage: nym-node sign [OPTIONS] <--text <TEXT>|--contract-msg <CONTRACT_MSG>>
Options:
--id <ID> Id of the nym-node to use [env: NYMNODE_ID=] [default: default-nym-node]
--config-file <CONFIG_FILE> Path to a configuration file of this node [env: NYMNODE_CONFIG=]
--text <TEXT> Signs an arbitrary piece of text with your identity key
--contract-msg <CONTRACT_MSG> Signs a transaction-specific payload, that is going to be sent to the smart contract, with your identity key
-o, --output <OUTPUT> [default: text] [possible values: text, json]
-h, --help Print help
```
@@ -0,0 +1,15 @@
```sh
Add new gateway to this client
Usage: nym-socks5-client add-gateway [OPTIONS] --id <ID>
Options:
--id <ID> Id of client we want to add gateway for
--gateway-id <GATEWAY_ID> Explicitly specify id of the gateway to register with. If unspecified, a random gateway will be chosen instead
--force-tls-gateway Specifies whether the client will attempt to enforce tls connection to the desired gateway
--latency-based-selection Specifies whether the new gateway should be determined based by latency as opposed to being chosen uniformly
--set-active Specify whether this new gateway should be set as the active one
--nym-apis <NYM_APIS> Comma separated list of rest endpoints of the API validators
-o, --output <OUTPUT> [default: text] [possible values: text, json]
-h, --help Print help
```
@@ -1,10 +1,10 @@
```sh
Binary Name: nym-socks5-client
Build Timestamp: 2024-10-22T15:51:54.341993905Z
Build Timestamp: 2024-10-23T08:50:32.539144092Z
Build Version: 1.1.39
Commit SHA: 0e7bbbf93b909bbf3fecd594213bc9b92aec24f1
Commit Date: 2024-10-22T17:18:51.000000000+02:00
Commit SHA: b960cbd978b9ffa17c884bce22f0e59c20b9aa01
Commit Date: 2024-10-23T10:49:01.000000000+02:00
Commit Branch: max/individual-command-autodocs
rustc Version: 1.80.0
rustc Channel: stable
@@ -0,0 +1,11 @@
```sh
Generate shell completions
Usage: nym-socks5-client completions <SHELL>
Arguments:
<SHELL> [possible values: bash, elvish, fish, power-shell, zsh]
Options:
-h, --help Print help
```
@@ -0,0 +1,15 @@
```sh
Import a pre-generated credential
Usage: nym-socks5-client import-credential --id <ID> <--credential-data <CREDENTIAL_DATA>|--credential-path <CREDENTIAL_PATH>>
Options:
--id <ID>
Id of client that is going to import the credential
--credential-data <CREDENTIAL_DATA>
Explicitly provide the encoded credential data (as base58)
--credential-path <CREDENTIAL_PATH>
Specifies the path to file containing binary credential data
-h, --help
Print help
```
@@ -0,0 +1,44 @@
```sh
Initialise a Nym client. Do this first!
Usage: nym-socks5-client init [OPTIONS] --id <ID> --provider <PROVIDER>
Options:
--id <ID>
Id of client we want to create config for
--gateway <GATEWAY>
Id of the gateway we are going to connect to
--force-tls-gateway
Specifies whether the client will attempt to enforce tls connection to the desired gateway
--latency-based-selection
Specifies whether the new gateway should be determined based by latency as opposed to being chosen uniformly
--nym-apis <NYM_APIS>
Comma separated list of rest endpoints of the API validators
--provider <PROVIDER>
Address of the socks5 provider to send messages to
--use-reply-surbs <USE_REPLY_SURBS>
Specifies whether this client is going to use an anonymous sender tag for communication with the service provider. While this is going to hide its actual address information, it will make the actual communication slower and consume nearly double the bandwidth as it will require sending reply SURBs.
Note that some service providers might not support this.
[possible values: true, false]
-p, --port <PORT>
Port for the socket to listen on in all subsequent runs
--host <HOST>
The custom host on which the socks5 client will be listening for requests
-o, --output <OUTPUT>
[default: text]
[possible values: text, json]
-h, --help
Print help (see a summary with '-h')
```
@@ -0,0 +1,10 @@
```sh
List all registered with gateways
Usage: nym-socks5-client list-gateways [OPTIONS] --id <ID>
Options:
--id <ID> Id of client we want to list gateways for
-o, --output <OUTPUT> [default: text] [possible values: text, json]
-h, --help Print help
```
@@ -0,0 +1,34 @@
```sh
Run the Nym client with provided configuration client optionally overriding set parameters
Usage: nym-socks5-client run [OPTIONS] --id <ID>
Options:
--id <ID>
Id of client we want to create config for
--gateway <GATEWAY>
Id of the gateway we want to connect to. If overridden, it is user's responsibility to ensure prior registration happened
--nym-apis <NYM_APIS>
Comma separated list of rest endpoints of the API validators
--use-anonymous-replies <USE_ANONYMOUS_REPLIES>
Specifies whether this client is going to use an anonymous sender tag for communication with the service provider. While this is going to hide its actual address information, it will make the actual communication slower and consume nearly double the bandwidth as it will require sending reply SURBs.
Note that some service providers might not support this.
[possible values: true, false]
--provider <PROVIDER>
Address of the socks5 provider to send messages to
-p, --port <PORT>
Port for the socket to listen on
--host <HOST>
The custom host on which the socks5 client will be listening for requests
-h, --help
Print help (see a summary with '-h')
```
@@ -0,0 +1,19 @@
```sh
Queues up another upgrade for the associated daemon
Usage: nymvisor add-upgrade [OPTIONS] --upgrade-name <UPGRADE_NAME> <DAEMON_BINARY>
Arguments:
<DAEMON_BINARY> Path to the daemon's upgrade executable
Options:
--upgrade-name <UPGRADE_NAME> Name of this upgrade
--force Overwrite existing upgrade binary / upgrade-info.json file
--add-binary Indicate that this command should only add binary to an *existing* scheduled upgrade
--now Force the upgrade to happen immediately
--publish-date <PUBLISH_DATE> Specifies the publish date metadata field of this upgrade. If unset, the current time will be used
--upgrade-time <UPGRADE_TIME> Specifies the time at which the provided upgrade will be performed (RFC3339 formatted). If left unset, the upgrade will be performed in 15min
--upgrade-delay <UPGRADE_DELAY> Specifies delay until the provided upgrade is going to get performed. If let unset, the upgrade will be performed in 15min
-o, --output <OUTPUT> [default: text] [possible values: text, json]
-h, --help Print help
```
@@ -1,10 +1,10 @@
```sh
Binary Name: nymvisor
Build Timestamp: 2024-10-22T15:51:54.341993905Z
Build Timestamp: 2024-10-23T08:50:32.539144092Z
Build Version: 0.1.5
Commit SHA: 0e7bbbf93b909bbf3fecd594213bc9b92aec24f1
Commit Date: 2024-10-22T17:18:51.000000000+02:00
Commit SHA: b960cbd978b9ffa17c884bce22f0e59c20b9aa01
Commit Date: 2024-10-23T10:49:01.000000000+02:00
Commit Branch: max/individual-command-autodocs
rustc Version: 1.80.0
rustc Channel: stable
@@ -0,0 +1,9 @@
```sh
Show configuration options being used by this instance of nymvisor
Usage: nymvisor config [OPTIONS]
Options:
-o, --output <OUTPUT> [default: text] [possible values: text, json]
-h, --help Print help
```
@@ -0,0 +1,9 @@
```sh
Show build information of the associated daemon
Usage: nymvisor daemon-build-info [OPTIONS]
Options:
-o, --output <OUTPUT> [default: text] [possible values: text, json]
-h, --help Print help
```
@@ -0,0 +1,48 @@
```sh
Initialise a nymvisor instance with persistent Config.toml file
Usage: nymvisor init [OPTIONS] <DAEMON_BINARY>
Arguments:
<DAEMON_BINARY> Path to the daemon's executable
Options:
--id <ID>
ID specifies the human readable ID of this particular nymvisor instance. Can be overridden with $NYMVISOR_ID environmental variable
--upstream-base-upgrade-url <UPSTREAM_BASE_UPGRADE_URL>
Sets the base url of the upstream source for obtaining upgrade information for the deaemon. It will be used fo constructing the full url, i.e. $NYMVISOR_UPSTREAM_BASE_UPGRADE_URL/$DAEMON_NAME/upgrade-info.json Can be overridden with $NYMVISOR_UPSTREAM_BASE_UPGRADE_URL environmental variable
--upstream-polling-rate <UPSTREAM_POLLING_RATE>
Specifies the rate of polling the upstream url for upgrade information. default: 1h Can be overridden with $NYMVISOR_UPSTREAM_POLLING_RATE
--disable-nymvisor-logs
If enabled, this will disable `nymvisor` logs (but not the underlying process) Can be overridden with $NYMVISOR_DISABLE_LOGS environmental variable
--upgrade-data-directory <UPGRADE_DATA_DIRECTORY>
Set custom directory for upgrade data - binaries and upgrade plans. If not set, the global nymvisors' data directory will be used instead. Can be overridden with $NYMVISOR_UPGRADE_DATA_DIRECTORY environmental variable
--daemon-home <DAEMON_HOME>
The location where the `nymvisor/` directory is kept that contains the auxiliary files associated with the underlying daemon, such as any backups or current version information. (e.g. $HOME/.nym/nym-api/my-nym-api, $HOME/.nym/mixnodes/my-mixnode, etc.). Can be overridden with $DAEMON_HOME environmental variable
--daemon-absolute-upstream-upgrade-url <DAEMON_ABSOLUTE_UPSTREAM_UPGRADE_URL>
Override url to the upstream source for upgrade plans for this daeamon. The Url has to point to an endpoint containing a valid [`UpgradeInfo`] json. Note: if set this takes precedence over `upstream_base_upgrade_url` Can be overridden with $DAEMON_ABSOLUTE_UPSTREAM_UPGRADE_URL environmental variable
--allow-download-upgrade-binaries <ALLOW_DOWNLOAD_UPGRADE_BINARIES>
If set to true, this will enable auto-downloading of new binaries using the url provided in the `upgrade-info.json` Can be overridden with $DAEMON_ALLOW_BINARIES_DOWNLOAD environmental variable [possible values: true, false]
--enforce-download-checksum <ENFORCE_DOWNLOAD_CHECKSUM>
If enabled nymvisor will require that a checksum is provided in the upgrade plan for the binary to be downloaded. If disabled, nymvisor will not require a checksum to be provided, but still check the checksum if one is provided. Can be overridden with $DAEMON_ENFORCE_DOWNLOAD_CHECKSUM environmental variable [possible values: true, false]
--restart-daemon-after-upgrade <RESTART_DAEMON_AFTER_UPGRADE>
If enabled, nymvisor will restart the subprocess with the same command-line arguments and flags (but with the new binary) after a successful upgrade. Otherwise (if disabled), nymvisor will stop running after an upgrade and will require the system administrator to manually restart it. Note restart is only after the upgrade and does not auto-restart the subprocess after an error occurs. Can be overridden with $DAEMON_RESTART_AFTER_UPGRADE environmental variable [possible values: true, false]
--restart-daemon-on-failure
If enabled, nymvisor will restart the subprocess with the same command-line arguments and flags after it has crashed Can be overridden with $DAEMON_RESTART_ON_FAILURE environmental variable
--on-failure-daemon-restart-delay <ON_FAILURE_DAEMON_RESTART_DELAY>
If `restart_on_failure` is enabled, the following value defines the amount of time `nymvisor` shall wait before restarting the subprocess. Can be overridden with $DAEMON_FAILURE_RESTART_DELAY environmental variable
--max-daemon-startup-failures <MAX_DAEMON_STARTUP_FAILURES>
Defines the maximum number of startup failures the subprocess can experience in a quick succession before no further restarts will be attempted and `nymvisor` will exit. Can be overridden with $DAEMON_MAX_STARTUP_FAILURES environmental variable
--startup-period-duration <STARTUP_PERIOD_DURATION>
Defines the length of time during which the subprocess is still considered to be in the startup phase when its failures are going to be considered in `max_startup_failures`. Can be overridden with $DAEMON_STARTUP_PERIOD_DURATION environmental variable
--daemon-shutdown-grace-period <DAEMON_SHUTDOWN_GRACE_PERIOD>
Specifies the amount of time `nymvisor` is willing to wait for the subprocess to undergo graceful shutdown after receiving an interrupt (for either an upgrade or shutdown of the `nymvisor` itself) Once the time passes, a kill signal is going to be sent instead. Can be overridden with $DAEMON_SHUTDOWN_GRACE_PERIOD environmental variable
--daemon-backup-data-directory <DAEMON_BACKUP_DATA_DIRECTORY>
Set custom backup directory for daemon data. If not set, the daemon's home directory will be used instead. Can be overridden with $DAEMON_BACKUP_DATA_DIRECTORY environmental variable
--unsafe-skip-backup
If enabled, `nymvisor` will perform upgrades directly without performing any backups. default: false Can be overridden with $DAEMON_UNSAFE_SKIP_BACKUP environmental variable
-o, --output <OUTPUT>
[default: text] [possible values: text, json]
-h, --help
Print help
```
@@ -168,10 +168,10 @@ Example output:
```sh
Binary Name: nym-socks5-client
Build Timestamp: 2024-10-22T15:51:54.341993905Z
Build Timestamp: 2024-10-23T08:50:32.539144092Z
Build Version: 1.1.39
Commit SHA: 0e7bbbf93b909bbf3fecd594213bc9b92aec24f1
Commit Date: 2024-10-22T17:18:51.000000000+02:00
Commit SHA: b960cbd978b9ffa17c884bce22f0e59c20b9aa01
Commit Date: 2024-10-23T10:49:01.000000000+02:00
Commit Branch: max/individual-command-autodocs
rustc Version: 1.80.0
rustc Channel: stable
@@ -133,10 +133,10 @@ Example output:
```sh
Binary Name: nym-client
Build Timestamp: 2024-10-22T15:51:54.341993905Z
Build Timestamp: 2024-10-23T08:50:32.539144092Z
Build Version: 1.1.39
Commit SHA: 0e7bbbf93b909bbf3fecd594213bc9b92aec24f1
Commit Date: 2024-10-22T17:18:51.000000000+02:00
Commit SHA: b960cbd978b9ffa17c884bce22f0e59c20b9aa01
Commit Date: 2024-10-23T10:49:01.000000000+02:00
Commit Branch: max/individual-command-autodocs
rustc Version: 1.80.0
rustc Channel: stable
@@ -303,14 +303,10 @@ Usage: nym-cli ecash [OPTIONS]
nym-cli ecash <COMMAND>
Commands:
issue-ticket-book
recover-ticket-book
import-ticket-book
generate-ticket
import-coin-index-signatures
import-expiration-date-signatures
import-master-verification-key
help Print this message or the help of the given subcommand(s)
issue-ticket-book
recover-ticket-book
import-ticket-book
help Print this message or the help of the given subcommand(s)
Options:
--mnemonic <MNEMONIC>
@@ -331,7 +327,7 @@ Options:
### `ecash issue-ticket-book`
```sh
Usage: nym-cli ecash issue-ticket-book [OPTIONS] <--client-config <CLIENT_CONFIG>|--output-file <OUTPUT_FILE>>
Usage: nym-cli ecash issue-ticket-book [OPTIONS] --client-config <CLIENT_CONFIG>
Options:
--mnemonic <MNEMONIC>
@@ -344,24 +340,12 @@ Options:
Config file of the client that is supposed to use the credential
--nyxd-url <NYXD_URL>
Overrides the nyxd URL provided either as an environment variable NYXD_VALIDATOR or in a config file
--output-file <OUTPUT_FILE>
Output file for the ticketbook
--bs58-output
Specifies whether the output file should use binary or bs58 encoded data
--nym-api-url <NYM_API_URL>
Overrides the validator API URL provided either as an environment variable API_VALIDATOR or in a config file
--include-expiration-date-signatures
Specifies whether the file output should contain expiration date signatures
--mixnet-contract-address <MIXNET_CONTRACT_ADDRESS>
Overrides the mixnet contract address provided either as an environment variable or in a config file
--include-coin-index-signatures
Specifies whether the file output should contain coin index signatures
--vesting-contract-address <VESTING_CONTRACT_ADDRESS>
Overrides the vesting contract address provided either as an environment variable or in a config file
--include-master-verification-key
Specifies whether the file output should contain master verification key
--bs58-encoded-client-secret <BS58_ENCODED_CLIENT_SECRET>
Secret value that's used for deriving underlying ecash keypair
-h, --help
Print help
```
@@ -391,7 +375,7 @@ Options:
### `ecash import-ticket-book`
```sh
Usage: nym-cli ecash import-ticket-book [OPTIONS] --client-config <CLIENT_CONFIG> <--credential-data <CREDENTIAL_DATA>|--credential-path <CREDENTIAL_PATH>> <--standalone|--full>
Usage: nym-cli ecash import-ticket-book [OPTIONS] --client-config <CLIENT_CONFIG> <--credential-data <CREDENTIAL_DATA>|--credential-path <CREDENTIAL_PATH>>
Options:
--client-config <CLIENT_CONFIG>
@@ -408,10 +392,6 @@ Options:
Overrides the nyxd URL provided either as an environment variable NYXD_VALIDATOR or in a config file
--nym-api-url <NYM_API_URL>
Overrides the validator API URL provided either as an environment variable API_VALIDATOR or in a config file
--standalone
Specifies whether we're attempting to import a standalone ticketbook (i.e. serialised `IssuedTicketBook`)
--full
Specifies whether we're attempting to import full ticketboot (i.e. one that **might** contain required global signatures; that is serialised `ImportableTicketBook`)
--mixnet-contract-address <MIXNET_CONTRACT_ADDRESS>
Overrides the mixnet contract address provided either as an environment variable or in a config file
--vesting-contract-address <VESTING_CONTRACT_ADDRESS>
@@ -7,7 +7,8 @@ set -o nounset
set -o pipefail
# make sure we have all the binaries built
cd ../../ && cargo build --release &&
cd ../../ && cargo build --release && cd tools/nym-cli && cargo build --release && cd ../../ &&
# run autodoc script
cd documentation/autodoc/ && cargo run --release &&
@@ -17,9 +18,9 @@ cd ../../ && cargo build --release &&
mv autodoc-generated-markdown/commands/* ../docs/components/outputs/command-outputs/ &&
# commit files to git: needed for remote deployment from branch
if ! git diff --quiet -- "../docs/pages/developers/tools" "../docs/pages/developers/clients/websocket" "../docs/pages/developers/clients/socks5"; then
if ! git diff --quiet -- "../docs/pages/developers/tools" "../docs/pages/developers/clients/websocket" "../docs/pages/developers/clients/socks5" "../docs/components/outputs/command-outputs/"; then
printf "commiting changes"
git add ../docs/pages/developers/
git add ../docs/pages/developers/ ../docs/components/outputs/command-outputs/
git commit -m "auto commit generated command files"
git push origin HEAD
else