Besides parsing the output of listfunds, shouldn't we have a way to see how much funds we can send, and how much we can receive?
I think you want the spendable_msat field in the channels in listpeers:
$ lightning-cli listpeers | jq '.peers[].channels[].spendable_msat'
"2019900000msat"
It's really easy to either sum up the channels or to have a plugin do it for you and then calling the plugin to get the total.
the summary plugin should cover this https://github.com/lightningd/plugins/tree/master/summary
Most helpful comment
the
summaryplugin should cover this https://github.com/lightningd/plugins/tree/master/summary