Installation
Requirements
- Node.js 18 or newer (including Node.js 20, 22, and 24)
- Supported operating systems: macOS, Linux, Windows
Installation Methods
For Command-Line Usage
Using npm (recommended)
Install promptfoo
globally using npm:
npm install -g promptfoo
Or use npx
to run promptfoo
directly without installation:
npx promptfoo@latest
Using Homebrew
If you prefer using Homebrew, you can install promptfoo with:
brew install promptfoo
For Library Usage
Install promptfoo
as a library in your project:
npm install promptfoo