Add new subcommand for opening recipes in desktop app (#4970)

This commit is contained in:
Kevin Everly
2025-10-06 10:06:42 -07:00
committed by GitHub
parent fb92e713a9
commit 202fea5ed8
3 changed files with 145 additions and 25 deletions
+12 -1
View File
@@ -8,7 +8,7 @@ use crate::commands::bench::agent_generator;
use crate::commands::configure::handle_configure;
use crate::commands::info::handle_info;
use crate::commands::project::{handle_project_default, handle_projects_interactive};
use crate::commands::recipe::{handle_deeplink, handle_list, handle_validate};
use crate::commands::recipe::{handle_deeplink, handle_list, handle_open, handle_validate};
// Import the new handlers from commands::schedule
use crate::commands::schedule::{
handle_schedule_add, handle_schedule_cron_help, handle_schedule_list, handle_schedule_remove,
@@ -283,6 +283,14 @@ enum RecipeCommand {
recipe_name: String,
},
/// Open a recipe in Goose Desktop
#[command(about = "Open a recipe in Goose Desktop")]
Open {
/// Recipe name to get recipe file to open
#[arg(help = "recipe name or full path to the recipe file")]
recipe_name: String,
},
/// List available recipes
#[command(about = "List available recipes")]
List {
@@ -1215,6 +1223,9 @@ pub async fn cli() -> Result<()> {
RecipeCommand::Deeplink { recipe_name } => {
handle_deeplink(&recipe_name)?;
}
RecipeCommand::Open { recipe_name } => {
handle_open(&recipe_name)?;
}
RecipeCommand::List { format, verbose } => {
handle_list(&format, verbose)?;
}