promptfoo is a free, open source ai development platforms project written in TypeScript and released under MIT. It has 25,231 GitHub stars, 2,331 forks and 651 open issues, and was last pushed 4 hours ago. On this registry it ranks #32 of 61 tracked projects in AI Development Platforms, with 5 head-to-head comparisons available. It gained 88 stars over the last 3 tracked days.

What is promptfoo?

Promptfoo is an open-source command-line tool and TypeScript library for evaluating and red-teaming large language model applications, aimed at developers, AI engineers, and security teams who need measurable evidence that a prompt, agent, or retrieval-augmented generation pipeline behaves correctly and safely before it reaches users.

What it is

Promptfoo lives in the AI and machine learning tooling ecosystem as an evaluation and red-teaming framework for LLM applications. It is distributed as a CLI and as a library, written in TypeScript and licensed under MIT, with the README describing it as a tool for testing prompts, agents, and RAGs. It is used for automated evaluations, vulnerability scanning, and side-by-side model comparison across providers including OpenAI, Anthropic, Azure, Bedrock, and Ollama.

The concrete problem it replaces is trial-and-error prompt development. Instead of changing a prompt and guessing whether the output improved, a user writes a declarative configuration and runs promptfoo eval to produce scored results, then promptfoo view to inspect them. The same framework covers security: red teaming runs generate security vulnerability reports rather than subjective impressions. Evaluations run locally, so prompts do not leave the machine. Promptfoo is now part of OpenAI and remains open source under the MIT licence, according to the README.

Key capabilities

  • Automated evaluations of prompts and models, driven by declarative configuration files and executed with promptfoo eval.
  • Red teaming and vulnerability scanning for LLM applications, producing security vulnerability reports through the red-team workflow.
  • Side-by-side model comparison across providers such as OpenAI, Anthropic, Azure, Bedrock, and Ollama.
  • CI/CD integration for automated checks, with dedicated documentation for pipeline usage.
  • Code scanning that reviews pull requests for LLM-related security and compliance issues.
  • Command-line and library usage, including a Node.js package for programmatic invocation.
  • Developer-oriented runtime features such as live reload and caching.

Who uses it and how

  • Application teams running LLM features in production use it to gate prompt changes in CI/CD rather than shipping on intuition; the README states it powers LLM apps serving 10M+ users.
  • Security and compliance engineers run red-team scans to surface vulnerabilities before release.
  • Platform engineers compare candidate models from different providers on the same test suite to choose one on metrics instead of gut feel.
  • Maintainers of RAG and agent pipelines use code scanning on pull requests to catch LLM-related security and compliance issues.
  • Teams that require privacy run evaluations locally with their own API keys, keeping prompts on their own machines.

Getting started

Install with npm install -g promptfoo, brew install promptfoo, or pip install promptfoo, or run without installing via npx promptfoo@latest. Then create a project with promptfoo init --example getting-started, export the provider key such as OPENAI_API_KEY, and run promptfoo eval followed by promptfoo view inside the example directory.

How it compares

No list of paid products replaced by this project is provided in the facts, and no comparable tools are named. Promptfoo therefore stands alone in this registry.

When to use it — and when not to

Adopt it when a team needs repeatable, locally executed evals and red-team scanning wired into CI/CD. A self-hoster must operate a Node.js runtime of at least 22.22.0 for npm and npx usage, with Node.js 24 LTS recommended, and must supply API keys for most LLM providers. Teams that cannot manage Node.js runtimes or provider credentials, and anyone expecting a hosted service with no local setup, should look elsewhere; the project also carries a sizeable backlog of 651 open issues.

project readme (upstream, from github) — read inline

Promptfoo: LLM evals & red teaming

npm npm GitHub Workflow Status MIT license Discord

promptfoo is a CLI and library for evaluating and red-teaming LLM apps. Stop the trial-and-error approach - start shipping secure, reliable AI apps.

Website · Getting Started · Red Teaming · Documentation · Discord

Promptfoo is now part of OpenAI. Promptfoo remains open source and MIT licensed. Read the company update.

Quick Start

Requires Node.js >=22.22.0 for npm and npx usage. Node.js 24 LTS is recommended; see the runtime support guide.

npm install -g promptfoo
promptfoo init --example getting-started

Also available via brew install promptfoo and pip install promptfoo. You can also use npx promptfoo@latest to run any command without installing.

Most LLM providers require an API key. Set yours as an environment variable:

export OPENAI_API_KEY=sk-abc123

Once you're in the example directory, run an eval and view results:

cd getting-started
promptfoo eval
promptfoo view

See Getting Started (evals) or Red Teaming (vulnerability scanning) for more.

What can you do with Promptfoo?

  • Test your prompts and models with automated evaluations
  • Secure your LLM apps with red teaming and vulnerability scanning
  • Compare models side-by-side (OpenAI, Anthropic, Azure, Bedrock, Ollama, and more)
  • Automate checks in CI/CD
  • Review pull requests for LLM-related security and compliance issues with code scanning
  • Share results with your team

Here's what it looks like in action:

It works on the command line too:

promptfoo command line

It also can generate security vulnerability reports:

gen ai red team

Why Promptfoo?

  • Developer-first: Fast, with features like live reload and caching
  • Private: LLM evals run 100% locally - your prompts never leave your machine
  • Flexible: Works with any LLM API or programming language
  • Battle-tested: Powers LLM apps serving 10M+ users in production
  • Data-driven: Make decisions based on metrics, not gut feel
  • Open source: MIT licensed, with an active community

Learn More

Contributing

We welcome contributions! Check out our contributing guide to get started.

Join our Discord community for help and discussion.

Frequently asked questions

Is promptfoo free to use?

promptfoo is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does promptfoo do?

Test your prompts, agents, and RAGs. Red teaming/pentesting/vulnerability scanning for AI. Compare performance of GPT, Claude, Gemini, DeepSeek, and more. Simpl

What is promptfoo written in?

promptfoo is primarily written in TypeScript. Its source is publicly available at https://github.com/promptfoo/promptfoo, and it has 25,231 GitHub stars.