PHPackages                             fyrts/chrome-devtools-protocol - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fyrts/chrome-devtools-protocol

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fyrts/chrome-devtools-protocol
==============================

Chrome Devtools Protocol client for PHP

v1.2.130(1mo ago)213.2k—5.6%11MITPHPPHP ^7.4|^8.0CI passing

Since Dec 19Pushed 1mo agoCompare

[ Source](https://github.com/Fyrts/chrome-devtools-protocol)[ Packagist](https://packagist.org/packages/fyrts/chrome-devtools-protocol)[ RSS](/packages/fyrts-chrome-devtools-protocol/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (16)Versions (440)Used By (1)

Chrome Devtools Protocol PHP client
===================================

[](#chrome-devtools-protocol-php-client)

[![Build](https://github.com/Fyrts/chrome-devtools-protocol/actions/workflows/phpunit.yml/badge.svg)](https://github.com/Fyrts/chrome-devtools-protocol/actions/workflows/phpunit.yml)[![Latest Stable Version](https://camo.githubusercontent.com/133bb150c4772a881d7a776beb52b61b2478232516c10c3fea624c450d32cd6d/68747470733a2f2f706f7365722e707567782e6f72672f66797274732f6368726f6d652d646576746f6f6c732d70726f746f636f6c2f762f737461626c653f666f726d61743d666c6174)](https://packagist.org/packages/fyrts/chrome-devtools-protocol)[![License](https://camo.githubusercontent.com/5fbe18f93d1f69948316d8f69abe1e29cf32cc928207dae659b8ed9b0ca13d98/68747470733a2f2f706f7365722e707567782e6f72672f66797274732f6368726f6d652d646576746f6f6c732d70726f746f636f6c2f6c6963656e73653f666f726d61743d666c6174)](https://packagist.org/packages/fyrts/chrome-devtools-protocol)

> PHP client for [Chrome Devtools Protocol](https://chromedevtools.github.io/devtools-protocol/).

Installation
------------

[](#installation)

`composer require fyrts/chrome-devtools-protocol`

Basic usage
-----------

[](#basic-usage)

```
// context creates deadline for operations
$ctx = Context::withTimeout(Context::background(), 30 /* seconds */);

// launcher starts chrome process ($instance)
$launcher = new Launcher();
$instance = $launcher->launch($ctx);

try {
	// work with new tab
	$tab = $instance->open($ctx);
	$tab->activate($ctx);

	$devtools = $tab->devtools();
	try {
		$devtools->page()->enable($ctx);
		$devtools->page()->navigate($ctx, NavigateRequest::builder()->setUrl("https://www.google.com/")->build());
		$devtools->page()->awaitLoadEventFired($ctx);

		// ... work with page ...
		// e.g.
		// - print to PDF: $devtools->page()->printToPDF($ctx, PrintToPDFRequest::make());
		// - capture screenshot: $devtools->page()->captureScreenshot($ctx, CaptureScreenshotRequest::builder()->setFormat("jpg")->setQuality(95)->build());

	} finally {
		// devtools client needs to be closed
		$devtools->close();
	}

} finally {
	// process needs to be killed
	$instance->close();
}
```

Headless Chrome isolated contexts
---------------------------------

[](#headless-chrome-isolated-contexts)

Headless Chrome supports feature called *browser contexts* - they're like incognito windows - cookies, local storage etc. are not shared. After *browser context* is destroyed, user data created in given context, are destroyed.

Unlike incognito windows, there can be multiple isolate *browser contexts* at the same time.

```
$ctx = Context::withTimeout(Context::background(), 10);
$launcher = new Launcher();
$instance = $launcher->launch($ctx);
try {
	$session = $instance->createSession($ctx);
	try {

		// $session implements DevtoolsClientInterface, same as returned from Tab::devtools()

	} finally {
		$session->close();
	}
} finally {
	$instance->close();
}
```

License
-------

[](#license)

Licensed under MIT license. See `LICENSE` file.

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance88

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 83.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

439

Last Release

54d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2fe7a44c5e07cf8dd0eed2941b88dcab03342fb149ede5347b3467bc17691d4e?d=identicon)[Fyrts](/maintainers/Fyrts)

---

Top Contributors

[![fyrts](https://avatars.githubusercontent.com/u/5918336?v=4)](https://github.com/fyrts "fyrts (455 commits)")[![jakubkulhan](https://avatars.githubusercontent.com/u/95001?v=4)](https://github.com/jakubkulhan "jakubkulhan (73 commits)")[![hongaar](https://avatars.githubusercontent.com/u/205834?v=4)](https://github.com/hongaar "hongaar (7 commits)")[![JanBukva](https://avatars.githubusercontent.com/u/7108035?v=4)](https://github.com/JanBukva "JanBukva (3 commits)")[![voldemortensen](https://avatars.githubusercontent.com/u/7786383?v=4)](https://github.com/voldemortensen "voldemortensen (1 commits)")[![mikenz](https://avatars.githubusercontent.com/u/6816?v=4)](https://github.com/mikenz "mikenz (1 commits)")[![mstyles](https://avatars.githubusercontent.com/u/1187931?v=4)](https://github.com/mstyles "mstyles (1 commits)")[![osbre](https://avatars.githubusercontent.com/u/23292709?v=4)](https://github.com/osbre "osbre (1 commits)")

---

Tags

webautomationchromeheadless-chromechrome-devtoolschrome-devtools-protocol

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/fyrts-chrome-devtools-protocol/health.svg)

```
[![Health](https://phpackages.com/badges/fyrts-chrome-devtools-protocol/health.svg)](https://phpackages.com/packages/fyrts-chrome-devtools-protocol)
```

###  Alternatives

[jakubkulhan/chrome-devtools-protocol

Chrome Devtools Protocol client for PHP

183967.6k3](/packages/jakubkulhan-chrome-devtools-protocol)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

310107.9k1](/packages/cognesy-instructor-php)[nigelcunningham/puphpeteer

A Puppeteer bridge for PHP, supporting the entire API.

2221.7k](/packages/nigelcunningham-puphpeteer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
