Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions documentation/docs/guides/config-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,17 @@ GOOSE_SEARCH_PATHS:

These paths are prepended to the system PATH when running extension commands, ensuring your custom tools are found without modifying your global PATH.

## Recipe Command Configuration
You can optionally set up [custom slash commands](/docs/guides/recipes/session-recipes.md#custom-recipe-commands) to run recipes that you create. List the command (without the leading `/`) along with the path to the recipe:

```yaml
slash_commands:
- command: "run-tests"
recipe_path: "/path/to/recipe.yaml"
- command: "daily-standup"
recipe_path: "/Users/me/.local/share/goose/recipes/standup.yaml"
```

## Configuration Priority

Settings are applied in the following order of precedence:
Expand Down
3 changes: 2 additions & 1 deletion documentation/docs/guides/goose-cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ Once you're in an interactive session (via `goose session` or `goose run --inter
- **`/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
- **`/summarize`** - Summarize the current conversation to reduce context length while preserving key information
- **`/compact`** - Compact and summarize the current conversation to reduce context length while preserving key information
- **`/t`** - Toggle between `light`, `dark`, and `ansi` themes. [More info](#themes).
- **`/t <name>`** - Set theme directly (light, dark, ansi)

Expand All @@ -592,6 +592,7 @@ Once you're in an interactive session (via `goose session` or `goose run --inter
# Clear the current conversation history
/clear
```
You can also create [custom slash commands for running recipes](/docs/guides/recipes/session-recipes.md#custom-recipe-commands) in goose Desktop or the CLI.
---
Expand Down
51 changes: 50 additions & 1 deletion documentation/docs/guides/recipes/session-recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: "Share a goose session setup (including tools, goals, and instructi

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import { PanelLeft, Bot, SquarePen, Link, Calendar } from 'lucide-react';
import { PanelLeft, Bot, SquarePen, Link, Calendar, Terminal } from 'lucide-react';

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.

Expand Down Expand Up @@ -428,6 +428,55 @@ You can turn your current goose session into a reusable recipe that includes the
</TabItem>
</Tabs>

## Custom Recipe Commands
Create shortcuts to quickly run recipes in any goose chat session. Type a custom command like `/daily-report` to instantly apply that recipe's instructions.

<Tabs groupId="interface">
<TabItem value="ui" label="goose Desktop" default>
1. Click the <PanelLeft className="inline" size={16} /> button in the top-left to open the sidebar
2. Click `Recipes`
3. Find the recipe you want to edit and click the <Terminal className="inline" size={16} /> button
4. In the modal that pops up, type your custom command (without the leading `/`) into the text box
5. Click `Save`.

Once you assign a custom command, the `Recipes` menu displays that command in purple text under the recipe's creation date. Typing `/` into the goose Desktop chat window shows a popup menu with the available recipe commands.

To run the recipe, type your custom command with a leading slash into any chat session in the desktop app:
```
/run-tests
```

</TabItem>
<TabItem value="cli" label="goose CLI">

Custom slash commands are configured in your goose [configuration file](/docs/guides/config-files.md). List the command (without the leading `/`) along with the path to the recipe:

```yaml title="~/.config/goose/config.yaml"
slash_commands:
- command: "run-tests"
recipe_path: "/path/to/recipe.yaml"
- command: "daily-standup"
recipe_path: "/Users/me/.local/share/goose/recipes/standup.yaml"
```

To run the recipe, type your custom command with a leading slash into any goose chat session:
```sh
Context: ●○○○○○○○○○ 5% (9695/200000 tokens)
( O)> /run-tests
```
</TabItem>
</Tabs>

When you run a recipe using a slash command, the recipe's instructions and prompt fields are sent to your model and loaded into the conversation, but not displayed in chat. The model responds using the recipe's context and instructions just as if you opened it directly.

:::info
- Custom Recipe commands don't support parameters or arguments.
- Command names are case-insensitive (`/Bug` and `/bug` are treated as the same command).
- Commands must be unique and contain no spaces.
- You cannot use names that conflict with [built-in CLI slash commands](/docs/guides/goose-cli-commands.md#slash-commands) like `/recipe`, `/compact`, or `/help`.
- If the recipe file is missing or invalid, the command will be treated as regular text sent to the model.
:::

## Validate Recipe

<Tabs groupId="interface">
Expand Down
Loading