Last active
September 15, 2022 11:15
-
-
Save kopertop/4572aff15dae7e1bb6d22355f8ed6c52 to your computer and use it in GitHub Desktop.
Export all Algolia Index settings
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" | |
# git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also congratulations on the hammock!