Skip to Content
DocsReferenceEnvironment Variables

Environment Variables

VariableDefaultEffect
NEXTBREW_ROOTplatform default (see Configuration)Data directory. Same as --root
NEXTBREW_PREFIXderived from the rootPrefix directory. --prefix overrides it. On macOS the old default <root>/prefix is ignored
NEXTBREW_AUTO_INITunsetInitialize directories without prompting. Same as --auto-init
NEXTBREW_API_URLHomebrew’s APIUse another formula API base URL
NEXTBREW_API_AUTO_UPDATE_SECS600Seconds the cached formula index is trusted before it is revalidated
NEXTBREW_NO_AUTOREMOVEunsetIf set to any value, nb uninstall does not run autoremove afterwards
NEXTBREW_SERVICES_NO_DOMAIN_WARNINGunsetIf set, hides the launchd domain warning from nb services
NEXTBREW_DIR~/.nextbrewUsed by nb init to build the shell config block, and by the installer as its source checkout directory
NEXTBREW_BIN~/.local/bin (installer)Directory the installer puts nb and nbx in. nb init writes it into your shell config and puts it on PATH (falling back to $NEXTBREW_DIR/bin when unset)

nb bundle also reads HOMEBREW_BUNDLE_FILE, HOMEBREW_BUNDLE_FILE_GLOBAL and HOMEBREW_BUNDLE_NO_UPGRADE.

The installer (install.sh) honours NEXTBREW_DIR, NEXTBREW_BIN, NEXTBREW_ROOT and NEXTBREW_PREFIX. Other NEXTBREW_* names (NEXTBREW_FORMULA_*, NEXTBREW_CELLAR, NEXTBREW_LOGS and the like) are set by nextbrew for source builds; do not set them yourself.

Last updated on