> ## Documentation Index
> Fetch the complete documentation index at: https://jetify-dependabot-npm-and-yarn-npm-and-yarn-387f502f5a.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Install Testpilot

> Install Testpilot in minutes. Set up the binary and configure your OpenAI API key to start running AI-powered tests.

## Step 1: Install the Testpilot Binary[​](#step-1-install-the-testpilot-binary "Direct link to Step 1: Install the Testpilot Binary")

Install Testpilot by running the following command in your terminal:

```bash theme={null}
curl -fsSL https://get.jetify.com/testpilot | bash
```

This command downloads and installs the Testpilot binary on your system. After installation
completes, you'll be able to use the `testpilot` command.

## Step 2: Set Your OpenAI API Key[​](#step-2-set-your-openai-api-key "Direct link to Step 2: Set Your OpenAI API Key")

Testpilot uses OpenAI's API to generate and run tests. You'll need to set your OpenAI API key as an
environment variable:

```bash theme={null}
export OPENAI_API_KEY=your-api-key-here
```

If you are using a proxy or a different provider for your OpenAI API, you can set the
`OPENAI_BASE_URL` environment variable to point to your API endpoint:

```bash theme={null}
export OPENAI_BASE_URL=https://your-openai-api-endpoint.com
```

You can add this line to your shell profile (`.bashrc`, `.zshrc`, etc.) to make it persistent across
terminal sessions.

If you don't have an OpenAI API key yet, you can get one by:

1. Going to [OpenAI's platform](https://platform.openai.com/)
2. Creating an account or signing in
3. Navigating to the API keys section
4. Creating a new API key

That's it! With these two steps completed, you're ready to start using Testpilot to generate and run
tests for your projects.
