Configuration
FZ is configured through environment variables, .fz/ alias directories, and
per-call arguments. Nothing needs to be configured to get started — every setting has a
default.
Environment Variables
The full list, with defaults, is on the Environment Variables page. The most common ones:
| Variable | Purpose | Default |
|---|---|---|
FZ_LOG_LEVEL |
DEBUG / INFO / WARNING / ERROR / CRITICAL |
ERROR |
FZ_MAX_WORKERS |
Thread-pool size for parallel cases | CPU count |
FZ_MAX_RETRIES |
Calculator retry attempts per case | 5 |
FZ_RUN_TIMEOUT |
Per-case timeout, seconds (0 disables) |
3600 |
FZ_INTERPRETER |
Default formula interpreter (python / R) |
python |
FZ_SHELL_PATH |
Extra search path for shell binaries | system PATH |
FZ_CASE_NAMING |
Case dir naming (path / hash / index) |
path |
FZ_CACHE_DIR |
Cache location | .fz/cache |
from fz import get_config
config = get_config()
print(config.max_workers, config.max_retries)
config.max_workers = 4 # override at runtime
.fz/ Directory
FZ looks for aliases in ./.fz/ (project) then ~/.fz/ (user); project wins.
.fz/
├── models/ # model aliases → fz.fzr(..., model="perfectgas")
│ └── perfectgas.json
├── calculators/ # calculator aliases → fz.fzr(..., calculators="cluster")
│ └── cluster.json
├── algorithms/ # fzd algorithm plugins
│ ├── brent.py
│ └── pso.R
└── tmp/ # per-run scratch dirs (auto-created)
Model Alias
.fz/models/perfectgas.json
{
"varprefix": "$",
"formulaprefix": "@",
"delim": "{}",
"commentline": "#",
"interpreter": "python",
"output": {
"pressure": "python://grep(r'P = (\\S+)', 'output.txt')"
}
}
Calculator Alias
.fz/calculators/cluster.json
{
"uri": "ssh://user@hpc.university.edu",
"models": {
"perfectgas": "bash /home/user/codes/perfectgas/run.sh",
"cfd": "bash /home/user/codes/cfd/run.sh"
}
}
fz.fzr("input.txt", variables, "perfectgas", calculators="cluster")
# resolves to: ssh://user@hpc.university.edu/bash /home/user/codes/perfectgas/run.sh
Inspect and validate what is installed with fzl:
Timeout Resolution Order
Highest priority first:
timeout=argument tofzr()/fzc()(or--timeouton the CLI)- Model field
model["timeout"](int seconds;None/0disables) FZ_RUN_TIMEOUT(default3600)
Argument Formats (CLI)
--model, --calculator, and --variables each accept, tried in this order:
- Alias —
--model perfectgas(from.fz/models/) - JSON file —
--model model.json - Inline JSON —
--model '{"varprefix": "$"}'
See Also
- Environment Variables — every variable in detail
- Model Definition
- Calculators Overview