GPT CLI
A Python SDK and command-line interface for interacting with OpenAI models.
Features
- 🚀 Command-line interface (
gpt) - 🐍 Python SDK (
import gpt) - 🔑 Secure API key configuration
- 🤖 Model selection
- ⚙️ JSON-based configuration storage
- 🐛 Verbose/debug logging
- 🌡️ Temperature control
- 📏 Output token limits
- ❌ Custom error handling
GPTAuthErrorGPTQuotaErrorGPTModelError
Installation
pip install gpt-cli-env
Note: You will need an OpenAI API key to use this package.
CLI Usage
Initialize GPT CLI:
gpt --init
Ask a question:
gpt "Hi, how are you?"
Verbose mode:
gpt --verbose --init
Show the version:
gpt --version
Show information:
gpt --info
Show help:
gpt --help
Python SDK
import gpt
prompt = input("Enter your prompt: ")
response = gpt.send_prompt(
prompt=prompt,
api_key="sk-XXXXXXXXXXXXXXXXXXXX"
)
print(response)
Other Projects
Check out my other project:
- ter-fx – A terminal utility library for colorful output, logging, and CLI tools.
Author
Created with ❤️ using Python.
Faizan-ur-Rahim
Metadata
Release files for gpt-cli-env 1.0.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 | |
|---|---|---|---|
| gpt_cli_env-1.0.3.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gpt_cli_env-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.6 kB
Release files / gpt_cli_env-1.0.3.tar.gz
| Download URL | gpt_cli_env-1.0.3.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
452e04c10227619b1d66fece79fd29271e706733e931e6d7a468fb2ca2921506
|
|
BLAKE2b-256 checksum How to use checksums |
a03172c9888f1cfa253c866d9d3738df8baaa0d9f769532d4fe69b8de5645689
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / gpt_cli_env-1.0.3-py3-none-any.whl
| Download URL | gpt_cli_env-1.0.3-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
402363908fc96d47c4647430f2a1e4d273185420c83b15b3c2c520002b36a4ad
|
|
BLAKE2b-256 checksum How to use checksums |
3f5158b5ed12c8fba8e8230b11b64c3cead1f5aa8ac46f721ee0dd51030e2008
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|