refactoring: removed create recipe in cli (#11942)
This commit is contained in:
@@ -96,7 +96,6 @@ The following default templates can be customized.
|
||||
| [compaction.md](https://github.com/aaif-goose/goose/blob/main/crates/goose/src/prompts/compaction.md) | Prompt for summarizing conversation history when context limits are reached | Desktop and CLI |
|
||||
| [permission_judge.md](https://github.com/aaif-goose/goose/blob/main/crates/goose/src/prompts/permission_judge.md) | Prompt for analyzing tool operations for read-only detection | Desktop and CLI |
|
||||
| [plan.md](https://github.com/aaif-goose/goose/blob/main/crates/goose/src/prompts/plan.md) | Instructions for creating detailed, actionable plans with clarifying questions | CLI only |
|
||||
| [recipe.md](https://github.com/aaif-goose/goose/blob/main/crates/goose/src/prompts/recipe.md) | Prompt for generating recipe files from conversations | Desktop and CLI |
|
||||
| [subagent_system.md](https://github.com/aaif-goose/goose/blob/main/crates/goose/src/prompts/subagent_system.md) | System prompt for subagents spawned to handle specific tasks | Desktop and CLI |
|
||||
| [tiny_model_system.md](https://github.com/aaif-goose/goose/blob/main/crates/goose/src/prompts/tiny_model_system.md) | System prompt for tiny local models using shell command emulation | CLI |
|
||||
| [session_name.md](https://github.com/aaif-goose/goose/blob/main/crates/goose/src/prompts/session_name.md) | Prompt for generating short session names from conversation history | Desktop and CLI |
|
||||
|
||||
@@ -85,7 +85,7 @@ When you run a recipe using a slash command, the recipe's instructions and promp
|
||||
- Slash commands accept only one [parameter](/docs/guides/recipes/recipe-reference#parameters). Any additional parameters in the recipe must have default values.
|
||||
- Command names are case-insensitive (`/Bug` and `/bug` are treated as the same command).
|
||||
- Command names must be unique and contain no spaces.
|
||||
- You cannot use names that conflict with [built-in CLI slash commands](/docs/guides/goose-cli-commands#slash-commands) like `/recipe`, `/compact`, or `/help`.
|
||||
- You cannot use names that conflict with [built-in CLI slash commands](/docs/guides/goose-cli-commands#slash-commands) like `/compact` or `/help`.
|
||||
- If the recipe file is missing or invalid, the command will be treated as regular text sent to the model.
|
||||
|
||||
## Additional Resources
|
||||
|
||||
@@ -797,7 +797,6 @@ Once you're in an interactive session (via `goose session` or `goose run --inter
|
||||
- **`/plan <message_text>`** - Enter 'plan' mode with optional message. Create a plan based on the current messages and ask user if they want to act on it
|
||||
- **`/prompt <n> [--info] [key=value...]`** - Get prompt info or execute a prompt
|
||||
- **`/prompts [--extension <name>]`** - List all available prompts, optionally filtered by extension
|
||||
- **`/recipe [filepath]`** - Generate a recipe from the current conversation and save it to the specified filepath (must end with .yaml). If no filepath is provided, it will be saved to ./recipe.yaml
|
||||
- **`/compact`** - Compact and summarize the current conversation to reduce context length while preserving key information
|
||||
- **`/r`** - Toggle full tool output display (show complete tool parameters without truncation)
|
||||
- **`/skills [<name>...]`** - List available skills, or load one or more skills by name
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
title: Reusable Recipes
|
||||
description: "Share a goose session setup (including tools, goals, and instructions) as a reusable recipe that others can launch with a single click"
|
||||
description: "Package tools, goals, and instructions as a reusable recipe that others can launch with a single click"
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
@@ -9,57 +9,27 @@ import TabItem from '@theme/TabItem';
|
||||
import { PanelLeft, ChefHat, SquarePen, Link, Clock, Terminal, Share2 } from 'lucide-react';
|
||||
import RecipeFields from '@site/src/components/RecipeFields';
|
||||
|
||||
Sometimes you finish a task in goose and realize, "Hey, this setup could be useful again." Maybe you have curated a great combination of tools, defined a clear goal, and want to preserve that flow. Or maybe you're trying to help someone else replicate what you just did without walking them through it step by step.
|
||||
|
||||
You can turn your current goose session into a reusable recipe that includes the tools, goals, and setup you're using right now and package it into a new Agent that others (or future you) can launch with a single click.
|
||||
Recipes package tools, goals, and instructions into reusable workflows that others (or future you) can launch with a single click.
|
||||
|
||||
## Create Recipe
|
||||
|
||||
<Tabs groupId="interface">
|
||||
<TabItem value="ui" label="goose Desktop" default>
|
||||
|
||||
Create a recipe from the current session or from a template.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="session" label="Current Session" default>
|
||||
1. While in the session you want to save as a recipe, click the <ChefHat className="inline" size={16} /> button at the bottom of the app
|
||||
2. In the dialog that opens, review and edit the recipe fields as needed:
|
||||
<RecipeFields />
|
||||
3. When you're finished, you can:
|
||||
- Click `Create Recipe` to save the recipe to your Recipe Library
|
||||
- Click `Create & Run Recipe` to save and immediately run the recipe in a new session
|
||||
</TabItem>
|
||||
<TabItem value="new" label="Template">
|
||||
1. Click the <PanelLeft className="inline" size={16} /> button in the top-left to open the sidebar
|
||||
2. Click `Recipes` in the sidebar
|
||||
3. Click `Create Recipe`
|
||||
4. In the dialog that opens, fill in the recipe fields as needed:
|
||||
<RecipeFields />
|
||||
5. When you're finished, you can:
|
||||
- Copy the recipe link to share the recipe with others
|
||||
- Click `Save Recipe` to save the recipe to your Recipe Library
|
||||
- Click `Save & Run Recipe` to save and immediately run the recipe in a new session
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
:::warning
|
||||
You cannot create a recipe from an existing recipe session, but you can view or [edit the recipe](#edit-recipe).
|
||||
:::
|
||||
1. Click the <PanelLeft className="inline" size={16} /> button in the top-left to open the sidebar
|
||||
2. Click `Recipes` in the sidebar
|
||||
3. Click `Create Recipe`
|
||||
4. In the dialog that opens, fill in the recipe fields as needed:
|
||||
<RecipeFields />
|
||||
5. When you're finished, you can:
|
||||
- Copy the recipe link to share the recipe with others
|
||||
- Click `Save Recipe` to save the recipe to your Recipe Library
|
||||
- Click `Save & Run Recipe` to save and immediately run the recipe in a new session
|
||||
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="cli" label="goose CLI">
|
||||
Recipe files can be either JSON (.json) or YAML (.yaml) files. While in a [session](/docs/guides/sessions/session-management#start-session), run this command to generate a recipe.yaml file in your current directory:
|
||||
|
||||
```sh
|
||||
/recipe
|
||||
```
|
||||
|
||||
If you want to specify a different name, you can provide it as an argument:
|
||||
|
||||
```sh
|
||||
/recipe my-custom-recipe.yaml
|
||||
```
|
||||
Create a JSON or YAML file in your editor using the recipe structure below.
|
||||
|
||||
<details>
|
||||
<summary>recipe file structure</summary>
|
||||
@@ -92,10 +62,6 @@ You can turn your current goose session into a reusable recipe that includes the
|
||||
|
||||
For detailed descriptions and example configurations of all recipe fields, see the [Recipe Reference Guide](/docs/guides/recipes/recipe-reference).
|
||||
|
||||
:::warning
|
||||
You cannot create a recipe from an existing recipe session - the `/recipe` command will not work.
|
||||
:::
|
||||
|
||||
:::tip Validate Your Recipe
|
||||
You should [validate your recipe](#validate-recipe) to verify that it's complete and properly formatted.
|
||||
:::
|
||||
@@ -161,10 +127,6 @@ You can turn your current goose session into a reusable recipe that includes the
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
:::tip Customize Recipe Generation
|
||||
You can customize how goose generates recipes by editing the `recipe.md` [prompt template](/docs/guides/context-engineering/prompt-templates).
|
||||
:::
|
||||
|
||||
## Edit Recipe
|
||||
<Tabs groupId="interface">
|
||||
<TabItem value="ui" label="goose Desktop" default>
|
||||
|
||||
@@ -44,8 +44,8 @@ Before saving recipes, it's important to understand where they can be stored and
|
||||
|
||||
**Save New Recipe:**
|
||||
|
||||
1. To create a recipe from your chat session, see [Create Recipe](/docs/guides/recipes/session-recipes#create-recipe)
|
||||
2. Once in the Recipe Editor, click `Save Recipe` to save it to your Recipe Library
|
||||
1. Open `Recipes` from the sidebar and click `Create Recipe`
|
||||
2. Complete the Recipe Editor, then click `Save Recipe` to save it to your Recipe Library
|
||||
|
||||
**Save Modified Recipe:**
|
||||
|
||||
@@ -61,15 +61,7 @@ When you modify and save a recipe with a new name, a new recipe and new link are
|
||||
</TabItem>
|
||||
<TabItem value="cli" label="goose CLI">
|
||||
|
||||
When you [create a recipe](/docs/guides/recipes/recipe-reference), it gets saved to:
|
||||
|
||||
* Your working directory by default: `./recipe.yaml`
|
||||
* Any path you specify: `/recipe /path/to/my-recipe.yaml`
|
||||
* Local project recipes: `/recipe .goose/recipes/my-recipe.yaml`
|
||||
|
||||
:::note
|
||||
The CLI saves recipes as `.yaml` files. While the CLI can run recipes in `.json` format, it does not provide an option to save recipes as JSON.
|
||||
:::
|
||||
Create recipe files with your preferred editor. Store project-specific recipes in `.goose/recipes/` and global recipes in `~/.config/goose/recipes/`. The CLI can run recipes in either YAML or JSON format.
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
@@ -46,7 +46,7 @@ Commit your code changes early and often. This allows you to rollback any unexpe
|
||||
Administrators can use an [allowlist](/docs/guides/allowlist) to restrict goose to approved extensions only. This helps prevent risky installs from unknown MCP servers.
|
||||
|
||||
### Set up starter templates
|
||||
You can turn a successful session into a reusable "[recipe](/docs/guides/recipes/session-recipes)" to share with others or use again later—no need to start from scratch.
|
||||
Create a reusable [recipe](/docs/guides/recipes/session-recipes) for workflows you want to share or run again later.
|
||||
|
||||
### Embrace an experimental mindset
|
||||
You don’t need to get it right the first time. Iterating on prompts and tools is part of the workflow.
|
||||
|
||||
Reference in New Issue
Block a user