Tentang
GPTX: AI chatbot for natural language conversations
AI dan pembelajaran mesinYang dapat Anda lakukan
- π¬ - Streamed answers - Chat Completions stream token-by-token into the terminal - no long silent waits
- π§ - Modern chat models - gpt-4o-mini default; any OpenAI chat model via config
- π¨ - Premium color theme - Custom violet-gold rich palette with live generation indicators
- π‘οΈ - Error containment - A failed API call reports and returns to the prompt - the loop never crashes out
Pertumbuhan bintang terukur
- dalam 24 jam
- 0
- dalam 7 hari
- 0
- dalam 15 hari
- 0
- dalam 1 bulan
- 0
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
Asliβ€ G P T X β€
ChatGPT in your terminal - one prompt loop, streamed answers, zero web UI.
π Table of Contents
- π― Why GPTX?
- π§ What It Does
- π Quick Start
- π¦ Installation
- β¨ Features
- β¨οΈ Usage
- βοΈ Configuration
- π§° Tech Stack
- β οΈ Disclaimer
- π€ Contributing
- π License
- π¨βπ» Developer
π― Why GPTX?
Everything you need from ChatGPT fits into one terminal loop: type a question, get the answer, repeat. GPTX is that loop - no browser tabs, no API playground, no framework.
v2.0 modernizes the engine. Built on the OpenAI SDK v1+ Chat Completions API (
gpt-4o-minidefault), replies stream into the terminal as they generate, wrapped in a premium violet-gold rich theme with per-loop error containment and fail-fast config validation. Setup detects Termux and four Linux package-manager families automatically, and verifies every dependency before claiming success.
π§ What It Does
| # | Step | What happens |
|---|---|---|
| 1οΈβ£ | Ask | You type a question in the terminal (β You βΊ) |
| 2οΈβ£ | Stream | The OpenAI chat model replies, printing token-by-token (β GPTX βΊ) |
| 3οΈβ£ | Loop | Ask again, exit / bye when done - Ctrl+C / Ctrl+D also exit cleanly |
What this tool is NOT: it is not a group-bot platform, not a reseller frontend, and not a way around OpenAI's usage policies - you are responsible for what you ask.
π Quick Start
git clone https://github.com/MrHacker-X/GPTX.git
cd GPTX
./setup.sh # installs deps (Termux / apt / dnf / pacman / apk)
nano config.py # or: export OPENAI_API_KEY="sk-..."
python3 gptx.py # chat loop starts
π Where do I get an API key?
Create one at platform.openai.com/api-keys - every question is billed to that key, so keep it private.
π¦ Installation
Termux (Android)
apt update -y && apt install git -y
git clone https://github.com/MrHacker-X/GPTX.git
cd GPTX
chmod +x setup.sh
./setup.sh
Desktop Linux / macOS
git clone https://github.com/MrHacker-X/GPTX.git
cd GPTX
./setup.sh # or: pip install -r requirements.txt
Supported Systems
| OS | Status | Notes |
|---|---|---|
| π± Termux (Android) | β Fully supported | Auto-detected |
| π§ Debian / Ubuntu / Kali | β Fully supported | apt detected automatically |
| π§ Fedora / RHEL | β Fully supported | dnf detected automatically |
| π§ Arch / Manjaro | β Fully supported | pacman detected automatically |
| π§ Alpine | β Fully supported | apk detected automatically |
| π macOS | β Fully supported | pip-only path, needs Python preinstalled |
π‘ The setup script verifies every dependency at the end and tells you exactly what's missing - it will never print "installed successfully" when it isn't.
β¨ Features
| Feature | Description | |
|---|---|---|
| π¬ | Streamed answers | Chat Completions stream token-by-token into the terminal - no long silent waits |
| π§ | Modern chat models | gpt-4o-mini default; any OpenAI chat model via config |
| π¨ | Premium color theme | Custom violet-gold rich palette with live generation indicators |
| π‘οΈ | Error containment | A failed API call reports and returns to the prompt - the loop never crashes out |
| π©Ή | Fail-fast validation | Missing API key β one clear line at startup, no stack trace |
| π§Ή | Clean exits | exit, bye, Ctrl+C and Ctrl+D all leave gracefully |
| π | Env-var credentials | Key supplied via config.py placeholder or environment variables β a real key never ships in the repo |
| πͺΆ | Minimal dependencies | 2 packages: openai, rich |
β¨οΈ Usage
Run the tool, ask anything:
python3 gptx.py
| Input | Result |
|---|---|
| any question | e.g. explain DNS in one paragraph β streamed GPTX answer |
| empty input | Gentle hint, loop continues |
exit or bye |
Exits with links to the developer's channels |
| Ctrl+C / Ctrl+D | Same clean exit - no traceback |
βοΈ Configuration
Everything lives in config.py - and every setting can be overridden from the shell:
| Setting | Env var | Default | Description |
|---|---|---|---|
| API key | OPENAI_API_KEY |
(required) | Your OpenAI API key (key inside config.py) |
| Model | GPTX_MODEL |
gpt-4o-mini |
Any OpenAI chat model |
| Max tokens | GPTX_MAX_TOKENS |
1024 |
Length cap per reply |
# either edit config.py, or:
export OPENAI_API_KEY="sk-..."
export GPTX_MODEL="gpt-4o"
π§° Tech Stack
| Layer | Technology |
|---|---|
| Language | Python 3.8+ |
| AI | openai SDK v1+ β streamed Chat Completions |
| Terminal UI | rich β custom violet/gold theme (truecolor, graceful degradation) |
| Setup | POSIX bash with 5 environment detections |
β οΈ Disclaimer
Read this before using GPTX.
- You pay per token. Every question is billed to your OpenAI key. Keep the key private and the token cap sane.
- OpenAI's policies apply. Your prompts must comply with OpenAI's usage policies - you are responsible for what you ask.
- Personal use. GPTX is a personal assistant tool, not a service for third parties.
- No warranty. Provided "as is", with no warranty of any kind. The author is not liable for any misuse, cost, or damage resulting from its use.
π€ Contributing
Contributions are welcome!
# 1. fork it
# 2. create your branch
git checkout -b feature/amazing-feature
# 3. commit
git commit -m "Add amazing feature"
# 4. push
git push origin feature/amazing-feature
# 5. open a Pull Request
Ideas worth exploring: per-session conversation memory, markdown rendering for code-heavy answers, a /clear command, one-shot --ask "..." CLI mode for scripts.
π License
Distributed under the MIT License. See the LICENSE file for the full text.
π¨βπ» Developer
| Dev | MrHacker-X |
| GitHub | github.com/MrHacker-X |
| [email protected] | |
| Website | vritrasec.com |
| Network | link.vritrasec.com |
β Star the repo if GPTX answered you well β
Built by MrHacker-X - chat power, terminal simplicity.
Jelajahi proyek terkait
Memuatβ¦