A command-line tool to industrialize web quality measurement.
Scodi is a tool that centralizes the use of famous web quality measurement services (Google Lighthouse, GreenIT Analysis or Mozilla Observatory) in a unique CLI.
Its modular approach makes it easy to process the analysis results into a database to track metrics over time.
Moreover the command-line interface allows a smooth integration into a CI/CD chain.
Example scenario:
- analyze https://www.ipcc.ch/ using the Google Lighthouse service.
- store the results in a MySQL database.
-
Install the packages
npm install @scodi/lighthouse @scodi/mysql
-
Set the credentials for MySQL (database URL)
echo SCODI_MYSQL_DATABASE_URL=login:password@127.0.0.1:3306 >> .env
-
Start the analysis
npx scodi lighthouse --config '{"url":"https://www.ipcc.ch/"}'
Once the analysis is over, the results will be stored in a report table, which you can exploit with tools like Grafana:
For more options, have a look at the help with npx scodi -h
To start analyses over HTTP instead of the command line, use the Scodi API package.
Scodi has been designed to be as light as possible, which explains its modular approach: you only install what you need.
To do so, Scodi is divided in 3 types of packages.
| Type | Mission | Example |
|---|---|---|
| Runner | Starts an analysis | using the CLI or the HTTP API |
| Analysis | Analyzes URLs using third-party services | using GreenIT Analysis |
| Listener | Do things with the results of the analysis | store them into a MySQL database |
The minimum setup you need to run Scodi, is to have the Scodi CLI runner module and a single analysis module.
| Name | Type | Purpose |
|---|---|---|
| Scodi API | Runner | Exposes an HTTP API that starts an analysis when it is requested |
| Scodi CLI | Runner | Control the other modules via a CLI |
| Scodi GreenIT | Analysis | Analyzes URLs with GreenIT Analysis |
| Scodi Lighthouse | Analysis | Analyzes URLs with Google Lighthouse |
| Scodi Observatory | Analysis | Analyzes URLs with Mozilla Observatory |
| Scodi SSL Labs Server | Analysis | Analyzes URLs with Qualys SSL Labs Server |
| Scodi MySQL | Listener | Stores the results of the analysis into a MySQL database |
Contributions are welcome: see CONTRIBUTING.md. Scodi is released under the MIT license.
