Any program can drive physical input.
Start an HTTP server inside a script. Anything that can make a request (a web app, a Python process, an AI model) moves the mouse and presses keys. Permission-gated by the modeline. Hardware output ships through Rebind Link; every example here also runs in software mode.
-- rebind: min_sdk=3.0.0
-- rebind: name=HTTP Bridge
-- rebind: permission=net
local server = nil
function OnStart()
server = Net.Listen(8080, function(req)
local cmd = JSON.Parse(req.body)
HID.Move(cmd.dx, cmd.dy)
if cmd.click then
Run(function() HID.Press("Mouse1", 20) end)
end
return { status = 200, body = "ok" }
end)
end
function OnStop()
if server then server:Stop() end
end
A real runtime, not a macro recorder.
The Luau SDK covers HID output, live input state, macro record and replay, pixel sampling, window control, HTTP and WebSocket servers, sandboxed file I/O, shared-memory IPC, timers, and declarative config panels. Scripts respond to lifecycle and input hooks, declare metadata in modelines, and run concurrent tasks with Run, Sleep, and cancellable handles. Full namespace and hook reference: docs.rebind.gg/reference/sdk-reference.
Drive Rebind from your own code.
A local RPC API served by the Rebind app, with clients for TypeScript, Python, and Rust.
// npm install @rebind.gg/client-ts
import { RebindRemote } from "@rebind.gg/client-ts";
const r = new RebindRemote();
await r.connect();
r.hidMove(30, -5);
r.hidPress("Mouse1", 20);
r.hidType("hello");
const { x, y } = await r.systemMouse();
const px = await r.screenPixel(x, y);
r.close();
The Python and Rust clients expose the same surface. Install commands and full API docs: client libraries.
What developers build
- Home and desk automation: bridge physical input to your smart-home or scripts over HTTP.
- AI-vision sidecars: a local model decides; the script moves real hardware via shared-memory
PipeIPC. - Robotics and control rigs: consistent, scriptable HID output from a dedicated device.
- Automated testing: drive physical HID from your test suite for hardware-in-the-loop QA.