This is the official VSCode extension for devbox open source project by jetify.com
When VSCode Terminal is opened on a devbox project, this extension detects devbox.json and runs devbox shell so terminal is automatically in devbox shell environment. Can be turned off in settings.
If the opened workspace in VSCode has a devbox.json file, from command palette, invoking the devbox command Reopen in Devbox shell environment will do the following:
- Installs devbox packages if missing.
- Update workspace settings for MacOS to create terminals without creating a login shell learn more
- Interact with Devbox CLI to setup a devbox shell.
- Close current VSCode window and reopen it in a devbox shell environment as if VSCode was opened from a devbox shell terminal.
NOTE: Requires devbox CLI v0.5.5 and above installed and in PATH. This feature is in beta. Please report any bugs/issues in Github or our Discord.
NOTE2: This feature works with Linux, MacOS, and Windows with WSL (project files should reside in WSL and devbox CLI needs to be installed and in PATH in WSL)
cmd/ctrl + shift + p opens vscode's command palette. Typing devbox filters all available commands devbox extension can run. Those commands are:
- Init: Creates a devbox.json file
- Add: adds a package to devbox.json
- Remove: Removes a package from devbox.json
- Shell: Opens a terminal and runs devbox shell
- Run: Runs a script from devbox.json if specified
- Install Install packages specified in devbox.json
- Update Update packages specified in devbox.json
- Search Search for packages to add to your devbox project
- Generate DevContainer files: Generates devcontainer.json & Dockerfile inside .devcontainers directory. This allows for running vscode in a container or GitHub Codespaces.
- Generate a Dockerfile from devbox.json: Generates a Dockerfile a project's root directory. This allows for running the devbox project in a container.
- Reopen in Devbox shell environment: Allows projects with devbox.json reopen VSCode in devbox environment. Note: It requires devbox CLI v0.5.5 and above installed and in PATH.
No need to take any action for this feature. When writing a devbox.json, if this extension is installed, it will validate and highlight any disallowed fields or values on a devbox.json file.
Enabling debug mode in extension settings will create a sequence of logs in the file: .devbox/extension.log. This feature only tracks the logs for "Devbox: Reopen in Devbox Shell environment".
Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.
Steps:
- Bump the version in
package.json, and add notes toCHANGELOG.md. Sample PR: #951. - Manually trigger the
vscode-ext-releasein Github Actions.