@dinakars777/cmd-rescue
v1.0.0
Published
An AI-powered CLI wrapper that automatically diagnoses and fixes failing terminal commands in real-time.
Maintainers
Readme
cmd-rescue 🛟
Never Google a terminal error again.
cmd-rescue is an AI-powered CLI wrapper that instantly intercepts your failing terminal commands, analyzes the stack trace using an LLM (OpenAI), explains what went wrong, and automatically generates the exact command to fix it.
Just hit Enter to auto-apply the fix and get back to coding.
Why?
Developers bleed hours staring at giant red stderr tracebacks from failed builds, npm ERR!, Docker crashes, or obscure Git conflicts. Instead of copying and pasting into ChatGPT, cmd-rescue does it inline, directly in your workflow.
Installation
You don't even need to install it. Just prefix your failing command with npx @dinakars777/cmd-rescue:
npx @dinakars777/cmd-rescue npm install failing-package-name(Or install globally to use via rescue <command>):
npm install -g @dinakars777/cmd-rescue
rescue docker-compose upSetup
You just need a standard OpenAI API Key.
export OPENAI_API_KEY="sk-your-openai-key"How It Works
rescuetransparently runs your target command (e.g.npm run dev) just like your native terminal does.- If the command succeeds natively (exit code
0),cmd-rescuequietly steps aside. - If it fails, the exit code and
stderrare immediately streamed to OpenAI (gpt-4o-mini). - An intelligent explanation is printed directly to the terminal, and you are prompted
Would you like to auto-run this fix: ...?.
License
MIT
