Can we download Cloud Functions from cloud shell or gcloud ? At the moment we have the option to download from UI in the source tab.
After some tests, the GUI action required a cookies for the authentication and you can't pass an access token or a identity token.
You can't perform this action programmatically (or with a lot of effort, and with a personal authentication. I think that service account won't be able to do this)