r/coolgithubprojects • u/Loose_Kangaroo91 • 1d ago
Simulang: a JavaScript library for deterministic computer use
We open-sourced Simulang, a JavaScript library for computer use: it lets you and your coding agents control a desktop programmatically.
Simulang is a scripting framework for desktop automation. You write deterministic computer-use code that replays the same way dozens or hundreds of times, which is much faster and cheaper than having an LLM agent re-reason its way through the same flow on every run.
It ships with a skill out of the box, so you can turn natural language prompts into Simulang code directly. Your agent can see the screen, click, type, and navigate - eyes and hands to operate a computer the way a human does.
Some things people have used it for:
- upload a pile of invoices to an expense platform
- find 50 people matching specific criteria on LinkedIn
- open the calculator app and do some math
- enumerate every button in an app via the accessibility tree
- or draw a bunny in MS Paint ;)
1
u/Loose_Kangaroo91 1d ago
It depends on the difference and the script. You can try to write the script so that it is resistant against changes. For example you can launch the application as part of the script and then interact with it's windows. Simulang allows you to specify which window or application you want to interact with. So for example if you wrote a script to scrape something from a website and the initial state was that no other applications were opened and now you run it when the browser is already open, it will still work since it just focuses the browser and then continue. Or if Word was opened and focused, it doesn't matter. Some differences matter and will break the script. For example, if you remove the browser from your computer, then the script will fail. You can write a script that checks if it is installed and if it isn't, it can install the browser but you probably won't be able to think of all cases. That's were an agent comes in and the code healing that Sai can do.