Skip to main content

brosh

A browser window unspooling a whole web page into one long scroll

Full-page browser screenshots, from the command line or from your own code, with the pixels, the text, and the HTML all handed back together.

Brosh drives a real browser (Chrome, Edge, or Safari) via Playwright, scrolls through a page, and captures each section as an image — plus the visible text as Markdown and, if you want it, the underlying HTML. Built for AI agents that need to see a page, not just fetch its source.

  • Scrolling capture: single shot, frame series, or animated PNG of the whole scroll
  • Extracts visible text (Markdown) and optionally minified HTML alongside every screenshot
  • CLI, sync/async Python API, and an MCP server for Claude and other AI tools
  • Connects to your existing Chrome/Edge session (cookies, logins, extensions included) or launches a fresh one
  • Cross-platform: macOS, Windows, Linux

Quick Start

pip install brosh
playwright install

That second command matters: Playwright needs its own browser binaries, and pip install brosh doesn't fetch them. Skip it and every capture fails with a browser-not-found error.

Then:

brosh shot "https://example.com"

Screenshots land in ~/Pictures/brosh by default, named {domain}-{timestamp}-{scroll%}-{section}.png.

Installation

# uv (recommended)
uv tool install brosh

# pip
pip install brosh

# run without installing
uvx brosh shot "https://example.com"

Whichever route you pick, don't forget playwright install afterward.

See Installation for binary releases, pipx, and from-source setups.

CLI Usage

# Basic capture
brosh shot "https://example.com"

# Animated PNG of the whole scroll
brosh shot "https://example.com" --output_format apng

# Custom viewport, JSON output with HTML included
brosh --width 1920 --height 1080 shot "https://example.com" --fetch_html --json > page.json

# Reuse a running browser instance across multiple shots
brosh --app chrome run
brosh --app chrome shot "https://example.com"
brosh --app chrome quit

Global options (--app, --width, --height, --zoom, --output_dir, --subdirs, --verbose, --json) go before the command; command options go after. Full option tables: CLI Reference.

Python API

from brosh import capture_webpage

result = capture_webpage(
    url="https://example.com",
    width=1280,
    height=720,
    output_format="jpg",
    scale=75,
)
for path, metadata in result.items():
    print(path, metadata["text"][:80])
import asyncio
from brosh import capture_webpage_async

async def main():
    result = await capture_webpage_async(
        url="https://docs.python.org/3/",
        fetch_html=True,
        max_frames=3,
    )
    print(list(result))

asyncio.run(main())

Both APIs return a dict mapping saved file paths to metadata (selector, text, optionally html). Details and convenience functions: Python API.

MCP Server Mode

Brosh ships an MCP server so AI tools can request a screenshot mid-conversation.

claude mcp add brosh -- brosh-mcp

Or drop this into your MCP client's config:

{
  "mcpServers": {
    "brosh": {
      "command": "brosh-mcp"
    }
  }
}

Restart your client, then ask it to "use brosh to capture example.com and show me the text." Full setup, including uvx-based configs: MCP Server Mode.

Documentation

Everything else — architecture, full command reference, output/JSON format, troubleshooting — lives at twardoch.github.io/brosh.

License

MIT. See LICENSE.

Built by Adam Twardoch on Playwright, python-fire, and FastMCP.

Metadata

Release files for brosh 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for brosh 1.0.1
File Size Uploaded Provenance Actions
brosh-1.0.1.tar.gz 9.2 kB With provenance Details for brosh-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for brosh 1.0.1
File Interpreter ABI Platform Actions
brosh-1.0.1-py3-none-any.whl Python 3 none any Details for brosh-1.0.1-py3-none-any.whl

Total release size: 14.1 kB

Release files / brosh-1.0.1.tar.gz

Download URL brosh-1.0.1.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
de082238b70b304949e7a3cec40221493888865ca291f8be5023fba7d966f45b
BLAKE2b-256 checksum
How to use checksums
78e6421a849de4e9db9a3684ef71064cacddc83419c188c658d1e5364841f4c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / brosh-1.0.1-py3-none-any.whl

Download URL brosh-1.0.1-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd8cc04189f4a32a39323d1298a6880e51977f009a0661491bae3ae639bc623b
BLAKE2b-256 checksum
How to use checksums
30d713f40c94aeccc1a379767fbeef6fe9f430fb4353e5d14aa7c1c8f880aac2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Security for brosh 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for brosh-1.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page