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

@toby1123yjh/test-cli

v0.1.16

Published

AI-powered E2E testing tool with natural language test case generation

Readme

test-cli

AI 驱动的 E2E 测试 CLI:通过 /generate//update 生成可运行的测试脚本,通过 /run 执行并输出 Markdown/HTML 报告。

安装

npm install -g @toby1123yjh/test-cli
- 用官方 npmjs 装:npm i -g @toby1123yjh/test-cli@latest --registry=https://registry.npmjs.org/
- 用你当前 taobao 镜像装:npm i -g @toby1123yjh/test-cli@latest --registry=https://registry.npm.taobao.org/

系统要求

  • Node.js >= 18
  • 前端 UI 测试需要 Playwright(建议 npm i -D playwright && npx playwright install
  • Git 可选

.test-cli/ 目录结构

.test-cli/
├── config.yaml
├── cases/
│   └── <module>/
│       ├── case.yaml
│       └── script/
│           ├── test.spec.ts   # frontend (Playwright)
│           └── test.api.mjs    # backend (Node + fetch)
└── tests/
    └── <timestamp>/
        ├── report.md
        ├── report.html
        └── artifacts/

快速开始

  1. 启动交互式 CLI:
test-cli
  1. 生成并加载配置(会创建 .test-cli/config.yaml.test-cli/cases/.test-cli/tests/):
/config
  1. 编辑 .test-cli/config.yaml(示例):
project:
  name: "my-app"
  baseUrl: "http://localhost:3000"

provider:
  # openai | anthropic | gemini | deepseek
  provider: "openai"
  model: "gpt-4o-mini"
  # apiKey: ${OPENAI_API_KEY}
  1. 生成测试:
  • 前端:
/generate login https://example.com/login
  • 后端(需要 project.baseUrl 或在提示里包含 URL):
/generate api
  1. 运行测试(模块可选;不传则跑所有可运行模块):
/run
/run login

报告输出在 .test-cli/tests/<timestamp>/{report.md, report.html}

Slash Commands

| 命令 | 说明 | |------|------| | /help | 显示命令列表 | | /clear | 清屏 | | /config | 创建/重载 .test-cli/config.yaml 并准备目录 | | /generate <module> [url] [notes...] | 生成 case.yaml + 可运行脚本 | | /update <module> [notes...] | 更新 case.yaml 并重新生成脚本 | | /validate [file] [--dir <dir>] | 校验 case.yaml(主要用于 frontend case) | | /run [module] [--mode frontend|backend] [--filter ...] [--timeout ...] | 执行脚本并生成报告 | | /new | 已废弃(请使用 /generate) |

CLI(非交互)

# 与 /run 等价
test-cli run [module] [--mode frontend|backend] [--filter "..."]

# CI 模式:执行 YAML 测试用例(不依赖生成脚本)
test-cli run --ci [--filter "..."]

开发

pnpm install
pnpm test
pnpm typecheck
pnpm build

许可证

MIT