Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

browserless browserless

Powered by microlink.io Last version Coverage Status NPM Status

@browserless/cli: CLI to interact with Browserless capabilities.

See CLI section our website for more information.

Install

Using npm:

npm install @browserless/cli -g

About

This package provides a command-line interface for interacting with browserless capabilities directly from your terminal. It exposes the browserless binary that wraps the core browserless API into easy-to-use shell commands.

What this package does

The @browserless/cli package allows you to:

  • Take screenshots from URLs with gradient backgrounds, browser overlays, and device emulation
  • Record captures as video/audio using the tabCapture extension flow
  • Generate PDFs from web pages
  • Extract content as HTML or plain text
  • Run Lighthouse audits for performance analysis
  • Analyze page weight (network requests, transfer size, resource size)
  • Check URL status and response information (redirects, headers, status codes)

Available commands

Command Description
capture <url> Record a page and return video buffer (use --path to save file)
screenshot <url> Capture a screenshot with optional overlay and background
pdf <url> Generate a PDF document from a web page
html <url> Serialize the page content to HTML
text <url> Extract plain text content from the page
lighthouse <url> Run a Google Lighthouse audit and output JSON report
page-weight <url> Analyze network requests and resource sizes
ping <url> Get response info: status code, redirects, headers
status <url> Get the HTTP status code
goto <url> Navigate to a URL and return page/response info

Capture examples

# mp4 (default)
browserless capture https://example.com --path=./capture.mp4

# webm output type
browserless capture https://example.com --type=webm --path=./capture.webm

Note: The lighthouse command requires an extra installation.

Please make sure to install the standalone package by running:
npm install -g @browserless/lighthouse

How it fits in the monorepo

This package depends on:

Dependency Purpose
@browserless/capture Extension-based tab capture for CLI video recording
browserless Core API for all browser automation operations
@browserless/lighthouse Lighthouse audit integration (used by lighthouse command)

The CLI acts as a thin wrapper that parses command-line arguments, initializes a browserless instance, and delegates to the appropriate command handler.

License

@browserless/cli © Microlink, released under the MIT License.
Authored and maintained by Microlink with help from contributors.

The logo has been designed by xinh studio.

microlink.io · GitHub microlinkhq · X @microlinkhq