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

@labnex/cli

v1.4.0

Published

CLI for Labnex, an AI-Powered Testing Automation Platform

Readme

Labnex CLI

AI-Powered Testing Automation Platform Command Line Interface

Version License

Installation

# Install globally
npm install -g @labnex/cli

# Or use npx
npx @labnex/cli --help

Authentication

Before using the CLI, you need to authenticate:

# Configure your API settings
labnex config set

# Log in with your credentials
labnex auth login

Commands

Running Tests

# Run all tests for a project
labnex run --project-id <PROJECT_ID>

# Run a specific test case
labnex run --project-id <PROJECT_ID> --test-id <TEST_ID>

# Run with AI optimization (recommended)
labnex run --project-id <PROJECT_ID> --optimize-ai

# Run in headless mode
labnex run --project-id <PROJECT_ID> --headless

# Run with verbose logging
labnex run --project-id <PROJECT_ID> --verbose

Managing Projects

# List all projects
labnex list --projects

# List test cases for a project
labnex list --tests <PROJECT_ID>

# Create a new project
labnex projects create --name "My Project" --code PROJECT1 --description "Description"

# List all projects with details
labnex projects list

Linting & Importing

# Static-analysis of raw step files
labnex lint-tests ./tests --json

# Convert raw steps into a Test Case
labnex create-test-case --project-id <PROJECT_ID> --file checkout.txt

AI Features

# Generate a test case with AI
labnex ai generate --description "Test the login functionality with valid credentials"

# Optimize test selection with AI
labnex ai optimize --project <PROJECT_CODE>

Analysis

# Analyze test failure
labnex analyze failure --run-id <RUN_ID>

# Check overall status
labnex status

# Check specific test run
labnex status --run-id <RUN_ID>

Options

Global Options

| Option | Description | |--------|-------------| | --verbose | Enable detailed logging | | --api-url <url> | Override API URL |

Run Command Options

| Option | Description | Default | |--------|-------------|---------| | -p, --project-id <id> | Project ID (required) | - | | -t, --test-id <id> | Run specific test case by ID | - | | -e, --environment <env> | Environment (staging/production) | staging | | -m, --mode <mode> | Execution mode (local/cloud) | cloud | | --optimize-ai | Enable AI optimization for element finding | false | | --parallel <number> | Number of parallel workers (cloud mode) | 4 | | --headless | Run in headless mode (local mode) | false | | --timeout <ms> | Test timeout in milliseconds | 300000 | | --base-url <url> | Base URL for relative navigation | - | | --username <user> | Supply login username | - | | --password <pass> | Supply login password | - |

Performance Features

  • AI Element Optimization: Enables intelligent element finding and reduces flakiness
  • Iframe Handling: Optimized iframe switching for complex web applications
  • Smart Waits: Dynamic wait times based on element visibility
  • Detailed Reporting: Step-by-step execution reports with timing

Changelog

Version 1.4.0 (Current)

  • Cloud execution mode enabled by default (--mode cloud)
  • Added lint-tests and create-test-case commands
  • New flags: --base-url, --username, --password
  • Updated docs & examples across website and npm package

Status of Features

Working Features

  • Core CLI commands and help system
  • Project and test case listing
  • Test execution with AI optimization
  • Basic login flow testing on standard websites
  • Status reporting and detailed logging

Recently Added

  • Cloud execution mode (default) with live progress streaming
  • Static test linter (lint-tests) and interactive --fix flow
  • Raw step importer (create-test-case) for quick Test Case creation

Known Issues

  • Some complex UI interactions (like modals on certain websites) may require specific selectors
  • File upload operations require test files to be present in the expected location

Troubleshooting

Authentication Issues

If you encounter authentication errors:

# Reset API configuration
labnex config set --reset

# Login again
labnex auth login

Connection Problems

If you cannot connect to the Labnex API:

# Check status
labnex status

# Configure custom API URL
labnex config set --api-url https://custom-api.labnex.com

Browser Execution Errors

If tests fail with browser-related errors:

# Update dependencies
npm update -g @labnex/cli

# Run with verbose logging
labnex run --project-id <ID> --verbose

Examples

Example 1: Complete Test Workflow

# Create a new project
labnex projects create --name "E-commerce Site" --code ECOM --description "Testing for our e-commerce platform"

# Generate tests with AI
labnex ai generate --description "Test checkout process with credit card payment"

# Run all tests with optimization
labnex run --project-id <PROJECT_ID> --optimize-ai --headless

Example 2: Debugging Failed Tests

# Run specific test with detailed logging
labnex run --project-id <PROJECT_ID> --test-id <TEST_ID> --verbose

# Analyze failure reasons
labnex analyze failure --run-id <LATEST_RUN_ID>

Documentation

For complete documentation, visit https://labnexdev.github.io/Labnex

Contributing

Contributions are welcome! Please see the CONTRIBUTING.md file for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.