pAIpe: Your LLM shell assistant
pAIpe is a command-line tool designed to streamline your interactions with Large Language Models (LLMs). It provides a flexible and configurable pipeline to process text input through various LLM providers and models, managed through profiles for ease of use and customization.
Features
- Command-Line Interface: Simple and intuitive CLI for interacting with LLMs directly from your terminal.
- Profile-Based Configuration: Define and manage multiple LLM configurations (profiles) in a
paipe.yamlfile, allowing you to switch between different providers, models, and settings effortlessly. - Streaming Output: Supports streaming responses from LLMs for a more interactive and real-time experience.
- Input from Stdin or File: Read input text from standard input for quick prompts or from files for processing larger documents.
- Extendable Configurations: Designed to be easily extended with new LLM providers and models by modifying the configuration file.
Installation
# install with openai protocol supported
python -m pip install -U paipe[openai]
# install with all protocol supported
python -m pip install -U paipe[all]
Or install using uv(run with uvx paipe):
# install with openai protocol supported
uv tool install -U paipe[openai]
# install with all protocol supported
uv tool install -U paipe[all]
Configuration
paipe is configured using a paipe.yaml file. This file should be placed in one of the following locations (in order of priority):
- Current directory (
./paipe.yaml) - User local directory (
~/.local/share/paipe/paipe.yaml) - System configuration directory (
/etc/paipe.yaml)
If no paipe.yaml is found in these locations, paipe will prompt an error message and exit.
Here's an example of a paipe.yaml configuration file(access api via openrouter):
default:
protocol: openai
api_key: 'YOUR_OPENROUTER_API_KEY_HERE' # Replace with your actual API key
base_url: 'https://openrouter.ai/api/v1'
model: 'deepseek/deepseek-chat:free'
deepseek-r1:
protocol: openai
api_key: 'YOUR_OPENROUTER_API_KEY_HERE' # Replace with your actual API key
base_url: 'https://openrouter.ai/api/v1'
model: 'deepseek/deepseek-r1:free'
Each section in the paipe.yaml file defines a profile. Here's a breakdown of the profile settings:
protocol: Specifies the LLM API protocol. Currently,paipeis configured to useopenaiwhich can interface with various providers through platforms like OpenRouter or directly with specific APIs.api_key: Your API key for the chosen provider. Replace the placeholder'YOUR_API_KEY_HERE'with your actual API key.base_url: The API base URL for the provider. For OpenRouter, it's typically'https://openrouter.ai/api/v1'.model: The specific LLM model to use from the provider. The available models depend on your chosen provider and API key access. Examples include'google/gemini-2.0-pro-exp-02-05:free','qwen2-72b-instruct','deepseek/deepseek-r1:free', etc.
Usage
Basic usage:
paipe <prompt>
This will execute paipe with the <prompt> you provide, using the default profile defined in your paipe.yaml and stream the response to your terminal.
cat essay.txt | paipe --profile deepseek-r1 "write a summary of the following text:"
This will read the content of essay.txt and send it to the deepseek-r1 profile for processing.
paipe --list
This will list all the available profiles defined in your paipe.yaml file.
License
paipe is released under the MIT License. See the LICENSE file for more details.
Metadata
Release files for paipe 0.1.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| paipe-0.1.17.tar.gz | 16.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| paipe-0.1.17-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.8 kB
Release files / paipe-0.1.17.tar.gz
| Download URL | paipe-0.1.17.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
67e96ec6a929a2e3a14db4e6be1fe3c3695e4a9a7cae26ec9e31f6577d1c76a2
|
|
BLAKE2b-256 checksum How to use checksums |
c5301fae447a58ecd1ced2e0f31f4206beb2adc70b7604693c7bd0bea7bcf25d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.20
|
Release files / paipe-0.1.17-py3-none-any.whl
| Download URL | paipe-0.1.17-py3-none-any.whl |
|---|---|
| Size | 22.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a7bf46e180bab152b02fd90dbcf92e4950c2594ce1dd4c4ae2672e0bbd2ce6f
|
|
BLAKE2b-256 checksum How to use checksums |
139949cc0e3a23768f467293aaf58c5a818e358b1fc554938199a85b6881d229
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.20
|