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.2.tar.gz (2.9 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.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pipe_pai_tool-0.1.2.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.13

File hashes

Hashes for pipe_pai_tool-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2d4de34c74e093bc60c8233dbb4292071fa845f5534bbb18f4c4a235a142419f
MD5 418c4411af7c0aab7f648f2d77e0e0e8
BLAKE2b-256 858f5b706ee4b2946fa342dfd71d2460f8ffb1ac65789af7219325a4355a7f85

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pipe_pai_tool-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 967f3f13029c11d0ab0c9e0c1eafb4dea5f69503be0515649a3a9093ea066b63
MD5 db090e0e82f390377900d1302586893a
BLAKE2b-256 8886859909fb72e564adedbea4137459b034e640d23deda0f7dfddd6eb4aaab9

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