diff --git a/xmtp_debug/src/app.rs b/xmtp_debug/src/app.rs index 79f6c6473..5dcd4e810 100644 --- a/xmtp_debug/src/app.rs +++ b/xmtp_debug/src/app.rs @@ -21,6 +21,7 @@ mod store; /// Types shared between App Functions mod types; +use clap::CommandFactory; use color_eyre::eyre::{self, Result}; use directories::ProjectDirs; use std::{fs, path::PathBuf, sync::Arc}; @@ -95,6 +96,11 @@ impl App { } = opts; debug!(fdlimit = get_fdlimit()); + if cmd.is_none() && !clear { + AppOpts::command().print_help()?; + eyre::bail!("No subcommand was specified"); + } + if let Some(cmd) = cmd { match cmd { Generate(g) => generate::Generate::new(g, backend, db).run().await, diff --git a/xmtp_debug/src/args.rs b/xmtp_debug/src/args.rs index ec1decbaf..3c2cf67c5 100644 --- a/xmtp_debug/src/args.rs +++ b/xmtp_debug/src/args.rs @@ -57,7 +57,7 @@ pub struct Generate { #[arg(long, short)] pub amount: usize, /// Specify amount of random identities to invite to group - #[arg(long, short)] + #[arg(long)] pub invite: Option, #[command(flatten)] pub message_opts: MessageGenerateOpts, diff --git a/xmtp_debug/src/constants.rs b/xmtp_debug/src/constants.rs index 93205e2e5..d8bd69bb3 100644 --- a/xmtp_debug/src/constants.rs +++ b/xmtp_debug/src/constants.rs @@ -14,7 +14,7 @@ pub static XMTP_PRODUCTION_D14N: LazyLock = LazyLock::new(|| Url::parse("") pub static XMTP_DEV_D14N: LazyLock = LazyLock::new(|| Url::parse("https://grpc.testnet.xmtp.network:443").unwrap()); pub static XMTP_LOCAL_D14N: LazyLock = - LazyLock::new(|| Url::parse("http://localhots:5050").unwrap()); + LazyLock::new(|| Url::parse("http://localhost:5050").unwrap()); pub static XMTP_PRODUCTION_PAYER: LazyLock = LazyLock::new(|| Url::parse("").unwrap()); pub static XMTP_DEV_PAYER: LazyLock =