
promptfoo
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.

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
- Install with npm and run the init command.
- Write test cases and assertions in the YAML config.
- Run in CI and review the generated report.
Core Advantages
- ✓No vendor account
- ✓Fast to adopt
- ✓Model-agnostic
Who It's For
Pricing & Free Trial
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
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★ 4.5
Learn Prompting★ 4.5
PromptLayer★ 4.4