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

@rawwee/wcag-cli

v0.1.1

Published

CLI for WCAG 2.2 guidelines, techniques, and glossary — powered by official W3C data. Zero-token-cost alternative to the WCAG MCP.

Downloads

214

Readme

wcag-cli

A command-line interface for WCAG 2.2 guidelines, techniques, and glossary — powered by official W3C data.

wcag-cli is a zero-token-cost alternative to the WCAG MCP. It wraps the wcag-guidelines-mcp npm package to bring comprehensive WCAG 2.2 data to your terminal.

Installation

# Global install
npm install -g @rawwee/wcag-cli

# Or run without install
npx @rawwee/wcag-cli <command>

Requirements: Node.js ≥ 18.0.0

Quick Start

# Get details for a specific criterion
wcag get-criterion 1.1.1

# Search for criteria by keyword
wcag search-wcag "keyboard"

# List all techniques for a criterion
wcag get-techniques-for-criterion 2.4.7

# Get all AA-level criteria (including A)
wcag get-criteria-by-level AA --include_lower

# Find failure techniques for a criterion
wcag get-failures-for-criterion 1.4.3

# See what's new in WCAG 2.2
wcag whats-new-in-wcag22

Commands

Core Commands

  • list-principles — Lists all four WCAG 2.2 principles: Perceivable, Operable, Understandable, and Robust.

  • list-guidelines — Lists WCAG 2.2 guidelines, optionally filtered by principle number (1-4).

  • list-success-criteria — Lists WCAG 2.2 success criteria with optional filters by level (A, AA, AAA), guideline (e.g., "1.1"), or principle (1-4).

  • get-success-criteria-detail — Gets the normative success criterion requirements — just the title and exception details without Understanding documentation.

  • get-criterion — Gets full details for a specific WCAG success criterion by its reference number.

    • Example: wcag get-criterion 1.1.1
  • get-guideline — Gets full details for a specific WCAG guideline including all its success criteria.

  • search-wcag — Searches WCAG 2.2 success criteria by keyword in titles and descriptions.

    • Example: wcag search-wcag "keyboard"
  • get-criteria-by-level — Gets all success criteria for a specific conformance level. Optionally includes lower levels (e.g., AA includes A).

    • Example: wcag get-criteria-by-level AA --include_lower
  • count-criteria — Returns counts of success criteria grouped by level, principle, or guideline.

Techniques Commands

  • list-techniques — Lists WCAG techniques, optionally filtered by technology (html, aria, css, pdf, general, etc.) or type (sufficient, advisory, failure).

  • get-technique — Gets details for a specific technique by ID.

    • Example: wcag get-technique H37
  • get-techniques-for-criterion — Gets all techniques (sufficient, advisory, and failures) for a specific success criterion.

    • Example: wcag get-techniques-for-criterion 2.4.7
  • search-techniques — Searches techniques by keyword in titles.

  • get-failures-for-criterion — Gets failure techniques (common mistakes) for a specific success criterion.

    • Example: wcag get-failures-for-criterion 1.4.3

Glossary Commands

  • get-glossary-term — Gets the definition of a WCAG glossary term.

  • list-glossary-terms — Lists all WCAG glossary terms.

  • search-glossary — Searches the WCAG glossary by keyword.

Enhanced Commands

  • whats-new-in-wcag22 — Lists all success criteria that were added in WCAG 2.2.

    • Example: wcag whats-new-in-wcag22
  • get-full-criterion-context — Gets comprehensive context for a success criterion including techniques, test rules, and related glossary terms.

  • get-server-info — Returns information about this WCAG MCP server and data source.

Usage

Arguments

The CLI follows a simple argument convention:

  • Required arguments are positional and must be provided in the order defined by the command's schema.
  • Optional arguments are provided as --flags with values (e.g., --include_lower, --principle 1).

Known limitations:

  • Place --flags after positional arguments. A bare boolean flag placed before a positional will consume the positional as its value.
  • Positional values starting with - or -- are parsed as flags, not positionals, and are not supported.

Getting Help

# List all available commands
wcag
wcag --help

# Get help for a specific command
wcag <command> --help

# Examples:
wcag get-criterion --help
wcag search-wcag --help
wcag get-criteria-by-level --help

Updating WCAG Data

WCAG data is shipped inside the pinned wcag-guidelines-mcp dependency. To update to newer WCAG data:

  1. Bump the wcag-guidelines-mcp version in package.json
  2. Run npm install
  3. Republish @rawwee/wcag-cli to npm

Attribution

WCAG data © W3C, from the W3C WCAG Repository (https://github.com/w3c/wcag), under the W3C Document License.

The CLI is a wrapper over the wcag-guidelines-mcp npm package by Joe Watkins.

License

MIT — see LICENSE for details.