
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
[](https://badge.fury.io/js/%40lhci%2Fcli)
@lhci/cli is a command-line interface for Lighthouse CI, a tool for running Lighthouse audits on your web applications and tracking their performance over time. It allows you to set up, run, and manage Lighthouse CI in your CI/CD pipeline.
Running Lighthouse CI
This command runs the Lighthouse CI autorun, which automatically sets up and runs Lighthouse audits on your web application. It is useful for integrating performance checks into your CI/CD pipeline.
npx @lhci/cli autorun
Collecting Data
This command collects Lighthouse reports for the specified URL. It can be used to gather performance data for different pages of your web application.
npx @lhci/cli collect --url=https://example.com
Uploading Data
This command uploads the collected Lighthouse reports to a specified target, such as temporary public storage or a custom server. It is useful for sharing and storing performance data.
npx @lhci/cli upload --target=temporary-public-storage
Setting Up Server
This command starts a Lighthouse CI server on the specified port. The server can be used to store and visualize Lighthouse reports over time.
npx @lhci/cli server --port=9001
Running Assertions
This command runs assertions based on Lighthouse scores and configurations. It is useful for enforcing performance budgets and ensuring that your web application meets certain performance criteria.
npx @lhci/cli assert --preset=lighthouse:recommended
Lighthouse is an open-source, automated tool for improving the quality of web pages. It can be run as a Chrome Extension or from the command line. While @lhci/cli focuses on CI/CD integration and tracking performance over time, lighthouse is more general-purpose and can be used for ad-hoc performance audits.
Sitespeed.io is an open-source tool that helps you analyze and monitor the performance of your web site. It provides a wide range of metrics and can be integrated into your CI/CD pipeline. Compared to @lhci/cli, sitespeed.io offers more comprehensive performance analysis and monitoring capabilities.
WebPageTest is a tool that allows you to run performance tests on your web pages from multiple locations around the world using real browsers. It provides detailed performance reports and can be integrated into your CI/CD pipeline. While @lhci/cli is focused on Lighthouse audits, WebPageTest offers a broader range of performance testing options.
The Lighthouse CI CLI enables running Lighthouse from various CI environments. Read the Lighthouse CI docs to learn more.
FAQs
[](https://badge.fury.io/js/%40lhci%2Fcli)
The npm package @lhci/cli receives a total of 275,361 weekly downloads. As such, @lhci/cli popularity was classified as popular.
We found that @lhci/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.