diff --git a/documentation/docs/guides/goose-cli-commands.md b/documentation/docs/guides/goose-cli-commands.md index 49bb46c9f9..96abdb5d3d 100644 --- a/documentation/docs/guides/goose-cli-commands.md +++ b/documentation/docs/guides/goose-cli-commands.md @@ -260,7 +260,8 @@ Execute commands from an instruction file or stdin. Check out the [full guide](/ - **`--with-extension `**: Add stdio extensions (can be used multiple times in the same command) - **`--with-builtin `**: Add builtin extensions by name (e.g., 'developer' or multiple: 'developer,github') - **`--debug`**: Output complete tool responses, detailed parameter values, and full file paths -- **`--explain`**: Show a recipe's title, description, and parameters. +- **`--explain`**: Show a recipe's title, description, and parameters +- **`--no-session`**: Run goose commands without creating or storing a session file **Usage:** @@ -284,6 +285,9 @@ goose run --recipe recipe.yaml --debug #Show recipe details goose run --recipe recipe.yaml --explain + +#Run instructions from a file without session storage +goose run --no-session -i instructions.txt ``` --- diff --git a/documentation/docs/guides/running-tasks.md b/documentation/docs/guides/running-tasks.md index 533b273f5a..ca5f7d451e 100644 --- a/documentation/docs/guides/running-tasks.md +++ b/documentation/docs/guides/running-tasks.md @@ -91,6 +91,13 @@ goose run -n my-project -t "initial instructions" goose run -n my-project -r ``` +You can also run commands without creating or storing a session file by using the `--no-session` flag. This is useful for automated scripts, or one-off tasks where you don't need to maintain the conversation history or state. This flag routes the session output to a temporary null path (`/dev/null` on Unix or `NUL` on Windows), and discards it when complete. + +```bash +# Run a command without creating a session file +goose run --no-session -t "your command here" +``` + ### Working with Extensions If you want to ensure specific extensions are available when running your task, you can indicate this with arguments. This can be done using the `--with-extension`, `--with-remote-extension`, or `--with-builtin` flags: