Never Google a terminal error again.
cmd-rescue is an AI-powered CLI wrapper that intercepts failing terminal commands, analyzes the stack trace with an LLM, explains what went wrong, and generates the exact fix command. Just hit Enter to auto-apply it.
- 🤖 Powered by
gpt-4o-mini— fast and cheap - 🔍 Transparently wraps any command — no workflow changes
- ⚡ Silently steps aside when commands succeed
- 🛠️ Auto-applies the fix with a single keypress
No install needed — just prefix your failing command:
npx @dinakars777/cmd-rescue npm install failing-packageOr install globally for the short rescue alias:
npm install -g @dinakars777/cmd-rescue
rescue docker-compose up
rescue npm run buildRequires an OpenAI API key:
export OPENAI_API_KEY="sk-your-key"- Runs your target command transparently
- If it succeeds (exit code
0), quietly exits - If it fails, streams
stderrtogpt-4o-mini - Prints an explanation and prompts:
Would you like to auto-run this fix: ...? - Hit Enter — done
| Package | Purpose |
|---|---|
openai |
GPT-4o-mini error analysis |
execa |
Transparent command execution |
| TypeScript | Type-safe implementation |
MIT