Last active
April 3, 2026 13:28
-
-
Save yash-garg/0dca7500bd564259cea8dcb8ce09d248 to your computer and use it in GitHub Desktop.
Script to Check For Minecraft Mod Updates via Modrinth
This file contains hidden or 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
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| if [ $# -lt 1 ]; then | |
| echo "Usage: $0 <minecraft-version>" >&2 | |
| exit 1 | |
| fi | |
| VERSION="$1" | |
| mods=( | |
| beautified-chat-server | |
| c2me-fabric | |
| chunky | |
| disconnect-packet-fix | |
| fabric-api | |
| fabricexporter | |
| ferrite-core | |
| jade | |
| leaves-us-in-peace | |
| lithium | |
| netherportalfix | |
| no-chat-reports | |
| pl3xmap | |
| spark | |
| scaffolding-drops-nearby | |
| villager-death-messages | |
| ) | |
| GREEN="\033[32m" | |
| RED="\033[31m" | |
| YELLOW="\033[33m" | |
| RESET="\033[0m" | |
| printf "\nMinecraft Version: %s\n\n" "$VERSION" | |
| printf "%-30s | %-10s | %s\n" "MOD" "STATUS" "DETAILS" | |
| printf "%-30s-+-%-10s-+-%s\n" "------------------------------" "----------" "-------------------------" | |
| printf "%s\n" "${mods[@]}" \ | |
| | xargs -P 6 -I{} bash -c ' | |
| mod="{}" | |
| json=$(curl -s "https://api.modrinth.com/v2/project/$mod/version") | |
| if echo "$json" | jq -e --arg v "'"$VERSION"'" "any(.[]; (.game_versions | index(\$v)))" > /dev/null; then | |
| loaders=$(echo "$json" | jq -r --arg v "'"$VERSION"'" " | |
| [.[] | select(.game_versions | index(\$v)) | .loaders[]] | unique | join(\", \") | |
| ") | |
| printf "%-30s | '"$GREEN"'%-10s'"$RESET"' | %s\n" "$mod" "UPDATED" "$loaders" | |
| else | |
| printf "%-30s | '"$RED"'%-10s'"$RESET"' | %s\n" "$mod" "MISSING" "-" | |
| fi | |
| ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment