browser  by lightpanda-io

Headless browser for AI/automation tasks, scraping, and LLM training

created 2 years ago
9,431 stars

Top 5.4% on sourcepulse

GitHubView on GitHub
Project Summary

Lightpanda is an open-source headless browser designed for AI agents, LLM training, scraping, and testing, offering significantly reduced memory footprint and faster execution compared to Chrome. It aims to provide a performant alternative for web automation tasks that heavily rely on JavaScript execution.

How It Works

Lightpanda is built from scratch using the Zig programming language, eschewing Chromium, Blink, or WebKit. This approach allows for low-level system programming and optimizations. It incorporates a V8 JavaScript engine and a partial implementation of Web APIs, including Fetch and XHR, with compatibility for Playwright and Puppeteer via the Chrome DevTools Protocol (CDP) as a work in progress.

Quick Start & Requirements

  • Install: Download pre-built binaries for Linux x86_64 and macOS aarch64.
    • Linux: curl -L -o lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-x86_64-linux && chmod a+x ./lightpanda
    • macOS: curl -L -o lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-aarch64-macos && chmod a+x ./lightpanda
  • Prerequisites: Zig 0.14.0 is required for building from source. Building V8 requires additional development libraries (e.g., build-essential, cmake, clang on Debian/Ubuntu).
  • Resources: Building from source is CPU-intensive and time-consuming due to V8 compilation.
  • Docs: lightpanda.io

Highlighted Details

  • Claims 9x less memory footprint and 11x faster execution than Chrome.
  • Supports JavaScript execution via V8.
  • CDP server for Playwright/Puppeteer compatibility (WIP).
  • Tested against Web Platform Tests.

Maintenance & Community

  • Project is in Beta stage, with ongoing development.
  • Community links: Twitter

Licensing & Compatibility

  • Licensed under the MIT License.
  • Compatible with commercial use and closed-source linking.

Limitations & Caveats

Lightpanda is a work in progress (Beta stage) and may not render or execute all websites correctly. Web API coverage is partial and under development. Building from source requires significant time and resources, including specific Zig version and development toolchain setup.

Health Check
Last commit

1 day ago

Responsiveness

1 week

Pull Requests (30d)
68
Issues (30d)
11
Star History
755 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.