Installation
Requirements
- Node.js 18 or newer
- 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
Verify Installation
To verify that promptfoo is installed correctly, run:
promptfoo --version
This should display the version number of promptfoo.
Next Steps
After installation, you can start using promptfoo by running:
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.