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

cypress-genie-ai

v1.0.10

Published

AI CLI tool that generates Cypress test scripts from natural language scenarios and a URL

Readme

Cypress Genie AI 🧞‍♂️

An AI-powered tool that automatically generates and maintains Cypress test automation code by analyzing your web application's DOM structure.

Features

  • Intelligent Test Generation: Automatically creates Cypress tests from user scenarios
  • Smart Page Object Management:
    • Auto-generates page objects with best practices
    • Updates existing page objects without overwriting custom changes
    • Maintains selector accuracy through DOM analysis
  • DOM State Tracking:
    • Captures DOM snapshots during page transitions
    • Tracks navigation history for comprehensive testing
    • Validates and updates selectors automatically
  • Best Practices Built-in:
    • Uses data-testid and stable selectors
    • Implements page object pattern
    • Includes comprehensive assertions
    • Supports method chaining

Installation 🚀

npm install cypress-genie-ai

Prerequisites 📋

  • Node.js (v16 or higher)
  • Cypress (v12 or higher)
  • OpenAI API key

Configuration ⚙️

  1. Create a .env file in your project root:
OPENAI_API_KEY=your_api_key_here
  1. Make sure your .gitignore includes:
node_modules
.env

Usage 🛠️

Basic Usage

npx cypress-genie-ai "Login and verify dashboard" --url=https://your-app.com/login

How It Works 🔄

  1. DOM Analysis: Captures initial page DOM and tracks navigation changes
  2. AI Processing: Analyzes DOM structure and generates appropriate test code
  3. Smart Updates:
    • Merges new selectors with existing page objects
    • Updates incorrect selectors
    • Preserves custom modifications
  4. Code Generation: Creates or updates:
    • Page Object files
    • Test specifications
    • Element selectors

Example Output 📝

// Generated Page Object
export default class LoginPage {
  elements = {
    usernameInput: () => cy.get('[data-testid="username-input"]'),
    passwordInput: () => cy.get('[data-testid="password-input"]'),
    loginButton: () => cy.get('[data-testid="login-button"]')
  }

  login(username, password) {
    this.elements.usernameInput().type(username);
    this.elements.passwordInput().type(password);
    this.elements.loginButton().click();
    return this;
  }
}

Contributing 🤝

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Troubleshooting 🔍

Common Issues

  1. Selector not found

    • Ensure the page is fully loaded
    • Check if elements are in iframes
    • Verify dynamic content loading
  2. OpenAI API Issues

    • Verify API key in .env file
    • Check API quota and limits
    • Ensure proper network connectivity

Support 💬

  • Create an issue for bugs or feature requests
  • Star the repo if you find it useful
  • Follow for updates

Acknowledgments 🙏

  • OpenAI for GPT API
  • Cypress team for the amazing test framework
  • Contributors and users of this project