This is a CLI chatGPT for Linux with beautiful highlighting gpt-5
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
- installation
pip install naf-chatgpt-cli
# or
git clone https://github.com/nafanius/ChatGptCLI.git
cd chatgptcli
pip install .
# or
poetry install
- 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
openairichreadline(usually included in Unix-based systems)prompt-toolkit(optional, for enhanced input handling)
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file naf_chatgpt_cli-0.1.7.tar.gz.
File metadata
- Download URL: naf_chatgpt_cli-0.1.7.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.8.0-86-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73dd7277b1b4651dd10f6a4acc6485f04f7d7a9028c36ebbc66de717ea148655
|
|
| MD5 |
08d9260c1a681bc5ce88f54d2308a47b
|
|
| BLAKE2b-256 |
3e96013dfef439000703bb79a4f4c3a0ed096e1c9396d2fdb72acd57d265e976
|
File details
Details for the file naf_chatgpt_cli-0.1.7-py3-none-any.whl.
File metadata
- Download URL: naf_chatgpt_cli-0.1.7-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.8.0-86-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eeb44d805f89bfe72c4f67abf07be9510beacb4058447855a36a0aac8247b4f0
|
|
| MD5 |
2ba3e584d04bb3e6496cb3e43ead58c4
|
|
| BLAKE2b-256 |
1ef5399d963b49b4d1f90d7d6e24ec7cd521609ee25e37e668248a64dd2f9a39
|