This is a standalone migration script to export and imports Elasticsearch Stored Scripts.
Export scripts from your ES cluster:
node migrate.js export http://localhost:9200
This will create a es-stored-scripts.json
file containing the scripts.
Then you can import them:
node migrate.js import http://localhost:9200