From 3e7a27aa6243647e53e6679d4dde002d32e6fb49 Mon Sep 17 00:00:00 2001 From: Lily Delalande Date: Tue, 26 Nov 2024 15:44:27 +0100 Subject: [PATCH 1/4] first round --- crates/goose-cli/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/goose-cli/src/main.rs b/crates/goose-cli/src/main.rs index ef7fa1ac5..9d4941a47 100644 --- a/crates/goose-cli/src/main.rs +++ b/crates/goose-cli/src/main.rs @@ -41,7 +41,7 @@ struct Cli { #[arg(long)] databricks_token: Option, - /// Model to use + /// The machine learning model to use for operations. Use 'gpt-4o' for enhanced competence. #[arg(short, long, default_value = "gpt-4o")] model: String, @@ -78,7 +78,7 @@ enum Command { #[arg(short, long, action = clap::ArgAction::SetTrue)] resume: bool, }, - /// Run goose once-off with instructions from a file + /// Run Goose operations once-off using a specified instruction file containing commands Run { #[arg(short, long)] instructions: Option, From a95f1a7c8daa1e618a71ef74f4e1d79337a2a004 Mon Sep 17 00:00:00 2001 From: Lily Delalande Date: Tue, 26 Nov 2024 15:55:49 +0100 Subject: [PATCH 2/4] add extra info --- crates/goose-cli/src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/goose-cli/src/main.rs b/crates/goose-cli/src/main.rs index 9d4941a47..fb5c4003a 100644 --- a/crates/goose-cli/src/main.rs +++ b/crates/goose-cli/src/main.rs @@ -63,6 +63,11 @@ struct Cli { #[derive(Subcommand)] enum Command { Configure { + /// Name of the profile to configure. Use 'default' for the default profile. + #[arg( + help = "Profile name to configure", + long_help = "Create or modify a named configuration profile. Profiles store settings like API keys and model preferences." + )] profile_name: Option, }, System { From fa16ca75e97ca340790ae8f25845fd091a1a358f Mon Sep 17 00:00:00 2001 From: Lily Delalande Date: Tue, 26 Nov 2024 16:06:07 +0100 Subject: [PATCH 3/4] add rest of the help messages --- crates/goose-cli/src/main.rs | 104 ++++++++++++++++++++++++++++++----- 1 file changed, 91 insertions(+), 13 deletions(-) diff --git a/crates/goose-cli/src/main.rs b/crates/goose-cli/src/main.rs index fb5c4003a..6cd62fea0 100644 --- a/crates/goose-cli/src/main.rs +++ b/crates/goose-cli/src/main.rs @@ -62,48 +62,126 @@ struct Cli { #[derive(Subcommand)] enum Command { + /// Configure Goose settings and profiles + #[command(about = "Configure Goose settings and profiles")] Configure { - /// Name of the profile to configure. Use 'default' for the default profile. + /// Name of the profile to configure #[arg( help = "Profile name to configure", - long_help = "Create or modify a named configuration profile. Profiles store settings like API keys and model preferences." + long_help = "Create or modify a named configuration profile. Use 'default' for the default profile." )] profile_name: Option, }, + + /// Manage system prompts and behaviors + #[command(about = "Manage system prompts and behaviors")] System { #[command(subcommand)] action: SystemCommands, }, - /// Start or resume sessions with an optional session name + + /// Start or resume interactive chat sessions + #[command( + about = "Start or resume interactive chat sessions", + alias = "s", + )] Session { - #[arg(short, long)] + /// Name for the chat session + #[arg( + short, + long, + value_name = "NAME", + help = "Name for the chat session (e.g., 'project-x')", + long_help = "Specify a name for your chat session. When used with --resume, will resume this specific session if it exists." + )] session: Option, - #[arg(short, long)] + + /// Configuration profile to use + #[arg( + short, + long, + value_name = "PROFILE", + help = "Configuration profile to use (e.g., 'default')", + long_help = "Use a specific configuration profile. Profiles contain settings like API keys and model preferences." + )] profile: Option, - #[arg(short, long, action = clap::ArgAction::SetTrue)] + + /// Resume a previous session + #[arg( + short, + long, + help = "Resume a previous session (last used or specified by --session)", + long_help = "Continue from a previous chat session. If --session is provided, resumes that specific session. Otherwise resumes the last used session." + )] resume: bool, }, - /// Run Goose operations once-off using a specified instruction file containing commands + + /// Execute commands from an instruction file + #[command(about = "Execute commands from an instruction file")] Run { - #[arg(short, long)] + /// Path to instruction file containing commands + #[arg( + short, + long, + required = true, + value_name = "FILE", + help = "Path to instruction file containing commands", + long_help = "Path to a file containing commands to execute. Each command should be on a new line. \ + The file will be executed in order from top to bottom." + )] instructions: Option, - #[arg(short, long)] + + /// Configuration profile to use + #[arg( + short, + long, + value_name = "PROFILE", + help = "Configuration profile to use (e.g., 'default')", + long_help = "Use a specific configuration profile. Profiles contain settings like API keys and model preferences." + )] profile: Option, - #[arg(short, long)] + + /// Name for this run session + #[arg( + short, + long, + value_name = "NAME", + help = "Name for this run session (e.g., 'daily-tasks')", + long_help = "Specify a name for this run session. This helps identify and resume specific runs later." + )] session: Option, - #[arg(short, long, action = clap::ArgAction::SetTrue)] + + /// Resume a previous run + #[arg( + short, + long, + action = clap::ArgAction::SetTrue, + help = "Resume from a previous run", + long_help = "Continue from a previous run, maintaining the execution state and context." + )] resume: bool, }, } #[derive(Subcommand)] enum SystemCommands { + /// Add a new system prompt + #[command(about = "Add a new system prompt from URL")] Add { - #[arg(help = "The URL to add system")] + #[arg( + help = "URL of the system prompt to add", + long_help = "URL pointing to a file containing the system prompt to be added." + )] url: String, }, + + /// Remove an existing system prompt + #[command(about = "Remove an existing system prompt")] Remove { - #[arg(help = "The URL to remove system")] + #[arg( + help = "URL of the system prompt to remove", + long_help = "URL of the system prompt that should be removed from the configuration." + )] url: String, }, } From 2a837c5cb1b55bf58939f0fc4e623365ec3eb4b8 Mon Sep 17 00:00:00 2001 From: Bradley Axen Date: Fri, 29 Nov 2024 09:44:44 -0800 Subject: [PATCH 4/4] Update crates/goose-cli/src/main.rs --- crates/goose-cli/src/main.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/goose-cli/src/main.rs b/crates/goose-cli/src/main.rs index 7ad6ebd72..400ece026 100644 --- a/crates/goose-cli/src/main.rs +++ b/crates/goose-cli/src/main.rs @@ -126,8 +126,6 @@ enum Command { required = true, value_name = "FILE", help = "Path to instruction file containing commands", - long_help = "Path to a file containing commands to execute. Each command should be on a new line. \ - The file will be executed in order from top to bottom." )] instructions: Option,