code-genie-cli
code-genie-cli copied to clipboard
Uses OpenAI's GPT API to turn natural language into Python code and execute it on your desktop.
code-genie-cli
Uses OpenAI's GPT API to get a helpful assistant within your terminal. Genie can suggest code executions that will be directly run after confirmation from the user. Forget the command to mount a drive? Simply ask code-genie-cli to do it for you!
https://user-images.githubusercontent.com/5624120/230372901-30a12d9d-303f-42dc-b39c-7a4df33094bc.mp4
Installation
This project now only has python related depenencies and should work on both Windows and Unix. However everything is tested on Unix so I may be wrong. Windows users will need to install manually as I haven't yet made a windows installation script.
Do keep in mind that you'll need your OpenAI API key for this software to work (https://platform.openai.com/). You'll need to input the key when run for the first time, the key is stored in your home directory under .code-genie-cli/openai_key.txt.
Quick - Unix only
- Clone project to local machine:
git clone [email protected]:Shardj/code-genie-cli.git - Run
cd code-genie-cli/ && ./install.shand follow the steps
Manual
-
Clone the project to your local machine:
git clone [email protected]:Shardj/code-genie-cli.git -
Install Python 3 and pip (Python package installer) if not already installed. On some versions of Linux you'll need pip3 and on others you'll want pipx.
-
Open a terminal (Unix) or command prompt (Windows),
cdinto the project directory, and runpip install -e ., or of course using pip3 or pipx there instead. -
This will have installed dependencies and created a script named
code-genie-cliin your Pythonbin/directory, orscripts/for Windows. -
Find the
bin/by runningpython -m site --user-base. Check to see if thebin/is in yourPATHenvironment variable. If not add this to your~/.bashrcor~/.bash_profile:export PATH="/path/to/your/python/bin:$PATH", and then restart your shell.
Running the software
On Linux or macOS, open a terminal and simply run code-genie-cli.