timoni icon indicating copy to clipboard operation
timoni copied to clipboard

[Proposal] Define bundle as CUE module instead of individual files

Open folliehiyuki opened this issue 5 months ago • 3 comments

Currently, to avoid writing a lengthy bundle file, I'd have to split it into multiple CUE files, and apply them with timoni bundle apply -f <file1> -f <file2>. The command keeps getting longer the more instances I add to it. Most of the time, I have those bundle files being in the same directory, each specifying values for each individual instance. It'd be nice for timoni apply to support directories alongside individual files.

Proposal

  • Add -d flag, pointing to the local directory with CUE files
  • A valid bundle file requires a "fixed" package name to be specified, .e.g package bundle
  • timoni looks into the specified directory, gets the merged config from the CUE package bundle. This way, CUE's module functionality can be utilized to avoid dealing with file listing, manual value merging logic, .etc

folliehiyuki avatar Jan 22 '24 17:01 folliehiyuki