Environment files variable export action

At present,we can export the variables of environment into a JSON file using export option.
Is any option to avoid manual intervention on export action which means that automatic export via JS script.

The Postman API can be used to programmatically get the data from your environment files.