devbox is a free, open source build & deployment project written in Go and released under Apache-2.0. It has 12,362 GitHub stars, 357 forks and 466 open issues, and was last pushed 25 hours ago. On this registry it ranks #12 of 59 tracked projects in Build & Deployment, with 5 head-to-head comparisons available. It gained 3 stars over the last 3 tracked days.

What is devbox?

Devbox is an open-source, Apache-2.0 licensed command-line tool written in Go that creates isolated, reproducible development shells from a single declaration file, and it is aimed at individual developers and teams who need identical toolchain versions on every machine and in every environment.

What it is

Devbox is a command-line tool that creates isolated shells for development. A developer starts by defining the list of packages required by a project's development environment, and Devbox uses that definition to create an isolated environment just for that application. In practice it works similarly to a package manager such as yarn, except the packages it manages sit at the operating-system level, the kind of thing normally installed with brew or apt-get. It draws on over 400,000 package versions from the Nix Package Registry at nixhub.io, and it is internally powered by nix. Devbox was originally developed by Jetify and is distributed under the Apache-2.0 licence.

The problem it solves is environmental drift and host pollution. Developers who work across several projects that need different versions of the same binary otherwise attempt to install conflicting versions on one laptop, or they reconfigure the host machine for every new tool they want to try. Teams also struggle to give every member the exact same tool versions. Devbox replaces that ad-hoc, host-level installation with a declarative devbox.json file that is committed to source control, so the environment is reproducible for everyone working on the project and stays isolated from everything else on the machine.

Key capabilities

  • Declares the package list for a project in a devbox.json file, created by devbox init and intended to be committed to source control.
  • Opens an interactive isolated shell with devbox shell, and runs individual commands inside the environment with devbox run.
  • Installs from over 400,000 package versions available through the Nix Package Registry, with nix as the internal engine.
  • Produces multiple environment targets from one definition: a local shell, a devcontainer for use with VSCode, a Dockerfile for building a production image with the same tools, and a remote development environment in the cloud.
  • Creates isolated environments directly on the laptop without an additional layer of virtualization, so the file system and individual commands are not slowed by that extra layer.
  • Keeps each project's versions separate, so multiple projects can each use a different version of the same binary without conflict.
  • Allows a tool to be added to a Devbox shell for evaluation and removed afterwards, leaving the host machine untouched.

Who uses it and how

  • Teams that commit a single devbox.json so every member gets the same version of every tool in the project shell.
  • Developers working on several projects at once, where each project requires a different version of the same binary and host-level installs would collide.
  • Developers who want to try an unfamiliar command-line tool without installing it permanently on the laptop, adding it to a shell and removing it later.
  • Teams seeking parity between development and production by generating a Dockerfile that builds an image with the exact tools used during development.
  • Editors and cloud users who take the same declaration and consume it as a VSCode devcontainer or as a remote development environment that mirrors the local setup.

Getting started

Install Devbox with the install script curl -fsSL https://get.jetify.com/devbox | bash, then run devbox init in an empty project folder, add packages from Nix, and enter the environment with devbox shell or run commands with devbox run. Full instructions are available on the Devbox documentation site at jetify.com/docs/devbox.

How it compares

Devbox behaves like a package manager in the mould of yarn, but the packages it manages are the operating-system-level tools that brew or apt-get would otherwise install onto the host. It differs from those host package managers in being project-scoped and isolated rather than machine-wide, and it is internally powered by nix, which supplies the package set it resolves against.

When to use it — and when not to

Choose Devbox when a project needs a reproducible set of OS-level tools shared across a shell, a devcontainer, a Docker image and a cloud environment from one declaration. The README describes no server component, database, object storage or mail service to operate, so the tool runs on the developer's own machine and depends on nix underneath; teams that cannot run a curl | bash installer or cannot rely on nix, or that need packages outside the Nix Package Registry, should look elsewhere. The repository carries 466 open issues at the time of writing and the README excerpt available for this entry is thin on the cloud and devcontainer workflows, so the more advanced environment targets deserve verification against the full documentation before adoption.

