mirror of
https://github.com/aljazceru/goose.git
synced 2025-12-19 15:14:21 +01:00
feat: allow for multiple values in cli options for adding extensions (#1070)
This commit is contained in:
@@ -65,23 +65,25 @@ enum Command {
|
||||
)]
|
||||
resume: bool,
|
||||
|
||||
/// Add a stdio extension with environment variables and command
|
||||
/// Add stdio extensions with environment variables and commands
|
||||
#[arg(
|
||||
long = "with-extension",
|
||||
value_name = "COMMAND",
|
||||
help = "Add a stdio extension (e.g., 'GITHUB_TOKEN=xyz npx -y @modelcontextprotocol/server-github')",
|
||||
long_help = "Add a stdio extension from a full command with environment variables. Format: 'ENV1=val1 ENV2=val2 command args...'"
|
||||
help = "Add stdio extensions (can be specified multiple times)",
|
||||
long_help = "Add stdio extensions from full commands with environment variables. Can be specified multiple times. Format: 'ENV1=val1 ENV2=val2 command args...'",
|
||||
action = clap::ArgAction::Append
|
||||
)]
|
||||
extension: Option<String>,
|
||||
extension: Vec<String>,
|
||||
|
||||
/// Add a builtin extension by name
|
||||
/// Add builtin extensions by name
|
||||
#[arg(
|
||||
long = "with-builtin",
|
||||
value_name = "NAME",
|
||||
help = "Add a builtin extension by name (e.g., 'developer')",
|
||||
long_help = "Add a builtin extension that is bundled with goose by specifying its name"
|
||||
help = "Add builtin extensions by name (e.g., 'developer' or multiple: 'developer,github')",
|
||||
long_help = "Add one or more builtin extensions that are bundled with goose by specifying their names, comma-separated",
|
||||
value_delimiter = ','
|
||||
)]
|
||||
builtin: Option<String>,
|
||||
builtin: Vec<String>,
|
||||
},
|
||||
|
||||
/// Execute commands from an instruction file
|
||||
@@ -128,23 +130,25 @@ enum Command {
|
||||
)]
|
||||
resume: bool,
|
||||
|
||||
/// Add a stdio extension with environment variables and command
|
||||
/// Add stdio extensions with environment variables and commands
|
||||
#[arg(
|
||||
long = "with-extension",
|
||||
value_name = "COMMAND",
|
||||
help = "Add a stdio extension with environment variables and command (e.g., 'GITHUB_TOKEN=xyz npx -y @modelcontextprotocol/server-github')",
|
||||
long_help = "Add a stdio extension with environment variables and command. Format: 'ENV1=val1 ENV2=val2 command args...'"
|
||||
help = "Add stdio extensions (can be specified multiple times)",
|
||||
long_help = "Add stdio extensions from full commands with environment variables. Can be specified multiple times. Format: 'ENV1=val1 ENV2=val2 command args...'",
|
||||
action = clap::ArgAction::Append
|
||||
)]
|
||||
extension: Option<String>,
|
||||
extension: Vec<String>,
|
||||
|
||||
/// Add a builtin extension by name
|
||||
/// Add builtin extensions by name
|
||||
#[arg(
|
||||
long = "with-builtin",
|
||||
value_name = "NAME",
|
||||
help = "Add a builtin extension by name (e.g., 'developer')",
|
||||
long_help = "Add a builtin extension that is compiled into goose by specifying its name"
|
||||
help = "Add builtin extensions by name (e.g., 'developer' or multiple: 'developer,github')",
|
||||
long_help = "Add one or more builtin extensions that are bundled with goose by specifying their names, comma-separated",
|
||||
value_delimiter = ','
|
||||
)]
|
||||
builtin: Option<String>,
|
||||
builtin: Vec<String>,
|
||||
},
|
||||
|
||||
/// List available agent versions
|
||||
|
||||
Reference in New Issue
Block a user