docs: New shared Agent topic with updates to existing topics and other stuff (#2160)

Co-authored-by: John Austin <jaustin@squareup.com>
Co-authored-by: Kalvin C <kalvinnchau@users.noreply.github.com>
This commit is contained in:
John Austin
2025-04-17 13:16:43 -07:00
committed by GitHub
parent 03b461bb1a
commit 9b605dbdd7
19 changed files with 360 additions and 41 deletions

View File

@@ -1,7 +1,8 @@
---
sidebar_position: 4
sidebar_position: 7
title: CLI Commands
sidebar_label: CLI Commands
---
# CLI Commands
Goose provides a command-line interface (CLI) with several commands for managing sessions, configurations and extensions. Below is a list of the available commands and their descriptions:
@@ -190,7 +191,7 @@ goose update --reconfigure
### mcp
Run an enabled MCP server specified by `<name>` (e.g. 'Google Drive')
Run an enabled MCP server specified by `<name>` (e.g. `'Google Drive'`)
**Usage:**
```bash
@@ -208,9 +209,10 @@ Execute commands from an instruction file or stdin. Check out the [full guide](/
- **`-i, --instructions <FILE>`**: Path to instruction file containing commands. Use - for stdin.
- **`-t, --text <TEXT>`**: Input text to provide to Goose directly
- **`-s, --interactive`**: Continue in interactive mode after processing initial input
- **`-n, --name <NAME>`**: Name for this run session (e.g. 'daily-tasks')
- **`-n, --name <NAME>`**: Name for this run session (e.g. `daily-tasks`)
- **`-r, --resume`**: Resume from a previous run
- **`-p, --path <PATH>`**: Path for this run session (e.g. './playground.jsonl')
- **`--recipe <RECIPE_FILE_NAME> <OPTIONS>`**: Load a custom recipe in current session
- **`-p, --path <PATH>`**: Path for this run session (e.g. `./playground.jsonl`)
- **`--with-extension <COMMAND>`**: Add stdio extensions (can be used multiple times in the same command)
- **`--with-builtin <NAME>`**: Add builtin extensions by name (e.g., 'developer' or multiple: 'developer,github')
@@ -218,6 +220,19 @@ Execute commands from an instruction file or stdin. Check out the [full guide](/
```bash
goose run --instructions plan.md
#Load a recipe with a prompt that Goose executes and then exits
goose run --recipe recipe.yaml
#Load a recipe from this chat and then stays in an interactive session
goose run --recipe recipe.yaml -s
#Load a recipe containing a prompt which Goose executes and then drops into an interactive session
goose run --recipe recipe.yaml --interactive
#Generates an error: no text provided for prompt in headless mode
goose run --recipe recipe_no_prompt.yaml
```
---
@@ -242,6 +257,30 @@ Used to evaluate system-configuration across a range of practical tasks. See the
goose bench ...etc.
```
### recipe
Used to validate a recipe file and get a link to share the recipe (aka "shared agent") with another Goose user.
```bash
goose recipe <COMMAND>
```
**Options:**
- **`--help, -h`**: Print this message or the help for the subcommand
**Command Usage:**
```bash
# Validate a recipe file
goose recipe validate $FILE.yaml
# Generate a deeplink for a recipe file
goose recipe deeplink $FILE.yaml
# Print this message or the help for the given command
goose recipe help
```
---
## Prompt Completion
@@ -257,6 +296,7 @@ The CLI provides a set of slash commands that can be accessed during a session.
- `/mode <name>` - Set the goose mode to use ('auto', 'approve', 'chat')
- `/plan <message>` - Create a structured plan based on the given message
- `/?` or `/help` - Display this help message
- `/recipe <recipe file name>` - Generate and save a session recipe to `recipe.yaml` or the filename specified by the command parameter.
All commands support tab completion. Press `<Tab>` after a slash (/) to cycle through available commands or to complete partial commands.