fnproject / cli

CLI tool for fnproject.
https://fnproject.io
Apache License 2.0
132 stars 66 forks source link

RFE: add machine readable output to the CLI #460

Open delabassee opened 6 years ago

delabassee commented 6 years ago

As a user (Dev and/or Ops), I want to easily script and automate Fn without necessarily having to rely on an API.

A new flag could make the CLI to generate a machine readable output (JSON comes to mind) instead of the regular human friendly (and colourful) output.

A good existing example is fn inspect app myappas it spits out a json document.

harryjsmith commented 6 years ago

Are there specific commands that you would most want this for, e.g. lists, or were you wanting it universally throughout the CLI?

delabassee commented 6 years ago

It depends on the cost of making this a global option. If it's too costly, list would be a needed one. I have to think for others, maybe get?

zootalures commented 6 years ago

For get, does the current ‘inspect’ and ‘inspect ’ fit ?

delabassee commented 6 years ago

'inspect' and 'inspect '?? Not sure about get calls and get logs, might maybe be useful too?!

delabassee commented 6 years ago

While chatting with @shaunsmith, I discovered that this might already be available! https://github.com/fnproject/cli/search?q=%22Output+format+%28json%29%22&unscoped_q=%22Output+format+%28json%29%22 I'll check to see if there's any gap before closing.