This release adds a few major new features to Devbox:
- Devbox Global lets you add packages to include across all your Devbox Shells
- Improved Shell Env ensures better consistency in your Devbox environment across shells and commands
Our customers tell us that while they love Devbox's isolated, reproducible dev environments, they often install the same tools across all their projects. For some developers, it's time-saving tools like
httpie. Others use a chain of cloud cli-tools like
kubectl to administer multiple devbox projects. In all these cases, developers want these packages available in all their Devbox projects without declaring them in every project.
With Devbox Global, you can install these tools using
devbox global add, and then use them across all my devbox projects.For example — if you use ripgrep as your preferred search tool, you can add it to your global Devbox profile with
devbox global add ripgrep. Now whenever you start a Devbox shell, you will have ripgrep available, even if it's not in the project's devbox.json. You can also use Devbox Global as your primary package manager by sourcing your global profile in your shellrc file.
You can even share your global profile with other developers via a
devbox.json. This can accelerate onboarding by ensuring everyone has the correct packages installed. Your team can quickly add the profile by rinning`devbox global pull and providing either a file name or URL that points to a devbox.json.
Learn more about Devbox Global in our documentation
Improved Shell Env
All shells and commands now use a unified environment to determine the correct environment variables and hooks to run, ensuring that you get a consistent environment wherever you run Devbox. The environment can also be printed via
Note, if you used an earlier version of Devbox to generate a
.envrc for direnv, you will need to regenerate it using
devbox generate .envrc --force. See our Direnv docs for more details.
Other changes in 0.4.0
- All Devbox commands now use a unified environment to determine the correct environment variables and hooks to run, ensuring that you get a consistent environment wherever you run Devbox
- Fixed an issue with Fish shell where init_hooks failed to run when starting Devbox Shell
- Dockerfiles created with devbox generate now have the correct permissions -
devbox runcan now be used to run arbitrary commands. For example:
devbox run datewill run
datein your Devbox shell, even if you have not created a script with that name.
- Scripts can now take parameters. For example: if your script is
"cow": "cowsay $@", then you can
devbox run cow mooand the cow will say moo