About
bevy_brp_extras does two things
- Configures your app for bevy remote protocol (BRP)
- Adds additional methods that can be used with BRP
Supported Bevy Versions
| bevy | bevy_brp_extras |
|---|---|
| 0.18 | 0.18.0-0.18.6 |
| 0.17 | 0.17.0-0.17.2 |
| 0.16 | 0.1 - 0.2 |
BRP Methods
- App Lifecycle:
screenshot,shutdown,set_window_title,get_diagnostics - Keyboard:
send_keys,type_text - Mouse:
click_mouse,double_click_mouse,send_mouse_button,move_mouse,drag_mouse,scroll_mouse - Trackpad Gestures (macOS):
double_tap_gesture,pinch_gesture,rotation_gesture
All methods are prefixed with brp_extras/ (e.g., brp_extras/screenshot). See docs.rs for parameter details.
Screenshot note: Your Bevy app must have the png feature enabled for screenshots to work. Without it, screenshot files will be created but will be 0 bytes.
= { = "0.18", = ["png"] }
Diagnostics note: get_diagnostics requires the diagnostics cargo feature (enabled by default). Disable with default-features = false if you don't want FrameTimeDiagnosticsPlugin added to your app.
WASM Support
bevy_brp_extras compiles on wasm32 targets. On native platforms, HTTP transport (RemoteHttpPlugin) is added automatically. On WASM, only the BRP methods are registered -- you need to provide your own transport (e.g., a WebSocket relay).
Usage
Add to your Cargo.toml:
[]
= "0.18.4"
Add the plugin to your Bevy app
use *;
use BrpExtrasPlugin;
Custom Port
You can specify a custom port for the BRP server:
.add_plugins
Alternatively, you can set the port at runtime using the BRP_EXTRAS_PORT environment variable:
BRP_EXTRAS_PORT=8080
Port priority: BRP_EXTRAS_PORT environment variable > with_port() > default port (15702)
Integration with bevy_brp_mcp
This crate is designed to work with bevy_brp_mcp, which provides a Model Context Protocol (MCP) server for controlling Bevy apps. When both are used together:
- Add
BrpExtrasPluginto your Bevy app - Use
bevy_brp_mcpwith your AI coding assistant - All methods are automatically discovered and made available as MCP tools
License
Dual-licensed under either:
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option.