docs: import yaml recipe (#4799)

This commit is contained in:
dianed-square
2025-09-24 15:51:31 -07:00
committed by GitHub
parent 990f5ce4f5
commit 3fa8599522
3 changed files with 63 additions and 46 deletions
@@ -20,12 +20,12 @@ After creating recipe files, you can use [`goose` CLI commands](/docs/guides/goo
### CLI and Desktop Formats
The Goose CLI supports CLI and Desktop recipe formats:
Goose recipes use two formats:
- **CLI Format**: Recipe fields (like `title`, `description`, `instructions`) are at the root level of the YAML/JSON file
- **Desktop Format**: Recipe fields are nested inside a `recipe` object, with additional metadata fields at the root level
- **CLI Format**: Recipe fields (like `title`, `description`, `instructions`) are at the root level of the YAML/JSON file. This format is used when recipes are created via the CLI `/recipe` command and [Recipe Generator](/recipe-generator) YAML option.
- **Desktop Format**: Recipe fields are nested inside a `recipe` object, with additional metadata fields at the root level. This format is used when recipes are created from Goose Desktop.
The CLI automatically detects and handles both formats when running `goose run --recipe <file>` and `goose recipe` commands.
The CLI automatically detects and handles both formats when running `goose run --recipe <file>` and `goose recipe` commands. The Desktop can [import](/docs/guides/recipes/storing-recipes#importing-recipes) and use YAML recipes (or deeplinks) in either CLI or Desktop format.
<details>
<summary>Format Examples</summary>
@@ -455,34 +455,40 @@ You can turn your current Goose session into a reusable recipe that includes the
</Tabs>
## Share Recipe
<Tabs groupId="interface">
<TabItem value="ui" label="Goose Desktop" default>
Share your recipe with Desktop users by copying the recipe link:
1. Click the <PanelLeft className="inline" size={16} /> button in the top-left to open the sidebar
2. Click `Recipes` in the sidebar
3. Find your recipe in the Recipe Library
4. Click `Preview` next to the recipe you want to share
5. Under `Deeplink`, click `Copy` and then share the link with others
When someone clicks the link, it will open Goose Desktop with your recipe configuration. They can also use your recipe link to [import a recipe](/docs/guides/recipes/storing-recipes#storing-recipes) into their Recipe Library for future use.
</TabItem>
<TabItem value="cli" label="Goose CLI">
Share your recipe with CLI users by directly sending them the recipe file or converting it to a shareable [deep link](/docs/guides/goose-cli-commands#recipe) for Desktop users:
```sh
goose recipe deeplink recipe.yaml
```
</TabItem>
</Tabs>
Share your recipe with Goose users using a recipe link or recipe file.
:::info Privacy & Isolation
Each recipient gets their own private session when using your shared recipe. No data is shared between users, and your original session and recipe remain unaffected.
:::
### Share via Recipe Link
You can share a recipe with Desktop users via a recipe link.
<Tabs groupId="interface">
<TabItem value="ui" label="Goose Desktop" default>
Copy the deeplink from your Recipe Library to share with others:
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 `Preview` next to the recipe you want to share
4. Under `Deeplink`, click `Copy`
</TabItem>
<TabItem value="cli" label="Goose CLI">
Generate a deeplink from your recipe file to share with others:
```sh
goose recipe deeplink <FILE>
```
</TabItem>
</Tabs>
When someone clicks the link, it will open Goose Desktop with your recipe configuration. They can also use your recipe link to [import a recipe](/docs/guides/recipes/storing-recipes#importing-recipes) for future use.
### Share via Recipe File
You can share a recipe with Desktop or CLI users by sending the recipe file directly.
- Desktop users can [import the recipe](/docs/guides/recipes/storing-recipes#importing-recipes) (YAML only).
- CLI users can run a YAML or JSON recipe using `goose run --recipe <FILE>`
## Schedule Recipe
<Tabs groupId="interface">
<TabItem value="ui" label="Goose Desktop" default>
@@ -661,14 +667,5 @@ To protect your privacy and system integrity, Goose excludes:
This means others may need to supply their own credentials or memory context if the recipe depends on those elements.
## CLI and Desktop Formats
The Goose CLI supports both CLI and Desktop recipe formats:
- **CLI Format**: Recipe fields are at the root level. This format is used when recipes are created via the CLI `/recipe` command and Recipe Generator YAML option.
- **Desktop Format**: Recipe fields are nested under a `recipe` key. This format is used when recipes are saved in Goose Desktop.
Both formats work seamlessly with `goose run --recipe <file>` and `goose recipe` CLI commands - you don't need to convert between them. For more details, see [CLI and Desktop Formats](/docs/guides/recipes/recipe-reference#cli-and-desktop-formats).
## Learn More
Check out the [Goose Recipes](/docs/guides/recipes) guide for more docs, tools, and resources to help you master Goose recipes.
@@ -55,19 +55,10 @@ If you're already using a recipe and want to save a modified version:
3. Make any desired edits to the description, instructions, or initial prompts
5. Click **Save Recipe**
:::note
:::info
When you modify and save a recipe with a new name, a new recipe and new link are generated. You can still run the original recipe from the recipe library, or using the original link. If you edit a recipe without changing its name, the version in the recipe library is updated, but you can still run the original recipe via link.
:::
**Import Recipe:**
You can import a [shared recipe](/docs/guides/recipes/session-recipes#share-recipe) into your Recipe Library:
1. Click the <PanelLeft className="inline" size={16} /> button in the top-left to open the sidebar
2. Click `Recipes`
3. Click **Import Recipe** and paste in the recipe URL
4. Add a name and choose the [storage location](#recipe-storage-locations)
5. Click **Import Recipe**
</TabItem>
<TabItem value="cli" label="Goose CLI">
@@ -80,6 +71,35 @@ You can import a [shared recipe](/docs/guides/recipes/session-recipes#share-reci
</TabItem>
</Tabs>
### Importing Recipes
<Tabs groupId="interface">
<TabItem value="desktop" label="Goose Desktop" default>
Import a recipe using its deeplink or YAML file:
**Import via Recipe Link:**
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 **Import Recipe**
4. Under **Recipe Deeplink**, paste in the [recipe link](/docs/guides/recipes/session-recipes#share-via-recipe-link)
5. Add a name and choose the [storage location](#recipe-storage-locations)
6. Click **Import Recipe**
**Import via Recipe File:**
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 **Import Recipe**
4. Under **Recipe YAML File**, click **Choose File**, select the YAML recipe file, and click `Open`
5. Add a name and choose the [storage location](#recipe-storage-locations)
6. Click **Import Recipe**
Importing JSON recipe files isn't currently supported.
</TabItem>
<TabItem value="cli" label="Goose CLI">
Recipe import is only available in Goose Desktop.
</TabItem>
</Tabs>
## Finding Your Recipes