Skip to content

Releases: jetify-com/devbox

0.2.0: Automatic Nix Installer, Plugins, and Background Services

20 Dec 22:33
76d75a7
Compare
Choose a tag to compare

Automatic Nix Installer

One major piece of feedback we received from early customers (especially those who were unfamiliar with Nix) was that they found the initial installation of the Nix Package Manager confusing and challenging. To reduce this friction in getting started, Devbox can now automatically Nix if we do not detect it on your Machine. Developers can now get up and running with Devbox using a single installer.

Devbox will try to detect Nix during installation, or when running a command that requires Nix (such as devbox add or devbox shell ). If we don’t find an installation of Nix on your machine, we will prompt you to install it using the default configuration for your operating system.

Instant package configuration with Devbox Plugins

We outlined our approach to package configuration in our blog post Do Repeat Yourself: Global Packages Considered Harmful. We aim to provide Nix's immutability and isolation while allowing developers to configure their projects locally.

This release has the first version of what we're calling Devbox Plugins. Plugins bundle default configuration (like environment variables, configuration files, and services) with packages and apply it when you install them with devbox add. Plugins make getting started with packages like NGINX or Postgresql much faster.

Let's try adding Nginx to our Devbox shell. When we run devbox add nginx, Devbox will use the Nginx plugin to configure our environment and create a default nginx.conf file for our project. The plugin will also add a service to our shell (see below), so we can quickly start and stop Nginx when testing our project:

Our initial release includes plugins for the following packages, with many more to come.

We are also planning to open and provide a public repo for plugins, so developers can contribute plugins, or even add their own private plugins to Devbox.

Manage your background services with Devbox

When working on an application, you often want some services or dependencies running in the background for testing. Take a web app as an example. While working on your application, you will want to test it against a running development server and database. Previously developers would manage these services via tools like Docker Compose or orchestrating them manually.

Devbox 0.2.0 includes a devbox services subcommand for starting and stopping services within your Devbox Shell. Packages installed in your shell that have services configured via a Devbox Plugin will appear when you run devbox services ls. You can start these services using devbox start and stop them using devbox stop.

Right now, developers can only configure services via plugins. Future releases will make it possible to define and manage services in your project's devbox.json.

Generate Dockerfiles and Devcontainers from the devbox CLI

You can now generate a generic Dockerfile or Devcontainer for your project using the devbox generate command. These Dockerfiles make it easy to build your Devbox Shell environment as a portable container, so you can develop your project anywhere.

For more information, consult our CLI Reference

What's Changed

  • [cloud] set KeepAlive setting for ssh to vm by @savil in #345
  • Remove Build Docs, add Example Docs by @Lagoja in #347
  • [nix] Improve nix installer by @mikeland86 in #350
  • Added devbox generate devcontainer command by @mohsenari in #346
  • [services] Add services to package configs (plugins) by @mikeland86 in #353
  • [cloud] ssh shim part 1: generate shim files by @savil in #348
  • [cloud] ssh shim part 2: invoke ssh by @savil in #349
  • [cloud] ssh shim part 3: invoke scp by @savil in #351
  • [services] Allow running services out of shell by @mikeland86 in #354
  • [php] Remove v1 planner, add composer definition to v2 by @mikeland86 in #359
  • [extension] Generate the same devcontainer files as CLI by @mohsenari in #357
  • [cloud] ssh shim part 4: detect stopped vm, and terminate mutagen sessions by @savil in #352
  • [cloud] ssh shim part 5: run own mutagen daemon by @savil in #355
  • [midcobra] add executionID by @savil in #358
  • [CLI] Changed devbox generate to devbox generate debug by @mohsenari in #364
  • Move several packages to internal/ by @loreto in #365
  • Refactor location of more files by @loreto in #367
  • openssh: add host keys for gateway[.dev].devbox.sh by @gcurtis in #360
  • [nix] nix install without using daemon flag DEV-1266 by @mikeland86 in #368
  • [add] Show better message if package is missing. Specify exact version after installing by @mikeland86 in #370
  • [sshshim] add sentry without using middleware by @savil in #366
  • [plugins] Move conf files out of .devbox and more DEV-1259 DEV-1258 by @mikeland86 in #362
  • [plugins] Only create devbox.d files on add by @mikeland86 in #369
  • Track panics in sentry by @LucilleH in #372
  • [cloud] enable multiple projects opening shells in same VM by @savil in #371
  • [sshshim] turn on gate by @savil in #376
  • [UX] Improve post-install readme, improve message if package not found by @mikeland86 in #375
  • [refactor] Rename and move pkgcfg to plugins by @mikeland86 in #380
  • [services] Start/stop multiple services DEV-1270 by @mikeland86 in #381
  • openssh: improve command errors and debug logging by @gcurtis in #377
  • Small improvements to telemetry by @loreto in #379
  • openssh: update SSH config when DEVBOX_GATEWAY is set by @gcurtis in #378
  • [plugins] Use relative paths or env variables in configs DEV-1272 by @mikeland86 in #382
  • [features] Enable plugins and nix install by @mikeland86 in #383
  • [planners] removed build planners by @mohsenari in #384
  • [cloud shell] respect gitignore file in --config directory to limit large data syncs by @savil in #387
  • [cloud shell] always ignore .devbox directory by @savil in #388
  • [cloud shell] skip comments and empty lines when adding --ignore to mutagen by @savil in #391
  • Add a Plugin Request Template by @Lagoja in #392
  • [extension] Updated readme and changelog + bumped version by @mohsenari in #394
  • [plugins] Add init hook to plugins. Add ruby gem bin to path DEV-1271 by @mikeland86 in #389

