Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow: Devbox Run #94

Closed
Lagoja opened this issue Sep 8, 2022 · 2 comments
Closed

Workflow: Devbox Run #94

Lagoja opened this issue Sep 8, 2022 · 2 comments
Labels
feature New feature or request

Comments

@Lagoja
Copy link
Contributor

Lagoja commented Sep 8, 2022

Current State

If you want to run a one off command or package with Devbox, you currently need to start your shell, run your package, and then exit the shell. This adds a lot of steps and friction for developers who may want to quickly start a package or run a project in their shell

Desired State

I set up a shell in advance with devbox init, and then add packages usingdevbox add. I now want to run a specific command or script in my Devbox Shell and then exit back to my normal shell, so I invoke my script or command with the Devbox CLI. This would be used to run my script in an isolated shell with all it’s dependencies, display the results, and then exit the Devbox shell.

@Lagoja Lagoja changed the title Devbox Run Workflow: Devbox Run Sep 8, 2022
@mentos1386
Copy link

This is something i see missing as well. I would like to use devbox inside CI and pre-commit hooks.

@Lagoja
Copy link
Contributor Author

Lagoja commented Sep 29, 2022

Hey everyone, this is now available in Devbox 0.0.7 -- you can run a one off command in your devbox shell using:

devbox shell -- <cmd>

This will launch a shell based on your devbox.json, run your command, and then exit back to your normal shell. For example:

~ $  devbox shell -- echo "Hello World"
Installing nix packages. This may take a while...
Starting a devbox shell...
Hello World
~ $ 

More info is in our new CLI Docs: https://www.jetpack.io/devbox/docs/cli_reference/devbox_shell/

@Lagoja Lagoja added this to the 0.0.7 milestone Sep 30, 2022
@Lagoja Lagoja closed this as completed Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Development

No branches or pull requests

2 participants