Skip to content

direnv

Version 2026.168.0935
Repo superproject

direnv — automatic per-directory environment loading from .envrc files direnv installs the direnv binary (one package name across fedora/arch/debian) AND declaratively wires the per-shell hook that makes .envrc autoload work. At charly box build the shell: schema bakes the POSIX hook into /etc/profile.d/charly-direnv-.sh for bash/zsh/sh (the generic body eval "$(direnv hook <shell>)" with ${SHELL_NAME} substituted) and the fish-specific hook into /etc/fish/conf.d/charly-direnv.fish (direnv hook fish | source). The scenarios assert both the installed/runnable binary AND the baked hook drop-ins, so they fail if either the package or the shell wiring is missing.

Installed on every distro:

  • direnv

This candy’s plan: — the runnable spec charly check executes against a live deployment. check: steps are idempotent probes; run: steps change state.

Intent Step
check the direnv binary is installed at /usr/bin/direnv for the .envrc/.secrets autoload workflow
check direnv reports its version without error
check the bash shell-init drop-in EVALs the direnv hook so .envrc loads on directory change (a check-for-eval typo would silently break the hook and spam every login shell with a command-not-found error)
check sourcing the bash direnv drop-in installs the hook cleanly, with no command-not-found error from a malformed check-for-eval hook body
check the fish shell-init drop-in is baked into its conf.d and sources the direnv fish hook
check package=direnv
check command=/usr/bin/direnv version