Skip to main content

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
    • GPTAuthError
    • GPTQuotaError
    • GPTModelError

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

Download files

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

Source Distribution

gpt_cli_env-1.0.3.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

gpt_cli_env-1.0.3-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file gpt_cli_env-1.0.3.tar.gz.

File metadata

  • Download URL: gpt_cli_env-1.0.3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for gpt_cli_env-1.0.3.tar.gz
Algorithm Hash digest
SHA256 452e04c10227619b1d66fece79fd29271e706733e931e6d7a468fb2ca2921506
MD5 ead8ef21d1e1c73d1d450d03b065375e
BLAKE2b-256 a03172c9888f1cfa253c866d9d3738df8baaa0d9f769532d4fe69b8de5645689

See more details on using hashes here.

File details

Details for the file gpt_cli_env-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: gpt_cli_env-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for gpt_cli_env-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 402363908fc96d47c4647430f2a1e4d273185420c83b15b3c2c520002b36a4ad
MD5 668674270d15875079e37c2f75892e44
BLAKE2b-256 3f5158b5ed12c8fba8e8230b11b64c3cead1f5aa8ac46f721ee0dd51030e2008

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 Sentry Error logging StatusPage Status page