CLI tool for interacting with OpenAI's ChatGPT
Top 18.4% on sourcepulse
This tool provides a powerful command-line interface for interacting with OpenAI's ChatGPT models, designed for developers and power users who need to integrate AI into their workflows. It streamlines complex interactions by allowing piped input, session management, and flexible output formatting, significantly enhancing productivity when working with LLMs from the terminal.
How It Works
Chatblade acts as a sophisticated wrapper around the OpenAI API, accepting input via standard input, arguments, or both. It supports conversation history management through named sessions, allowing users to maintain context across multiple interactions. The tool offers granular control over model selection (including GPT-3.5, GPT-4, and GPT-4o variants) and output processing, with options to extract raw text, code blocks, or JSON directly from responses.
Quick Start & Requirements
pip install chatblade
or brew install chatblade
OPENAI_API_KEY
environment variable or passed via --openai-api-key
).Highlighted Details
-S
) and a default last
session (-l
).-e
.-p
for tailored AI behavior.-t
.Maintenance & Community
The project is actively maintained by npiv. Further community engagement details are not explicitly provided in the README.
Licensing & Compatibility
The project appears to be licensed under the MIT License, permitting commercial use and integration with closed-source projects.
Limitations & Caveats
The streaming output is noted as experimental. Configuration for Azure OpenAI requires specific environment variables (OPENAI_API_TYPE
, AZURE_OPENAI_ENDPOINT
, OPENAI_API_AZURE_ENGINE
) which override model selection flags.
9 months ago
1 day