docs: stream-json and auth-token cli options (#6426)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
dianed-square
2026-01-09 15:41:48 -08:00
committed by GitHub
parent 085f48a297
commit 350ab4b96a
2 changed files with 13 additions and 3 deletions
@@ -314,7 +314,7 @@ Execute commands from an instruction file or stdin. Check out the [full guide](/
- **`--explain`**: Show a recipe's title, description, and parameters
- **`--render-recipe`**: Print the rendered recipe instead of running it
- **`-q, --quiet`**: Quiet mode. Suppress non-response output, printing only the model response to stdout
- **`--output-format <FORMAT>`**: Output format (`text` or `json`). Default is `text`. Use `json` for automation and scripting
- **`--output-format <FORMAT>`**: Output format (`text`, `json`, or `stream-json`). Default is `text`. Use JSON structured output for automation and scripting: `json` for results after completion, `stream-json` for events as they occur
- **`--provider`**: Specify the provider to use for this session (overrides environment variable)
- **`--model`**: Specify the model to use for this session (overrides environment variable)
@@ -517,6 +517,7 @@ Don't expose the web interface to the internet without proper security measures.
- **`-p, --port <PORT>`**: Port number to run the web server on. Default is `3000`
- **`--host <HOST>`**: Host to bind the web server to. Default is `127.0.0.1`
- **`--open`**: Automatically open the browser when the server starts
- **`--auth-token <TOKEN>`**: Require a password to access the web interface
**Usage:**
```bash
@@ -528,6 +529,9 @@ goose web --port 8080
# Start web interface accessible from local network at `http://192.168.1.7:8080`
goose web --host 192.168.1.7 --port 8080
# Start web interface with authentication required
goose web --auth-token <TOKEN>
```
:::info
+8 -2
View File
@@ -155,12 +155,18 @@ goose run --debug --recipe recipe.yaml
### JSON Output Format
For automation, scripting, and CI/CD integration, you can get structured output from `goose run` using the `--output-format json` flag:
For automation, scripting, and CI/CD integration, you can get structured output from `goose run` using the `--output-format` flag:
- `json` - Complete JSON output after execution finishes (best for CI pipelines, logging)
- `stream-json` - Real-time structured output as events occur (best for progress monitoring, long-running tasks)
```bash
# Run with JSON output for automation
goose run --output-format json -t "your instructions"
# Stream JSON events in real-time
goose run --output-format stream-json -t "your instructions"
# Run a recipe with JSON output
goose run --output-format json --recipe recipe.yaml
@@ -221,4 +227,4 @@ This command:
2. Adds a custom extension with an API key
3. Names the session "project-setup"
4. Starts with "Initialize project" instruction
5. Exits automatically after processing the command.
5. Exits automatically after processing the command.