Metadata-Version: 2.4
Name: naf_chatgpt_cli
Version: 0.1.9
Summary: This is a CLI chatGPT for Linux with beautiful highlighting gpt-5 with correct syntaxes 
License-File: LICENSE
Author: ilin
Author-email: fizruk.ilin@gmail.com
Requires-Python: >=3.9
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: anyio (==4.9.0)
Requires-Dist: certifi (==2025.4.26)
Requires-Dist: distro (==1.9.0)
Requires-Dist: h11 (==0.16.0)
Requires-Dist: httpcore (==1.0.9)
Requires-Dist: httpx (==0.28.1)
Requires-Dist: idna (==3.10)
Requires-Dist: jiter (==0.9.0)
Requires-Dist: markdown-it-py (==3.0.0)
Requires-Dist: mdurl (==0.1.2)
Requires-Dist: openai (==1.76.2)
Requires-Dist: prompt-toolkit (>=3.0.52,<4.0.0)
Requires-Dist: pydantic (==2.11.4)
Requires-Dist: pydantic-core (==2.33.2)
Requires-Dist: pygments (==2.19.1)
Requires-Dist: rich (==14.0.0)
Requires-Dist: sniffio (==1.3.1)
Requires-Dist: tqdm (==4.67.1)
Requires-Dist: typing-extensions (==4.13.2)
Requires-Dist: typing-inspection (==0.4.0)
Description-Content-Type: text/markdown

# 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**

```bash
pip install naf-chatgpt-cli
# or
git clone https://github.com/nafanius/ChatGptCLI.git
cd chatgptcli
pip install .
# or
poetry install

```

2. **Set up your OpenAI API key**

```bash
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:

```bash
chatgpt_cli
```

### How it use:

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

```bash
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`](https://pypi.org/project/openai/)
- [`rich`](https://pypi.org/project/rich/)
- `readline` (usually included in Unix-based systems)
- `prompt-toolkit` (optional, for enhanced input handling)

## License

MIT License

