cli
cli copied to clipboard
RFE: add machine readable output to the CLI
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.
Are there specific commands that you would most want this for, e.g. lists, or were you wanting it universally throughout the CLI?
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?
For get, does the current ‘inspect’ and ‘inspect
'inspect' and 'inspect '??
Not sure about get calls and get logs, might maybe be useful too?!
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.