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

@magicpro97/testforge

v1.0.0

Published

🧪 AI Test Generator CLI — scan untested code, generate unit & E2E tests, coverage analysis

Downloads

100

Readme

🧪 TestForge

AI-powered test generation from your terminal

Scan untested code, generate unit & E2E tests, and visualize coverage — all from the CLI.

Features

  • 🔍 Scan — Detect untested files and functions across your codebase
  • 🤖 Generate — AI-generate unit tests for any file (Jest, Vitest, pytest, Flutter)
  • 🎭 E2E — Generate Playwright/Detox/Maestro test flows from natural language
  • 📊 Coverage — Terminal-friendly coverage visualization
  • 💡 Suggest — AI-prioritized test recommendations by risk/impact
  • Multi-language — TypeScript, JavaScript, Python, Dart, Kotlin, Swift

Quick Start

# Install globally
npm install -g @magicpro97/testforge

# Configure AI provider
testforge config set openai.apiKey sk-your-key
testforge config set defaultProvider openai

# Scan for untested code
testforge scan ./src

# Generate tests for a file
testforge gen src/utils.ts

# Generate E2E test from description
testforge gen:e2e "user logs in, adds item to cart, checks out"

# View coverage
testforge coverage .

# Get AI suggestions on what to test first
testforge suggest ./src

Commands

testforge scan [dir]

Scan for untested code and show coverage gaps.

testforge scan ./src
testforge scan ./src --language ts
testforge scan . --json

testforge gen <file>

AI-generate unit tests for a specific file.

testforge gen src/utils.ts
testforge gen src/api.ts --framework vitest
testforge gen src/helpers.py --provider gemini
testforge gen src/utils.ts --dry-run    # Preview without writing
testforge gen src/utils.ts -o tests/utils.test.ts

testforge gen:e2e "description"

Generate E2E test flows from natural language descriptions.

testforge gen:e2e "user signs up with email and verifies account"
testforge gen:e2e "add product to cart and checkout" --framework detox
testforge gen:e2e "navigate to settings and change password" --framework maestro

testforge coverage [dir]

Show coverage summary in terminal. Parses Istanbul/lcov coverage reports.

testforge coverage .
testforge coverage . --json
testforge coverage . --min 80

testforge suggest [dir]

AI-powered suggestions for which tests to write first, prioritized by risk and impact.

testforge suggest ./src
testforge suggest . --limit 5
testforge suggest . --json

testforge config

Manage AI provider configuration.

testforge config set openai.apiKey sk-your-key
testforge config set openai.model gpt-4o
testforge config set gemini.apiKey AIza...
testforge config set defaultProvider openai
testforge config list

Supported Languages

| Language | Extensions | Test Patterns | |------------|-----------------|-----------------------------------| | TypeScript | .ts | *.test.ts, *.spec.ts | | JavaScript | .js | *.test.js, *.spec.js | | Python | .py | test_*.py, *_test.py | | Dart | .dart | *_test.dart | | Kotlin | .kt | *Test.kt | | Swift | .swift | *Tests.swift |

AI Providers

  • OpenAI — GPT-4o-mini (default), GPT-4o, or any compatible model
  • Gemini — Gemini 2.0 Flash (default) or other Gemini models

Requirements

  • Node.js 20+
  • An OpenAI or Gemini API key

License

MIT © magicpro97