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):
pipx install pipe-pai-tool
Or with pip:
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:
export OPENAI_API_KEY="your_api_key_here"
Optionally, set a default model using the PAI_MODEL environment variable:
export PAI_MODEL="gpt-4"
Usage
Pipe a prompt to pai and receive the model's response on stdout:
echo "Write a haiku about the sea" | pai
Alternatively, specify a different model or API key:
echo "Tell me a joke" | pai --model gpt-4 --api-key $OPENAI_API_KEY
Chat mode
By default, pai runs in the pipe mode with no chat history.
You can enter an interactive multi-turn chat by:
pai --chat
> Write a poem about the moon
--------------------
<AI response displayed here>
To exit chat mode, send an empty prompt press ctrl+c or type q, exit, or quit.
Metadata
Release files for pipe-pai-tool 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pipe_pai_tool-0.1.3.tar.gz | 3.9 kB | Without provenance | Details for pipe_pai_tool-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pipe_pai_tool-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for pipe_pai_tool-0.1.3-py3-none-any.whl |
Total release size: 8.4 kB
Release files / pipe_pai_tool-0.1.3.tar.gz
| Download URL | pipe_pai_tool-0.1.3.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73fb8cb861e68f32e2b9055d0e3d4bee911f3de99e75e5b5b98b0eba50aeece8
|
|
BLAKE2b-256 checksum How to use checksums |
60ddc9627d8cfd45508621cc541dd478e2ea6946c51242f2a955c94715a2484f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.13
|
Release files / pipe_pai_tool-0.1.3-py3-none-any.whl
| Download URL | pipe_pai_tool-0.1.3-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3445b64c9c7a952589c56218683c264ee6c3bf3cc5d8a3a2dfb469cef1956253
|
|
BLAKE2b-256 checksum How to use checksums |
85c7f966c4ad7c3bef2195f626aed97d94a4ea05bc490edd1e75cd0ab9063cfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.13
|
Security for pipe-pai-tool 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.