Skip to main content

Installation

Requirements

  • Node.js 20.20+ or 22.22+
  • Supported operating systems: Windows, Mac, Linux

For Command-Line Usage

Install promptfoo using npm, npx, or Homebrew (Mac, Linux):

npm install -g 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:

promptfoo --version

This should display the version number of promptfoo:

0.120.20

Run Promptfoo

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.

See Also