Expand description



A simple half-life inspired console with support for argument parsing.


Add ConsolePlugin and optionally the resource ConsoleConfiguration.

use bevy::prelude::*;
use bevy_console::{ConsoleConfiguration, ConsolePlugin};

fn main() {
        .insert_resource(ConsoleConfiguration {
            // override config here

Create a console command struct and system and add it to your app with .add_console_command.

Add doc comments to your command to provide help information in the console.

use bevy::prelude::*;
use bevy_console::{reply, AddConsoleCommand, ConsoleCommand, ConsolePlugin};

fn main() {
        .add_console_command::<ExampleCommand, _, _>(example_command);

/// Example command
#[console_command(name = "example")]
struct ExampleCommand {
    /// Some message
    msg: String,

fn example_command(mut log: ConsoleCommand<ExampleCommand>) {
    if let Some(ExampleCommand { msg }) = log.take() {
        // handle command

Examples can be found in the /examples directory.

cargo run --example log_command


Should work in wasm, but you need to disable default features.


Reply with the format! syntax.

Reply with the format! syntax followed by [failed].

Reply with the format! syntax followed by [ok].


Command argument information.

Command information.

Executed parsed console command.

Parsed raw console command into command and args.

Console configuration

Console open state

Console plugin.

Events to print to the console.


Error when trying to parse values.

Key for toggling the console.

The value types available for arguments.


Add a console commands to Bevy app.

Parse arguments from values.

Provides command usage information including description, arguments and their types.

Console command name.

Parse from argument value.

Derive Macros

Implement CommandName, CommandArgs and CommandHelp for a struct.