This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for index in $( algolia indices list --output jsonpath --template="{..name}" ); do | |
echo "Export ${index}" | |
algolia settings get ${index} > ${index}.json | |
# If you have jq installed, you can get pretty formatted JSON output using: | |
# algolia settings get ${index} | jq "." > ${index}.json | |
done | |
# Add the following to automatically commit and push to a repository | |
# git add *.json | |
# git commit -a --m "Automatic Settings Export" |