Development environments with devbox

A development environment describes a set of variables, tools and software that is needed by every developer working on the project. The simplest approach is to define everything globally, for example:

  • Put environment variables in the shell profile
  • Install tools using the OS package manager
  • Install software using the OS package manager

It works until the moment different projects start requiring different values of the same variables and different versions of the same tools and software. This is when majority of developers turn to container software, such as docker, for help.

While using containers works, they are not really needed unless the project is a distributed system, where each component/service could be a project on its own. Devbox sits somewhere in the middle between the two in terms of complexity while being the easiest to use.

It takes only devbox init to start using it in a project, which creates devbox.json describing the development environment that can be entered with devbox shell. Upon entering the shell, all of the specified variables are automatically exported and all of the specified tools and software are added to PATH.

Tools and software can be searched with devbox search <pattern>, removed with devbox rm <name> and installed with devbox add <name>[@version].