[Feature Request] Worktrunk switch scope/arguments
I've been really excited about getting Worktrunk in our repo, especially some of the advanced use cases around creating worktree specific servers and docker containers. For full stack feature development this is amazing since each one has its own database and docker services.
However, sometimes going into a feature I know that I'll only be working on a frontend feature that doesn't actually need to spin up a backend server + database. It would be really cool if we could configure arbitrary arguments that can be passed to wt and that then are made available to the different steps so I can modify our scripts to more intelligently provision potential resources.
I'm picturing something like wt switch --create --scope=ui my-frontend-only-feature and then having access to scope values in scripts.
I know I could build this myself by having some wrapper scripts that set environment variables I could read but I think it would be a cool feature to have available natively in worktrunk.
Thanks for the suggestion! This is a feature request rather than a bug, so I'll leave it for a maintainer to evaluate and prioritize.
my sense is that something like --scope is too specific; adds weight to the API without enough generality
I think there could be something around setting custom fields, similar to some of the threads from https://github.com/max-sixty/worktrunk/issues/947 (now morphed beyond its title)
would really like more use-cases there, it's a bit of a solution-in-search-of-a-problem at the moment
vars now should fill this gap, albeit with a bit of required customization https://worktrunk.dev/config/#wt-config-state-vars
so I'll close, but any issues around vars are very welcome