Brigadier is a command parser and dispatcher designed for Minecraft: Java Edition and available for general use under the MIT license.
The tool solves the problem of parsing and executing commands with complex syntax trees. It works by building a command tree composed of command nodes that represent valid syntax options. Each node can be a literal (requiring exact text input) or an argument node (accepting parsed values of specified types). The dispatcher evaluates user input against this tree, matching it to the appropriate execution path and calling the corresponding handler function with the parsed context.
Brigadier suits projects that need flexible command parsing with support for subcommands and typed arguments. The builder pattern encourages clean registration code, and the architecture allows extending existing command trees without access to original source code. Custom argument types can be implemented for domain-specific parsing. The tool is particularly valuable for applications requiring interactive command interfaces with rich syntax validation.
The project maintains active engagement with contributions, requiring a contributor license agreement for submissions. Development follows the Microsoft Open Source Code of Conduct, indicating a formal governance structure typical of projects with institutional backing.