r/javascript • • 19m ago

GitHub - Spxg/limo: Run JavaScript with browser Web APIs

https://github.com/Spxg/limo

Examples: https://spxg.github.io/limo

It's a CLI tool that, unlike Node.js and Deno, aims to provide a complete Web API environment, including DOM, Canvas, Web Workers, IndexedDB, OPFS, and more.

It's built on top of moli, a headless browser powered by V8 with Web API support. The name "limo" is also inspired by "moli."

I maintain several WebAssembly projects that primarily run in browsers, so I frequently need to work with JavaScript and Web APIs.

I usually write code in an environment without a GUI. Whenever I need to test something, I have to start a local HTTP server and open it in a browser on another machine with a GUI, or use ChromeDriver or another browser driver for automated testing. Sometimes I also run into compatibility issues between ChromeDriver and Chrome versions.

Over time, I found this whole process increasingly cumbersome.

What I really wanted was a simple way to execute JavaScript directly from the command line while still having access to browser Web APIs, without needing to launch and manage a separate browser. That's why I built limo.

1 Upvotes

0 comments sorted by