molerat
Health Uyari
- License Γ’β¬β License: Apache-2.0
- Description Γ’β¬β Repository has a description
- Active repo Γ’β¬β Last push 0 days ago
- Low visibility Γ’β¬β Only 8 GitHub stars
Code Gecti
- Code scan Γ’β¬β Scanned 1 files during light audit, no dangerous patterns found
Permissions Gecti
- Permissions Γ’β¬β No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
An accessibility & agentic layer for Rust UI applications π
molerat
An accessibility & agentic layer for Rust UI applications, built on AccessKit π
Quickstart
cargo add molerat
Add molerat to your app and publish a semantic view alongside your existing UI:
use molerat::Molerat;
let mut molerat = Molerat::new("Notes");
molerat.publish(|ui| {
ui.text("status", "All changes saved");
});
See the available semantic UI components in the API documentation.
If you have actions in your app, define an enum and return them from your UI handlers:
#[derive(Debug)]
enum Message {
Save,
}
let mut molerat = Molerat::<Message>::new("Notes");
molerat.publish(|ui| {
ui.button("save", "Save").on_click(|| Message::Save);
});
See the available semantic actions in the API documentation.
To handle the incoming actions:
for message in molerat.messages() {
match message {
Message::Save => { /* update app state */ }
}
}
Examples
ratatui-recipe-atspi: An app that speaks Ratatouille recipe.ratatui-dashboard-atspi: An app that speaks the system stats.ratatui-recipe-mcp: Task queue controlled by agents.ratatui-sqlite-mcp: SQLite workbench controlled by agents.ratatui-paint-mcp: Drawing canvas controlled by agents.
Run one with:
cargo run --example <example-name> --features <mcp|atspi>
# For example:
cargo run --example ratatui-recipe-atspi --features atspi
# The MCP examples require the stdio bridge (molerat-mcp) to be installed:
cargo install molerat --features mcp --bin molerat-mcp
cargo run --example ratatui-recipe-mcp --features mcp
The examples above are built with Ratatui, but molerat is not designed for any specific UI framework.
[!TIP]
If you want to integrate molerat with Ratatui, see the migration guide or simply give that document to your agent π§
Showcase
Here is knife (a reverse-engineering TUI) solving a crackme challenge:
https://github.com/user-attachments/assets/586710de-214c-468c-91b7-0126d7a25592
Here is BugStalker (a Rust debugger) debugging an application:
https://github.com/user-attachments/assets/ff256f9a-4f7b-4374-a7d3-5d91e2ebec55
Integrations
Screen readers
You can use the AT-SPI to expose your UI/actions to screen readers on Linux!
- Enable
atspifeature:
cargo add molerat --features atspi
- And then adjust your constructor to use AT-SPI:
let mut molerat = Molerat::<Message>::new_atspi("Notes");
Nothing else is needed!
Agents
You can use the Model Context Protocol (MCP) to expose your UI/actions to agents!
- Install the
molerat-mcpstdio bridge and register it with your MCP client:
cargo install molerat --features mcp --bin molerat-mcp
- Register the installed binary with your MCP client. e.g. Codex:
codex mcp add molerat -- "$(command -v molerat-mcp)"
- Enable
mcpfeature:
cargo add molerat --features mcp
- And then you can change your constructor to use the MCP bridge:
let mut molerat = Molerat::<Message>::new_mcp("Notes")?;
That's it! Your app is now agentic and can be controlled by your favorite agent.
License
Licensed under either of Apache License Version 2.0 or The MIT License at your option.
π¦ γ( ΒΊ _ ΒΊ γ) - respect crables!
Copyright
Copyright Β© 2026, Orhun ParmaksΔ±z
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi