- Install python
apt install python3 - Install pipx
sudo apt install pipx - Ensure pipx executables are in your PATH
pipx ensurepath - Install shell-gpt with pipx
pipx install shell-gpt - Logout/Log back in
- Run shell gpt with
sgpt - Authenticate with an LLM backend using a token
- Install python
winget install Python.Python.3.11 - Manually add paths if needed to your %PATH% env variable
- c:\users\madat\appdata\roaming\python\python311
- c:\users\madat\appdata\roaming\python\python311\scripts
- Install pipx
python -m pip install --user pipx - Ensure path is added
python -m pipx ensurepath - Install shell-gpt with pipx
pipx install shell-gpt - Run shell gpt with
sgpt - Authenticate with an LLM backend using a token
Use this to inject litellm module into the pipx installation of shell-gpt
pipx inject shell-gpt litellm
- Gemini / Google
- ChatGPT / OpenAI
sgpt requires your query to be wrapped in quotes every time. for example
sgpt "what is a kernel panic"
You can use a wrapper function to make this easier and not have to enter quotes
Create this function in your .bashrc
ask() {
sgpt "$*"
}
Reload your session or run bash
Now just use ask binary your query without quotes
ask what is a kernel panic"
- Launch powershell as Admin
- Run this to allow scripts
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser - Run this to open your Powershell default profile (equivalent to .bashrc)
notepad $PROFILE - Create the file if it doesn't exist
- Enter this function inside and save,quit
function Ask { $query = $args -join ' ' sgpt $query } - Use the function by calling
ask [question
- Install with
sgpt --install-integration
- Relaunch shell
- To use it, type in a human readable command like "revert last 3 commits in git"
- Hit
Ctrl + lhotkey to convert that line to a command