baseline-warden
Pre-commit/CI guardrail for Baseline support in HTML/CSS. Scans your code, maps features to Web Baseline (Web Status + MDN BCD), and flags anything not widely/newly available.
Quick start
Install uv (one‑liner):
curl -LsSf https://astral.sh/uv/install.sh | sh
Install Baseline Warden from PyPI with uv and scan:
uv venv .venv && source .venv/bin/activate
uv pip install baseline-warden
bw sync --lock # build a Baseline snapshot
bw scan --out console,json # fails on limited; warns on unknown
# Tip: add --summary-only for compact console output
Supported Python versions: 3.11, 3.12, and 3.13. The example workflows use Python 3.13, and CI tests all three.
What it checks
- Files: .html/.htm/.jinja/.jinja2 and .css (others ignored)
- Findings: Baseline status per BCD key (widely/newly/limited/unknown)
- Outputs: console (use
--summary-onlyto keep it brief),report.json, GitHub annotations - Noise control: ignores global HTML attrs (class/id/aria-*), custom property declarations (
--foo), descriptor-only at‑rules (@font-face/@counter-style/@page); falls back value→property when helpful
Integrations
- Pre-commit (blocking by default):
- repo: local hooks: - id: baseline-warden name: baseline-warden entry: bw scan --out console --summary-only --config baseline-warden.toml language: system files: '\\.(html|htm|jinja|jinja2|css)$'
GitHub Actions (minimal working example):
name: Baseline Warden
on:
pull_request:
push:
branches:
- main
jobs:
baseline:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install uv
run: pip install uv
- name: Sync dependencies
run: uv sync --locked
- name: Run Baseline scan
run: uv run bw scan --out console --ci
- Ensure
baseline.lock.jsonis committed (recommended). If you prefer to build it in CI, add a step before the scan:uv run bw sync --lock.
Configuration
Defaults usually “just work” for common layouts. For full options and examples, see the Configuration guide: docs/CONFIG.md.
Contributing
See the contributing guide: CONTRIBUTING.md for developer setup and guidelines.
Metadata
Release files for baseline-warden 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| baseline_warden-0.1.1.tar.gz | 38.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| baseline_warden-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 72.8 kB
Release files / baseline_warden-0.1.1.tar.gz
| Download URL | baseline_warden-0.1.1.tar.gz |
|---|---|
| Size | 38.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e88fccec54c0d7c68cddbb6551ff50d6169a67c32891f3d83d86561fd0e9726
|
|
BLAKE2b-256 checksum How to use checksums |
cdbcc0e8851a66b90d023e26c898032706e91f91176aba73c5a4c6a631f53453
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2025.
Transparency logRelease files / baseline_warden-0.1.1-py3-none-any.whl
| Download URL | baseline_warden-0.1.1-py3-none-any.whl |
|---|---|
| Size | 34.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b911f2e8ecde4da24198f85afd4836bf0560067070d63afd720f232898dab67
|
|
BLAKE2b-256 checksum How to use checksums |
0f9a3970a66f6b6485870eb7190134956eab8c7e9e9612d169a2de0112faa535
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2025.
Transparency log