oops is a tiny CLI that reruns a failing command, captures the error trace, and asks Gemini for a structured fix suggestion.
pipx install git+https://github.com/ibrahimi46/oops.gitDon't have pipx?
brew install pipx
pipx ensurepathoops needs your Gemini browser cookies to authenticate. Get them from your browser after logging in to gemini.google.com:
- Open DevTools → Application → Cookies →
https://gemini.google.com - Copy the values of
__Secure-1PSIDand__Secure-1PSIDTS
Then run these two commands to add them permanently to your shell (replace the values with yours):
echo 'export GEMINI_1PSID=your_value_here' >> ~/.zshrc
echo 'export GEMINI_1PSIDTS=your_value_here' >> ~/.zshrc
source ~/.zshrcUsing bash instead of zsh? Replace
~/.zshrcwith~/.bashrc.
oops "<your-failed-command>"Examples:
# React project
oops "npm run dev"
# Python project
oops "python app.py"If the command succeeds, oops prints:
- No Errors Detected!
If the command fails, oops prints:
- Analysis panel (error file and short description)
- Suggested Fix panel (actionable fix snippet/command)
- Executes your command
- Captures stderr/stdout if it fails
- Sends command + trace to Gemini with a strict JSON prompt
- Parses response into:
- file
- error
- fix
- Displays result in Rich panels
This project uses the excellent Gemini WebAPI library:
Big thanks to the maintainers and contributors.
- AI output can be wrong. Always review fixes before applying.
- Keep your .env private and never commit cookie values.