3

I'm trying to make argocd cli output yaml/json to prep it for script ingestion.

According to this PR: https://github.com/argoproj/argo-cd/pull/2551 It should be available but I can't find the option in cli help nor in documentation.

#argocd version:                                                                                                                                    
argocd: v2.1.2+7af9dfb
...
argocd-server: v2.0.3+8d2b13d
Vano
  • 1,416
  • 1
  • 13
  • 26

1 Answers1

4

Some commands accept the -o json flag to request JSON output.

Look in the commands documentation to find commands which support that flag.

argocd cluster list -o json, for example, will return a JSON list of configured clusters. The documentation looks like this:

Options

   -h, --help            help for get
   -o, --output string  
Output format. One of: json|yaml|wide|server (default "yaml")
crenshaw-dev
  • 7,504
  • 3
  • 45
  • 81
  • Yes Thank for answering. I now see it's not a global flag, my intended command doesn't. https://github.com/argoproj/argo-cd/issues/7676 – Vano Nov 10 '21 at 23:54