Skip to content

fnox activate ​

  • Usage: fnox activate [--no-hook-env] [SHELL]

Print shell code that loads secrets when you enter a project

Prints a hook for your shell to evaluate. Once active, the hook runs before each prompt: it loads the secrets with env = true (the default) when you enter a directory with a fnox config and removes them when you leave.

SHELL defaults to $FNOX_SHELL, then the name of $SHELL. Set FNOX_SHELL_OUTPUT to none, normal, or debug to control what the hook prints.

Arguments ​

  • [SHELL] — Shell to generate code for: bash, zsh, fish, nu, or pwsh

Flags ​

  • --no-hook-env — Print the hook without its initial hook-env call (for testing)
  • -h --help — Print help

Examples ​

Bash (add to ~/.bashrc)

sh
eval "$(fnox activate bash)"

Zsh (add to ~/.zshrc)

sh
eval "$(fnox activate zsh)"

Fish (add to ~/.config/fish/config.fish)

sh
fnox activate fish | source

See also ​

MIT LicenseCopyright © 2026jdx.dev