Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON/YAML output for CLI commands #629

Open
2 of 10 tasks
kosmoz opened this issue May 13, 2024 · 8 comments
Open
2 of 10 tasks

JSON/YAML output for CLI commands #629

kosmoz opened this issue May 13, 2024 · 8 comments
Labels
epic This issue serves as a collection of related tasks

Comments

@kosmoz
Copy link
Member

kosmoz commented May 13, 2024

All CLI commands should support specifying an output format if applicable. This can be done using the --output flag (short: -o). This flag is optional (default: empty) and can be set to "json" or "yaml". Output should be written to STDOUT.

If a command modifies some resources, the output should be of the resource after modification.
Those commands should also provide a --dry-run option.

Examples

# list packages as yaml
glasskube ls -o yaml
# simulate install and write json output to a file
glasskube install foo-pkg --dry-run --output=json > foo.json

Subtasks

@kosmoz kosmoz added epic This issue serves as a collection of related tasks needs-triage labels May 13, 2024
@Aryakoste
Copy link
Contributor

Hello @kosmoz I would like to work on this issue.

@jakepage91
Copy link
Collaborator

All yours!

@christophenne
Copy link
Member

Hi @Aryakoste, we created some subtasks now, since these are a lot of separate tasks. Could you please pick one of the linked issues, then we'll re-assign you to that, thanks!

@Aryakoste
Copy link
Contributor

@christophenne can I work on multiple tasks.

@christophenne
Copy link
Member

christophenne commented May 21, 2024

@Aryakoste which tasks would you like to do?

@Aryakoste
Copy link
Contributor

I can work on update and configure commands tasks. @christophenne

@christophenne
Copy link
Member

I think you can start with #657 and #658 – usually we try to have contributors work at only one issue at a time, but in this case it makes a bit more sense because the tasks are similar.

Can you please shortly comment in these two? I think you need to be "active" in the issue, otherwise github does not allow me to assign you it seems.

@Aryakoste
Copy link
Contributor

I have commented in the above 2 issues.

@pmig pmig removed the needs-triage label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic This issue serves as a collection of related tasks
Projects
None yet
Development

No branches or pull requests

5 participants