Command Line Interface

Gaël Métais edited this page Dec 27, 2016 · 20 revisions

The core of Yellow Lab Tools can be executed as a standalone from the command line. It simply analyzes a page and outputs the JSON when the test is complete.


Install Yellow Lab Tools

Install Yellow Lab Tools globally (with the -g flag), so the yellowlabtools CLI is automatically added to your PATH.

npm install -g yellowlabtools


Now you can launch this command from anywhere on your computer:


To save the result in a file:

yellowlabtools > resultFile.json


See the JSON output format here.

The result is printed directly to the stdout, and is JSON. Don't hesitate to ask if you would like another output format.


You can launch the test with optional parameters like this:

yellowlabtools --screenshot=/my/path/screenshot.png

--device= Use "phone" or "tablet" to simulate a mobile device (by user-agent and viewport size). Default is "desktop".


--screenshot= Will take a screenshot and use this value as the output path. It needs to end with ".png".


--proxy= Uses the defined HTTP proxy to access the website. Syntax is host:port.


--cookie= Adds a cookie for a domain. Multiple cookies can be set, using a pipe separator.
Example: --cookie="bar1=foo1;|bar2=foo2;".


--reporter The default output is JSON. You can switch to XML by setting --reporter=xml.

basic HTTP authentication

--auth-user and --auth-pass Authentication username and password. If your authentication is not basic (form based), you might be able to copy the session cookie from your browser, paste it in the --cookie parameter and launch a run before your cookie expires.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.