diff --git a/xmtp_debug/src/app.rs b/xmtp_debug/src/app.rs index 79f6c6473..3204bd878 100644 --- a/xmtp_debug/src/app.rs +++ b/xmtp_debug/src/app.rs @@ -24,6 +24,7 @@ mod types; use color_eyre::eyre::{self, Result}; use directories::ProjectDirs; use std::{fs, path::PathBuf, sync::Arc}; +use clap::CommandFactory; use xmtp_cryptography::utils::LocalWallet; use xmtp_id::associations::unverified::UnverifiedRecoverableEcdsaSignature; use xmtp_id::associations::{generate_inbox_id, unverified::UnverifiedSignature}; @@ -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,