Always forgetting how to use the terminal like me? Well no more!
- Basic shell knowledge
- Python 3
- Mac or Linux
- Bash, Zsh, or Fish
Run the following:
git clone https://github.com/hunterunger/gpt-cli-assistant.git
cd gpt-cli-assistant
python3 -m pip install -r requirements.txt
python3 main.py "check what shell im using"
It will then prompt you to set up your API key with OpenAI.
Also, it will give you an alias snippet for Alias Setup.
If you get an output like echo $SHELL
, it's working!
Run echo $SHELL
to check your shell.
Then run echo $PWD
to get it's absolute path or use the snippet from earlier.
echo 'alias gpt="python3 ~/path/to/main.py"' >> .bashrc
echo 'alias gpt="python3 ~/path/to/main.py"' >> .zshrc
function gpt
python3 ~/path/to/main.py $argv
end
funcsave gpt
Now you should be able to run
gpt "check what shell I'm using"
gpt "your request in simple english"
This will simply output the command to accomplish the requested task.
Add -e
to automatically run the command.
gpt "your request in simple english" -e
This will run the command instantly.
Run gpt -h
to get more commands and info.
- Questions are cached so you can re-run the same command without using additional api requests
- Make commands like
gpt "list hidden files"
and NOT likegpt "make a command to list files"
- Try long, multi-step commands like
gpt "save commit history to a file, then search the file for a commit with the word 'beta', then open it in vim"