Never accidentally push bad code, exposed secrets, or vulnerable scripts again. Oops is an intelligent CLI DevSecOps agent that intercepts your Git commits, scans your entire project, and automatically fixes vulnerabilities using AI (OpenAI, Anthropic, Gemini, or local Ollama models) before your code reaches production.
🌐 Website: oopsai.vercel.app
📦 NPM Package: npmjs.com/package/oops-sec-cli
- ✨ Auto-Heal Workflow: Oops doesn't just tell you what's wrong. If it finds a vulnerability, it will parse the AI's JSON response and literally rewrite and fix the code inside your local files automatically.
- 🧠 Smart Framework Detection: The offline Deep Scanner dynamically analyzes your project structure. It automatically loads custom security rules if it detects React, Next.js (
NEXT_PUBLIC_secret leaks), or Python Django projects. - ☁️ Enterprise CI/CD Pipeline Generator: One click transforms Oops from a local CLI into an Enterprise DevSecOps tool. Run
oops setup-cito instantly generate a GitHub Actions workflow that blocks vulnerable Pull Requests across your entire team.
You can install oops globally on your system using NPM:
npm install -g oops-sec-cliOnce installed, simply run the interactive setup menu from anywhere in your terminal:
oops startThis interactive menu allows you to:
- Setup Cloud AI API: Enter your OpenAI, Anthropic, or Gemini API Key.
- Setup Local LLM: Connect to your local Ollama instance for 100% private, offline code reviews.
- Run Full Project Scan: Scan your entire directory for vulnerabilities and let the AI Auto-Heal your code.
- Generate CI/CD Pipeline: Automatically write a
.github/workflows/oops-security.ymlfile to protect your repository on GitHub.
To protect an existing project, navigate to your folder and integrate Oops with Husky:
# 1. Initialize Husky
npx husky init
# 2. Add Oops to your pre-commit hook (ensure TTY for interactivity)
echo -e "exec < /dev/tty\noops --pre-commit" > .husky/pre-commit(Note on Windows: Use echo "exec < /dev/tty followed by a new line with oops --pre-commit" > .husky/pre-commit if your shell doesn't support -e)
Now, whenever you run git commit, Oops will automatically intercept and scan your staged files! If a secret or vulnerability is found, it blocks the commit and gives you the option to let the AI fix it.
Contributions are always welcome! Please read our Contributing Guide to learn how you can help improve Oops.
Built by @omn7 and @jayeshmahajan0
