Skip to main content

This is a CLI chatGPT for Linux with beautiful highlighting gpt-5 with correct syntaxes

Project description

ChatGPT CLI

ChatGPT CLI is a Python-based command-line interface for interacting with ChatGPT using the OpenAI API.

Features

  • 🌐 Multilingual support (English, Russian, Polish)
  • 💾 Save and load conversation history
  • ⚡ Quick-access commands (e.g. q, n, e, r)
  • 🖋️ Formatted output using rich

Installation

  1. installation
pip install naf-chatgpt-cli
# or
git clone https://github.com/nafanius/ChatGptCLI.git
cd chatgptcli
pip install .
# or
poetry install
  1. Set up your OpenAI API key
export GPT_API_KEY=sk_your_key
export SAVE_PATH_GPT_HISTORY=/path/to/your/history # optional, default is saved in user's home directory

Usage

Launch the CLI with:

chatgpt_cli

How it use:

After launching the application, you can start typing your questions or commands. Here are some examples:

Welcome to ChatGPT!
q - exit
n - new topic
0 - reset prefix
00 - reset prefix and start new topic
e - translate to English
p - translate to Polish
rv - translate to Russian and provide usage examples
r - translate to Russian
s - save history conversation
l - load istory conversation
c - clear
h - display help
You:
What is the capital of France?
<tap double enter>

ChatGPT:
The capital of France is Paris.

You:

Available Commands

Command Description
q Quit the application
n Start a new topic
0 Reset prefix (exit translation mode)
00 Reset prefix and start a new topic
e Translate input to English
p Translate input to Polish
r Translate input to Russian
rv Translate to Russian and explain usage with examples in English
s Save conversation history to history.json
l Load conversation history from history.json
c Clear the screen
h Show help message

Dependencies

  • openai
  • rich
  • readline (usually included in Unix-based systems)
  • prompt-toolkit (optional, for enhanced input handling)

License

MIT License

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

naf_chatgpt_cli-0.1.9.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

naf_chatgpt_cli-0.1.9-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file naf_chatgpt_cli-0.1.9.tar.gz.

File metadata

  • Download URL: naf_chatgpt_cli-0.1.9.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.14.0-36-generic

File hashes

Hashes for naf_chatgpt_cli-0.1.9.tar.gz
Algorithm Hash digest
SHA256 262a45678cc4df0f3fefe9cd7d3e3bdfb088ac4b5182e865b40e46b2c934e28d
MD5 b16c3cf6fb21a172ad727716dda8c7ab
BLAKE2b-256 ff0bdcccd8a9ee643d3fa1b0cb0b374a419a0bc6d046f39cd95f109ed59635a7

See more details on using hashes here.

File details

Details for the file naf_chatgpt_cli-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: naf_chatgpt_cli-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.14.0-36-generic

File hashes

Hashes for naf_chatgpt_cli-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 8217fb993d2246ba711761c6f85763e43229e6c2b4500cc7c749b6f1a85d5772
MD5 0f51e435450bde8515e4d0fe183ff556
BLAKE2b-256 e5696037cc8628cb606ff52800bb27a4bb7564f00ee4b3f50b5776335cd8762b

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