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

mandoline-ci

v0.2.3

Published

Extend CI with Custom Code Evals

Downloads

12

Readme

Mandoline CI

Extend CI with Custom Code Evals using the Mandoline API.

Quick Start

Setup

Get your API key from mandoline.ai and configure it based on your usage:

Configure

Create a configuration file (mandoline-ci.config.js) that defines which files to evaluate and what metrics to apply:

export default [
  {
    name: 'src',
    files: ['src/**/*.ts', '!src/**/*.test.ts', '!src/**/*.spec.ts'],
    ignores: ['src/__tests__/**/*'],
    rules: {
      'architecture-consistency': {
        metricId: '4cb434d4-c012-48ac-9a40-19b92d73450e',
        threshold: 0.1,
      },
      'error-regressions': {
        metricId: 'c7efb63f-3b6d-4b32-9dc6-04bddc8ebabc',
        threshold: 0.2,
        scoreObjective: 'minimize', // lower score indicates fewer regressions
      },
      // and so on...
    },
  },
];

Omit scoreObjective to use the default 'maximize' behavior (higher scores pass). Set it to 'minimize' when Mandoline should treat lower scores as better.

See this repo's configuration for a complete example.

Use

In CI

Add MANDOLINE_API_KEY as a repository secret in Settings > Secrets and variables > Actions, then add as a job in your CI workflow.

For example, to add as a job that runs after tests pass:

jobs:
  test:
    # Your existing test job
    runs-on: ubuntu-latest
    steps:
      # ... your test steps

  mandoline-eval:
    name: Mandoline Evaluation
    runs-on: ubuntu-latest
    needs: test
    if: success()

    steps:
      - name: Checkout code
        uses: actions/checkout@v4
        with:
          fetch-depth: 0 # Required for git diff analysis between base and head

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '18'
          cache: 'npm'

      - name: Install dependencies
        run: npm ci

      - name: Build project
        run: npm run build

      - name: Run Mandoline evaluation
        env:
          MANDOLINE_API_KEY: ${{ secrets.MANDOLINE_API_KEY }}
        run: npx mandoline-ci run --verbose

See this repo's CI workflow for a complete example.

Via CLI

Install globally and set your API key, then run for local development or manual evaluation:

npm install -g mandoline-ci
export MANDOLINE_API_KEY="sk_****"
# Basic evaluation
mandoline-ci run

# Custom branches
mandoline-ci run --base develop --head feature/auth

# Explicitly specify intent
mandoline-ci run --intent "Implement user authentication"

# Validate setup
mandoline-ci validate

# Debug mode
mandoline-ci run --verbose

Programmatically

Install as a dependency and configure the client:

import { MandolineCI } from 'mandoline-ci';

const client = new MandolineCI({
  apiKey: 'sk_****', // or omit and set MANDOLINE_API_KEY env var
  workingDirectory: '/path/to/project',
});

const results = await client.evaluateDiff({
  base: 'main',
  head: 'HEAD',
  intent: 'Implement user authentication',
});

License

Apache 2.0