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

smart-ai-terminal

v0.4.0

Published

Unified CLI tool for automated test generation and execution

Downloads

26

Readme

Smart AI Test Suite (SAT)

Unified CLI tool for automated test generation and execution. Generate tests in minutes, not hours using AI-powered agents.

Team

Team Name: Aakhri

Team Members:

  • Vinil Joseph
  • Sharath S
  • Ashik k
  • Muhammed Haneen
  • Pavan Marathe

Npm Link - https://www.npmjs.com/package/smart-ai-terminal

( We would recommend global installation of the package )

Features

  • 🤖 AI-Powered Test Generation - Uses Groq SDK with Llama 3.3 70B for intelligent test creation
  • 95-98% Time Reduction - Generate comprehensive tests in 2-5 minutes instead of hours
  • 🔧 Auto-Fix Failing Tests - Automatically fixes test failures with AI assistance
  • 📊 Coverage Analysis - Identifies missing test cases and suggests improvements
  • ⚛️ React Support - Automatic detection and appropriate testing library usage
  • 🎯 Framework Detection - Automatically detects Jest, Vitest, or Mocha
  • 📦 Dependency Management - Auto-installs missing testing dependencies
  • 🔍 Static Analysis - AST-based code analysis for accurate test generation

Installation

npm install -g smart-ai-terminal

Quick Start

  1. Initialize SAT in your project:

    sat init

    This will:

    • Detect your test framework (Jest, Vitest, Mocha)
    • Create .satrc configuration file
    • Enter interactive mode automatically
  2. Configure API Key (first time only):

    sat shell
    setup

    Enter your Groq API key (get one at https://console.groq.com/keys)

  3. Generate tests for a file:

    sat gen unit src/utils/validator.ts

    Or use interactive mode:

    sat shell
    generate src/utils/validator.ts
  4. Run tests:

    sat test
  5. Check coverage:

    sat coverage

Commands

CLI Commands

sat init

Initialize SAT in your project. Detects your test framework (Jest, Vitest, Mocha) and creates configuration.

What it does:

  • Detects test framework from package.json
  • Creates .satrc configuration file
  • Automatically enters interactive shell mode

sat gen unit <file>

Generate unit tests for a TypeScript/JavaScript file.

Options:

  • -o, --output <dir> - Output directory for test files (default: __tests__)
  • --skip-deps - Skip dependency check and installation

Examples:

sat gen unit src/utils/validator.ts
sat gen unit src/components/Button.tsx -o tests
sat gen unit src/api/client.ts --skip-deps

Features:

  • Automatically detects React components (.tsx/.jsx files)
  • Installs missing testing dependencies (Jest, React Testing Library, etc.)
  • Creates appropriate Jest configuration if needed
  • Generates tests with comprehensive edge case coverage

sat test

Run tests using your configured test framework.

Options:

  • -w, --watch - Watch mode for continuous testing

Examples:

sat test
sat test --watch

sat coverage

Generate and display test coverage report.

Examples:

sat coverage

sat shell

Start interactive SAT session with AI-powered commands.

Interactive Commands:

  • learn - Analyze project structure and build AI context
  • generate <file> - Generate AI-powered tests for a file
  • generate --all - Generate tests for all source files
  • suggest <file> - Suggest missing test cases for a file
  • test [file] - Run tests (optionally for a specific file)
  • test --verbose [file] or test -v [file] - Run tests with detailed output
  • test --fix <file> - Run tests and auto-fix failures with AI
  • status - Show current project context and configuration
  • setup - Configure your GROQ API key
  • clear - Clear the screen
  • help - Show available commands
  • exit or quit - Exit SAT session

Example Workflow:

sat shell
> learn                    # Analyze project
> generate src/utils.ts    # Generate tests
> test                     # Run tests
> test --fix src/utils.ts  # Fix any failures
> exit

Configuration

SAT stores configuration in .satrc file:

{
  "framework": "jest",
  "testDir": "__tests__",
  "testFilePattern": "{name}.test.ts"
}

API Key Configuration

Set your Groq API key using one of these methods:

  1. Interactive setup:

    sat shell
    setup
  2. Environment variable:

    export GROQ_API_KEY=your_key_here
  3. Manual configuration: The API key is stored in ~/.satrc after setup.

Documentation

For comprehensive documentation on AI tools, agents, use cases, and productivity improvements, see AI_TOOLS.md.

Key Topics:

  • AI agent system (Generator, Fixer, Suggester, Reviewer, Analyzer)
  • Prompt engineering and context building
  • Measurable productivity improvements
  • Technical architecture
  • Integration points

Requirements

  • Node.js 18+
  • TypeScript/JavaScript project
  • Groq API Key (for AI features) - Get one at https://console.groq.com/keys
  • Test Framework (one of):
    • Jest (recommended)
    • Vitest
    • Mocha

Optional Dependencies

SAT will automatically install these when needed:

  • For React projects: @testing-library/react, @testing-library/jest-dom, @testing-library/user-event, jest-environment-jsdom
  • For all projects: jest, ts-jest, @types/jest

Supported File Types

  • TypeScript: .ts, .tsx
  • JavaScript: .js, .jsx

Project Structure

After initialization, SAT creates:

your-project/
├── .satrc              # SAT configuration
├── .sat/               # SAT project context (created after 'learn')
│   └── context.json   # Project analysis results
└── __tests__/         # Generated test files (default)

Examples

Basic Test Generation

# Initialize project
sat init

# Generate tests
sat gen unit src/utils/validator.ts

# Run tests
sat test

React Component Testing

# SAT automatically detects React components
sat gen unit src/components/Button.tsx

# Installs React Testing Library automatically
# Generates appropriate component tests

Interactive Workflow

sat shell
> learn                    # Build project context
> generate src/api.ts      # Generate tests
> test                     # Run all tests
> suggest src/api.ts       # Find missing test cases
> test --fix src/api.ts     # Auto-fix any failures

Batch Generation

sat shell
> generate --all           # Generate tests for all source files

Troubleshooting

API Key Issues

# Check if API key is configured
sat shell
> status

# Reconfigure if needed
> setup

Missing Dependencies

SAT will prompt to install missing dependencies automatically. If you want to skip:

sat gen unit src/file.ts --skip-deps

Test Framework Not Found

Make sure your test framework is installed:

npm install -D jest  # or vitest, mocha

Development

# Install dependencies
npm install

# Build
npm run build

# Development mode
npm run dev

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT