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.

https://www.postman.com/postman/workspace/postman-public-workspace/folder/12959542-74aa54b5-9f5f-4ba5-923f-a6c805c14774