Metadata-Version: 2.4
Name: pipe-pai-tool
Version: 0.1.2
Summary: pipe-pai is a simple command-line tool that allows you to interact with OpenAI models through Unix pipes
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openai>=0.27.0
Requires-Dist: typer>=0.16.0
Dynamic: license-file

# pipe-pai
pipe-pai is a simple command-line tool that allows you to interact with OpenAI models through Unix pipes.
Use it like this: `... | pai` - hence the name "pipe-pie".

## Installation

Install via pipx (recommended):

```bash
pipx install pipe-pai-tool
```

Or with pip:

```bash
pip install pipe-pai-tool
```

Or locally:
```
git clone git@github.com:krzysztofarendt/pai.git
cd pai
pipx install .
```

Ensure your OpenAI API key is set in the environment:

```bash
export OPENAI_API_KEY="your_api_key_here"
```

## Usage

Pipe a prompt to `pai` and receive the model's response on stdout:

```bash
echo "Write a haiku about the sea" | pai
```

Specify a different model or API key:

```bash
echo "Tell me a joke" | pai --model gpt-4 --api-key $OPENAI_API_KEY
```
