stagehand
by
browserbase

Description: The AI Browser Automation Framework

View browserbase/stagehand on GitHub ↗

Summary Information

Updated 1 hour ago
Added to GitGenius on July 16th, 2025
Created on March 24th, 2024
Open Issues/Pull Requests: 152 (+0)
Number of forks: 1,393
Total Stargazers: 21,235 (+1)
Total Subscribers: 93 (+0)
Detailed Description

Stagehand is a Go library and command-line tool developed by BrowserBase, designed to automate the process of building, testing, and deploying browser extensions. It addresses the complexities inherent in extension development, particularly around manifest management, build pipelines, and cross-browser compatibility. Essentially, it aims to be a "build system for browser extensions," streamlining workflows and reducing boilerplate. It's particularly useful for extensions targeting multiple browsers (Chrome, Firefox, Edge, Safari, Opera) as it handles the variations in manifest formats and packaging requirements.

The core of Stagehand revolves around a declarative configuration file, typically `stagehand.toml`, where developers define their extension's metadata, dependencies, build steps, and testing procedures. This configuration allows Stagehand to automatically generate browser-specific manifests, bundle code, and package the extension for distribution. Instead of manually maintaining separate manifest files for each browser, Stagehand uses a templating system (using Go templates) to dynamically create them based on a single source of truth. This significantly reduces the risk of inconsistencies and errors. The library provides a robust set of functions for manipulating manifests, handling icons, and managing other extension assets.

Stagehand's functionality extends beyond simple building. It includes features for running tests, both unit and end-to-end, within the extension's environment. It supports various testing frameworks and allows developers to define custom test commands. Furthermore, it facilitates automated deployment to browser extension stores (Chrome Web Store, Firefox Add-ons) through its integration with their respective APIs. This automation can be incorporated into CI/CD pipelines, enabling continuous integration and continuous deployment of extensions. The CLI tool provides commands for building, testing, packaging, and publishing extensions, making it easy to integrate Stagehand into existing development workflows.

A key strength of Stagehand is its extensibility. Developers can define custom build steps and testing procedures using Go code, allowing them to tailor the build process to their specific needs. The library provides a plugin system that enables developers to add new features and integrations. This flexibility makes Stagehand suitable for a wide range of extension projects, from simple utility extensions to complex web applications packaged as extensions. It also supports different build targets, allowing for the creation of different versions of the extension for different environments (e.g., development, staging, production).

In summary, Stagehand is a powerful tool for browser extension developers seeking to automate and streamline their workflows. By providing a declarative configuration system, automated build pipelines, testing capabilities, and deployment features, it significantly reduces the complexity of extension development and promotes consistency across different browsers. Its extensibility and plugin system further enhance its versatility, making it a valuable asset for both individual developers and large teams. The project is actively maintained by BrowserBase and has a growing community of users contributing to its development.

stagehand
by
browserbasebrowserbase/stagehand

Repository Details

Fetching additional details & charts...