Skip to content

Configuration reference ​

fnox.toml declares providers, secrets, profiles, and the settings that control how fnox resolves and injects them. This page lists every field and how config files combine. For a walkthrough, see config files. For provider-specific fields, see the provider catalog.

JSON schema ​

The schema at https://fnox.jdx.dev/schema.json provides completion and validation in editors that support TOML schemas, such as VS Code with Even Better TOML. Reference it from the first line of the file:

toml
#:schema https://fnox.jdx.dev/schema.json

Files and load order ​

fnox merges config files in this order. A later file overrides an earlier one.

  1. The global config, config.toml in FNOX_CONFIG_DIR (default: ~/.config/fnox/config.toml).
  2. For each directory, from the filesystem root down to the current directory:
    1. fnox.toml, .fnox.toml, .config/fnox.toml
    2. fnox.<profile>.toml, .fnox.<profile>.toml, .config/fnox.<profile>.toml for each active profile, in order
    3. fnox.local.toml, .fnox.local.toml, .config/fnox.local.toml

The upward search stops at the first directory whose config sets root = true; the global config still loads. Each file is merged over the files it imports. Run fnox config-files to list the files fnox finds for the current directory.

FilePurpose
fnox.tomlProject config, usually committed.
fnox.<profile>.tomlLoaded only while <profile> is active. Its top-level providers, secrets, leases, and default_provider belong to that profile. fnox.default.toml is never loaded.
fnox.local.tomlPersonal overrides and fnox sync --local-file caches. Keep it out of git.
global config.tomlProviders and secrets for every project on the machine. Create it with fnox init --global.

Explicit config paths ​

-c, --config with a path other than the bare names fnox.toml, .fnox.toml, fnox.local.toml, or .fnox.local.toml turns off directory discovery. Write ./fnox.local.toml to load a local file on its own. fnox loads that file, the files it imports, and the global config, without parent directories, profile files, or local overrides. To load a file with no global layer, point FNOX_CONFIG_DIR at a directory without a config.toml:

sh
FNOX_CONFIG_DIR=/nonexistent fnox -c ./ci.toml get MY_SECRET

Merge rules ​

FieldWhen a later file sets it
providers.<name>, secrets.<name>, leases.<name>, plugins.<name>Replaces the earlier entry of that name as a whole. Fields are not merged.
profiles.<name>Merged: its providers, secrets, and leases by name; inherits and default_provider replaced.
default_provider, if_missing, env, prompt_auth, redact_execReplaced.
daemon, mcpMerged field by field. mcp.secrets is replaced as a whole.
proxyReplaced as a whole, including every rule.

Path values ​

Relative paths in a config file resolve against the directory of the file that declares them. This applies to import and to these provider fields: age.key_file, enpass.vault, enpass.keyfile, foks.home, keepass.database, keepass.keyfile, keeper-sm.config_file, kubernetes.kubeconfig, lua.plugin (when it is a path), password-store.store_dir, and plain.file. A leading ~ expands to your home directory. Paths given on the command line resolve against the current directory.

File structure ​

toml
default_provider = "age"
if_missing = "warn"

[providers.age]
type = "age"
recipients = ["age1..."]

[providers.aws]
type = "aws-sm"
region = "us-east-1"

[secrets]
DATABASE_URL = { provider = "age", value = "YWdl..." } # ciphertext, abbreviated

[profiles.production.secrets]
DATABASE_URL = { provider = "aws", value = "database-url" }

Top-level settings ​

FieldTypeDefaultDescription
default_providerstringnoneProvider for secrets that do not name one, and the default target of write commands.
if_missing"error", "warn", "ignore""warn"Missing-secret behavior for secrets that do not set their own.
envtrue, "exec", falsetrueInjection mode for secrets that do not set their own.
importarray of paths[]Config files to merge underneath this one.
rootbooleanfalseStop the upward directory search at this file.
prompt_authbooleantrueOffer to run a provider's auth command when authentication fails.
redact_execbooleanfalseRedact secret values from piped fnox exec output.
age_key_filepathnoneAccepted for compatibility; has no effect.
providerstable{}Provider instances, by name.
secretstable{}Secrets for the default profile, by name.
profilestable{}Named profiles.
leasestable{}Lease backends, by name.
pluginstable{}Lua plugin sources, by name.
daemontablenoneDaemon settings.
mcptablenoneMCP server settings.
proxytablenoneCredential proxy rules.

