diff --git a/Cargo.lock b/Cargo.lock index 9ee48eb1..20ee1fa3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -363,6 +363,7 @@ checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" dependencies = [ "anstyle", "clap_lex", + "terminal_size", ] [[package]] @@ -2812,6 +2813,16 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "terminal_size" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +dependencies = [ + "rustix", + "windows-sys 0.48.0", +] + [[package]] name = "thiserror" version = "1.0.63" diff --git a/binaries/cuprated/Cargo.toml b/binaries/cuprated/Cargo.toml index eaaba402..0521b1fd 100644 --- a/binaries/cuprated/Cargo.toml +++ b/binaries/cuprated/Cargo.toml @@ -2,7 +2,7 @@ name = "cuprated" version = "0.0.1" edition = "2021" -description = "The Cuprate Monero Rust node." +description = "The Cuprate Rust Monero node." license = "AGPL-3.0-only" authors = ["Boog900", "hinto-janai", "SyntheticBird45"] repository = "https://github.com/Cuprate/cuprate/tree/main/binaries/cuprated" @@ -43,7 +43,7 @@ borsh = { workspace = true } bytemuck = { workspace = true } bytes = { workspace = true } cfg-if = { workspace = true } -clap = { workspace = true, features = ["cargo"] } +clap = { workspace = true, features = ["cargo", "help", "wrap_help"] } chrono = { workspace = true } crypto-bigint = { workspace = true } crossbeam = { workspace = true } diff --git a/binaries/cuprated/src/config/args.rs b/binaries/cuprated/src/config/args.rs index c0b89694..0e397417 100644 --- a/binaries/cuprated/src/config/args.rs +++ b/binaries/cuprated/src/config/args.rs @@ -6,7 +6,9 @@ use cuprate_helper::network::Network; use crate::config::{default::create_default_config_file, Config, DEFAULT_CONFIG_FILE_NAME}; +/// Cuprate Args. #[derive(clap::Parser, Debug)] +#[command(version, about)] pub struct Args { /// The network we should run on. #[arg( @@ -17,10 +19,13 @@ pub struct Args { )] pub network: Network, /// The amount of outbound clear-net connections to maintain. + #[arg(long)] pub outbound_connections: Option, /// The location of the Cuprate config file. + #[arg(long)] pub config_file: Option, /// Generate a config file and place it in the given folder. + #[arg(long)] pub generate_config: Option, }