npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

litmus-agent

v1.1.7

Published

CLI tool to extract and collate artifacts from Playwright test failures

Readme

Litmus-Agent

A CLI tool to triage Playwright test failures using playwright JSON report and traces.

Authors

The package is created and published by Litmus Check AI To use this package, the LITMUS_API_KEY can be generated after signing up, or by reaching out to [email protected]

Installation

Global Installation (for CLI usage)

npm install -g litmus-agent

Or install locally in your project:

npm install --save-dev litmus-agent

Setup for playwright

The playwright configuration needs to be setup to record JSON reports and traces for failures. Nodejs is required to run this package.

  • Node.js (v14+)
  • Playwright JSON report format (generated with ['json', { outputFile: 'report.json' }] reporter)
  • Trace files must be generated (configure with trace: 'retain-on-failure' in playwright.config)

Sample config

export default defineConfig({
	testDir: './tests',
	retries: 0,
	reporter: [
		['json', { outputFile: './reports/report.json' }]
	],
	use: {
		trace: 'retain-on-failure',
		screenshot: 'only-on-failure',
	},
	outputDir: './traces',
	projects: [
		{
			name: 'chromium',
			use: { ...devices['Desktop Chrome'] }
		}
	]
});

API Key setup

Environment variables can be set in a .env file in the root directory or as system environment variables.

  • LITMUS_API_KEY - API key for Litmus API (required) can be generated on the web app

Usage

After installation, the lc command will be available globally (or via npx if installed locally).

Basic Usage

lc triage <path-to-report.json>

With Options

# Save API response to file with pretty printing
lc triage ./reports/report.json --output response.json --pretty

# Output API response to stdout (default)
lc triage ./reports/report.json

Note: The CLI always sends data to the Litmus API and outputs the API response. If the API call fails, it outputs {error: 'Failed to complete triaging'}.

Options

  • <report-path> - Path to Playwright JSON report file (required)
  • -o, --output <file> - Output file path for API response (default: stdout)
  • -p, --pretty - Pretty-print JSON output
  • -c, --error-context <number> - Number of context lines for error snippets (default: 10)
  • -V, --version - Output version number
  • -h, --help - Display help

Example .env file

Create a .env file in the root directory:

LITMUS_API_KEY=your-api-key-here

Output

The CLI always sends the triage data to the Litmus API and outputs:

  • On success (HTTP 200): The API response JSON
  • On failure: {error: 'Failed to complete triaging'}

Dependencies

  • yauzl - Unzip trace files
  • commander - CLI argument parsing
  • @babel/parser - Parse TypeScript/JavaScript to extract test functions
  • @babel/traverse - Traverse AST to find test blocks
  • dotenv - Load environment variables from .env file

License

Attribution-NonCommercial-ShareAlike 4.0 International