default_provider ​

Names the provider for secrets that set a value but no provider. It is also the default target of fnox set and fnox sync, and of new secrets added in fnox edit. A profile's default_provider overrides the top-level one. When neither is set and exactly one provider is available, fnox uses that provider. When no provider applies, fnox set stores the value in plain text.

if_missing ​

What fnox does when a secret resolves to nothing: "error" fails the command, "warn" prints a warning and continues, and "ignore" continues silently. The effective value is the first of these that is set:

  1. --if-missing
  2. FNOX_IF_MISSING
  3. The secret's if_missing
  4. The top-level if_missing
  5. FNOX_IF_MISSING_DEFAULT
  6. "warn"

See missing secrets.

env ​

Default injection mode for every secret that does not set env itself. With env = "exec", no secret enters the interactive shell unless it opts back in with env = true; fnox exec still injects them.

toml
env = "exec"

[secrets]
DATABASE_URL = { provider = "age", value = "YWdl..." } # exec only, inherited
GITHUB_TOKEN = { provider = "age", value = "YWdl...", env = true } # also in the shell

This limits what other programs in your shell can read from the environment. It is not an access boundary: anything that can run commands in your shell can still run fnox get.

import ​

Paths of config files to merge underneath this one, relative to this file. The importing file overrides its imports, and an earlier import overrides a later one. Imports are not recursive: an imported file's own import and root are ignored.

toml
import = ["./shared/base.toml"]

root ​

root = true stops the upward search for config files at this file's directory. The global config still loads.

prompt_auth ​

When a provider fails to authenticate in a terminal, fnox offers to run its auth_command. Set prompt_auth = false to turn this off. FNOX_PROMPT_AUTH overrides this setting, and --non-interactive turns off all prompts.

redact_exec ​

Set redact_exec = true to replace secret values with [REDACTED] in the stdout and stderr of fnox exec when they are piped or redirected. Terminals are never filtered. FNOX_EXEC_REDACT overrides this setting, and --redact / --no-redact override both. See redact output; this is not a sandbox.

age_key_file ​

Parsed for compatibility with older configs, but nothing reads it. Set key_file on the age provider, or set FNOX_AGE_KEY_FILE.

Providers ​

toml
[providers.op]
type = "1password"
vault = "Engineering"

Every provider entry needs a type. These fields apply to every type; the rest depend on the type and are listed on each provider page.

FieldTypeDefaultDescription
typestringrequiredProvider type, such as age, 1password, or aws-sm.
auth_commandstringthe type's built-inCommand to offer when authentication fails. "" turns off the prompt.
daemon_cachebooleantrueSet false to stop the daemon caching values from this provider.
cache_ttlduration[daemon] valueSliding TTL for values cached from this provider. Overrides [daemon] cache_ttl.
max_cache_ttlduration[daemon] valueAbsolute TTL for values cached from this provider. Overrides [daemon] max_cache_ttl.

Provider types: 1password, age, aws-kms, aws-ps, aws-sm, azure-ac, azure-kms, azure-sm, bitwarden, bitwarden-sm, doppler, enpass, fido2, foks, gcp-kms, gcp-sm, gopass, infisical, keepass, keeper-sm, keychain, kubernetes, lua, password-store, passwordstate, plain, proton-pass, vault, yubikey.

auth_command ​

toml
[providers.rbw]
type = "bitwarden"
backend = "rbw"
auth_command = "rbw unlock"

Secret references in provider fields ​

