Installation
Requirements
- Node.js 18 or newer
- Supported operating systems: macOS, Linux, Windows
For Command-Line Usage
Install promptfoo using npx, npm, or brew:
- npm
- npx
- brew
npm install -g promptfoo
npx promptfoo@latest
brew install promptfoo
For Library Usage
Install promptfoo
as a library in your project:
npm install promptfoo --save
Verify Installation
To verify that promptfoo is installed correctly, run:
- npm
- npx
- brew
promptfoo --version
npx promptfoo@latest --version
promptfoo --version
This should display the version number of promptfoo:
0.114.7
Run Promptfoo
After installation, you can start using promptfoo by running:
- npm
- npx
- brew
promptfoo init
npx promptfoo@latest init
promptfoo init
This will create a promptfooconfig.yaml
placeholder in your current directory.
For more detailed usage instructions, please refer to our Getting Started guide.