Configuration
Gooze reads config from a file named gooze.yaml. This helps you keep the same settings in your repo and in CI.
Create a starter config
This command creates a starter gooze.yaml in the current directory.
gooze initHow config is loaded
- File name:
gooze.yaml - Location: the directory you run Gooze from
- Environment variables: prefix
GOOZE_(use_instead of-and.)
Example: the flag --no-cache can be set via GOOZE_NO_CACHE=true.
Environment variables
Gooze can read settings from environment variables. The names are derived from config keys by prefixing GOOZE_, uppercasing, and replacing . and - with _.
Typical precedence is: CLI flags -> env vars -> config file -> defaults. For logging, --verbose and --log-output override env/config.
| Env var | What it controls |
|---|---|
GOOZE_OUTPUT | Reports output directory |
GOOZE_NO_CACHE | Disable incremental cache when true |
GOOZE_PATHS_EXCLUDE | Exclude patterns (comma-separated) |
GOOZE_RUN_PARALLEL | Worker count for run |
GOOZE_RUN_MUTATION_TIMEOUT | Per-mutation timeout (seconds) |
GOOZE_LOG_FILENAME | Log file path |
GOOZE_LOG_VERBOSE | Force verbose logging when true |
GOOZE_LOG_LEVEL | Log level (for example: debug, info, warn, error) |
# Example: set output + disable cache for one run
export GOOZE_OUTPUT=.gooze-reports
export GOOZE_NO_CACHE=true
gooze run ./...# Example: exclude vendor and mock files
export GOOZE_PATHS_EXCLUDE='^vendor/,^mock_'
gooze run ./...A common config example
This example does: (1) sets output dir, (2) excludes vendor/examples, (3) sets parallel workers, (4) enables verbose logs.
# gooze.yaml
output: .gooze-reports
no-cache: false
run:
parallel: 1
# Some versions support a timeout flag/config.
# Check: gooze run --help
mutation_timeout: 120
paths:
exclude:
- '^vendor/'
- '^examples/'
logging:
verbose: false
output: .gooze.logCLI flags vs config
In most tools, CLI flags override config. If you see surprising behavior, print help and compare:
gooze --helpgooze run --help