{"slug": "lint-a-mods-folder-before-you-launch-jdx-resources-check", "title": "Lint a mods folder before you launch: jdx resources --check", "summary": "An open-source Kotlin CLI and MCP server called jdx added a `resources --check` command in v1.8.5 (PR #198) that validates Minecraft mod metadata inside JVM jars without loading or running them. The command inspects fabric.mod.json, quilt.mod.json, mods.toml, neoforge.mods.toml and referenced mixin configs, flagging errors and warnings such as missing entrypoint classes, absent mixin configs, malformed JSON/TOML and unresolved dependencies. In a test with three hand-built jars, the tool reported 4 errors and 1 warning before launch, then surfaced deeper classpath problems after the syntax issues were fixed.", "body_md": "A typo in `fabric.mod.json`, a mixin config that never made it into the jar, a client entrypoint renamed in code but not in metadata: the loader reports all of these, but only after you have started the game. In a big pack, that start can take a minute or more.\n\n[jdx](https://mohammadmd1383.github.io/jdx/) is an open-source CLI and MCP server (Kotlin, Java 21+, Apache-2.0) that answers IDE-style questions about JVM jars without loading or running them. Since v1.8.5 ([PR #198](https://github.com/MohammadMD1383/jdx/pull/198), [issue #179](https://github.com/MohammadMD1383/jdx/issues/179)), `jdx resources --check` reads the mod metadata inside the jars and reports problems before you launch.\n\n```\ncurl -fsSL https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.sh | bash\n```\n\n(Windows: `irm https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.ps1 | iex`. Existing release installs update with `jdx upgrade`.)\n\n`--check` looks at `fabric.mod.json`, `quilt.mod.json`, `META-INF/mods.toml`, `META-INF/neoforge.mods.toml` and mixin configs, plus the mixin configs those files name. It reports:\n\n`schemaVersion`, `id` and `version` for Fabric; `modLoader`, `loaderVersion`, `license` and a `[[mods]]` entry with a `modId` for Forge and NeoForge.`--jars` provides. `minecraft`, `java` and the loaders themselves are skipped, and so are optional Forge/NeoForge dependencies.\nEach finding is an `error` or a `warning`.\n\nTo test it, I built three tiny jars:\n\n`examplemod-1.0.0.jar`: its `fabric.mod.json` names a `main` entrypoint that exists, a `client` entrypoint that doesn't, two mixin configs (only one is in the jar) and depends on `fabric-api` and `cloth-config`. The mixin config that is in the jar has a trailing comma.` cloth-config-15.0.140.jar`: only a valid `\"id\": \"cloth-config\"`.` forgeymod-1.0.0.jar`: a `META-INF/mods.toml` with an unclosed string on `displayName`, and a required dependency on `jei`.\n\n```\njdx resources --check --jars mods --no-jdk\nchecked 4 metadata files: 4 errors, 1 warning\ncloth-config-15.0.140.jar\n  fabric.mod.json (fabric.mod.json): ok\nexamplemod-1.0.0.jar\n  examplemod.mixins.json (mixin config): 1 error\n    error: malformed JSON: line 8, column 3: unexpected character ']'\n  fabric.mod.json (fabric.mod.json): 2 errors, 1 warning\n    error: entrypoint 'client' class com.example.client.ExampleModClient is not on the classpath\n    error: mixin config 'examplemod.client.mixins.json' is not in this jar\n    warning: dependency 'fabric-api' is not provided by any opened jar (add it to --jars, or the game or loader supplies it)\nforgeymod-1.0.0.jar\n  META-INF/mods.toml (mods.toml): 1 error\n    error: malformed TOML: line 8: unterminated string\nnote: --check reads metadata in place; use --cat to print a file raw. Nothing is downloaded.\n```\n\nHere's how to read it:\n\n`fabricloader` aren't reported at all.`]` right after the trailing comma, and the TOML error points at the After fixing the comma and the quote and rebuilding the two jars, the same command goes one level deeper:\n\n```\nchecked 4 metadata files: 3 errors, 2 warnings\ncloth-config-15.0.140.jar\n  fabric.mod.json (fabric.mod.json): ok\nexamplemod-1.0.0.jar\n  examplemod.mixins.json (mixin config): 1 error\n    error: mixin class com.example.mixin.ChatHudMixin (in 'mixins') is not on the classpath\n  fabric.mod.json (fabric.mod.json): 2 errors, 1 warning\n    error: entrypoint 'client' class com.example.client.ExampleModClient is not on the classpath\n    error: mixin config 'examplemod.client.mixins.json' is not in this jar\n    warning: dependency 'fabric-api' is not provided by any opened jar (add it to --jars, or the game or loader supplies it)\nforgeymod-1.0.0.jar\n  META-INF/mods.toml (mods.toml): 1 warning\n    warning: dependency 'jei' is not provided by any opened jar (add it to --jars, or the game or loader supplies it)\nnote: --check reads metadata in place; use --cat to print a file raw. Nothing is downloaded.\n```\n\n`TitleScreenMixin` is in the jar, so only `ChatHudMixin` is reported. Missing fields look like this, for a `neoforge.mods.toml` whose `[[mods]]` entry has no `modId`:\n\n```\nchecked 1 metadata file: 1 error, 0 warnings\nneomod-2.0.0.jar\n  META-INF/neoforge.mods.toml (neoforge.mods.toml): 1 error\n    error: [[mods]] #1 is missing 'modId'\nnote: --check reads metadata in place; use --cat to print a file raw. Nothing is downloaded.\n```\n\nThe usual `resources` filters work. `--in` limits the check to one jar, and the other jars still count as providers:\n\n```\njdx resources --check --in 'examplemod*' --jars mods --no-jdk\n```\n\nThat prints `checked 2 metadata files: 3 errors, 1 warning` with just the `examplemod-1.0.0.jar` section. A pattern works too: `jdx resources --check fabric.mod.json --jars mods --no-jdk` checks every `fabric.mod.json` and the mixin configs they name. `--limit` caps how many files are listed.\n\nFindings don't change the exit code. The command exits 0 when at least one metadata file was checked, even with errors, and 1 when nothing matched:\n\n``` bash\n$ jdx resources --check 'nothing-here.toml' --jars mods --no-jdk\nnot found: nothing-here.toml\nno mod metadata matching 'nothing-here.toml'\n```\n\n(exit 1). `--check` together with `--cat` is a usage error (exit 3).\n\nTo fail a build, use `--json`, which carries every finding with its `severity`:\n\n```\njdx resources --check --jars mods --no-jdk --json \\\n  | jq -r '.result.files[] | .artifact as $a | .findings[] | select(.severity==\"error\") | \"\\($a): \\(.message)\"'\nexamplemod-1.0.0.jar: mixin class com.example.mixin.ChatHudMixin (in 'mixins') is not on the classpath\nexamplemod-1.0.0.jar: entrypoint 'client' class com.example.client.ExampleModClient is not on the classpath\nexamplemod-1.0.0.jar: mixin config 'examplemod.client.mixins.json' is not in this jar\n```\n\nThe summary also includes `.result.errors` and `.result.warnings` counts, so `jq -e '.result.errors == 0'` makes a one-line gate.\n\n`\"cloth-config\": \">=15\"` passes if any jar declares The MCP tool `jdx_resources` takes `check`, so after `jdx setup --agent claude-code` an agent can run the same check on a mods folder and read the findings as JSON.\n\nThe repo is at [https://github.com/MohammadMD1383/jdx](https://github.com/MohammadMD1383/jdx). The modpack guide covers the other questions, like which mod logs a message, ships a duplicate class or mixes into a class: [https://mohammadmd1383.github.io/jdx/docs/minecraft-modpack/](https://mohammadmd1383.github.io/jdx/docs/minecraft-modpack/)", "url": "https://wpnews.pro/news/lint-a-mods-folder-before-you-launch-jdx-resources-check", "canonical_source": "https://dev.to/mohammadmd1383/lint-a-mods-folder-before-you-launch-jdx-resources-check-2o0l", "published_at": "2026-12-02 16:35:33+00:00", "updated_at": "2026-12-02 16:46:57.484562+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents"], "entities": ["jdx", "MohammadMD1383", "Fabric", "Quilt", "Forge", "NeoForge", "Minecraft"], "also_reported_by": [], "takeaway": "Running `jdx resources --check --jars mods` validates Fabric/Quilt/Forge/NeoForge metadata and mixin configs in place, catching missing entrypoint classes, absent mixin configs and malformed JSON/TOML before a slow game launch.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/lint-a-mods-folder-before-you-launch-jdx-resources-check", "markdown": "https://wpnews.pro/news/lint-a-mods-folder-before-you-launch-jdx-resources-check.md", "text": "https://wpnews.pro/news/lint-a-mods-folder-before-you-launch-jdx-resources-check.txt", "jsonld": "https://wpnews.pro/news/lint-a-mods-folder-before-you-launch-jdx-resources-check.jsonld"}}