Friday, April 17, 2026

SHELL-GPT WITH GEMINI TO MONITOR ORACLE DB

# Install Python and create environment

sudo dnf install python3.12 python3.12-pip -y

python3.12 -m venv ~/sgpt_env

source ~/sgpt_env/bin/activate


# Install Shell-GPT and LiteLLM

pip install "shell-gpt[litellm]"


# Add configuration to .bashrc (Replace PASTE_KEY with your key)

cat << 'EOF' >> ~/.bashrc

# Shell-GPT Config

# Shell-GPT Gemini Fix
export USE_LITELLM=true
export DEFAULT_MODEL="gemini/gemini-2.5-flash"
export GEMINI_API_KEY="PASTE_YOUR_GEMINI_KEY_HERE"
export OPENAI_API_KEY=sk-placeholder
alias sgpt='~/sgpt_env/bin/sgpt'

EOF

source ~/.bashrc


uninstallation:

# Remove the virtual environment folder

rm -rf ~/sgpt_env


# Remove the config lines from .bashrc

sed -i '/# Shell-GPT Config/,/alias sgpt/d' ~/.bashrc


# Optional: Remove Python 3.12 if no longer needed

# sudo dnf remove python3.12 -y


# Refresh terminal

source ~/.bashrc


No comments:

Post a Comment

Enable OpenSSH on Windows 11

Step 1: Install OpenSSH Server You can do this via PowerShell (run as Administrator ): Check if it's already available: Get-WindowsCapab...