Full Changelog: 0.1.2...0.2.0

Devbox 0.1.3 Pre-release

16 Dec 18:56
437290b
Compare
Choose a tag to compare
Pre-release

One Step Installation for Nix and Devbox

One major piece of feedback we received from early customers (especially those who were unfamiliar with Nix) was that they found the initial installation of the Nix Package Manager confusing and challenging. To reduce this friction in getting started, Devbox can now automatically Nix if we do not detect it on your Machine. Developers can now get up and running with Devbox using a single installer.

Devbox will try to detect Nix during installation, or when running a command that requires Nix (such as devbox add or devbox shell ). If we don’t find an installation of Nix on your machine, we will prompt you to install it using the default configuration for your operating system.

Instant package configuration with Devbox Plugins

We outlined our approach to package configuration in our blog post Do Repeat Yourself: Global Packages Considered Harmful. We aim to provide Nix's immutability and isolation while allowing developers to configure their projects locally.

This release has the first version of what we're calling Devbox Plugins. Plugins bundle default configuration (like environment variables, configuration files, and services) with packages and apply it when you install them with devbox add. Plugins make getting started with packages like NGINX or Postgresql much faster.

Let's try adding Nginx to our Devbox shell. When we run devbox add nginx, Devbox will use the Nginx plugin to configure our environment and create a default nginx.conf file for our project. The plugin will also add a service to our shell (see below), so we can quickly start and stop Nginx when testing our project:

Our initial release includes plugins for the following packages, with many more to come.

We are also planning to open and provide a public repo for plugins, so developers can contribute plugins, or even add their own private plugins to Devbox.

Manage your background services with Devbox

When working on an application, you often want some services or dependencies running in the background for testing. Take a web app as an example. While working on your application, you will want to test it against a running development server and database. Previously developers would manage these services via tools like Docker Compose or orchestrating them manually.

Devbox 0.1.3 includes a devbox services subcommand for starting and stopping services within your Devbox Shell. Packages installed in your shell that have services configured via a Devbox Plugin will appear when you run devbox services ls. You can start these services using devbox start and stop them using devbox stop.

Right now, developers can only configure services via plugins. Future releases will make it possible to define and manage services in your project's devbox.json.

Generate Dockerfiles and Devcontainers from the devbox CLI

You can now generate a generic Dockerfile or Devcontainer for your project using the devbox generate command. These Dockerfiles make it easy to build your Devbox Shell environment as a portable container, so you can develop your project anywhere.

For more information, consult our CLI Reference

What's Changed

  • [cloud] set KeepAlive setting for ssh to vm by @savil in #345
  • Remove Build Docs, add Example Docs by @Lagoja in #347
  • [nix] Improve nix installer by @mikeland86 in #350
  • Added devbox generate devcontainer command by @mohsenari in #346
  • [services] Add services to package configs (plugins) by @mikeland86 in #353
  • [cloud] ssh shim part 1: generate shim files by @savil in #348
  • [cloud] ssh shim part 2: invoke ssh by @savil in #349
  • [cloud] ssh shim part 3: invoke scp by @savil in #351
  • [services] Allow running services out of shell by @mikeland86 in #354
  • [php] Remove v1 planner, add composer definition to v2 by @mikeland86 in #359
  • [extension] Generate the same devcontainer files as CLI by @mohsenari in #357
  • [cloud] ssh shim part 4: detect stopped vm, and terminate mutagen sessions by @savil in #352
  • [cloud] ssh shim part 5: run own mutagen daemon by @savil in #355
  • [midcobra] add executionID by @savil in #358
  • [CLI] Changed devbox generate to devbox generate debug by @mohsenari in #364
  • Move several packages to internal/ by @loreto in #365
  • Refactor location of more files by @loreto in #367
  • openssh: add host keys for gateway[.dev].devbox.sh by @gcurtis in #360
  • [nix] nix install without using daemon flag DEV-1266 by @mikeland86 in #368
  • [add] Show better message if package is missing. Specify exact version after installing by @mikeland86 in #370
  • [sshshim] add sentry without using middleware by @savil in #366
  • [plugins] Move conf files out of .devbox and more DEV-1259 DEV-1258 by @mikeland86 in #362
  • [plugins] Only create devbox.d files on add by @mikeland86 in #369
  • Track panics in sentry by @LucilleH in #372
  • [cloud] enable multiple projects opening shells in same VM by @savil in #371
  • [sshshim] turn on gate by @savil in #376
  • [UX] Improve post-install readme, improve message if package not found by @mikeland86 in #375
  • [refactor] Rename and move pkgcfg to plugins by @mikeland86 in #380
  • [services] Start/stop multiple services DEV-1270 by @mikeland86 in #381
  • openssh: improve command errors and debug logging by @gcurtis in #377
  • Small improvements to telemetry by @loreto in #379
  • openssh: update SSH config when DEVBOX_GATEWAY is set by @gcurtis in #378
  • [plugins] Use relative paths or env variables in configs DEV-1272 by @mikeland86 in #382
  • [features] Enable plugins and nix install by @mikeland86 in #383

Full Changelog: 0.1.2...0.1.3-dev

0.1.2

07 Dec 20:07
f520cc5
Compare
Choose a tag to compare

New Features

Devbox Scripts in Devbox Shell

You can now run devbox scripts from inside of a devbox shell. Previously, this would trigger an error about starting shells within shells. Now, if you run a script from within a devbox shell using devbox run <script>, devbox will run the command within your existing shell without trying to start a new shell

Example Docs

New Example Docs have been published to the Devbox Docs site -- these examples show how you can create dev environments for different languages, tools, and stacks using Devbox. The docs can be found here. You can also browse our examples repo at https://github.com/jetpack-io/devbox-examples/

Deprecating and Removing Devbox Build

devbox build and our automatic planners are now deprecated and removed. An upcoming release will enable developers to generate a container based on their devbox shell. This feature was removed due to low usage and poor performance, and due to a desire to focus on creating dev environments with devbox shell.

This release also includes some in progress work for automatic package configuration, nix installation, and Devbox Cloud.

Special thanks to @dritter and @boothb for their contributions to this release!

