JSON to Brigadier: Turn JSON Files into Minecraft Commands
If you have ever hand-written a long Brigadier command tree for a datapack or a custom server tool, you already know how tedious the process can be. The JSON to Brigadier library solves that problem by converting JSON files directly into Minecraft Commands. Instead of wrestling with nested builders in Java, you describe your command structure in plain JSON and let the library handle the heavy lifting.
This makes it a practical tool for datapack authors, plugin developers, and map makers who want readable, maintainable command definitions. Whether you are building a simple utility command or a complex argument tree, JSON to Brigadier keeps your workflow clean and predictable.
What JSON to Brigadier Does
At its core, JSON to Brigadier is a library that reads a JSON specification and outputs a working Minecraft command. The JSON format mirrors Brigadier's own argument model, so you get the flexibility of the command API without writing verbose Java code. Each command is defined with an argument object, and the library maps the type field to the correct Brigadier argument type.
The original API specification is documented on the json-to-brigadier GitHub repository, which lists every supported argument type and the extra properties some of them accept. That reference is worth bookmarking if you plan to build anything beyond the basics.
Supported Argument Types
Most argument types are declared with just a type name. These include common ones such as game_profile, block_pos, column_pos, block_state, block_predicate, item_stack, item_predicate, color, component, message, nbt_compound_tag, nbt_path, nbt_tag, objective, objective_criteria, operation, particle, angle, rotation, scoreboard_slot, swizzle, team, item_slot, resource_location, mob_effect, function, entity_anchor, int_range, float_range, item_enchantment, entity_summon, dimension, time, and uuid.
Three argument types require extra configuration:
- minecraft:vec3 and minecraft:vec2 accept a centered boolean that controls whether the coordinates are centered on the block.
- minecraft:score_holder and minecraft:entity accept a multiple boolean that determines whether more than one target is allowed.
Because these options are expressed as simple JSON keys, you never need to dig through Brigadier's source to remember the correct builder method.
Minecraft Versions and Loaders
JSON to Brigadier is designed around Brigadier, the command dispatcher that has powered Minecraft's command system since the 1.13 update. That means it is most relevant for modern versions, from 1.13 onward, where the flattened command syntax and Brigadier argument types are in use. Older releases that rely on the legacy command format are not the target audience for this library.
Since it is a Java library rather than a mod, it works alongside the major mod loaders. Developers building Fabric or NeoForge mods can include it as a dependency and generate command trees at runtime, while server-side plugin projects on platforms such as Paper or Spigot can use the same JSON-driven approach. The library does not tie you to a single loader, which keeps it flexible across projects.
How to Install JSON to Brigadier
If you are a developer, the process is straightforward. Add the library to your project's build configuration, then write a JSON file that describes your command. Load that file through the library's API, and it returns a Brigadier command ready to register on your dispatcher. The json-to-brigadier repository includes the API specifications you need to match the expected JSON structure.
For players and server owners who simply want to download JSON to Brigadier and use it with existing content, the foxygame.net launcher makes the whole process painless: its built-in add-on catalog lets you install JSON to Brigadier for Minecraft with a single click, and it automatically keeps the tool updated so version compatibility is handled for you.
Once installed, test your command in a development world before pushing it to a live server. Brigadier reports parse errors clearly, so a malformed JSON file is usually easy to spot and fix.
Why Use a JSON-Driven Command Workflow
Keeping command definitions in JSON has real advantages. Your command trees become data rather than code, which means you can edit them without recompiling. Teams can review changes in a readable diff, and non-programmers can adjust arguments without touching Java. For large projects with dozens of subcommands, this separation of structure and logic saves hours of maintenance.
The library also reduces the chance of subtle mistakes. Brigadier builders are powerful but verbose, and it is easy to misplace a redirect or forget an argument type. A JSON schema is easier to validate and reuse across multiple commands.
Final Thoughts
JSON to Brigadier is a focused, useful tool for anyone who works with Minecraft commands at a technical level. It removes boilerplate, keeps definitions readable, and fits neatly into modern mod and plugin development on Minecraft 1.13 and later. If you build datapacks, mods, or server tools, learning how to install and use this library is a small investment that pays off every time you add a new command.