You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment each subcommand is implemented in 2 parts: main functionality in subcommand definition file, output functionality defined as a switch case of plain/interactive output.Printer. Each subcommand is calculating the printer on its own using the same copy-pasted code what can be done once on rootcmd initialization.
Description
This issue is about introducing new output.Printer interface, which will contain AsJSON, AsYAML, AsPlainText, AsInteractive methods. Each subcommand which is outputting any data should implement this interface.
Part for selecting the output printer and calling it (which are now copy-pasted on each subcommand core functions) also should be moved to common place (init of root cmd?) which should set a variable available to be consumed by subcommand code (e.g. allowing to check for interaction, control spinner).
Mentioned variable and output handling code should land in ./internal/ package
Acceptance Criteria
new printer interface introduced in internal/ package
code for selecting printer added to root command initialization
Activity
github-actions commentedon Oct 15, 2026
Thanks for opening this issue! 🎉
A maintainer will triage it within 5 business days. You can learn more about our issue workflow in the Issue Lifecycle documentation.
In the meantime, please make sure you have provided:
This helps us route your issue faster.