A CLI python program that uses the OpenAI API to respond to user's request for assistance like a hacker from an 80s movie.
- Python 3.8 or higher
- Python packages: openai, python-dotenv
- OpenAI API Key
-
Clone the repository
git clone
-
Install the dependencies
pip install -r requirements.txt
-
Rename the
.env.example
file to.env
and add your OpenAI API keyOPENAI_API_KEY=your_api_key_here
-
(Optional) Add to bash etc.
Modify .bash_profile (or .bashrc, .zshrc, etc.) to include the following function:
function hacker() { python '/path/to/hacker.py' "$@" }
Or create an alias:
alias hacker="python '/path/to/hacker.py'"
-
Run the program
hacker <your_request_here>
Or, if you did't add the function/alias to your bash profile:
python /path/to/hacker.py <your_request_here>
After a receiving a response, you can enter a new request or type
exit
,quit
, orq
to quit.