> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/block/goose/llms.txt
> Use this file to discover all available pages before exploring further.

# Recipe Command

> Manage and validate Goose recipes

The `recipe` command provides utilities for working with Goose recipes - YAML templates that define custom agent configurations.

## Usage

```bash theme={null}
goose recipe <subcommand> [OPTIONS]
```

## Subcommands

### Validate

Validate a recipe file.

```bash theme={null}
goose recipe validate <RECIPE_NAME>
```

**Arguments:**

<ParamField path="recipe_name" type="string" required>
  Recipe name or full path to the recipe file to validate.

  Can be:

  * Recipe name from GitHub (if `GOOSE_RECIPE_GITHUB_REPO` configured)
  * Local file path to YAML file
</ParamField>

**Examples:**

```bash theme={null}
goose recipe validate my-recipe
goose recipe validate /path/to/recipe.yaml
goose recipe validate ./recipes/analyze.yaml
```

**Output:**

```bash theme={null}
✓ recipe file is valid
```

Or if invalid:

```bash theme={null}
✗ recipe file is invalid: Missing required field 'prompt'
```

### Deeplink

Generate a deeplink URL for a recipe.

```bash theme={null}
goose recipe deeplink <RECIPE_NAME> [--param KEY=VALUE...]
```

**Arguments:**

<ParamField path="recipe_name" type="string" required>
  Recipe name or full path to the recipe file.
</ParamField>

**Options:**

<ParamField path="--param" type="key=value" default="[]">
  Recipe parameter in `key=value` format. Can be specified multiple times.

  **Short:** `-p`

  **Example:** `--param username=alice --param channel=goose-team`
</ParamField>

**Examples:**

```bash theme={null}
goose recipe deeplink analyze-code
goose recipe deeplink my-recipe --param user=alice --param task=review
goose recipe deeplink /path/to/recipe.yaml -p env=production
```

**Output:**

```bash theme={null}
✓ Generated deeplink for: Code Analysis Recipe
goose://recipe?config=eyJ0aXRsZSI6IkNvZGUgQW5...&username=alice&channel=goose-team
```

**Use Cases:**

* Share recipe configurations
* Create bookmarkable workflows
* Integrate with external tools
* Pre-fill recipe parameters

### Open

Open a recipe in Goose Desktop.

```bash theme={null}
goose recipe open <RECIPE_NAME> [--param KEY=VALUE...]
```

**Arguments:**

<ParamField path="recipe_name" type="string" required>
  Recipe name or full path to the recipe file.
</ParamField>

**Options:**

<ParamField path="--param" type="key=value" default="[]">
  Recipe parameter in `key=value` format. Can be specified multiple times.

  **Short:** `-p`
</ParamField>

**Examples:**

```bash theme={null}
goose recipe open analyze-code
goose recipe open my-recipe --param user=alice --param env=dev
goose recipe open ./recipe.yaml
```

**Output:**

```bash theme={null}
✓ Opened recipe 'Code Analysis Recipe' in Goose Desktop
```

Or if Desktop not available:

```bash theme={null}
✗ Failed to open recipe in Goose Desktop: desktop not found
Generated deeplink: goose://recipe?config=...
You can manually copy and open the URL above
```

### List

List available recipes.

```bash theme={null}
goose recipe list [OPTIONS]
```

**Options:**

<ParamField path="--format" type="string" default="text">
  Output format: `text` or `json`
</ParamField>

<ParamField path="--verbose" type="boolean" default="false">
  Show verbose information including recipe descriptions.

  **Short:** `-v`
</ParamField>

**Examples:**

```bash theme={null}
goose recipe list
goose recipe list --format json
goose recipe list --verbose
```

**Text Output:**

```bash theme={null}
Available recipes:
analyze-code - Performs code analysis and review - local: ./recipes/analyze.yaml
test-generator - Generates unit tests - github: recipes/test-gen.yaml
```

**Verbose Output:**

```bash theme={null}
Available recipes:
  analyze-code - Performs code analysis and review - local: ./recipes/analyze.yaml
    Title: Code Analysis Recipe
    Path: /home/user/recipes/analyze.yaml
```

**JSON Output:**

```json theme={null}
[
  {
    "name": "analyze-code",
    "title": "Code Analysis Recipe",
    "description": "Performs code analysis and review",
    "path": "./recipes/analyze.yaml",
    "source": "Local"
  }
]
```

