bevy_commodore
This is a text command framework for Bevy, largely inspired by Minecraft's Brigadier command parser & dispatcher.
Features
- Multiple simultaneous command and argument registries
- Custom argument types
- Optional arguments
- (Nested) subcommands
Getting started
To start, simply register your commands to your CommandPlugin plugin and add it to the app, e.g.:
use ;
use ;
use Write;
let mut app = new;
let plugin = new;
let echo_command = new;
echo_command.;
plugin.register_command;
app.add_plugins;
app.add_plugins;
app.run;
[!NOTE] This example will work, but it will provide no way to call these commands. To supply input to the command plugin, use the
CommandInputevent. You'll be able to get the result of the command via theCommandOutputevent.
For a more detailed and fully functional example showcasing more features, you can view the examples/example.rs file.
Roadmap
- Variadic arguments
- Help for subcommands