This project provides a Python terminal interface for interacting with OpenAI's ChatGPT.
- Get script suggestions from ChatGPT
- Write and execute generated scripts
- Extensible command system
- Clone the repository:
git clone https://github.com/yourusername/chatgpt-terminal.git cd chatgpt-terminal
- Install the required dependencies:
pip install requests
pip install openai
- Set up the ChatGPT API key as an environment variable:
export CHATGPT_API_KEY="your-chatgpt-api-key-here"
Command Prompt:
setx CHATGPT_API_KEY "your-chatgpt-api-key-here"
[Environment]::SetEnvironmentVariable("CHATGPT_API_KEY", "your-chatgpt-api-key-here", "User")
Replace your-chatgpt-api-key-here with your actual ChatGPT API key.
- Run the script:
python script.py
Enter one of the following commands in the terminal:
!help
: Display the help text.!script
: Generates a script with the provided instruction.!help
: Displays the help text.
!script write a script that reads column A from an excel file and adds in column B the value A/2
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.