install plugins (#8949)

This commit is contained in:
Jack Amadeo
2026-05-04 08:58:25 -04:00
committed by GitHub
parent b11c9a3d98
commit 5f9a5a53db
9 changed files with 440 additions and 1 deletions
+26
View File
@@ -14,6 +14,7 @@ use goose_mcp::{AutoVisualiserRouter, ComputerControllerServer, MemoryServer, Tu
use crate::commands::configure::configure_telemetry_consent_dialog;
use crate::commands::configure::handle_configure;
use crate::commands::info::handle_info;
use crate::commands::plugin::handle_plugin_install;
use crate::commands::project::{handle_project_default, handle_projects_interactive};
use crate::commands::recipe::{handle_deeplink, handle_list, handle_open, handle_validate};
use crate::commands::term::{
@@ -643,6 +644,16 @@ enum GatewayCommand {
},
}
#[derive(Subcommand)]
enum PluginCommand {
/// Install a plugin from a git repository URL
#[command(about = "Install a plugin from a git repository URL")]
Install {
#[arg(help = "URL to a git repository containing a supported plugin")]
url: String,
},
}
#[derive(Subcommand)]
enum RecipeCommand {
/// Validate a recipe file
@@ -854,6 +865,13 @@ enum Command {
command: RecipeCommand,
},
/// Manage plugins
#[command(about = "Manage plugins")]
Plugin {
#[command(subcommand)]
command: PluginCommand,
},
/// Manage scheduled jobs
#[command(about = "Manage scheduled jobs", visible_alias = "sched")]
Schedule {
@@ -1056,6 +1074,7 @@ fn get_command_name(command: &Option<Command>) -> &'static str {
Some(Command::Schedule { .. }) => "schedule",
Some(Command::Update { .. }) => "update",
Some(Command::Recipe { .. }) => "recipe",
Some(Command::Plugin { .. }) => "plugin",
Some(Command::Term { .. }) => "term",
#[cfg(feature = "local-inference")]
Some(Command::LocalModels { .. }) => "local-models",
@@ -1529,6 +1548,12 @@ async fn handle_schedule_command(command: SchedulerCommand) -> Result<()> {
}
}
fn handle_plugin_subcommand(command: PluginCommand) -> Result<()> {
match command {
PluginCommand::Install { url } => handle_plugin_install(&url),
}
}
fn handle_recipe_subcommand(command: RecipeCommand) -> Result<()> {
match command {
RecipeCommand::Validate { recipe_name } => handle_validate(&recipe_name),
@@ -1857,6 +1882,7 @@ pub async fn cli() -> anyhow::Result<()> {
Ok(())
}
Some(Command::Recipe { command }) => handle_recipe_subcommand(command),
Some(Command::Plugin { command }) => handle_plugin_subcommand(command),
Some(Command::Term { command }) => handle_term_subcommand(command).await,
#[cfg(feature = "local-inference")]
Some(Command::LocalModels { command }) => handle_local_models_command(command).await,