Many provider fields accept { secret = "NAME" } instead of a literal, so a provider's credentials can be secrets themselves. fnox looks the name up among the configured secrets first, then in the environment, and reports a dependency cycle as an error.

toml
[providers.vault]
type = "vault"
address = "https://vault.example.com:8200"
token = { secret = "VAULT_TOKEN" }

[secrets]
VAULT_TOKEN = { provider = "age", value = "YWdl..." } # ciphertext, abbreviated

See secret references in provider config.

Secrets ​

toml
[secrets]
DATABASE_URL = { provider = "op", value = "Database/url", description = "Main database" }

Secret names are environment variable names: they must match ^[A-Za-z_][A-Za-z0-9_]*$. Every field is optional; API_KEY = {} declares a secret that comes from the environment.

FieldTypeDefaultDescription
providerstringdefault_providerProvider that holds or decrypts the value.
valuestringnoneCiphertext for encryption providers, or the item reference for remote providers.
sourcestringnoneFile holding the ciphertext instead of value. See separate files.
defaultstringnoneFallback when the provider returns nothing or fails.
if_missing"error", "warn", "ignore"inheritedMissing-secret behavior for this secret.
envtrue, "exec", falsetop-level envWhere the secret is injected as an environment variable.
as_filebooleanfalseInject the path of a temporary file holding the value.
sensitivebooleantrueSet false to leave the value readable in redacted output. See sensitive.
json_pathstringnoneExtract a field from a JSON value, with dot notation for nesting.
lineinteger, 1 or morenoneExtract one line from a multi-line value.
descriptionstringnoneShown by fnox list.
urlstringnonehttp(s) page where a new value is created. Shown by fnox list; fnox set KEY --open opens it.
daemon_cachebooleantrueSet false to resolve this secret directly instead of from the daemon cache.
cache_ttldurationprovider or [daemon] valueSliding TTL for this secret in the daemon cache. Overrides the provider and [daemon] values.
max_cache_ttldurationprovider or [daemon] valueAbsolute TTL for this secret in the daemon cache. Overrides the provider and [daemon] values.
synctablenoneEncrypted cache written by fnox sync.
pusharray of stringsnonePush targets that fnox push copies the value into.

Resolution order ​

fnox resolves a secret from the first source that produces a value:

  1. The sync cache, decrypted with its provider. Without one, the provider and value.
  2. default, with any ${NAME} references expanded.
  3. An environment variable with the secret's name.

If none produces a value, if_missing decides the outcome. json_path and line apply to whichever value was found.

url ​

url records the page where a new value for the secret is created, such as a personal access token page. It must be an http:// or https:// URL.

toml
[secrets]
GITHUB_TOKEN = { provider = "keychain", value = "GITHUB_TOKEN", url = "https://github.com/settings/tokens" }

fnox list adds a URL column when any secret has one, and fnox tui shows it in the secret details. To rotate the token, run:

bash
fnox set GITHUB_TOKEN --open

fnox prints the URL, opens it in your default browser, then prompts for the new value with hidden input. If no browser can be launched (for example over SSH), open the printed URL yourself. --open needs an interactive terminal and cannot be combined with VALUE, --from-file, or --generate. Without a url on the secret, it prints a warning and goes straight to the prompt. fnox set KEY --url URL records the URL without asking for a value.

value ​

For an encryption provider such as age or aws-kms, value is ciphertext that fnox set writes. For a remote provider such as 1password or aws-sm, it names the item; each provider's page gives the format.

toml
[secrets]
DATABASE_URL = { provider = "age", value = "YWdl..." } # ciphertext, abbreviated
STRIPE_KEY = { provider = "aws", value = "stripe-key" } # AWS Secrets Manager secret name

default ​

Used when the provider returns nothing, including after a provider error. ${NAME} inside a default expands to another secret's resolved value, in any declaration order:

toml
[secrets]
API_BASE_URL = { default = "https://api.${BASE_URL}" }
BASE_URL = { default = "example.com" }

