Devbox now supports nushell through the --format flag on the shellenv command.
Add this to ~/.config/nushell/env.nu:
devbox global shellenv --format nushell --preserve-path-stack -r
| lines
| parse "$env.{name} = \"{value}\""
| where name != null
| transpose -r
| into record
| load-envThis is equivalent to bash's eval "$(devbox global shellenv)" and runs on every fresh shell start.
To use devbox global packages with nushell, you need to load the environment similar to how bash/zsh use eval "$(devbox global shellenv)".
Add this to ~/.config/nushell/env.nu to regenerate and load devbox environment fresh every time, just like bash's eval:
# Load devbox global environment dynamically (equivalent to bash eval)
devbox global shellenv --format nushell --preserve-path-stack -r
| lines
| parse "$env.{name} = \"{value}\""
| where name != null
| transpose -r
| into record
| load-env--format nushell- Output in nushell syntax--preserve-path-stack- Maintain existing PATH order if devbox is already active-r(recompute) - Always recompute the environment, prevents "out of date" warnings