Client libraries
Typed, auto-reconnecting wrappers over the remote-control protocol in the language you already use.
Available clients
The official clients are thin, typed wrappers over the protocol with reconnection handled for you.
JavaScript / TypeScript
npm install @rebind.gg/client-ts
import { RebindRemote } from "@rebind.gg/client-ts";
const r = new RebindRemote("ws://127.0.0.1:19561");
await r.connect();
r.hidMove(30, -5);
r.hidPress("Mouse1", 20);
r.hidType("hello\n");
const { x, y } = await r.systemMouse();
const pixel = await r.screenPixel(x, y);
for await (const pos of r.mouseEvents()) {
console.log(pos.x, pos.y);
if (pos.x > 500) break;
}
r.close();
Works in Node 22+, Bun, Deno, and the browser. Full TypeScript types, zero runtime dependencies.
- npm:
@rebind.gg/client-ts - GitHub:
usinput/rebind-client-ts
Python
pip install git+https://github.com/usinput/rebind-client-py.git
from rebind import RebindRemote
with RebindRemote("ws://127.0.0.1:19561") as r:
r.hid_move(30, -5)
r.hid_press("Mouse1", hold_ms=20)
r.hid_type("hello\n")
x, y = r.system_mouse()
pixel = r.screen_pixel(x, y)
# stream live mouse position
for pos in r.mouse_events():
print(pos.x, pos.y)
if pos.x > 500:
break
Blocking and asyncio APIs. Pure Python on Windows, macOS, and Linux.
- GitHub:
usinput/rebind-client-py
Rust
cargo add rebind-client
use rebind_client::RebindClient;
#[tokio::main]
async fn main() -> rebind_client::Result<()> {
let client = RebindClient::connect("ws://127.0.0.1:19561").await?;
client.hid_move(30, -5);
client.hid_press("Mouse1", 20);
client.hid_type("hello\n");
let (x, y) = client.system_mouse().await?;
let _pixel = client.screen_pixel(x, y).await?;
let mut events = client.mouse_events().await?;
while let Some(pos) = events.recv().await {
println!("{} {}", pos.x, pos.y);
}
client.close().await;
Ok(())
}
Async, typed, built on tokio.
- crates.io:
rebind-client - GitHub:
usinput/rebind-client-rs
Speaking the protocol directly? See Protocol.