Changelog

  • [nixpkgs version] update test devbox.json files with the autoupgrade by @savil in #278
  • ci: truncate long k8s namespace names by @gcurtis in #272
  • Add golangci-lint to devbox.json by @ipince in #273
  • golangci-lint offending line is displayed in error logs by @ipince in #274
  • Bump loader-utils from 2.0.2 to 2.0.4 in /docs/app by @dependabot in #280
  • Fixed terminal commands not running when closed by @mohsenari in #283
  • Added changelog for V0.0.2 by @mohsenari in #286
  • Added github action for vscode extension release by @mohsenari in #282
  • vscode extension terminal behavior fixes + readme update by @mohsenari in #287
  • referencing vscode token from env variable by @mohsenari in #289
  • [pkgcfg] Add postgresql config by @mikeland86 in #295
  • [bug] Fix bug where symlink does not get overriden correctly by @mikeland86 in #296
  • [pkgcfg] Allow for wildcards in package config filenames by @mikeland86 in #297
  • Fixed github action workflow publishing vscode extension by @mohsenari in #294
  • [pkgcfg] Add nginx config by @mikeland86 in #299
  • [bug] Fix nil pointer dereference in go planner by @ipince in #301
  • [pkgcfg] Add ruby config by @mikeland86 in #298
  • [dependabot] Fix vulnerability by @mikeland86 in #303
  • [config-directory] run shell.initHooks and shell.scripts relative to --config dir by @savil in #302
  • s/COnfig/config typo fix by @savil in #304
  • rename srcDir to configDir for clarity by @savil in #305
  • [pkgcfg] Add Apache httpd config by @mikeland86 in #300
  • [pkgcfg] Show readme when adding packages. Add info command by @mikeland86 in #306
  • [pkgcfg] Add rustup config json by @mikeland86 in #307
  • [pkgcfg] python config (readme) by @mikeland86 in #308
  • [devbox] Add client code for devbox cloud by @loreto in #310
  • Respect nixpkgs commit in devbox add by using nix search by @savil in #314
  • [pkgcfg] Embed config instead of using GitHub by @mikeland86 in #320
  • Small fixes for devcontainers in WSL by @mohsenari in #315
  • [pkgcfg] Add php extension support by @mikeland86 in #309
  • add gateway subdomains to sshconfig to avoid StrictHostKeyChecking by @savil in #323
  • [cloud] ensure devbox.json exists and pass devbox struct to cloud.Shell functions by @savil in #321
  • [devbox testdata] improve rust testdata's init script to work over ssh by @savil in #326
  • [pkgcfg] Remove config if package is removed by @mikeland86 in #324
  • Point the cli to the production gateway by @loreto in #327
  • Rename CICD workflows to be more descriptive by @loreto in #328
  • [featureflags] Simplify feature flags by @mikeland86 in #325
  • Bumping vscode extension version by @mohsenari in #330
  • [cloud] client directly calls start_devbox_server.sh by @savil in #329
  • [pkgcfg] Ensure php-fpm works out of the box by @mikeland86 in #334
  • Add packages info in telemetry to get better understanding by @LucilleH in #333
  • deprecate devbox build + hide devbox plan by @mohsenari in #336
  • Add sentry error reporting to telemetry by @LucilleH in #335
  • cloud: use unique SSH keys per VM by @gcurtis in #340
  • devbox run inside shell by @mohsenari in #331
  • [nix] Add nix install command by @mikeland86 in #337
  • [pkgcfg] show shims and env variables in info command. Add markdown flag by @mikeland86 in #341
  • [config] update default nixpkgs commit to most recent nixos-22.11 by @savil in #344
  • [nix-installer] auto-install nix if we detect it's missing by @mikeland86 in #343

New Contributors

Full Changelog: 0.1.1...0.1.2

0.1.1 - Run Scripts, pin Nixpkg SHA

10 Nov 23:28
f098578
Compare
Choose a tag to compare

Release 0.1.1 includes two major new features: package pinning and executing scripts with devbox run

New Features

Pin Nixpkgs in your Devbox.json

You can now pin an exact version of the Nixpkg repository for installing packages. This feature is useful for pinning the versions of the packages installed by Devbox, or for selecting packages from older revisions of Nixpkg.

To pin the Nixpkg version, add the commit of the Nixpkg repo that you want to use in your devbox.json.

"nixpkgs": {
    "commit": "89f196fe781c53cb50fef61d3063fa5e8d61b6e5"
}

If you leave the commit unset, Devbox will automatically add a default Nixpkg commit to your devbox.json when you run a command that reads your devbox.json like devbox add. You can update your project to the latest default by deleting the commit hash from your devbox.json.

For more details, see the Nixpkg pinning guide on our docs page.

Running Scripts in Devbox Shell

Developers can now define scripts in their devbox.json, and execute them in their Devbox Shell using devbox run. Scripts are defined by providing a name, and a command or list of commands for Devbox to run.

"shell": {
        "init_hook": [
            "source conf/set-environmen.sh",
            "rustup default stable",
            "cargo fetch"
        ],
        "scripts": {
            "test": "cargo test -- --show-output",
            "start" : "cargo run",
        }
    }

You can then execute your scripts using devbox run <script_name>. Devbox will then start an interactive shell, run your init_hook, run the script, and then exit when the script completes or is interrupted by CTRL-C. For example:

