cue icon indicating copy to clipboard operation
cue copied to clipboard

cmd/cue: command to list packages

Open myitcv opened this issue 9 months ago • 1 comments

Is your feature request related to a problem? Please describe.

Go has go list to list package information (see #2882 for a request to be able to list module versions - that issue could be merged into this one). Having a similar command in CUE would be generally incredibly useful.

Describe the solution you'd like

A cmd/cue command to list package information like go list.

Describe alternatives you've considered

There isn't a good solution here, save for manually gathering this information as a human. Which seems to be a shame when https://pkg.go.dev/cuelang.org/go/cue/build#Instance exists already.

Additional context

n/a

myitcv avatar Mar 24 '25 05:03 myitcv

Worth saying outloud that one of the biggest use cases for go list is with the --json flag, where it shows package (or module) information in a structured JSON format. This is extremely useful for integration within other programs or scripts.

cue list should have a similar way to export information in structured form.

mvdan avatar Dec 09 '25 16:12 mvdan