spring-cli icon indicating copy to clipboard operation
spring-cli copied to clipboard

Add `command list` with `--json` option

Open BoykoAlex opened this issue 1 year ago • 0 comments

This command i think would be useful for the IDE for the user to select the user defined command for execution. Perhaps it is enough just to implement the JSON variant of the command since user defined command are listed for help command. The format would be Command[]:

interface Subcommand {
  name: string;
}
interface Command extends Subcommand {
  subcommands: Subcommand[]
}

Can help output JSON? If yes then I likely to get away with help output jsonified rather than have extra commands to fetch user defined commands data.

Another option of course is just read the contents of the .spring/commands myself and parse yaml file describing the command myself as well by the IDE integration... This can be done as well. Please advice :-)

BoykoAlex avatar Jan 19 '24 22:01 BoykoAlex