diff --git a/ailoop-cli/src/main.rs b/ailoop-cli/src/main.rs index b2b63ba..410508c 100644 --- a/ailoop-cli/src/main.rs +++ b/ailoop-cli/src/main.rs @@ -21,7 +21,7 @@ enum AuthorizeDefault { #[command(version)] #[command(about = "Human-in-the-Loop CLI Tool for AI Agent Communication")] #[command( - help_template = "{name} - {version}\n{about}\n\n{usage-heading}\n {usage}\n\n{all-args}{options}\n" + help_template = "{name} - {version}\n{about}\n\n{usage-heading}\n {usage}\n\n{all-args}\n" )] struct Cli { #[command(subcommand)] diff --git a/ailoop-cli/tests/cli_snapshot_tests.rs b/ailoop-cli/tests/cli_snapshot_tests.rs index 78e50e5..b3b5388 100644 --- a/ailoop-cli/tests/cli_snapshot_tests.rs +++ b/ailoop-cli/tests/cli_snapshot_tests.rs @@ -54,6 +54,23 @@ fn test_help_shows_commands() { } } +#[test] +fn test_help_no_duplicate_options() { + let help_text = get_help_text().expect("Failed to get help text"); + let count = help_text.matches("-h, --help").count(); + assert_eq!( + count, 1, + "'-h, --help' MUST appear exactly once in help output, found {} times\nActual:\n{}", + count, help_text + ); + let count_v = help_text.matches("-V, --version").count(); + assert_eq!( + count_v, 1, + "'-V, --version' MUST appear exactly once in help output, found {} times\nActual:\n{}", + count_v, help_text + ); +} + #[test] fn test_task_help_shows_subcommands() { let help_text = diff --git a/ailoop-py/uv.lock b/ailoop-py/uv.lock index 4552ce8..8c1dacc 100644 --- a/ailoop-py/uv.lock +++ b/ailoop-py/uv.lock @@ -4,7 +4,7 @@ requires-python = ">=3.11" [[package]] name = "ailoop-py" -version = "1.0.4" +version = "1.0.6" source = { editable = "." } dependencies = [ { name = "httpx" },