7.2 Command-line overrides and effective values
CLI overrides are valuable for one-off sensitivity analyses, automated grids and output-directory selection. They are also easy to miss during review. Use them deliberately and make the resulting configuration visible.
An override applies only when the option is present. Boolean pairs such as --plots and --no-plots are explicit values; absence means “retain the file or default value.” Repeated/list options may replace a list rather than append to it. The Chapter 7 experiment proves replacement for --sample-sizes 18: [12, 24] became [18].
Effective value versus source value
Keep these concepts separate:
| Term | Meaning |
|---|---|
| Default | Built-in fallback for an omitted field |
| Source value | Value written in the settings file |
| Override | Explicit invocation value |
| Effective value | Value used after merging and validation |
The source file is not modified when CLI options override it. nlmx instead writes a command-specific settings-used artifact when that command supports one. For power, the artifact is power_settings_used.power.
Logs as a second view
The startup log records the executable version, invocation, settings path and output location. Some command families also list applied CLI overrides. Preserve the complete log because a copied settings-used file cannot by itself prove which shell, executable or original file produced it.
When invoking from a script, capture the fully expanded arguments rather than only the wrapper command. Quoting can change comma-separated lists and semicolon-bearing test specifications before nlmx sees them. PowerShell users should quote values containing semicolons.
Reproducible sensitivity runs
For a small temporary change, use an override and retain each output directory. For a result that will be reviewed or published, promote the effective values into a named settings file. This avoids a long, fragile command and makes diffs meaningful.
Do not overwrite the baseline output directory. nlmx generally refuses a non-empty output directory unless overwriting is explicitly enabled; that protection also keeps sensitivity runs from silently replacing evidence.
Common mistakes
- Expecting list options to append without checking command behavior.
- Forgetting that shell parsing happens before nlmx parsing.
- Publishing the source settings file but not the effective settings or command.
Checklist
- Quote structured CLI values.
- Give each variant a separate output directory.
- Compare effective-settings artifacts field by field.
Further reading
See option mapping, rerun records and the worked round trip.