$ devbox run start

Installing nix packages. This may take a while... done.
Starting a devbox shell...
project dir is /Users/johnlago/src/devbox-examples/development/rust/rust-stable-hello-world/conf
info: using existing install for 'stable-aarch64-apple-darwin'
info: default toolchain set to 'stable-aarch64-apple-darwin'

  stable-aarch64-apple-darwin unchanged - rustc 1.64.0 (a55dd71d5 2022-09-19)

    Finished dev [unoptimized + debuginfo] target(s) in 0.00s
    Running `target/debug/rust-stable-hello-world`

Hello, world!

$

For more information and tips on how to use Devbox scripts, see the scripts guide in our docs page.

Bug Fixes

  • Fixed a bug where not all zsh startup files were included in a developer's shellrc (#250)
  • Fixed a PkgExists panic for some missing packages (#249)

What's Changed

  • nix: fix PkgExists panic for some missing packages by @gcurtis in #249
  • [feature-flag] Add simple feature flag package by @mikeland86 in #251
  • [devbox shell] ensure all zsh startup files are linked to ZDOTDIR by @savil in #250
  • [nipkgs version] add feature flag and write to devbox.json if missing by @savil in #252
  • [pkgcfg] Create new pkgckg that can load local config by @mikeland86 in #253
  • [nixpkgs version] change field from version to commit; add validation by @savil in #256
  • [nixpkgs version] generate nix files containing the nixpkgs version from config by @savil in #258
  • [nixpkgs version] devbox init should add default nixpkgs commit by @savil in #259
  • [pkg-config] Add bin sym links and add to path by @mikeland86 in #257
  • [feature flag] respect env-var of feature flag (even if turned off) and default enable Nixpkg Version FF by @savil in #266
  • [pkg-config] Implement basic mariadb config by @mikeland86 in #263
  • [pkg-config] Read config from github by @mikeland86 in #264
  • Use for logo light/dark mode by @gcurtis in #260
  • ci: suffix Jetpack preview namespaces with "-ref" by @gcurtis in #271
  • First pass at devbox scripts implementation by @ipince in #254
  • devbox: add PackageStore and Package for querying /nix/store by @gcurtis in #270
  • Docs for Devbox Run and Setting the Commit Sha by @Lagoja in #268
  • vscode extension settings + devcontainer setup + devbox commands by @mohsenari in #262
  • Unhide devbox run by @ipince in #275

Full Changelog: 0.1.0...0.1.1

0.1.1-dev

10 Nov 23:00
2118019
Compare
Choose a tag to compare
0.1.1-dev Pre-release
Pre-release
0.1.1-dev

0.1.0

25 Oct 22:59
adda549
Compare
Choose a tag to compare

Release 0.1.0 features some workflow improvements to make devbox shell more reliable, and includes the v1 release of our Visual Studio Code extension.

⚠️ Note: This release may cause some projects to break if they do not explicitly declare their packages in the devbox.json. See Shell Package Suggestions below for more details. You can fix your project by adding the suggested packages with devbox add [packages]

Workflow Improvements

  • Shell Package Suggestions: Devbox will no longer automatically add packages when you run devbox shell. Instead Devbox will suggest packages that may be missing from your shell and prompt you to add them. This feature was changed due to reports of conflicts between user installed packages and auto installed packages.

    • For example, if I try to start a shell in my Python project without adding the python3 package:
    ➜  devbox shell                                                                                                                                                                                                       
    Installing nix packages. This may take a while...done.
    We detected extra packages you may need. To install them, run `devbox add python3`
    Starting a devbox shell...

    I can then add the missing packages by running the suggestion:

    ➜  devbox add python3
    Installing nix packages. This may take a while...done.
    python3 is now installed. Run `hash -r` to ensure your shell is updated.
    `
  • VSCode Extension: You can now automatically activate your Devbox Shells in VSCode’s integrated terminal by installing the Devbox VSCode extension. More features will be added in upcoming releases
  • --config flag: You can choose a specific devbox.json to use with devbox shell using this flag. This can be useful for situations where your devbox.json is in a different folder, or when you want to have multiple devbox.json files for a single project
  • Devbox now warns you when you are attempting to remove a non-existent package from your devbox.json

Changelog

What's Changed

Full Changelog: 0.0.11...0.1.0

0.0.11

13 Oct 20:30
f9b922c
Compare
Choose a tag to compare

New Feature

  • Enabling direnv with devbox. See our docs for more details (#213)

Bug Fix

  • Fixed a bug for how packages are installed using nix (#229)

Changelog

  • f9b922c [shell] add /share and /lib to development.nix (#229)
  • 07739a7 [shell] minimal revert of #222 to bring back shell plans temporarily (#228)
  • 8811ade direnv integration - updating PATH (#213)
  • be10969 Turn off auto-detection for language on devbox shell (#222)

0.0.10

06 Oct 21:41
e70e25e
Compare
Choose a tag to compare

Bug Fixes

  • Polish improvements for how packages are installed via nix (#215, #210, #220, #221)
  • Fixed a bug that would cause builds to fail for NodeJS Planner (#212)
  • Fixed a bug where Python packages installed as Nix packages could not be found in PYTHONPATH (#218)

Changelog

  • [Bug] Fix bash regression for PATH by @LucilleH in #207
  • [nodejs planner] InputFiles should take paths relative to devbox.json, and not combined with srcDir by @savil in #212
  • [Fix] Ensure python sys path contains nix installed modules by @mikeland86 in #218
  • [RFC] move gitignore file to .devbox directory and ignore gen/profile/shell_history by @savil in #215
  • [shell] move nix-profile into a specific directory inside .devbox directory by @savil in #210
  • fix pipenv test by @savil in #219
  • nix: fix removing user Nix profiles from PATH by @gcurtis in #220
  • devbox: handle paths with spaces by @gcurtis in #221

Full Changelog: 0.0.9...0.0.10

0.0.9

06 Oct 00:19
e9a38d2
Compare
Choose a tag to compare

Hotfix for 0.0.8.

Fixed a bug where devbox shell was failing when Planners detected 0 or more than 1 project in a directory

Changelog

0.0.8

05 Oct 22:29
965e05a
Compare
Choose a tag to compare

Release Notes

Version 0.0.8 is focused on fixing user bugs and other workflow issues.

New Language Support

  • Ruby, including Ruby on Rails
  • Java w/ Gradle

Workflow Improvements

  • You can now add packages to a running shell without restarting devbox shell. You will need to run hash -r to make the packages available in your shell after adding them. (#188)
  • Devbox will now look for a devbox.json file in parent directories, if you do not have one in your current directory. This is useful when you have multiple projects that share a single devbox.json file (#200)
  • Shell history is now preserved across devbox shell sessions (#204)
  • We now provide better error messages when we can't detect a planner during devbox build (#184)

Bug Fixes

  • We no longer propagate an error message when a user explicitly exits their shell (#201)
  • Our Golang planner no longer returns an error when main.go is not found (#199)
  • Segment errors are now silenced on connection failure (#197)

Updates to Docs, including:

  • Documentation on our new planners
  • How to configure your editor with Devbox
  • Updated CLI reference, with flags and subcommands

Full Changelog

  • [polish] improve error message for missing devbox-json by @savil in #174
  • [Java Planner] part4 - Added support for gradle by @mohsenari in #160
  • [Docs] Haskell and Zig Planners by @savil in #180
  • Added gradle support to docs by @mohsenari in #182
  • Support Rails in Ruby planner by @ipince in #183
  • [build] Better error message when can't find planner by @mikeland86 in #184
  • Update Python Docs by @Lagoja in #187
  • Add auto generated docs to Devbox Docs by @Lagoja in #189
  • Silence any segment errors by @loreto in #197
  • docs: fix typo in Python language detection docs by @ipince in #195
  • Add docs for Ruby by @ipince in #194
  • [planner] Golang planner return error when main.go is not found by @LucilleH in #199
  • [Bug] Do not propagate error on explicit shell exit by @LucilleH in #201
  • Fix typo by @reflektoin in #205
  • [config] look for the devbox.json file in parent directories as well by @savil in #200
  • IDE integration instructions by @mohsenari in #190
  • [shell] add packages within shell, leveraging nix-profile by @savil in #188
  • boxcli: skip shell tests due to timeout by @gcurtis in #208
  • [shell] preserve history by @savil in #204

New Contributors

Full Changelog: 0.0.7...0.0.8