Analysis updated 2026-07-03
Build a Minecraft plugin command system where /give player item 5 routes to a different handler than /give player item.
Add a typed command parser to a Java CLI tool or chat bot that validates argument types and gives users clear error messages.
Generate autocomplete suggestions for a command interface by querying Brigadier's usage tree at any node.
| mojang/brigadier | tng/archunit | oasisfeng/island | |
|---|---|---|---|
| Stars | 3,688 | 3,690 | 3,685 |
| Language | Java | Java | Java |
| Setup difficulty | easy | easy | hard |
| Complexity | 2/5 | 2/5 | 4/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Add via Maven or Gradle from Mojang's public repository, no external infra or API keys required.
Brigadier is a command parsing and dispatching library built by Mojang, the company behind Minecraft. It was originally created for Minecraft: Java Edition and later released as a standalone open-source library available to any Java or JVM project under the MIT license. The core idea is that you define a tree of possible command structures, and when a user types something, the library figures out which branch of that tree matches what they typed, validates any arguments, and calls the appropriate function. You build this tree by registering commands one at a time. Each command can be a fixed keyword, an argument that accepts a specific type of value like an integer, or a combination where a keyword is followed by one or more arguments. The README shows an example where typing "foo" runs one piece of code and typing "foo 123" runs a different piece. Argument types handle the parsing and validation. The library includes some built-in types, and you can write your own if you need a custom format. When parsing fails because the user typed something the library cannot understand, it throws a specific exception type that describes what went wrong, which makes it straightforward to show the user a helpful error message. For usage hints, the library can generate a list of all valid command patterns under any node in the tree, or a condensed "smart usage" summary that groups optional parts together. These are designed to be shown to users as autocomplete suggestions or help text. The library is available through Maven and Gradle via Mojang's public repository. Contributions are welcome but require a Contributor License Agreement, and the project follows Microsoft's open-source code of conduct.
Brigadier is Mojang's open-source Java library for parsing and dispatching commands using a tree structure, originally built for Minecraft and now available for any JVM project that needs typed command parsing with autocomplete hints.
Mainly Java. The stack also includes Java, Maven, Gradle.
MIT License, use freely for any purpose, including commercial use, with no restrictions beyond keeping the copyright notice.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.