Skip to Content
ConfigEnvironment variables

Environment variables

Runtime behavior is controlled partly by environment variables. Canonical names live in packages/cli/src/constants/env.ts — update that file (one place) when adding or renaming vars; docs and snapshots should follow.

I18NPRUNE_* — config overlay

Merged after defaults and the config file, before discovery and CLI flags (see Configuration README). Values are also listed in the i18nprune config --json output under the env snapshot (these keys only).

VariableEffect
I18NPRUNE_SOURCEOverride config.source (path to source locale JSON).
I18NPRUNE_LOCALES_DIROverride config.localesDir.
I18NPRUNE_SRCOverride config.src (scan root).
I18NPRUNE_FUNCTIONSComma-separated list overriding config.functions.
I18NPRUNE_NO_DISCOVERYWhen truthy (1, true, yes), skip discovery layer where applicable.
I18NPRUNE_NO_INITWhen truthy, treated like non-interactive init paths; also skips interactive prompts together with CI and non-TTY stdin (see JSON & long runs).
I18NPRUNE_NO_UPDATE_CHECKWhen truthy (1, true, yes), skip all npm registry update discovery: no background refresh, no banner hint, no version --check fetch. CI=true also skips (see Versioning).

I18NPRUNE_GENERATE_* — generate command defaults

Read when running i18nprune generate; merged into options before CLI flags (see packages/cli/src/commands/generate/env.ts).

VariableEffect
I18NPRUNE_GENERATE_LANGDefault target language code.
I18NPRUNE_GENERATE_ENGLISH_NAMEDefault English label for .meta.json.
I18NPRUNE_GENERATE_NATIVE_NAMEDefault native endonym.
I18NPRUNE_GENERATE_DIRECTIONltr or rtl only.
I18NPRUNE_GENERATE_NO_METATruthy → skip meta sidecar.
I18NPRUNE_GENERATE_FORCETruthy → force re-translate.
I18NPRUNE_GENERATE_DRY_RUNTruthy → dry-run.

Other variables

VariableEffect
CIWhen 1 or true, contributes to skipping interactive prompts (with I18NPRUNE_NO_INIT and non-TTY stdin).
MISSING_DISPLAY_DEFAULT_TOPPositive integer 1…100000: default cap for missing human path listings when --top is omitted. Overrides config.missing.displayDefaultTop; invalid values are ignored. See Command namespaces.

Source of truth

  • Names: packages/cli/src/constants/env.ts
  • Config namespaces: Command namespaces (config.validate, config.missing, …)