PixelFrame
Professional Visual Regression & Responsive Testing Engine
Features • Installation • Usage • CI Integration • Contributing
Overview
PixelFrame is a high-performance CLI tool designed for frontend teams to automate responsive screenshot capture, generate detailed reports, and perform visual regression testing. It provides a structured, automation-first approach to verifying UI consistency across dozens of devices and viewports.
Features
- Multi-Breakpoint Capture: Capture high-fidelity screenshots across mobile, tablet, and desktop viewports in a single run.
- Smart Emulation: Built-in library of 15+ device presets (iPhone 15, MacBook Pro, etc.) with support for device scale factors and touch.
- YAML Configuration: Manage complex test suites using clean, version-controlled configuration files.
- Visual Regression: Pixel-perfect diffing with red-highlighted heatmaps and automated similarity scoring.
- Portable Reports: Self-contained HTML reports with embedded images for easy sharing and documentation.
- CI Ready: Integrated exit codes, JSON output, and GitHub Action templates for automated regression gating.
Installation
1. Prerequisites
PixelFrame requires Python 3.10 or higher.
2. Setup
# Clone the repository
git clone https://github.com/nijil71/PixelFrame.git
cd PixelFrame
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install package
pip install -e .
playwright install chromium --with-deps
Usage
Basic Capture
Capture a website using default responsive breakpoints.
pixelframe capture run https://example.com
Device Emulation
Select specific devices from the built-in library.
pixelframe capture run https://apple.com --devices "iPhone 15, iPad Air, MacBook Pro 14"
Config-Driven Capture
Run complex audits using a YAML configuration file.
pixelframe capture run --config demo-config.yml
Visual Diffing
Compare two runs to identify visual regressions. The CLI returns exit code 1 if results fall below the threshold.
pixelframe diff run path/to/baseline path/to/latest --fail-under 98.0 --open-report
CI Integration
PixelFrame is optimized for CI/CD pipelines. Use it to automatically block pull requests that introduce visual regressions.
- name: Visual Threshold Check
run: |
pixelframe diff run ./baseline ./current --fail-under 99.0 --json
Device Library
Run pixelframe devices list for the full directory. Popular presets include:
| Category | Devices |
|---|---|
| Phones | iPhone 15 Pro Max, Galaxy S23, Pixel 8, Galaxy Z Fold 5 |
| Tablets | iPad Air, iPad Pro (11"/12.9"), Galaxy Tab S9 |
| Laptops | MacBook Air, MacBook Pro (14"/16"), Surface Pro 9 |
| Desktops | 1080p, 1440p, 4K |
Contributing
Contributions are welcome! Whether you are adding a new device preset or improving the capture engine.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Metadata
Release files for pixelframe 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pixelframe-0.3.0.tar.gz | 17.4 kB | Without provenance | Details for pixelframe-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pixelframe-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for pixelframe-0.3.0-py3-none-any.whl |
Total release size: 35.8 kB
Release files / pixelframe-0.3.0.tar.gz
| Download URL | pixelframe-0.3.0.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b1bebfa1cda884262d92e934219044b46287e9993020aafa405568462cc20f6
|
|
BLAKE2b-256 checksum How to use checksums |
06cd34dc8073adb2637957ea96c6dc2bc9c44f09ad871b7c7a4f743c60ddd43c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.6
|
Release files / pixelframe-0.3.0-py3-none-any.whl
| Download URL | pixelframe-0.3.0-py3-none-any.whl |
|---|---|
| Size | 18.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
08e58c3abf64103c07bf9a71d60bdb11e19520ad49226c08d8443828e5ae6705
|
|
BLAKE2b-256 checksum How to use checksums |
771f0c6a52f985183078fb2d254f4482c1e7038c2f8503e27648248ac190eff6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.6
|
Security for pixelframe 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.