swiftly icon indicating copy to clipboard operation
swiftly copied to clipboard

Add JSON Output Format

Open roulpriya opened this issue 7 months ago • 0 comments

Add support for JSON output for toolchain management commands:

  • List toolchains
  • Install toolchain
  • Use toolchain

Create structured result types for each command operation, define clear structs/classes for outputs like toolchain lists, version info, etc and include fields for all data currently output as text

Modify command implementations to return these structured types instead of directly printing text, and separate logic from presentation concerns

Implement a rendering layer with text and JSON formatters by creating interfaces with implementations for each output format.

Use a command-line argument like --format=json to control the output format

For backward compatibility:

  • Default to text output when no format is specified
  • Ensure text formatting matches the current output closely

roulpriya avatar Jun 10 '25 04:06 roulpriya