7.14 Option-to-setting mapping
CLI option names conventionally use kebab case; TOML keys use snake case. Mapping is usually direct, but table placement and structured values still matter.
Table 7.3. Worked power mappings
| CLI form | Settings location | Example effective value |
|---|---|---|
--method fim |
[analysis].method |
"fim" |
--target-power 0.9 |
[analysis].target_power |
0.9 |
--seed 70701 |
[analysis].seed |
70701 |
--threads 1 |
[analysis].threads |
1 |
--sample-sizes 12,24 |
[design].sample_sizes |
[12, 24] |
--fim-approximation fo |
[fim].approximation |
"fo" |
--fim-kind reduced |
[fim].kind |
"reduced" |
--fim-draws 20 |
[fim].draws |
20 |
--no-plots |
[output].plots |
false |
--no-report |
[output].report |
false |
-o DIR |
[output].directory |
path |
Structured --test syntax is converted to a [[test]] table. The worked CLI value
THETA(4)=0.55;null=0;name=WT exponent
maps to separate theta, value, null and name fields. Quote the complete CLI value so the shell does not interpret semicolons.
Mapping is command-specific
Do not mechanically convert every --long-option to a TOML key. Some options control the launcher rather than the scientific configuration, some are repeated, and some compact CLI syntaxes expand into multiple fields. The generated template and settings-used artifact are the authoritative bridge.
Converting a command safely
Start with --print-config, fill the mapped tables, run both forms with identical inputs/seeds, and compare stable output tables. The Chapter 7 experiment compared CSV rows rather than timestamps or log filenames. Then retain the file-driven form as the reviewed baseline.
Common mistakes
- Replacing hyphens with underscores without checking table placement.
- Failing to quote semicolon-containing structured values.
- Comparing whole directories byte-for-byte despite expected timestamps/log IDs.
Checklist
- Verify mappings against a generated template.
- Inspect the settings-used output.
- Compare scientifically stable outputs after conversion.
Further reading
See CLI overrides, effective records and the round-trip procedure.