Skip to content

Configuration Reference

Concise technical reference for pyproject.toml tables and the user config file. For design rationale and precedence examples, see Configuration and Precedence Model. For every individual setting key, flag, and default, see Settings.


[tool.nf] (pyproject.toml)

Project-level CLI inventory and runner configuration.

Key Type Default Description
apps list[str] [] Hybrid app specs in module.path:attribute format (preferred unified key).
hybrid_apps list[str] [] Alias merged with apps for hybrid apps.
terraform_apps list[str] [] App specs for Terraform JSON synthesis (nf synth).
legacy_apps list[str] [] Alias merged with terraform_apps for synthesis apps.
python list[str] \| str ["python"] Python command used by subprocess-based commands such as nf synth.
example_scripts list[str] [] Script paths executed by nf synth --all.
outdir str ".nf.out" Output directory searched by CLI stack-inventory commands (nf list stacks).
[tool.nf]
python = ["uv", "run", "python"]
apps = ["infra.app:web"]
terraform_apps = ["legacy.app:network"]

[tool.nf.config] (pyproject.toml)

Project-wide execution and backend settings, keyed by setting name. See Settings for the complete table of keys and valid values.

[tool.nf.config]
max_concurrent_resources = 20
max_concurrent_reads = 40
recovery_strategy = "checkpoint"
deferred_approval = "each_round"
backend_type = "s3"
backend_s3_bucket = "acme-state"
backend_s3_key_prefix = "web"

[tool.nf.tui] and [tool.nf.tui.keys] (pyproject.toml)

Project defaults for nf tui. See nf tui for action IDs and keymap details.

Key Type Description
skin str Theme name (k9s, charm, charm-dark, charm-light, light, terminal).
keymap str Base keymap (k9s or emacs).
graph_lines str Dependency graph line style (bundled, all, shared).
refresh int Auto-refresh interval in seconds (0 disables).
readonly bool \| list[str] Disable mutations globally (true) or for specific app selectors.

[tool.nf.tui.keys] maps individual action IDs to replacement keys (or "" to unbind).


User config (~/.config/nf/config.toml)

Machine-local CLI defaults read by nf (unless --no-user-config is passed; override path with --user-config FILE). Path lookup: $XDG_CONFIG_HOME/nf/config.toml if set to an absolute path and present, else ~/.config/nf/config.toml (%APPDATA%\nf\config.toml on Windows).

Allowed keys (written in CLI flag spelling without leading dashes):

  • Logging: log-level, log-format, trace
  • Display: non-interactive
  • Provider installation & caches: provider-mirror, provider-mirror-include, provider-direct, provider-credentials-file, provider-ca-bundle, provider-cache-dir, schema-cache-dir, provider-version-cache-dir
  • TUI ([tui] table): skin, keymap, graph-lines, refresh, readonly

Engine and backend settings (recovery-strategy, backend-type, max-concurrent-resources, etc.) are rejected in user config. Embedding code and nf.sdk do not read this file.


Precedence and validation

  1. CLI flag (or Project(settings=...) / nf.core.config.flags)
  2. [tool.nf.config] in pyproject.toml
  3. Direct Python argument (App(...) or backend constructor)
  4. User config (~/.config/nf/config.toml, allowed machine-local keys only)
  5. Built-in default

  6. No NF_* environment variables are read.

  7. Conflicting [tool.nf.config] and code values raise ConfigurationError.
  8. Invalid setting keys or values fail fast before planning or execution begins.