## Recipe Sources

Recipes can be loaded from:

### Local Files

YAML files on your filesystem:

```bash theme={null}
goose recipe validate ./my-recipe.yaml
goose recipe validate /absolute/path/to/recipe.yaml
```

### GitHub Repository

If `GOOSE_RECIPE_GITHUB_REPO` is configured:

```bash theme={null}
export GOOSE_RECIPE_GITHUB_REPO=username/recipes
goose recipe validate my-recipe  # Fetches from GitHub
```

Or configure permanently:

```bash theme={null}
goose configure
# Select: goose settings → goose recipe github repo
# Enter: username/recipes
```

## Recipe Format

Recipes are YAML files with this structure:

```yaml theme={null}
title: "My Recipe"
description: "Recipe description"
version: "1.0"

prompt: |
  System instructions for the AI agent.
  Can include parameters: {{ username }}

instructions: |
  Additional context and guidance.
  Parameters work here too: {{ task }}

parameters:
  username:
    type: string
    description: "User name"
    required: true
  task:
    type: string  
    description: "Task to perform"
    default: "analyze"

response:
  json_schema:
    type: object
    properties:
      result:
        type: string
        description: "Analysis result"
    required:
      - result
```

## Using Recipes

### With Run Command

Execute a recipe:

```bash theme={null}
goose run --recipe analyze-code
goose run --recipe ./recipe.yaml --params user=alice --params task=review
```

**See:** [Run Command documentation](#) for details.

### With Parameters

Pass parameters to recipes:

```bash theme={null}
goose run --recipe my-recipe \
  --params username=alice \
  --params task=review \
  --params env=production
```

### Explain Recipe

Show recipe details before running:

```bash theme={null}
goose run --recipe analyze-code --explain
```

**Output:**

```bash theme={null}
Title: Code Analysis Recipe
Description: Performs comprehensive code analysis

Parameters:
  - file (required): Path to file to analyze
  - depth (optional): Analysis depth (default: full)
```

### Render Recipe

Print the rendered recipe YAML:

```bash theme={null}
goose run --recipe my-recipe \
  --params user=alice \
  --render-recipe
```

Shows the final YAML with parameters substituted.

## Validation

Recipe validation checks:

* **Required fields:** `title`, `prompt`
* **Schema validation:** JSON schema syntax
* **Parameter references:** All `{{ param }}` references exist
* **YAML syntax:** Valid YAML structure
* **Type checking:** Parameter types match usage

**Example errors:**

```bash theme={null}
✗ recipe file is invalid: Missing required field 'title'
✗ recipe file is invalid: Invalid JSON schema
✗ recipe file is invalid: Parameter 'username' referenced but not defined
```

## Examples

**Create and validate recipe:**

```bash theme={null}
# Create recipe.yaml
cat > recipe.yaml << 'EOF'
title: "Test Generator"
description: "Generate unit tests"
prompt: |
  Generate unit tests for {{ file }}
instructions: |
  Use {{ framework }} testing framework
parameters:
  file:
    type: string
    required: true
  framework:
    type: string
    default: "jest"
EOF

# Validate
goose recipe validate recipe.yaml
```

**Generate deeplink with parameters:**

```bash theme={null}
goose recipe deeplink test-generator \
  --param file=src/utils.ts \
  --param framework=vitest
```

**List and filter recipes:**

```bash theme={null}
# All recipes
goose recipe list

# With descriptions
goose recipe list --verbose

# JSON for scripting
goose recipe list --format json | jq '.[] | select(.source == "Local")'
```

**Open in Desktop:**

```bash theme={null}
goose recipe open analyze-code --param file=main.ts
```

## Recipe Repository

Configure a GitHub repository for shared recipes:

```bash theme={null}
# Set repository
export GOOSE_RECIPE_GITHUB_REPO=myorg/goose-recipes

# Or configure permanently
goose configure
# Select: goose settings → goose recipe github repo
```

Then reference recipes by name:

```bash theme={null}
goose recipe validate code-review
goose run --recipe test-generator
```

Goose will fetch from:
`https://github.com/myorg/goose-recipes/recipes/<name>.yaml`

## See Also

* [Run Command](#) - Execute recipes
* [Configure Command](/api/cli/configure) - Set recipe repository
* Recipe authoring guide (link to guide)
