Shell-GPT is a terminal-based chatbot using OpenAI's powerful GPT-3.5-turbo model. This project allows you to interact with the model directly from your terminal. It also includes syntax highlighting for Python code in the chat responses.
- Interactive chat with GPT-3.5-turbo from your terminal.
- Python code syntax highlighting for improved readability.
- Ability to pass a question as a command line argument.
- Python 3.7 or later
- OpenAI Python package
- Pygments package for Python code highlighting
- Colored package for colored terminal text
- Dotenv package for environment variable management
-
Clone the repository:
git clone https://github.com/yourusername/shell-gpt.git
-
Navigate to the project directory:
cd shell-gpt
-
Install the requirements:
pip install -r requirements.txt
-
Set up your OpenAI API key in a
.env
file in the project root directory. The key should be assigned to theOPENAI_API_KEY
variable. For example:OPENAI_API_KEY=yourapikey
To start a chat, simply run:
python shell_gpt.py
Contributions, issues, and feature requests are welcome!