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 🙏

© 2025 – Pkg Stats / Ryan Hefner

yaiqa

v1.0.1

Published

YAIQA CLI - AI-powered test automation from the command line

Readme

YAIQA CLI

A powerful command-line interface for YAIQA - AI-powered test automation platform. Run intelligent browser tests from your terminal with ease.

Installation

Global Installation

npm install -g yaiqa

Local Installation

npm install yaiqa
npx yaiqa --help

Quick Start

  1. Authenticate with YAIQA (automatically sets up project config)

    yaiqa login
  2. List available tests

    yaiqa list
  3. Run tests

    yaiqa ai-check my-test

Commands

yaiqa login

Authenticate with the YAIQA platform.

yaiqa login
yaiqa login --api-key <your-api-key>

Options:

  • -k, --api-key <key> - API key for authentication

Note: Project configuration is automatically set up during yaiqa login if no .yaiqa.config.json exists.

yaiqa list

List all available tests.

yaiqa list
yaiqa list --format json

Options:

  • -f, --format <format> - Output format (table, json)

yaiqa ai-check

Run AI-powered tests.

# Run specific tests
yaiqa ai-check test1 test2

# Run ad-hoc test
yaiqa ai-check --url https://example.com --prompt "Click the login button"

# Automatically waits for completion
yaiqa ai-check my-test

# Generate JUnit report
yaiqa ai-check my-test --reporter junit --output results.xml

Options:

  • -u, --url <url> - URL to test (for ad-hoc tests)
  • -p, --prompt <prompt> - Test instructions (for ad-hoc tests)
  • -n, --name <name> - Test name (for ad-hoc tests)
  • -d, --description <description> - Test description
  • -t, --timeout <timeout> - Timeout in milliseconds (default: 300000)
  • -w, --wait - Wait for test completion (deprecated - now automatic)
  • --adhoc - Run as ad-hoc test (don't save to database)
  • --reporter <reporter> - Output reporter (console, junit, json)
  • -o, --output <file> - Output file for reports

Note: The yaiqa ai-check command automatically waits for test completion, so manual status checking is not needed.

Configuration

Global Configuration

The CLI stores configuration in your system's config directory:

  • macOS/Linux: ~/.config/yaiqa/config.json
  • Windows: %APPDATA%/yaiqa/config.json

Project Configuration

Create a .yaiqa.config.json file in your project root:

{
  "project": {
    "name": "My Project",
    "description": "Project description"
  },
  "apiUrl": "https://api.yaiqa.com",
  "defaultOptions": {
    "timeout": 300000,
    "retries": 3,
    "verbose": false
  }
}

Environment Variables

  • YAIQA_API_KEY - Your API key (optional, can also use yaiqa login)
  • YAIQA_VERBOSE - Enable verbose output
  • YAIQA_JSON_OUTPUT - Enable JSON output

Output Formats

Console Output (Default)

Colorized, human-readable output with status indicators and progress bars.

JSON Output

Machine-readable JSON format for integration with other tools:

yaiqa list --format json
yaiqa ai-check my-test --json

JUnit XML

Generate JUnit-compatible XML reports for CI/CD integration:

yaiqa ai-check my-test --reporter junit --output results.xml

CI/CD Integration

GitHub Actions

name: YAIQA Tests
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: '18'
      - run: npm install -g yaiqa
      - run: yaiqa login --api-key ${{ secrets.YAIQA_API_KEY }}
      - run: yaiqa ai-check my-test --reporter junit --output results.xml
      - uses: dorny/test-reporter@v1
        if: always()
        with:
          name: YAIQA Test Results
          path: results.xml
          reporter: java-junit

Jenkins

pipeline {
    agent any
    stages {
        stage('Test') {
            steps {
                sh 'npm install -g yaiqa'
                sh 'yaiqa login --api-key ${YAIQA_API_KEY}'
                sh 'yaiqa ai-check my-test --reporter junit --output results.xml'
            }
        }
    }
    post {
        always {
            junit 'results.xml'
        }
    }
}

Advanced Usage

Development Workflow

For file watching during development, consider using IDE extensions or external tools like nodemon or chokidar.

Ad-hoc Testing

Run tests without saving to the database:

yaiqa ai-check --url https://example.com --prompt "Click the login button" --name "Login Test"

Batch Testing

Run multiple tests in sequence:

yaiqa ai-check test1 test2 test3

Custom Timeouts

Set custom timeouts for long-running tests:

yaiqa ai-check my-test --timeout 600000  # 10 minutes

Troubleshooting

Authentication Issues

# Check if you're authenticated
yaiqa list

# Re-authenticate
yaiqa login

Network Issues

# Check API connectivity
yaiqa list --verbose

# If you need a custom API URL, contact support

Test Execution Issues

# Run with verbose output
yaiqa ai-check my-test --verbose

# The ai-check command automatically waits for completion
# No manual status checking needed

Examples

Basic Test Execution

# List available tests
yaiqa list

# Run a specific test
yaiqa ai-check "Login Test"

# Run multiple tests
yaiqa ai-check "Login Test" "Checkout Test"

Ad-hoc Testing

# Test a specific URL with custom instructions
yaiqa ai-check --url https://example.com --prompt "Navigate to the contact page and fill out the form"

CI/CD Pipeline

# Run tests and generate JUnit report
yaiqa ai-check my-test --reporter junit --output test-results.xml

# Exit with appropriate code for CI
if [ $? -eq 0 ]; then
  echo "All tests passed"
else
  echo "Some tests failed"
  exit 1
fi

Development Workflow

# Login (automatically sets up project config)
yaiqa login

# Run specific tests before commit
yaiqa ai-check critical-tests

# For file watching, use IDE extensions or external tools

API Reference

The CLI integrates with the YAIQA REST API:

  • Authentication: Bearer token authentication
  • Base URL: https://api.yaiqa.com (production)
  • Endpoints:
    • GET /api/tests - List tests
    • POST /api/tests - Create test
    • POST /api/tests/:id/execute - Execute test
    • GET /api/tests/execution/:id - Get execution status
    • GET /api/tests/executions/:id - Get execution results
    • POST /api/api-keys/validate - Validate API key

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

  • Documentation: https://docs.yaiqa.com
  • Issues: https://github.com/yaiqa/yaiqa/issues
  • Discord: https://discord.gg/yaiqa