Starting a Dev Environment with Devbox
Devbox is a command-line tool that lets you easily create reproducible, reliable dev environments. 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. Developers can start a dev environment for their project by running
To learn more about how Devbox works, you can read our introduction
This quickstart shows you how to install Devbox, and use it to start a development environment for a project that is configured to use Devbox via
Use the following install script to get the latest version of Devbox:
curl -fsSL https://get.jetpack.io/devbox | bash
Devbox requires the Nix Package Manager. If Nix is not detected on your machine when running a command, Devbox will automatically install it for you with the default settings for your OS. Don't worry: You can use Devbox without needing to learn the Nix Language.
Start your development shell
Open a terminal in the project. The project should contain a
devbox.jsonthat specifies how to create your development environment
Start a devbox shell for your project:
To get started, all we have to do is run:
Installing nix packages. This may take a while... done.
Starting a devbox shell...
The first time you run
devbox shellmay take a while to complete due to Devbox downloading prerequisites and package catalogs required by Nix. This delay is a one-time cost, and future invocations and package additions should resolve much faster.
Use the packages provided in your development environment
The packages listed in your project's
devbox.jsonshould now be available for you to use. For example, if the project's
email@example.com, you should now have
pythonin your path:
$ python --version
Your host environment's packages and tools are also available, including environment variables and config settings.
git config --get user.name
You can search for additional packages using
devbox search <pkg>. You can then add them to your Devbox shell by running
devbox add [pkgs]
To exit the Devbox shell and return to your regular shell:
Learn more about Devbox
- Devbox Global: Learn how to use the devbox as a global package manager
- Devbox Scripts: Automate setup steps and configuration for your shell using Devbox Scripts.
- Configuration Guide: Learn how to configure your shell and dev environment with
- Browse Examples: You can see how to create a development environment for your favorite tools or languages by browsing the Devbox Examples repo.
Use Devbox with your IDE
- Direnv Integration: Devbox can integrate with direnv to automatically activate your shell and packages when you navigate to your project.
- Devbox for Visual Studio Code: Install our VS Code extension to speed up common Devbox workflows or to use Devbox in a devcontainer.
- Join our Discord Community: Chat with the development team and our growing community of Devbox users.
- Visit us on Github: File issues and provide feedback, or even open a PR to contribute to Devbox or our Docs.