A CLI tool for quickly scaffolding Bevy entity modules with a standardized structure.
To install the tool to your PATH for development use:
cargo install --path .This will compile and install the helper binary to ~/.cargo/bin (or %USERPROFILE%\.cargo\bin on Windows), which should already be in your PATH if you installed Rust via rustup.
Note: If you make changes to the code, reinstall with:
cargo install --path . --forceThe CLI provides an entity command that creates a new Bevy entity module:
helper entity <name>Where <name> must be in snake_case format (e.g., player_character, enemy_spawner, health_pickup).
helper entity player_characterThis will create a directory structure like:
player_character/
├── mod.rs
├── components.rs
└── systems.rs
When you run helper entity <name>, the tool:
- Creates a subdirectory with the entity name in the current directory
- Generates three files in that subdirectory:
mod.rs- Contains the plugin structure with a[Name]Plugin(converted from snake_case to PascalCase)components.rs- Template file for entity componentssystems.rs- Template file for entity systems
- Updates parent
mod.rs- If amod.rsfile exists in the current directory, it automatically addsmod <name>;at the top
use bevy::prelude::*;
use systems::*;
use components::*;
pub mod components;
mod systems;
pub struct [NameToPascalCase]Plugin;
impl Plugin for [NameToPascalCase]Plugin {
fn build(&self, app: &mut App) {
}
}// Components related to [NameToPascalCase]
use super::*;// Systems for [NameToPascalCase]
use super::*;Where [NameToPascalCase] is automatically converted from the snake_case input (e.g., player_character → PlayerCharacter).
- Rust (installed via rustup recommended)
- The
clapcrate (automatically installed as a dependency)