Skip to main content
Remote Control is a free Rebind package that runs a WebSocket server speaking plain JSON. Another program connects to it and sends keyboard, mouse, and controller output, reads screen, window, and input state, and subscribes to live events, in whatever language it is written in. The output goes through Rebind’s active transport: the operating system’s input APIs in software mode, or USB HID reports with a Rebind Link. Controller output needs a Rebind Link whose USB profile has a joypad.

Run the server

The server is the Remote Control package, a Luau script you can read in the editor. It needs Rebind 3.15.0 or later and does not need a Rebind Link.
  1. Install it from the marketplace listing, or run rebind install @rebind/remote-control --allow.
  2. Open the installed package’s main.luau in Rebind and select the Options tab.
  3. Set a strong, unique Auth token. Your program sends it before any other command.
  4. Start the script. It listens on ws://127.0.0.1:19561.
  5. Connect from code, or connect an AI agent.
Settings are stored in Rebind, not in the package, so they survive package updates.
If you ran remote_access.lua or remote.luau, stop it first: it uses the same port. Remote Control answers the same command names; set its token again in Auth token.

Options

The Remote Control script's Options tab with the WS port slider at 19561, an empty Auth token field, Local only switched on, and every Allow switch off

The Options tab of the installed main.luau, every option at its default.

Allow shell commands, Allow file access, Allow registry changes, and Allow custom Luau each give a connected program full control of this computer, including every other option here: custom Luau can change any setting, file access can rewrite the script, and shell commands can do anything you can. Turn one on only for a program you trust completely. With those four off, a connected program can still send input and, where the platform supports it, capture the screen, read and change the clipboard, and control windows. Which commands work on each operating system follows Platforms.
Without an auth token, any program on this computer, including a web page open in your browser, can connect and control your keyboard, mouse, and screen. Nothing asks you first. Set a strong token. Turning off Local only exposes the server on every network interface, and connections are not encrypted: restrict the port with your firewall and use it only on a network you trust.

Connect from code

Anything that can open a WebSocket and send JSON can drive the server; the whole protocol is on one page: Protocol. To give an AI agent a keyboard and mouse instead, see Use with an AI agent. Typed clients wrap the protocol for TypeScript, Python, and Rust. Each sends the token when you give one and turns error replies into exceptions or Err values that carry the server’s error code. Commands without a typed method go through call. Each client also streams live mouse and window events, and the TypeScript and Python clients stream input events too; the package READMEs show how.

TypeScript

@rebind.gg/client-ts runs on Node 22+, Bun, Deno, and browsers, and reconnects with backoff.
Methods and options: npm, GitHub.

Python

rebind needs Python 3.9+. RebindRemote blocks; AsyncRebindRemote has the same methods, with the reads as coroutines. Both reconnect with backoff.
Methods: GitHub.

Rust

rebind-client runs on tokio. It does not reconnect: when the connection drops, connect again.
Methods: crates.io, GitHub.

Stop

Stop the script from the editor toolbar when you are not using it. Stopping it closes the server, its timers, and any audio it is playing. Changing the token does not disconnect programs already connected; restart the script to cut them off. Press Left Ctrl + Left Alt + K (Left Control + Left Option + K on macOS) to stop every script and release every held key and button. In hardware mode, press it on a keyboard you attached in Peripherals. See the kill switch.