mirror of
https://github.com/aljazceru/goose.git
synced 2025-12-19 15:14:21 +01:00
feat: Add command goose update to update goose CLI version (#1308)
Co-authored-by: Alex Hancock <alexhancock@block.xyz>
This commit is contained in:
@@ -157,6 +157,23 @@ enum Command {
|
||||
|
||||
/// List available agent versions
|
||||
Agents(AgentCommand),
|
||||
|
||||
/// Update the Goose CLI version
|
||||
#[command(about = "Update the goose CLI version")]
|
||||
Update {
|
||||
/// Update to canary version
|
||||
#[arg(
|
||||
short,
|
||||
long,
|
||||
help = "Update to canary version",
|
||||
long_help = "Update to the latest canary version of the goose CLI, otherwise updates to the latest stable version."
|
||||
)]
|
||||
canary: bool,
|
||||
|
||||
/// Enforce to re-configure Goose during update
|
||||
#[arg(short, long, help = "Enforce to re-configure goose during update")]
|
||||
reconfigure: bool,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(clap::ValueEnum, Clone, Debug)]
|
||||
@@ -234,6 +251,13 @@ async fn main() -> Result<()> {
|
||||
cmd.run()?;
|
||||
return Ok(());
|
||||
}
|
||||
Some(Command::Update {
|
||||
canary,
|
||||
reconfigure,
|
||||
}) => {
|
||||
goose_cli::commands::update::update(canary, reconfigure)?;
|
||||
return Ok(());
|
||||
}
|
||||
None => {
|
||||
Cli::command().print_help()?;
|
||||
println!();
|
||||
|
||||
Reference in New Issue
Block a user