project readme (upstream, from github) — read inline

Devbox

Instant, easy, and predictable development environments

Join Discord License: Apache 2.0 version tests Built with Devbox

What is it?

Devbox is a command-line tool that lets you easily create isolated shells for development. You start by defining the list of packages required by your development environment, and devbox uses that definition to create an isolated environment just for your application.

In practice, Devbox works similar to a package manager like yarn – except the packages it manages are at the operating-system level (the sort of thing you would normally install with brew or apt-get). With Devbox, you can install over 400,000 package versions from the Nix Package Registry

Devbox was originally developed by Jetify and is internally powered by nix.

Demo

The example below creates a development environment with python 3.10 and go 1.18, even though those packages are not installed in the underlying machine. You can run commands in the environment with devbox run, or start an interactive shell in it with devbox shell:

screen cast

Installing Devbox

Use the following install script to get the latest version of Devbox:

curl -fsSL https://get.jetify.com/devbox | bash

Read more on the Devbox docs.

Benefits

A consistent shell for everyone on the team

Declare the list of tools needed by your project via a devbox.json file and run devbox shell. Everyone working on the project gets a shell environment with the exact same version of those tools.

Try new tools without polluting your laptop

Development environments created by Devbox are isolated from everything else in your laptop. Is there a tool you want to try without making a mess? Add it to a Devbox shell, and remove it when you don't want it anymore – all while keeping your laptop pristine.

Don't sacrifice speed

Devbox can create isolated environments right on your laptop, without an extra-layer of virtualization slowing your file system or every command. When you're ready to ship, it'll turn it into an equivalent container – but not before.

Goodbye conflicting versions

Are you working on multiple projects, all of which need different versions of the same binary? Instead of attempting to install conflicting versions of the same binary on your laptop, create an isolated environment for each project, and use whatever version you want for each.

Take your environment with you

Devbox's dev environments are portable. We make it possible to declare your environment exactly once, and use that single definition in several different ways, including:

  • A local shell created through devbox shell
  • A devcontainer you can use with VSCode
  • A Dockerfile so you can build a production image with the exact same tools you used for development.
  • A remote development environment in the cloud that mirrors your local environment.

Quickstart: Fast, Deterministic Shell

In this quickstart we'll create a development shell with specific tools installed. These tools will only be available when using this Devbox shell, ensuring we don't pollute your machine.

  1. Open a terminal in a new empty folder.

  2. Initialize Devbox:

    devbox init
    

    This creates a devbox.json file in the current directory. You should commit it to source control.

  3. Add command-line tools from Nix. For example, to add Python 3.10:

    devbox add [email protected]
    

    Search for more packages on Nixhub.io

  4. Your devbox.json file keeps track of the packages you've added, it should now look like this:

    {
      "packages": [
        "[email protected]"
      ]
    }
    
  5. Start a new shell that has these tools installed:

    devbox shell
    

    You can tell you're in a Devbox shell (and not your regular terminal) because the shell prompt changed.

  6. Use your favorite tools.

    In this example we installed Python 3.10, so let's use it.

    python --version
    
  7. Your regular tools are also available including environment variables and config settings.

    git config --get user.name
    
  8. To exit the Devbox shell and return to your regular shell:

    exit
    

Read more on the Devbox docs Quickstart.

Additional commands

devbox help - see all commands

See the CLI Reference for the full list of commands.

Join our Developer Community

Contributing

Devbox is an opensource project, so contributions are always welcome. Please read our contributing guide before submitting pull requests.

Devbox development readme

Related Work

Thanks to Nix for providing isolated shells.

License

This project is proudly open-source under the Apache 2.0 License

Frequently asked questions

Is devbox free to use?

devbox is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does devbox do?

Instant, easy, and predictable development environments

What is devbox written in?

devbox is primarily written in Go. Its source is publicly available at https://github.com/jetify-com/devbox, and it has 12,362 GitHub stars.