oops-ai
v1.0.0
Published
Pipe error messages to AI for instant solutions
Maintainers
Keywords
Readme
💥 oops
Your terminal just crashed. oops knows why.
npm run build 2>&1 | oopsPipe any error → AI analysis → copy-paste fix. Under 2 seconds.
The Problem
Your build breaks. You stare at a 40-line stack trace. You copy the error, open a browser, paste it into Google, click three Stack Overflow links, try two solutions that don't work, and finally find the fix 15 minutes later.
Meanwhile, your flow state is gone.
Quick Start
npx oops-ai # Use without installing
# or
npm install -g oops-ai # Install globally
export ANTHROPIC_API_KEY="sk-ant-..." # Get one at console.anthropic.comThen pipe any error:
npm run build 2>&1 | oops
python script.py 2>&1 | oops
cargo build 2>&1 | oops
docker build . 2>&1 | oops
kubectl logs pod/api-xyz 2>&1 | oopsThe 2>&1 redirects stderr to stdout so oops catches all error output.
Before → After
Before 😩
$ npm run build
Error: Cannot find module 'express'
at Function.Module._resolveFilename
...45 more lines...
*copy → Google → SO → try → fail → repeat*After ⚡
$ npm run build 2>&1 | oops
Problem: Cannot find module 'express'
Solution:
$ npm install express
Done. 0.8s ✓Examples
Rust Borrow Checker
$ cargo build 2>&1 | oops
Problem: Cannot borrow `users` as mutable while borrowed as immutable
Solution: Limit the lifetime of the immutable borrow
let first_name = users[0].name.clone();
users.push(new_user); // Now OK
println!("{}", first_name);Docker Build Failure
$ docker build -t myapp . 2>&1 | oops
Problem: Dockerfile parse error - unexpected EOF at line 12
Solution: Missing backslash in multi-line RUN command
RUN apt-get update && \
apt-get install -y curlGit Push Rejected
$ git push origin main 2>&1 | oops
Problem: Remote contains commits you don't have locally
Solution:
$ git pull --rebase origin main
$ git push origin mainKubernetes Pod Crash
$ kubectl logs pod/api-7d9f8b-xk2m 2>&1 | oops
Problem: ECONNREFUSED 10.0.0.5:5432 — Can't reach PostgreSQL
Solution:
1. Check DB service: kubectl get svc postgres-service
2. Verify DB_HOST env var in deployment
3. Test: kubectl run debug --image=postgres:15 ...Use Cases
- Stay in flow — Get solutions without leaving the terminal
- Onboard faster — Clone a new repo, pipe errors instead of asking teammates
- Debug production —
kubectl logs ... | oopswhen every second counts - Learn new languages — Rust borrow checker, Go interfaces explained instantly
- Pre-commit check —
npm test 2>&1 | oopsbefore pushing broken code
How It Works
- Reads error output from stdin
- Auto-detects language/framework
- Sends to Claude AI for analysis
- Returns concise, actionable fix (~0.5–1.5s)
Supported Languages
JavaScript · TypeScript · Python · Go · Rust · Java · C/C++ · Ruby · PHP · Docker · Kubernetes · Git · Shell · PostgreSQL · MySQL · and more
Options
-v, --verbose Detailed analysis with multiple approaches
--no-color Disable colored output
-V, --version Show version
-h, --help Show helpPro Tips
# Shell aliases for speed
alias oops-build='npm run build 2>&1 | oops'
alias oops-test='npm test 2>&1 | oops'
# Trim huge output for faster analysis
docker build . 2>&1 | tail -100 | oops
# Save solutions for later
npm run build 2>&1 | oops > solution.txt
# Git pre-commit hook
npm test 2>&1 | oops || exit 1vs Alternatives
| | oops | Google/SO | ChatGPT | Copilot |
|---|---|---|---|---|
| Speed | ~1 second | 2-5 minutes | 30+ seconds | N/A |
| Context-aware | ✅ Full error | ❌ You summarize | ❌ You paste | IDE only |
| Terminal-native | ✅ Pipe & done | ❌ Browser | ❌ Browser | IDE only |
| Cost per query | ~$0.003 | Free | $20/mo | $10/mo |
Privacy
Error text is sent to Anthropic's API for analysis. Don't pipe sensitive data (passwords, API keys, tokens).
Requirements
- Node.js 18+
- Anthropic API key (
ANTHROPIC_API_KEY)
Also From MUIN
Love oops? Check out our other developer CLI tools:
- roast-cli — AI code reviews with Gordon Ramsay energy. Get brutally honest feedback before errors even happen.
- git-why — AI-powered git history explainer. Understand why that buggy code exists before you fix it.
- portguard — Monitor and kill zombie processes hogging your ports. Fix the
EADDRINUSEbefore you even needoops.
Featured On
Read the launch article on Dev.to: 4 CLI Tools Every Developer Needs (That You've Never Heard Of)
License
MIT © MUIN
Built by MUIN — 일하는 AI, 누리는 인간
💥 Stop Googling errors. Pipe them to AI instead.
