bevy_console
A simple Half-Life inspired console with support for argument parsing powered by clap
.
Features
- Command parsing with
clap
- Command history
- Command completion
- Support for ansi colors
- Customizable key bindings
- Customizable theme
- Supports capturing Bevy logs to console
Usage
Add ConsolePlugin
and optionally the resource ConsoleConfiguration
.
use *;
use ;
Create a console command struct and system and add it to your app with .add_console_command
.
Commands are created like clap
commands with an additional CommandName
trait derived via the ConsoleCommand
derive.
Add doc comments to your command to provide help information in the console.
use *;
use ;
use Parser;
/// Example command
Examples can be found in the /examples directory.
wasm
Should work in wasm, but you need to disable default features.
Keyboard Shortcuts
Some shortcuts:
- Ctrl + L: Clear history
- Ctrl + C: Clear line
- Tab: Line completion