Skip to content

About

Open-source remote pair programming: low-latency screen sharing, voice, and remote control. Self-hostable.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

TwinCursor

CI License: AGPL-3.0

Open-source remote pair programming. Share your screen with sharp text and very little lag, talk, and let your pair take the keyboard and mouse. Pairing over the internet should feel like sharing a desk.

TwinCursor is in early development and there's no app to install yet. Screen sharing works from the command line, and remote control is being built now. See what works.

Why TwinCursor

The best pairing tools are closed and paid per seat, and general video calls blur code and lag behind your hands. TwinCursor is built around three ideas:

  • Latency is the product. All media runs in native Rust rather than a webview, and every change to that path has to report its effect on latency.
  • You stay in control of your machine. A guest can only control your computer after you grant it. You can always see who is controlling it, and revoke it instantly with a global hotkey. The threat model covers what's protected and what isn't.
  • It's yours to run. It's AGPL-3.0 and self-hostable, and Linux will be a first-class platform.

What works today

Status
Screen sharing ✅ Works from the command line: macOS sharer; macOS or Windows viewer
Call health stats and on-screen HUD ✅ Works
Auto-throttle on poor networks ✅ Works
Remote control 🚧 Works from the command line (macOS sharer), in hands-on testing
Voice 🚧 Works from the command line, with echo cancellation and mute
Desktop app Planned
Self-hosting with one command Planned
Linux Planned

The roadmap has the full plan.

Measured performance

Measure Result
1080p between two machines on home Wi-Fi 60 fps, round trip 29 ms typical, 105 ms at p95
Text quality, H.264 SSIM 0.9996 (1.0 is identical) at about 0.8 Mbps, even while scrolling fast
Sharer CPU, H.264 at 1080p 14% of one core
Delay the input path adds Under 1 ms on top of the network

These come from one Apple M4 MacBook and one Windows laptop, and the performance page has the full results and how to reproduce them. They don't yet include the app's own redraw time, so they aren't full glass-to-glass latency.

Try it

Today's build is tc-spike, a command-line tool for sharing a screen and measuring the result.

You'll need an Apple Silicon Mac with Xcode 26 and Rust 1.89 or newer. The first build downloads a prebuilt WebRTC library of about 277 MB.

brew install livekit
git clone https://github.com/abhinavbolla/twincursor
cd twincursor
cargo build --release -p twincursor-media-spike

Then run each of these in its own terminal, from the twincursor folder:

livekit-server --dev
target/release/tc-spike share
target/release/tc-spike view

macOS will ask you to allow Screen Recording for your terminal. Press S in the viewer to show or hide the stats HUD. Run tc-spike --help to see the options, such as --resolution 1440.

To share one window instead of the whole screen, list the windows and pick one by part of its title or app name, or by id; --app shows only one app's windows:

target/release/tc-spike windows
target/release/tc-spike share --window "Safari" --resolution native

The viewer leaves itself out of a whole-screen share, so you can try both ends on one Mac without the picture repeating inside itself. Its stats HUD says whether you're seeing the stream's real pixels ("shown 1:1") or a scaled picture.

Both sides talk through their mic and speakers, so macOS will also ask to allow the microphone. Echo cancellation is always on, so speakers work without headphones once the two ends are in different rooms. On one Mac, use headphones or --audio off on one side: each end cancels only its own speaker, so the two can feed back. tc-spike devices lists the mics and speakers, and --mic and --speaker pick one by number or part of its name. If that device is unplugged mid-call, the call moves to the system default.

To mute your mic, press M in the viewer (F8 while you're in control), or ⌃⌥⌘M on the sharing side, from any app. The other side sees that you're muted.

Remote control

Share with --allow-control, and the viewer can ask for your mouse and keyboard:

target/release/tc-spike share --allow-control

In the viewer, press F9 to ask. The sharer's terminal asks whether to allow it, and nothing happens until they type y. While a guest is in control, a label at the top of the sharer's screen says who it is, and a name tag follows their pointer. The sharer takes control back at any time with ⌃⌥⌘R, and the guest gives it back with F9. Input pauses while the sharer's screen is locked.

macOS will ask you to allow Accessibility for the sharer's terminal, which lets it move the pointer and type. The threat model explains what a guest in control can and can't do.

Between two machines

Start the server so that other machines can reach it, then share as above:

livekit-server --dev --bind 0.0.0.0

On the other machine, build tc-spike the same way and point it at the sharer's IP address:

target/release/tc-spike view --url ws://192.168.1.20:7880

--dev uses well-known keys and an unencrypted connection to the server, so only do this on a network you trust.

To build the viewer on Windows, use the Rust MSVC toolchain and clone to a short path such as C:\tc, because deep folders hit git's filename limit.

How it works

The sharer captures the screen with ScreenCaptureKit and encodes it, using hardware H.264 by default. Video goes through a LiveKit server to a native viewer, and remote-control input comes back over data channels. Read the architecture for the details, and the decision records for why it's built this way.

Contributing

Issues, measurements and pull requests are all welcome. Start with CONTRIBUTING.md, and look for a good first issue. To ask a question or share an idea, use Discussions. Everyone taking part follows our code of conduct.

Report security problems privately: see SECURITY.md.

License

TwinCursor is licensed under AGPL-3.0. Contributions are accepted under a Contributor License Agreement.

About

Open-source remote pair programming: low-latency screen sharing, voice, and remote control. Self-hostable.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages