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

vibecheck-runner

v0.4.0

Published

Programmatic runner for vibecheck evaluations - Run vibe checks directly in your Jest tests

Readme

@vibecheck/runner

Programmatic runner for vibecheck evaluations. Run vibe checks directly in your Jest tests.

Installation

npm install --save-dev @vibecheck/runner

Quick Start

Basic Usage

import { runVibeCheck } from '@vibecheck/runner';

const results = await runVibeCheck({
  file: './evals/hello-world.yaml'
});

console.log(`Passed: ${results.filter(r => r.passed).length}/${results.length}`);

With Jest

import { runVibeCheck } from '@vibecheck/runner';
import { extendExpect } from '@vibecheck/runner/jest';

// Extend Jest with custom matchers
extendExpect(expect);

describe('My LLM Feature', () => {
  it('should pass all vibe checks', async () => {
    const results = await runVibeCheck({
      file: './evals/my-feature.yaml'
    });

    expect(results).toHavePassedAll();
  });

  it('should have 80%+ success rate', async () => {
    const results = await runVibeCheck({
      file: './evals/my-feature.yaml'
    });

    expect(results).toHaveSuccessRateAbove(80);
  });
});

Configuration

API Key

The runner requires a vibecheck API key. Get yours at vibescheck.io.

Set your API key using one of these methods:

  1. Environment variable:
export VIBECHECK_API_KEY=your-api-key
  1. Config file: ~/.vibecheck/.env
VIBECHECK_API_KEY=your-api-key
  1. Constructor option:
import { VibeCheckRunner } from '@vibecheck/runner';

const runner = new VibeCheckRunner({
  apiKey: 'your-api-key'
});

API URL (Optional)

To test against localhost or a custom API:

const runner = new VibeCheckRunner({
  apiKey: 'your-api-key',
  apiUrl: 'http://localhost:3000'
});

Or via environment variable:

export VIBECHECK_URL=http://localhost:3000

API Reference

runVibeCheck(options)

Convenience function to run a vibe check.

const results = await runVibeCheck({
  file: './evals/test.yaml',
  model: 'anthropic/claude-3.5-sonnet', // Optional override
  apiKey: 'your-api-key',               // Optional
  apiUrl: 'http://localhost:3000'       // Optional
});

VibeCheckRunner

Main runner class for advanced usage.

import { VibeCheckRunner } from '@vibecheck/runner';

const runner = new VibeCheckRunner({
  apiKey: 'your-api-key',
  apiUrl: 'http://localhost:3000' // Optional
});

// Run evaluation
const results = await runner.run({
  file: './evals/test.yaml'
});

// Run on multiple models
const results = await runner.run({
  file: './evals/test.yaml',
  models: ['anthropic/claude-3.5-sonnet', 'openai/gpt-4']
});

// Start async run
const runId = await runner.startRun({
  file: './evals/test.yaml'
});

// Check status later
const status = await runner.getStatus(runId);

// Wait for completion
const results = await runner.waitForCompletion(runId);

Jest Matchers

The package includes custom Jest matchers for evaluating vibe check results:

toHavePassedAll()

Asserts that all evaluations passed.

expect(results).toHavePassedAll();

toHaveSuccessRateAbove(threshold)

Asserts that the success rate is above the threshold (0-100).

expect(results).toHaveSuccessRateAbove(80);

toHaveSuccessRateBelow(threshold)

Asserts that the success rate is below the threshold (0-100).

expect(results).toHaveSuccessRateBelow(50);

toHavePassedCount(count)

Asserts that exactly count evaluations passed.

expect(results).toHavePassedCount(5);

toHaveFailedCount(count)

Asserts that exactly count evaluations failed.

expect(results).toHaveFailedCount(2);

Examples

Testing Multiple Models

import { runVibeCheck } from '@vibecheck/runner';

describe('Multi-model testing', () => {
  it('should work on multiple models', async () => {
    const results = await runVibeCheck({
      file: './evals/test.yaml',
      models: [
        'anthropic/claude-3.5-sonnet',
        'openai/gpt-4',
        'anthropic/claude-3-haiku'
      ]
    });

    // Results from all models
    expect(results.length).toBeGreaterThan(0);
  });
});

Model Override

import { runVibeCheck } from '@vibecheck/runner';

describe('Model override', () => {
  it('should use specified model', async () => {
    // Override model from YAML
    const results = await runVibeCheck({
      file: './evals/test.yaml',
      model: 'openai/gpt-4'
    });

    expect(results).toHavePassedAll();
  });
});

Programmatic Suite

import { VibeCheckRunner } from '@vibecheck/runner';

const runner = new VibeCheckRunner();

const results = await runner.run({
  suite: {
    metadata: {
      name: 'inline-test',
      model: 'anthropic/claude-3.5-sonnet',
      system_prompt: 'You are a helpful assistant'
    },
    evals: [
      {
        prompt: 'What is 2+2?',
        checks: [
          { match: '*4*' },
          { min_tokens: 1 },
          { max_tokens: 100 }
        ]
      }
    ]
  }
});

TypeScript Support

The package is written in TypeScript and includes full type definitions.

import {
  VibeCheckRunner,
  EvalResult,
  EvalSuite,
  RunOptions,
  RunnerConfig
} from '@vibecheck/runner';

Error Handling

The runner throws descriptive errors:

try {
  const results = await runVibeCheck({
    file: './evals/test.yaml'
  });
} catch (error) {
  if (error instanceof AuthenticationError) {
    console.error('Invalid API key');
  } else if (error instanceof NetworkError) {
    console.error('Cannot connect to API');
  } else if (error instanceof ValidationError) {
    console.error('Invalid YAML format');
  } else {
    console.error('Evaluation failed:', error.message);
  }
}

License

MIT

Links