A CLI tool for monitoring web performance in modern web projects
npm install @modus/gimbal``
___ ___ ___
/\__\ /\ \ _____ /\ \
/:/ _/_ ___ |::\ \ /::\ \ /::\ \
/:/ /\ \ /\__\ |:|:\ \ /:/\:\ \ /:/\:\ \
/:/ /::\ \ /:/__/ __|:|\:\ \ /:/ /::\__\ /:/ /::\ \ ___ ___
/:/__\/\:\__\ /::\ \ /::::|_\:\__\ /:/_/:/\:|__| /:/_/:/\:\__\ /\ \ /\__\
\:\ \ /:/ / \/\:\ \__ \:\~~\ \/__/ \:\/:/ /:/ / \:\/:/ \/__/ \:\ \ /:/ /
\:\ /:/ / \:\/\__\ \:\ \ \::/_/:/ / \::/__/ \:\ /:/ /
\:\/:/ / \::/ / \:\ \ \:\/:/ / \:\ \ \:\/:/ /
\::/ / /:/ / \:\__\ \::/ / \:\__\ \::/ /
\/__/ \/__/ \/__/ \/__/ \/__/ \/__/
_ __ __ _ ____ _
| |__ _ _ | \/ | ___ __| | _ _ ___ / ___| _ __ ___ __ _ | |_ ___
| '_ \ | | | | | |\/| | / _ \ / _ | | | | | / __| | | | '__| / _ \ / _ | | __| / _ \`
| |_) | | |_| | | | | | | (_) | | (_| | | |_| | \__ \ | |___ | | | __/ | (_| | | |_ | __/
|_.__/ \__, | |_| |_| \___/ \__,_| \__,_| |___/ \____| |_| \___| \__,_| \__| \___|
|___/






Installation |
Documentation |
Contributing |
Code of Conduct |
Twitter

Gimbal uses industry-standard audits to analyze application performance. Continuously track performance to ensure your apps are within acceptable performance budgets.
Gimbal β€οΈ CIs like Circle CI and Travis CI.
- Lighthouse
- File sizes
- Directory sizes
- Heap memory
- CSS and JS coverage
You can install Gimbal globally using npm or yarn:
`shwith npm
npm install --global @modus/gimbal
gimbal --help
`
Now the gimbal is executable throughout your system for any projects you want to audit.
You can also install it to a specific project as a development dependency.
`shwith npm
npm install --save-dev @modus/gimbal
You can execute it via a npm script: (
package.json):`json
{
"scripts": {
"audit": "gimbal audit"
}
}
``sh
with npm
npm run auditor with yarn
yarn audit
`Usage Examples
- βοΈ Create React App:
gimbal audit
- π© Gatsby: gimbal audit --build-dir ./publicPrerequisites
- You should be using Create React App
- Make sure you've built the app (
npm run build or yarn build)
- build/ directory is assumedSample Output
Expand audits below for more detail.
Size Checks (2 failures)
| Label | Value | Threshold | Success |
| --------------------------------------------------------------- | :-------: | :-------: | :-----: |
| .../build/precache-manifest.380adf610922866d450d1a7155a60b54.js | 646 B | 5 B | x |
| .../build/static/js/2.b41502e9.chunk.js | 115.99 KB | 50 KB | x |
| .../build/static/js/main.28647029.chunk.js | 1.09 KB | 50 KB | β |
| .../build/static/js/runtime~main.a8a9905a.js | 1.47 KB | 30 KB | β |
| .../build | 479.43 KB | 500 KB | β |
Lighthouse Audits (0 failures)
| Label | Value | Threshold | Success |
| ------------------- | :---: | :-------: | :-----: |
| Performance | 99 | 95 | β |
| Accessibility | 79 | 75 | β |
| Best Practices | 100 | 95 | β |
| SEO | 90 | 90 | β |
| Progressive Web App | 58 | 50 | β |
Unused Source Checks (3 failures)
| Label | Value | Threshold | Success |
| ------------------------------------- | :----: | :-------: | :-----: |
| http://localhost:3000 | 41.77% | 30% | x |
| ...static/css/main.584f321a.chunk.css | 34.36% | 30% | x |
| http://localhost:3000/ | 25.40% | 30% | β |
| ...static/js/2.b41502e9.chunk.js | 42.40% | 30% | x |
| ...static/js/main.28647029.chunk.js | 2.59% | 30% | β |
Heap Snapshot Checks (0 failures)
| Label | Value | Threshold | Success |
| ---------------- | :-----: | :-------: | :-----: |
| Documents | 5 | | β |
| Frames | 2 | | β |
| JSHeapTotalSize | 4472832 | | β |
| JSHeapUsedSize | 3399040 | | β |
| LayoutCount | 3 | 5 | β |
| Nodes | 55 | | β |
| RecalcStyleCount | 3 | | β |
Programmatic Usage
You can use Gimbal from other node scripts as an external module. Note that configuration file will be automatically parsed.
`js
const { audit } = require('@modus/gimbal');async function customAudits() {
const response = await audit({
cwd: process.cwd(),
buildDir: './public',
comment: true,
verbose: false,
checkThresholds: true,
});
return response;
}
`Configuration
Gimbal supports configuration files in JavaScript, JSON and YAML formats. This configuration file will let Gimbal know what to execute, you can modify configurations for modules, and output reports in different formats (HTML, JSON, and Markdown). Just place a
.gimbalrc.yml (or .gimbalrc.js or .gimbalrc.json) in the root of your project where you will execute Gimbal. An example configuration file would look like:`yaml
configs:
puppeteer:
headless: falseoutputs:
html: ./artifacts/gimbal.html
json: ./artifacts/gimbal.json
markdown: ./artifacts/gimbal.md
`More about configurations can be found on the individual documentation pages of each commands and modules.
We recommend going through the entire πdocumentation section.
Thresholds
The main purpose of Gimbal is to run audits against an application. Each audit has it's own threshold or set of thresholds. Gimbal also comes configured by default to allow a create-react-app to pass. If you were to start with a React application created from CRA, you will need to adjust the thresholds as your application will inevitably grow in size. Each module can have it's thresholds configured via the configuration file. For example, the
size module's thresholds are configured via an array of objects:`yaml
configs:
lighthouse:
outputHtml: artifacts/lighthouse.html
threshold:
accessibility: 93
'best-practices': 90
performance: 50
pwa: 75
seo: 100
heap-snapshot:
threshold:
Documents: 5
Frames: 2
JSHeapTotalSize: 23356000
JSHeapUsedSize: 15068000
Nodes: 800
RecalcStyleCount: 9
size:
- path: ./build/precache-*.js
maxSize: 500 B
- path: ./build/static/js/*.chunk.js
maxSize: 1 MB
- path: ./build/static/js/runtime*.js
maxSize: 10 KB
- path: ./build/vendor.*.js
maxSize: 250 KB
- path: ./build/!(vendor).*.js
maxSize: 200 KB
- path: ./build/
maxSize: 18 MB
unused-source:
threshold: 0%
outputs:
html: artifacts/results.html
json: artifacts/results.json
markdown: artifacts/results.md
jobs:
- audit
``More about configuring thresholds can be found on the individual documentation pages of each commands and modules.
There are some plugins that are available that increase Gimbal's functionality:
- @modus/gimbal-plugin-axe
- @modus/gimbal-plugin-last-value
- @modus/gimbal-plugin-mysql
- @modus/gimbal-plugin-sqlite
Feel free to use our sample configuration files for major CI systems.
Gimbal runs on any OS with Node.js (10.0.0+).
Gimbal is built to support Cloud and CI environments. It can audit 1000 pages in under 10 seconds on AWS Lambda.
If you have a problem running Gimbal, please submit an issue. The more information you give us the faster we can get back with a good answer.
Modus Create is a digital product consultancy. We use a distributed team of the best talent in the world to offer a full suite of digital product design-build services; ranging from consumer facing apps, to digital migration, to agile development training, and business transformation.

This project is part of Modus Labs.

This project is MIT licensed.