Skip to content

Metadrop/ddev-yellowlabtools

Repository files navigation

tests project is maintained GitHub Release

ddev-yellowlabtools

A DDEV add-on that provides YellowLabTools for web performance analysis. Includes both CLI and Web UI.

Installation

ddev add-on get Metadrop/ddev-yellowlabtools
ddev restart

Usage

CLI

Analyze any URL:

ddev yellowlabtools https://example.com

Analyze your local DDEV site (this will use the default ddev url):

ddev yellowlabtools local

Web UI

Access the web interface at:

https://<projectname>.ddev.site:9034

The Web UI provides a visual interface to run analyses and view detailed reports.

CLI Options

Option Description
--device=<device> Device to simulate: phone, tablet (default: desktop)
--screenshot=<path> Save screenshot to path (must end with .png)
--proxy=<host:port> Use HTTP proxy
--cookie=<value> Set cookie (format: name=value; domain=.example.com)
--auth-user=<user> HTTP basic auth username
--auth-pass=<pass> HTTP basic auth password
--reporter=<format> Output format: json (default), xml

Examples

# Analyze local site with mobile device simulation
ddev yellowlabtools local --device=phone

# Analyze with HTTP basic authentication
ddev yellowlabtools https://staging.example.com --auth-user=admin --auth-pass=secret

# Save output to file
ddev yellowlabtools local > report.json

Output

By default, YellowLabTools outputs JSON to stdout. You can redirect this to a file:

ddev yellowlabtools https://example.com > analysis.json

Or use XML format:

ddev yellowlabtools https://example.com --reporter=xml > analysis.xml

What is YellowLabTools?

YellowLabTools is an open-source tool that analyzes web page performance and provides detailed reports on:

  • Page weight and requests
  • JavaScript execution time
  • DOM complexity
  • Bad practices detection
  • Performance scores and recommendations

Architecture

This add-on creates a dedicated yellowlabtools container based on ousamabenyounes/yellowlabtools with:

  • Alpine Linux with Node.js 18
  • Chromium browser for headless rendering
  • YellowLabTools server (Web UI exposed on port 9034)
  • YellowLabTools CLI

The container runs alongside your DDEV services and shares the same network, allowing it to analyze both external URLs and your local DDEV site.

Requirements

  • DDEV v1.23.0 or higher

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

Apache License 2.0

About

Ddev addon to run yellowlabs tools cli

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published