Skip to main content

pipe-pai is a simple command-line tool that allows you to interact with OpenAI models through Unix pipes

Project description

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"

Usage

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

echo "Write a haiku about the sea" | pai

Specify a different model or API key:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pipe_pai_tool-0.1.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pipe_pai_tool-0.1.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file pipe_pai_tool-0.1.1.tar.gz.

File metadata

  • Download URL: pipe_pai_tool-0.1.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pipe_pai_tool-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2046eccf2b269b4da84236a015739e3af3ed664dbf96a81b35380dcdadc8f670
MD5 0a85aa23de5562a19ec962aade8aff6c
BLAKE2b-256 657e97367e348f3d03824e1db81800d63e0be3513cc58b45a7db51621439b5b7

See more details on using hashes here.

File details

Details for the file pipe_pai_tool-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pipe_pai_tool-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pipe_pai_tool-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 68332901a3008248f4e7bb71f2d47916a9f81ed23ebaa357f762abf59c1f4dc7
MD5 1c2f88dcf8857e6ecd3eebf6b0b5e90a
BLAKE2b-256 c3936eaa0ccdd1216d7965d4a8d67691bd79ba116cc9c0204c9b79bb8e10f1e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page