diff --git a/documentation/docs/guides/config-files.md b/documentation/docs/guides/config-files.md index c546627ec409..e5e0e80d5fb2 100644 --- a/documentation/docs/guides/config-files.md +++ b/documentation/docs/guides/config-files.md @@ -84,6 +84,12 @@ GOOSE_CLI_MIN_PRIORITY: 0.2 # Recipe Configuration GOOSE_RECIPE_GITHUB_REPO: "block/goose-recipes" +# Search Path Configuration +GOOSE_SEARCH_PATHS: + - "/usr/local/bin" + - "~/custom/tools" + - "/opt/homebrew/bin" + # Observability (OpenTelemetry) otel_exporter_otlp_endpoint: "http://localhost:4318" otel_exporter_otlp_timeout: 20000 @@ -130,6 +136,19 @@ extensions: envs: {} # Environment values ``` +## Search Path Configuration + +Extensions may need to execute external commands or tools. By default, goose uses your system's PATH environment variable. You can add additional search directories in your config file: + +```yaml +GOOSE_SEARCH_PATHS: + - "/usr/local/bin" + - "~/custom/tools" + - "/opt/homebrew/bin" +``` + +These paths are prepended to the system PATH when running extension commands, ensuring your custom tools are found without modifying your global PATH. + ## Configuration Priority Settings are applied in the following order of precedence: diff --git a/documentation/docs/guides/environment-variables.md b/documentation/docs/guides/environment-variables.md index 37485532c2de..5f8106658df4 100644 --- a/documentation/docs/guides/environment-variables.md +++ b/documentation/docs/guides/environment-variables.md @@ -236,6 +236,7 @@ These variables control how goose handles [tool execution](/docs/guides/goose-pe | `GOOSE_CLI_MIN_PRIORITY` | Controls verbosity of [tool output](/docs/guides/managing-tools/adjust-tool-output) | Float between 0.0 and 1.0 | 0.0 | | `GOOSE_CLI_TOOL_PARAMS_TRUNCATION_MAX_LENGTH` | Maximum length for tool parameter values before truncation in CLI output (not in debug mode) | Integer | 40 | | `GOOSE_DEBUG` | Enables debug mode to show full tool parameters without truncation | "1", "true" (case insensitive) to enable | false | +| `GOOSE_SEARCH_PATHS` | Additional directories to search for executables when running extensions | JSON array of paths (e.g., `["/usr/local/bin", "~/custom/bin"]`) | System PATH only | No | **Examples** @@ -249,8 +250,13 @@ export GOOSE_TOOLSHIM_OLLAMA_MODEL=llama3.2 export GOOSE_MODE="auto" export GOOSE_CLI_MIN_PRIORITY=0.2 # Show only medium and high importance output export GOOSE_CLI_TOOL_PARAMS_MAX_LENGTH=100 # Show up to 100 characters for tool parameters in CLI output + +# Add custom tool directories for extensions +export GOOSE_SEARCH_PATHS='["/usr/local/bin", "~/custom/tools", "/opt/homebrew/bin"]' ``` +These paths are prepended to the system PATH when extensions execute commands, ensuring your custom tools are found without modifying your global PATH. + ### Enhanced Code Editing These variables configure [AI-powered code editing](/docs/guides/enhanced-code-editing) for the Developer extension's `str_replace` tool. All three variables must be set and non-empty for the feature to activate. diff --git a/documentation/docs/guides/goose-cli-commands.md b/documentation/docs/guides/goose-cli-commands.md index 47b18dc3bc6f..e0705976702f 100644 --- a/documentation/docs/guides/goose-cli-commands.md +++ b/documentation/docs/guides/goose-cli-commands.md @@ -292,6 +292,7 @@ Execute commands from an instruction file or stdin. Check out the [full guide](/ - **`--debug`**: Output complete tool responses, detailed parameter values, and full file paths - **`--max-turns `**: Maximum number of turns allowed without user input (default: 1000) - **`--explain`**: Show a recipe's title, description, and parameters +- **`--output-format `**: Output format (`text` or `json`). Default is `text`. Use `json` for automation and scripting - **`--provider`**: Specify the provider to use for this session (overrides environment variable) - **`--model`**: Specify the model to use for this session (overrides environment variable) diff --git a/documentation/docs/guides/running-tasks.md b/documentation/docs/guides/running-tasks.md index e0fb24000d8f..e4e9af814334 100644 --- a/documentation/docs/guides/running-tasks.md +++ b/documentation/docs/guides/running-tasks.md @@ -153,6 +153,26 @@ goose run --debug -t "your instructions" 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: + +```bash +# Run with JSON output for automation +goose run --output-format json -t "your instructions" + +# Run a recipe with JSON output +goose run --output-format json --recipe recipe.yaml + +# Combine with other options +goose run --output-format json --no-session -t "automated task" +``` + +The JSON output includes: +- Session metadata and execution results +- Tool outputs and any errors +- Structured data suitable for parsing by scripts and CI/CD pipelines + ## Common Use Cases ### Running Script Files diff --git a/documentation/docs/guides/sessions/session-management.md b/documentation/docs/guides/sessions/session-management.md index 1e261d0e12b3..cd710b46cfe5 100644 --- a/documentation/docs/guides/sessions/session-management.md +++ b/documentation/docs/guides/sessions/session-management.md @@ -57,6 +57,7 @@ In your first session, Goose prompts you to [set up an LLM (Large Language Model | New Session in Different Directory | `Cmd+O` | `Ctrl+O` | | Focus Goose Window | `Cmd+Option+Shift+G` | `Ctrl+Alt+Shift+G` | | Toggle Sidebar | `Cmd+B` | `Ctrl+B` | + | Keep goose Window Always on Top | `Cmd+Shift+T` | `Ctrl+Shift+T` |