npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bernierllc/validators-cli

v1.2.2

Published

Unified CLI interface for all BernierLLC validators

Downloads

17

Readme

@bernierllc/validators-cli

Unified CLI interface for all BernierLLC validators.

Installation

npm install -g @bernierllc/validators-cli

Or use locally:

npm install --save-dev @bernierllc/validators-cli

Quick Start

# Initialize configuration
bernier-validate init

# Run validation
bernier-validate run

# Run specific validator
bernier-validate run --validator html-syntax

# Watch mode
bernier-validate run --watch

# List available validators
bernier-validate list

# Describe validator
bernier-validate describe html-syntax

Commands

bernier-validate run [files...]

Run validation on files.

Options:

  • -v, --validator <name> - Run specific validator
  • -c, --config <path> - Config file path
  • -r, --reporter <type> - Output format (json, sarif, markdown, junit)
  • -o, --output <path> - Output file path
  • -w, --watch - Watch mode for continuous validation
  • -p, --profile <name> - Validation profile (strict, standard, relaxed)
  • --parallel <n> - Number of parallel validators (default: 4)
  • --verbose - Verbose output

Examples:

# Validate all files
bernier-validate run

# Validate specific files
bernier-validate run src/**/*.html

# Use strict profile
bernier-validate run --profile strict

# Output to file
bernier-validate run --output validation-report.json

# SARIF output for GitHub Code Scanning
bernier-validate run --reporter sarif --output results.sarif

# Watch mode
bernier-validate run --watch

bernier-validate fix [files...]

Auto-fix validation issues where possible.

Options:

  • -c, --config <path> - Config file path
  • --verbose - Verbose output

Examples:

# Fix all files
bernier-validate fix

# Fix specific files
bernier-validate fix src/**/*.html

bernier-validate list

List all available validators.

Examples:

bernier-validate list

bernier-validate describe <validator>

Show detailed information about a validator.

Examples:

bernier-validate describe html-syntax
bernier-validate describe security

bernier-validate init

Initialize configuration file interactively.

Options:

  • --no-interactive - Skip interactive prompts

Examples:

# Interactive setup
bernier-validate init

# Non-interactive with defaults
bernier-validate init --no-interactive

Configuration

Create a .validators.json file in your project root:

{
  "profile": "standard",
  "reporter": "json",
  "parallel": 4,
  "include": ["**/*.{html,css,js,ts,json}"],
  "exclude": ["node_modules/**", "dist/**", "coverage/**"],
  "validators": ["html-syntax", "css-syntax", "security"],
  "rules": {
    "html/syntax": "error",
    "css/properties": "warning"
  },
  "waivers": [
    {
      "rule": "security/xss",
      "reason": "Third-party library issue",
      "owner": "[email protected]",
      "expiry": "2025-12-31",
      "patterns": ["vendor/**/*.js"]
    }
  ]
}

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | profile | string | "standard" | Validation profile (strict, standard, relaxed) | | reporter | string | "json" | Output format (json, sarif, markdown, junit) | | parallel | number | 4 | Number of parallel validators | | include | string[] | ["**/*.{html,css,js,ts,json}"] | File patterns to validate | | exclude | string[] | ["node_modules/**", "dist/**"] | File patterns to exclude | | validators | string[] | undefined | Specific validators to run | | rules | object | {} | Rule-specific configuration | | waivers | array | [] | Rule suppression with justification |

Profiles

Strict Profile

Maximum enforcement with zero tolerance:

  • All validators enabled
  • All rules set to error
  • Zero error/warning thresholds
  • Includes WCAG AAA accessibility rules

Standard Profile (Default)

Balanced validation:

  • Core validators enabled
  • Mix of error and warning rules
  • Reasonable thresholds
  • Includes WCAG AA accessibility rules

Relaxed Profile

Minimal validation for rapid development:

  • Essential validators only
  • Most rules set to warning
  • Lenient thresholds
  • Critical security rules only

Reporters

JSON Reporter

Standard JSON output with detailed results:

bernier-validate run --reporter json

SARIF Reporter

GitHub Code Scanning compatible format:

bernier-validate run --reporter sarif --output results.sarif

Markdown Reporter

Human-readable reports:

bernier-validate run --reporter markdown --output report.md

JUnit Reporter

CI/CD test result format:

bernier-validate run --reporter junit --output test-results.xml

CI/CD Integration

GitHub Actions

name: Validate
on: [push, pull_request]

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
      - run: npm install
      - run: npx bernier-validate run --reporter sarif --output results.sarif
      - uses: github/codeql-action/upload-sarif@v2
        if: always()
        with:
          sarif_file: results.sarif

GitLab CI

validate:
  stage: test
  script:
    - npm install
    - npx bernier-validate run --reporter junit --output validation.xml
  artifacts:
    reports:
      junit: validation.xml

Pre-commit Hook

#!/bin/sh
npx bernier-validate run --profile strict $(git diff --cached --name-only --diff-filter=ACM)

Watch Mode

Continuously validate files as they change:

bernier-validate run --watch

Features:

  • Real-time validation on file changes
  • Incremental validation of modified files
  • Console output with color coding
  • Automatic re-validation on save

Integration Status

  • Logger: not-applicable - CLI tool outputs directly to terminal. Logging handled by runner.
  • Docs-Suite: ready - All commands documented with examples
  • NeverHub: not-applicable - CLI tool for local/CI execution

API Usage

Use validators-cli programmatically:

import { createCLI, runCLI } from '@bernierllc/validators-cli';

// Create CLI instance
const program = createCLI();

// Run CLI programmatically
await runCLI();

Dependencies

  • @bernierllc/validators-core - Core validator types
  • @bernierllc/validators-runner - Validation orchestration
  • @bernierllc/validators-reporters - Output formatting
  • @bernierllc/validators-rulesets - Pre-configured rule bundles
  • commander - CLI framework
  • chalk - Terminal colors
  • ora - Loading spinners
  • inquirer - Interactive prompts
  • chokidar - File watching

License

Copyright (c) 2025 Bernier LLC. All rights reserved.

See LICENSE file for details.

See Also