devbox icon indicating copy to clipboard operation
devbox copied to clipboard

[Feature]: Support devbox.yaml

Open d-enk opened this issue 1 year ago • 1 comments

What problem are you trying to solve?

exclude json restrictions

reopen #1590

see https://github.com/jetify-com/devbox/issues/1590#issuecomment-2178285560

What solution would you like?

Support yaml format

Alternatives you've considered

If you really don’t want it that much, you can at least add a path option for devbox.yaml So that you can configure something like:

yq eval 'json(.)' devbox.yaml | devbox --path -

d-enk avatar Jun 24 '24 07:06 d-enk

@d-enk dude yes! it suddenly clicked how i've been fighting JSON quote escapes and multiline unreadability and YAML would fix this. now we just need to bully the Jetify team into adding a CLI flag to revert v0.12.0's insane breaking changes :p

justinTM avatar Aug 03 '24 03:08 justinTM

@d-enk dude yes! it suddenly clicked how i've been fighting JSON quote escapes and multiline unreadability and YAML would fix this. now we just need to bully the Jetify team into adding a CLI flag to revert v0.12.0's insane breaking changes :p

Yeah this is a helpful one. I end up using an external task runner (e.g. with a makefile, justfile, justfile, et.c.), partially to avoid quote hell, and partially to declutter devbox.json.

Although, the official suggestion is to use of stand-alone script files that devbox references (e.g. an external .scripts directory full of different scripts for devbox to use). That also suffices for avoiding json quoting hell. And since devbox implements a lot of the same features as external task runners, that might be enough for you.

Another option I thought of is to extend the plugin API to hook into how a project parses devbox manifest files. That way we can just encourage community plugins as opposed to having devbox expand the scope of project maintenance. I'll make a separate ticket for that idea and link these one-off suggestions.

CourteousCoder avatar Jun 01 '25 21:06 CourteousCoder

I wish I could put comments in my devbox.json file.

gdw2 avatar Oct 15 '25 15:10 gdw2

I wish I could put comments in my devbox.json file.

you already can. devbox uses json5

ascknx avatar Oct 15 '25 15:10 ascknx

you already can. devbox uses json5

devbox uses tailscale/hujson which is jwcc, not json5. It doesn't support things like unquoted keys or line breaks in strings.

Tested this because you got me excited that it might support json5 for multiline strings. I think that is my biggest reason for wanting devbox.yaml support. For now I'm using a scripts directory.

AdrianOrdonezAtFanatics avatar Oct 16 '25 03:10 AdrianOrdonezAtFanatics