Skip to content

Allow package versions in devbox.json to reference a file #2820

Open
fvioz wants to merge 1 commit intojetify-com:mainfrom
fvioz:main
Open

Allow package versions in devbox.json to reference a file #2820
fvioz wants to merge 1 commit intojetify-com:mainfrom
fvioz:main

Conversation

@fvioz
Copy link
Copy Markdown

@fvioz fvioz commented Apr 17, 2026

Summary

Allow package versions in devbox.json to reference a file containing the version string (e.g., .go-version, .node-version). Teams commonly store versions in files to share them across CI, Docker builds, and local development — this ensures devbox environments stay in sync with production without manual duplication.

How was it tested?

  1. Create a dummy directory
mkdir dummy
  1. Create the following files

dummy/devbox.json

{
  "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.17.1/.schema/devbox.schema.json",
  "packages": {
    "go": ".go-version"
  },
  "shell": {
    "init_hook": ["echo 'Welcome to devbox!' > /dev/null"],
    "scripts": {
      "test": ["echo \"Error: no test specified\" && exit 1"]
    }
  }
}

dummy/.go-version

1.24.0
  1. Run the following command from the root of the project
devbox run build && cd dummy && ../dist/devbox shell

The expected result should that devbox download the go version 1.24.0 when shell is enabled.

Community Contribution License

All community contributions in this pull request are licensed to the project
maintainers under the terms of the
Apache 2 License.

By creating this pull request, I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 License as stated in
the
Community Contribution License.

@fvioz fvioz changed the title Allow version in files for devbox.json config file Allow package versions in devbox.json to reference a file Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant