Test your prompts, agents, and RAGs. Red teaming/pentesting/vulnerability scanning for AI. Compare performance of GPT, Claude, Gemini, Llama, and more. Simple declarative configs with command line and CI/CD integration. https://promptfoo.dev
  • TypeScript 96.8%
  • CSS 1.7%
  • JavaScript 1.1%
  • Python 0.2%
  • HTML 0.1%
Find a file
2026-09-04 11:22:16 -07:00
.agents
.claude
.claude-plugin
.cursor
.devcontainer
.github feat(providers): add GPT-6 Astra support (#10625) 2026-09-03 23:54:51 -07:00
.husky
.vscode
architecture
code-scan-action
docs
drizzle
examples fix(providers): support Abliteration Large V2 reasoning (#10615) 2026-09-04 00:55:20 -07:00
helm/chart/promptfoo
plugins
scripts
site fix: guard empty drift stats and clarify provider options (#10645) 2026-09-04 11:22:16 -07:00
src fix: guard empty drift stats and clarify provider options (#10645) 2026-09-04 11:22:16 -07:00
test fix: guard empty drift stats and clarify provider options (#10645) 2026-09-04 11:22:16 -07:00
tools/biome
.biomeignore
.dockerignore
.git-blame-ignore-revs
.gitignore
.mailmap
.npmignore
.npmrc
.nvmrc
.prettierignore
.prettierrc.yaml
.release-please-manifest.json
.rubocop.yml
.ruff.toml
AGENTS.md
biome.jsonc chore(deps): update dependency @biomejs/biome to v2.5.10 (#10564) 2026-08-31 23:25:35 -07:00
CHANGELOG.md
CITATION.cff
CLAUDE.md
CODE_OF_CONDUCT.md
codecov.yml
CONTRIBUTING.md
Dockerfile
drizzle.config.ts
knip.jsonc
LICENSE
package-lock.json chore(deps): update dependency @rollup/rollup-linux-x64-gnu to v4.63.0 (#10633) 2026-09-04 09:17:13 -07:00
package.json chore(deps): update dependency @rollup/rollup-linux-x64-gnu to v4.63.0 (#10633) 2026-09-04 09:17:13 -07:00
pnpm-workspace.yaml
README.md
release-please-config.json ci(release): advance release-please drift floor (#10579) 2026-08-31 23:36:45 -07:00
renovate.json docs(site): replace framer-motion with motion (#10590) 2026-08-31 23:41:40 -07:00
SECURITY.md
tsconfig.json
tsdown.config.ts
vitest.config.ts
vitest.integration.config.ts
vitest.setup.ts
vitest.smoke.config.ts

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:

prompt evaluation matrix - web viewer

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.