Skip to content

dinakars777/cmd-rescue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

cmd-rescue demo npm version

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 up

Setup

You just need a standard OpenAI API Key.

export OPENAI_API_KEY="sk-your-openai-key"

How It Works

  1. rescue transparently runs your target command (e.g. npm run dev) just like your native terminal does.
  2. If the command succeeds natively (exit code 0), cmd-rescue quietly steps aside.
  3. If it fails, the exit code and stderr are immediately streamed to OpenAI (gpt-4o-mini).
  4. An intelligent explanation is printed directly to the terminal, and you are prompted Would you like to auto-run this fix: ...?.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors