devbox README

The project's README from github.com/jetify-com/devbox. As one markdown file: README.md.

Devbox logo.

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:

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

Thanks to Nix for providing isolated shells.

License

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

devbox (jetify-com/devbox)

Searching Database…

12.4K ·GitHub
What is this?Devbox is a command-line tool that creates isolated, reproducible development shells by declaring packages in a devbox.json file, using Nix under the hood instead of Docker or a VM.
Is this like a package manager or more like a VM?It behaves like a package manager similar to yarn, except it installs OS-level tools (the kind you'd normally get from brew or apt-get) rather than just language packages.
How do I get a project running with it?Run devbox init in an empty folder to create a devbox.json, add tools with devbox add (e.g. python 3.10), then enter the environment with devbox shell.
Do I need to install Nix myself first?No, you just run Devbox's own install script; Devbox is internally powered by Nix but handles that integration for you.
Does it slow down my machine like a VM would?No, Devbox builds the isolated environment directly on your laptop with no extra virtualization layer, so file system access and commands stay fast; it only becomes a container when you explicitly ship it.
Is this meant for solo use or whole teams?Both — a shared devbox.json gives every teammate the exact same tool versions, while individuals can also try out tools in isolation without touching their main laptop setup.
How many packages can I actually install with Devbox?Devbox gives access to over 400,000 package versions from the Nix Package Registry, which you can search on Nixhub.io.
Can I turn my Devbox environment into a production container?Yes — the same devbox.json definition can generate a Dockerfile or a VS Code devcontainer, so the production image uses the exact same tools as your dev shell.
Why use Nix instead of just Docker for this?Nix lets Devbox install packages straight on your machine without a container or VM layer, so shells start instantly and only get containerized when you're ready to ship.
Can Devbox power a remote cloud dev environment too?Yes, the same devbox.json definition can also drive a remote development environment in the cloud that mirrors your local setup.
What are similar projects?agentbox, tilt, podman, earthly, buildkit, devpod, dagger, colima
Creator
jetify-com
Size
42.9 MB
Stars
12.4K
Age
4y
Commits · 90 Days