An undefined reference or a cycle is an error. A reference to a secret that resolves to nothing under warn or ignore expands to an empty string. Expansion applies only to default.

A default can also contain a template. Templates render first, then ${NAME} expands.

env ​

ValueShell integration and fnox exportfnox execfnox get
true (default)yesyesyes
"exec"noyesyes
falsenonoyes

fnox export --all includes all three. A provider or lease backend that depends on an env = false secret can still read it.

as_file ​

fnox writes the value to a temporary file that only you can read, and sets the variable to the file's path. fnox exec deletes the file when the command exits. Store file contents with fnox set KEY --from-file PATH, which keeps them byte for byte, including trailing newlines.

toml
[secrets]
GOOGLE_APPLICATION_CREDENTIALS = { provider = "op", value = "GCP/key file", as_file = true }

sensitive ​

Output redaction (fnox exec --redact, the MCP exec tool and ci-redact) hides every secret value by default. Set sensitive = false on plain configuration, such as a log level or an endpoint, so its value stays readable instead of corrupting ordinary output:

toml
[secrets]
LOG_LEVEL = { default = "INFO", sensitive = false }   # readable in output
API_KEY = { provider = "kv", value = "api-key" }      # redacted

sensitive = false applies whatever the value's source, so use it only for values that are not secrets. The usual limits still apply to everything else: fnox exec filters only output that is not a terminal (piped or redirected), and fnox exec and the MCP exec tool skip values shorter than 3 bytes after trimming. ci-redact has no length limit but cannot mask multi-line values.

json_path and line ​

json_path parses the value as JSON and extracts a field, using dot notation for nested keys. line returns the Nth line, counting from 1. They cannot be combined.

toml
[secrets]
DB_PASSWORD = { provider = "aws", value = "db-credentials", json_path = "credentials.password" }
USERNAME = { provider = "pass", value = "master", line = 2 }

sync ​

fnox sync writes sync = { provider = "...", value = "..." }, where value is the secret encrypted with provider. Resolution uses it instead of the original provider until fnox sync replaces it or fnox reencrypt clears it. Let fnox sync maintain this field. See sync.

Files ​

toml
# ~/.config/fnox/config.toml
[files]
"~/.kube/config" = { provider = "age", value = "YWdl..." } # ciphertext, abbreviated

[profiles.work.files]
"~/.aws/credentials" = { provider = "age", source = "files/aws-credentials.age" }

A file is a secret whose value is a whole file, keyed by the path it belongs at. It uses the same providers as a secret and is never an environment variable. The key is an absolute path or starts with ~/; ~/.kube/config and /home/me/.kube/config name the same file.

Files can only be declared in the global config (~/.config/fnox/config.toml, or FNOX_CONFIG_DIR). A project fnox.toml that declares them is an error, because it would let a cloned repository choose which paths fnox writes.

FieldTypeDefaultDescription
providerstringdefault_providerProvider that encrypts or stores the file. It must be able to encrypt or store, so plain is refused.
valuestringnoneCiphertext for encryption providers, or the item reference for remote providers.
sourcepathnoneFile holding what value would hold, relative to the config directory and inside it. Use source or value, not both.
descriptionstringnoneNote about the file.

See secret files.

Templates ​

