direnv exec . npm run dev

Category: Web App Development

direnv exec . npm run dev

Run a command with the directory's env loaded

Executes npm run dev with the environment from the current directory's .envrc, without relying on the shell hook or an interactive session. Ideal for scripts and editors that do not trigger direnv. The first argument is the directory, the rest is the command.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.