Devbox 0.0.5: Node + PHP Support, Init Hooks, and more

Devbox 0.0.5:  Node + PHP Support, Init Hooks, and more

We're pleased to announce the latest release of Devbox! In addition to various bug fixes and workflow improvements requested by the community, this release focused on adding support for 2 of our most requested languages: NodeJS and PHP.

If you already have the Devbox CLI, it should automatically update to 0.0.5 the next time you run it. If don't already have the Devbox, you can follow the installation instructions here.

Shell and Build Support for NodeJS and PHP

Devbox can now autodetect Node.js and PHP projects. You can use devbox shell to spin up a shell with Node.js and PHP base packages included, or use Devbox shell to create a Docker container designed for your project.  

  • Node.js autodetection will run whenever a package.json file is detected in your folder. For more details on what the NodeJS planner installs and what commands it adds to your Dockerfile, check our NodeJS documentation
  • PHP autodetection will run whenever a compose.json is detected in your project folder. For more details on what the PHP planner installs, and what commands it adds to your Dockerfile check our PHP Documentation

As always, we welcome issues and pull requests from the community to help us improve our language support.

Customize your Devbox Shell with Init Hooks

Scripts configured as init hooks in your devbox.json will run whenever you start a Devbox shell. This can be used to set environment variables, run setup tasks, or start background services whenever you initialize your shell. For example, you can use an init hook to customize your prompt whenever you start a shell:

  "shell": {
    "init_hook": "export PS1='📦 devbox> '\necho 'Welcome! See for tips on contributing to devbox.'"

For more on init hooks, you can view the Configuration Reference in the Devbox Documentation

Packages are now included in your Docker containers

Nix packages in your devbox.json are now also installed in your Docker container when running devbox build. Packages will be installed and updated whenever you start a new shell, and before the installation_stage runs when building a Dockerfile.

Additional bug fixes and improvements

We've also fixed a number of bugs, and made improvements to the development experience. You can view the full set of commits that we merged into this release here

What's Next for Devbox

Our upcoming development cycle will focus on further expanding our language support, as well as releasing a framework for developers in our community to easily add Devbox support for their favorite languages. You can learn more about what's coming by reviewing our Public Roadmap.

We'd love to hear your feedback and As always, we welcome issues and pull requests on Github. You can also join our Discord Server to chat with the development team and community.