A secret default and any literal string in a provider field that also accepts { secret = "NAME" } is rendered as a Tera template when it contains {{, {% or {#. Strings without those delimiters are used as written.

VariableValue
fnox.profileThe highest-priority selected profile, or default when none is selected
fnox.profilesEvery selected profile as a list, lowest priority first
toml
[providers.aws]
type = "aws-ps"
region = "eu-central-1"
profile = "{{ fnox.profile }}"

[secrets]
SST_STAGE = { default = "{{ fnox.profile }}" }

With fnox exec --profile staging -- sst deploy, SST_STAGE is staging and the provider reads the AWS profile staging. FNOX_PROFILE is not set in the child process.

An undefined variable or a syntax error fails with a message naming the field. Any of those three delimiters makes the whole string a template, including a lone {# that is not a comment. To keep a literal marker, wrap it in a raw block:

toml
[secrets]
TEMPLATE = { default = "{% raw %}{{ not rendered }}{% endraw %}" }

${NAME} references may appear inside a template branch, and only the references in the rendered result are required. Templates do not apply to value, description, list fields such as age recipients, or credential_command, which has its own {{ address }}-style context. A default is rendered when it is used, so a bad template in an unused default does not fail a secret whose provider returns a value.

Profiles ​

toml
[profiles.production]
default_provider = "aws"

[profiles.production.providers]
aws = { type = "aws-sm", region = "us-east-1" }

[profiles.production.secrets]
DATABASE_URL = { provider = "aws", value = "database-url" }
FieldTypeDescription
inheritsarray of stringsProfiles applied before this one, in order.
providerstableProviders added to the top-level providers for this profile.
secretstableSecrets that override top-level secrets of the same name.
leasestableLease backends for this profile.
targetstablePush targets for this profile.
default_providerstringOverrides the top-level default_provider.

Other fields are rejected. Settings such as if_missing, env, daemon, mcp, and proxy are top-level only.

A named profile starts from the top-level secrets and providers, applies each profile in inherits in order, then its own tables; later entries win. --no-defaults or FNOX_NO_DEFAULTS drops the top-level secrets but keeps the top-level providers. The name default refers to the top level, and a [profiles.default] table is ignored. Select profiles with -P or FNOX_PROFILE; several comma-separated profiles apply left to right. See profiles.

Lease backend settings ​

toml
[leases.aws]
type = "aws-sts"
region = "us-east-1"
role_arn = "arn:aws:iam::123456789012:role/dev-role"
duration = "1h"

Define lease backends under [leases.<name>] or [profiles.<profile>.leases.<name>]. Every backend has a type and an optional duration (default: 15m); the service may cap the actual lifetime. Types: aws-sts, azure-token, cloudflare, command, gcp-iam, github-app, github-oauth, gitlab, kubernetes, oauth2-client-credentials, tailscale, and vault. See credential leases.

Push targets ​

toml
[targets.gh]
type = "github-actions"
repo = "acme/api"
environment = "production"

[secrets]
STRIPE_KEY = { provider = "op", value = "Stripe/secret key", push = ["gh"] }

Define push targets under [targets.<name>] or [profiles.<profile>.targets.<name>], and list them in a secret's push field. fnox push resolves each such secret and writes it to its targets. Types: azure-container-apps, cloudflare-workers, fly, forgejo-actions, github-actions, gitlab-ci, hcp-terraform, and vercel. See push targets.

plugins ​

toml
[plugins]
corp = "acme/fnox-plugin-corp#v1.2.0"

[providers.corp]
type = "lua"
plugin = "corp"

Maps a plugin name to its git source. A source is a git URL, optionally followed by #<ref> to pin a tag, branch, or commit; owner/repo is shorthand for GitHub. fnox plugin install installs declared plugins. See Lua plugins.

daemon ​

toml
[daemon]
enabled = true
idle_timeout = "8h"
cache_ttl = "30m"
max_cache_ttl = "4h"
FieldTypeDefaultDescription
enabledbooleanfalseResolve secrets through the per-user daemon. FNOX_DAEMON overrides it.
share_across_commandsbooleanfalseLet eligible read commands reuse the same cached value.
socket_scopestring"context"Use separate daemons by invocation context, or set "user" to share one for this user's global configuration and runtime directories.
idle_timeoutduration"8h"How long the daemon runs without requests before it exits.
cache_ttldurationunsetSliding TTL for each cached secret; each read restarts it. Unset means no expiry from inactivity.
max_cache_ttldurationunsetAbsolute TTL for each cached secret, counted from when it was stored. Unset means no absolute limit.

A secret or provider can override both TTLs; see the tables below.

See daemon.

audit ​

toml
[audit]
enabled = true
path = "~/.local/state/fnox/audit.log"
FieldTypeDefaultDescription
enabledbooleanfalseAppend one JSON line per secret read. FNOX_AUDIT overrides it.
pathpath<state dir>/audit.logLog file. A leading ~ is expanded. FNOX_AUDIT_PATH overrides it. Set it in your global config.

Entries name the secret, never its value. See audit log.

mcp ​

toml
[mcp]
tools = ["exec"]
secrets = ["DATABASE_URL"]
FieldTypeDefaultDescription
toolsarray of strings["get_secret", "exec"]Tools that fnox mcp offers: get_secret, exec, request_secret.
secretsarray of stringsevery secretAllowlist of secrets the tools can reach, and that request_secret can ask for.
exec_timeout_secsinteger, 1 or more300Time limit, in seconds, for a command run by the exec tool.
redact_outputbooleantrueReplace resolved secret values in exec output with [REDACTED].

Redaction is not a sandbox: a command can transform a value before printing it. See MCP server.

proxy ​

toml
[proxy]
egress = "strict"
audit = true
allow_domains = ["registry.npmjs.org"]
allow_private = ["10.20.0.0/16"]

[[proxy.rules]]
secret = "GITHUB_TOKEN"
domain = "api.github.com"
methods = ["GET", "POST"]
paths = ["/repos/example/**"]

[[proxy.rules]]
secret = "MAPS_KEY"
domain = "*.maps.example.com"
query = "key"

[[proxy.rules]]
lease = "forge"
domain = "forge.example.com"
header = "private-token"
FieldTypeDefaultDescription
egress"strict", "permissive""strict"Reject destinations without a rule, or tunnel them without credentials.
auditbooleantrueLog proxied and refused requests. Headers, bodies, and values are never logged.
allow_domainsarray of stringsnoneDomains tunneled without credentials, even with strict egress. Same patterns as rules[].domain.
max_body_bytesinteger10485760 (10 MiB)Largest request body the proxy accepts, in bytes. Bodies are held in memory, so each concurrent request can use this much. Must be above 0.
allow_privatearray of IPs or CIDRsnoneNon-public networks the proxy may connect to, each optionally with a port ("127.0.0.1:4790"). Refused otherwise.
sandboxbooleanfalseRun fnox proxy run commands in an OS sandbox whose only network route is the proxy. See sandbox.
sandbox_backend"bwrap", "landlock""bwrap"Linux sandbox to use. landlock works without user namespaces but keeps the working directory read-only. See without user namespaces.
sandbox_allow_writearray of pathsnoneExtra paths the sandboxed command may write, besides the working directory (except under landlock) and temporary files.
sandbox_deny_readarray of pathsnoneExtra paths the sandboxed command may not read.
sandbox_allow_readarray of pathsnonePaths the sandbox hides by default that the command may read, such as fnox.toml.
rules[].secretstringnoneSecret to inject, from the active profile. Set exactly one of secret and lease.
rules[].leasestringnoneLease from [leases] whose credential the proxy mints, renews, and revokes. See leases.
rules[].credentialstringthe only oneVariable of the lease to inject, for a lease that produces several. Lease rules only.
rules[].domainstringrequiredTLS server name the secret may be sent to. A leading *. matches one subdomain label.
rules[].envstringthe secret or credentialVariable that holds the placeholder in the command's environment.
rules[].headerstring"authorization"Header, case-insensitive, in which the placeholder is replaced. Not allowed with query.
rules[].querystringnoneQuery parameter in which the placeholder is replaced, instead of a header. Not allowed with header.
rules[].methodsarray of stringsevery methodAllowed HTTP methods.
rules[].pathsarray of globsevery pathAllowed URL paths.
rules[].placeholderstringgeneratedPlaceholder value given to the command.

A later config file that sets [proxy] replaces the whole table, so it must restate every rule it allows. See credential proxy.

See also ​

MIT LicenseCopyright © 2026jdx.dev