promptfoo logo

promptfoo

★★★★★4.4PromptsFreeUpdated 27 Oct 2026

Unit tests for prompts, in the terminal or CI

promptfoo is a CLI that runs prompt and model comparisons against test cases, prints a matrix and fails your build when quality regresses.

promptfoo.dev
promptfoo homepage screenshot

Starter prompts

Copy one into promptfoo and swap the {braces} for your own details.

  • Turn this rough instruction into a reusable prompt with role, context and constraints: {instruction}.
  • Rewrite this prompt to be shorter while keeping the output quality: {prompt}.
  • Give me three prompt variants for {task}, from most to least constrained.

Overview

If you already have a CI pipeline, promptfoo is the lightest way to stop prompt regressions: a YAML file describes prompts, providers and assertions, and the CLI does the rest. It is developer-first — no dashboard account, and the HTML report is generated locally.

Key Features

Matrix comparison

Same test cases across models and prompt variants.

Assertions

Contains, regex, JSON schema and LLM-judge checks.

CI friendly

Exit codes and an offline HTML report.

How to Use

  1. Install with npm and run the init command.
  2. Write test cases and assertions in the YAML config.
  3. Run in CI and review the generated report.

Core Advantages

  • ✓No vendor account
  • ✓Fast to adopt
  • ✓Model-agnostic

Who It's For

DevelopersDevOps teamsPrompt engineers

Pricing & Free Trial

Open sourceIndicative — not yet re-checked

Open source

$0

Everything except the hosted enterprise features

Free tier: MIT-licensed CLI, permanently free.

Prices are indicative — check the current list on promptfoo.dev

Frequently asked questions

What is promptfoo?
promptfoo is a CLI that runs prompt and model comparisons against test cases, prints a matrix and fails your build when quality regresses.
Is there a free plan for promptfoo?
MIT-licensed CLI, permanently free.
How much does promptfoo cost?
promptfoo uses a open source model — see the pricing section for the plans we have on file.
What can promptfoo do?
Its headline capabilities: matrix comparison; assertions; CI friendly.
Who is promptfoo for?
It is aimed at developers, DevOps teams, prompt engineers.

Our Verdict

The cheapest quality insurance in this list if your team lives in a terminal.

Community rating

—
0 ratings

Tap a star to rate this tool

More like this

Compare promptfoo with alternatives

Put promptfoo next to its closest rivals — ratings, free tiers and entry prices in one table:

  • Prompt Engineering Guide logoPrompt Engineering Guide★ 4.5
  • Learn Prompting logoLearn Prompting★ 4.5
  • PromptLayer logoPromptLayer★ 4.4
Open the comparison table