You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> This is a lightweight wrapper that installs promptfoo via `pip`. It requires **Node.js 18+** and executes `npx promptfoo@latest` under the hood.
16
+
>
17
+
> **💡 If you have Node.js installed**, we recommend using `npx promptfoo@latest` directly for better performance:
18
+
>
19
+
> ```bash
20
+
> npx promptfoo@latest init
21
+
> npx promptfoo@latest eval
22
+
>```
23
+
>
24
+
> See the [main project](https://github.com/promptfoo/promptfoo) for the official npm package.
25
+
>
26
+
>**🐍 Use this pip wrapper when you:**
27
+
>
28
+
> - Need to install via `pip`for Python-only CI/CD environments
29
+
> - Want to manage promptfoo with poetry/pipenv/pip alongside Python dependencies
30
+
> - Work in environments where pip packages are easier to approve than npm
31
+
32
+
---
33
+
34
+
<p align="center">
35
+
<code>promptfoo</code> is a developer-friendly local tool for testing LLM applications. Stop the trial-and-error approach - start shipping secure, reliable AI apps.
-**Node.js 18+** (to run the actual promptfoo CLI)
51
+
- **Node.js 18+** (required to run promptfoo)
24
52
25
53
### Install from PyPI
26
54
27
55
```bash
28
56
pip install promptfoo
29
57
```
30
58
31
-
This Python package is a lightweight wrapper that calls the official promptfoo CLI via `npx`.
59
+
### Alternative: Use npx (Recommended)
32
60
33
-
### Verify Installation
61
+
If you have Node.js installed, you can skip the wrapper and use npx directly:
34
62
35
63
```bash
36
-
# Check that Node.js is installed
37
-
node --version
38
-
39
-
# Run promptfoo
40
-
promptfoo --version
64
+
npx promptfoo@latest init
65
+
npx promptfoo@latest eval
41
66
```
42
67
68
+
This is faster and gives you direct access to the latest version.
69
+
43
70
## Quick Start
44
71
45
72
```bash
46
-
# Initialize a new project
73
+
# Install
74
+
pip install promptfoo
75
+
76
+
# Initialize project
47
77
promptfoo init
48
78
49
-
# Run an evaluation
79
+
# Run your first evaluation
50
80
promptfoo eval
81
+
```
51
82
52
-
# Start red teaming
53
-
promptfoo redteam run
83
+
See [Getting Started](https://www.promptfoo.dev/docs/getting-started/) (evals) or [Red Teaming](https://www.promptfoo.dev/docs/red-team/) (vulnerability scanning) for more.
54
84
55
-
# View results in the web UI
56
-
promptfoo view
57
-
```
85
+
## What can you do with Promptfoo?
58
86
59
-
## Usage
87
+
-**Test your prompts and models** with [automated evaluations](https://www.promptfoo.dev/docs/getting-started/)
88
+
-**Secure your LLM apps** with [red teaming](https://www.promptfoo.dev/docs/red-team/) and vulnerability scanning
89
+
-**Compare models** side-by-side (OpenAI, Anthropic, Azure, Bedrock, Ollama, and [more](https://www.promptfoo.dev/docs/providers/))
90
+
-**Automate checks** in [CI/CD](https://www.promptfoo.dev/docs/integrations/ci-cd/)
91
+
-**Review pull requests** for LLM-related security and compliance issues with [code scanning](https://www.promptfoo.dev/docs/code-scanning/)
92
+
-**Share results** with your team
60
93
61
-
The `promptfoo` command behaves identically to the official Node.js CLI. All arguments are passed through:
94
+
Here's what it looks like in action:
62
95
63
-
```bash
64
-
# Get help
65
-
promptfoo --help
96
+

0 commit comments