Using Motion Audit as a Node.js library or SDK for automated testing and CI/CD pipelines.
While Motion Audit is primarily distributed as a CLI tool, the @soralasbs/motion-audit package also exports a programmatic Node.js API. You can import the audit runner directly into custom scripts, internal dashboards, or automated testing pipelines.
Install @soralasbs/motion-audit as a development dependency:
Puppeteer will resolve or download a compatible Chromium binary. For headless container environments without standard sandbox support, ensure MOTION_AUDIT_NO_SANDBOX=1 is set in your environment.
The entry point is the audit() function:
AuditRunOptions)The audit(url, options) function accepts an optional configuration object:
By default, both desktop and mobile viewports are audited sequentially and synthesized into the final tier.
MotionAuditReport)The audit() function returns a structured MotionAuditReport object:
overallTier & overallScore: Synthesized diagnostic grade combining compositor efficiency, scroll friction, layout thrashing, and GPU memory pressure.findings: Array of actionable diagnostic issues detected during the audit:
desktop / mobile: Deep viewport telemetry including captured animations, scroll listeners, CDP layers, and modeled VRAM consumption in bytes.You can use the programmatic API in custom test suites (e.g., Vitest or Node test runner) to assert motion quality:
When high or critical findings occur, extract pre-formatted AI prompts to pass to Claude, Cursor, or your internal automation:
For advanced use cases, the package also exports lower-level math models and constants:
BrowserRunner: Direct control over Puppeteer session lifecycle and viewport audits.DESKTOP_VIEWPORT & MOBILE_VIEWPORT: Standard viewport dimensions and DPR configurations.calculateRawTextureMemory), concurrency metrics, and layout thrashing detection.Installation
Getting started and installing Motion Audit.
MCP Server
Connect Motion Audit to AI assistants such as Cursor, Claude Desktop, Copilot, and Windsurf via the Model Context Protocol.
Built by Axyl. A performance auditing toolkit for motion-heavy web interfaces.
Last updated: 10/15/2026
Help keep SoraLabs moving.
Every contribution helps us build and maintain open-source tools for the community.
Sponsor on GitHub