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

a11yflow-cli

v1.0.0

Published

A11yFlow CLI Tool for CI/CD Integration

Downloads

4

Readme

A11yFlow CLI Tool

Command-line interface tool for A11yFlow accessibility scanning, designed for CI/CD integration.

Installation

Global Installation

npm install -g a11yflow-cli

Local Installation (for CI/CD)

npm install a11yflow-cli --save-dev

From Source

cd cli
npm install
npm run build
npm link  # For global access

Note: Nếu package chưa được publish lên npm, bạn có thể install từ source hoặc sử dụng npm link để test local.

Usage

Basic Scan

a11yflow scan --url https://example.com --api-key YOUR_API_KEY

Fail on Serious Violations (for CI/CD)

a11yflow scan \
  --url https://example.com \
  --api-key YOUR_API_KEY \
  --fail-on serious

Fail on Critical Only

a11yflow scan \
  --url https://example.com \
  --api-key YOUR_API_KEY \
  --fail-on critical

JSON Output

a11yflow scan \
  --url https://example.com \
  --api-key YOUR_API_KEY \
  --output json

Custom API URL

a11yflow scan \
  --url https://example.com \
  --api-key YOUR_API_KEY \
  --api-url https://api.a11yflow.com

Options

  • -u, --url <url> - URL to scan (required)
  • -k, --api-key <key> - API Key for authentication (required)
  • -f, --fail-on <level> - Fail on violations at this level or higher (default: serious)
    • Valid levels: critical, serious, moderate, minor
  • -o, --output <format> - Output format: text or json (default: text)
  • --api-url <url> - API base URL (default: http://localhost:3001 or A11YFLOW_API_URL env var)
  • --no-color - Disable colored output

Exit Codes

  • 0 - Scan completed successfully, no violations at fail-on level or higher
  • 1 - Error occurred or violations found at fail-on level or higher

CI/CD Integration Examples

GitHub Actions

name: Accessibility Check

on: [push, pull_request]

jobs:
  a11y-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      
      - name: Setup Node.js
        uses: actions/setup-node@v3
        with:
          node-version: '18'
      
      - name: Install A11yFlow CLI
        run: npm install -g a11yflow-cli
      
      - name: Run accessibility scan
        run: |
          a11yflow scan \
            --url ${{ secrets.SITE_URL }} \
            --api-key ${{ secrets.A11YFLOW_API_KEY }} \
            --fail-on serious

GitLab CI

a11y-check:
  image: node:18
  before_script:
    - npm install -g a11yflow-cli
  script:
    - a11yflow scan
        --url $SITE_URL
        --api-key $A11YFLOW_API_KEY
        --fail-on serious
  only:
    - merge_requests
    - main

CircleCI

version: 2.1
jobs:
  a11y-check:
    docker:
      - image: cimg/node:18.0
    steps:
      - checkout
      - run:
          name: Install A11yFlow CLI
          command: npm install -g a11yflow-cli
      - run:
          name: Run accessibility scan
          command: |
            a11yflow scan \
              --url $SITE_URL \
              --api-key $A11YFLOW_API_KEY \
              --fail-on serious

Jenkins Pipeline

pipeline {
    agent any
    
    stages {
        stage('Accessibility Check') {
            steps {
                sh '''
                    npm install -g a11yflow-cli
                    a11yflow scan \
                      --url ${SITE_URL} \
                      --api-key ${A11YFLOW_API_KEY} \
                      --fail-on serious
                '''
            }
        }
    }
}

Environment Variables

  • A11YFLOW_API_URL - Default API base URL (overridden by --api-url)

Getting Your API Key

  1. Sign up at A11yFlow
  2. Go to Settings > API Keys
  3. Create a new API key
  4. Copy the key and use it with the --api-key option

Examples

Scan and fail on any serious or critical violations

a11yflow scan \
  --url https://mywebsite.com \
  --api-key abc123... \
  --fail-on serious

Scan and only fail on critical violations

a11yflow scan \
  --url https://mywebsite.com \
  --api-key abc123... \
  --fail-on critical

Get JSON output for parsing

a11yflow scan \
  --url https://mywebsite.com \
  --api-key abc123... \
  --output json | jq '.summary'

Troubleshooting

Connection Error

If you get a connection error, make sure:

  • The API URL is correct (use --api-url if needed)
  • The API server is running and accessible
  • Your network/firewall allows connections to the API

Authentication Error

If you get an authentication error:

  • Verify your API key is correct
  • Check that your API key is active in your account settings
  • Ensure you're using the correct API key for your subscription plan

Exit Code Issues

  • Exit code 1 means violations were found at the --fail-on level or higher
  • To only fail on critical issues, use --fail-on critical
  • To see all violations without failing, use --fail-on minor (will only fail if there are minor issues)