Skip to content

dinakars777/cmd-rescue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cmd-rescue 🛟

npm version npm downloads License: MIT

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.

Features

  • 🤖 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

Quick Start

No install needed — just prefix your failing command:

npx @dinakars777/cmd-rescue npm install failing-package

Or install globally for the short rescue alias:

npm install -g @dinakars777/cmd-rescue
rescue docker-compose up
rescue npm run build

Setup

Requires an OpenAI API key:

export OPENAI_API_KEY="sk-your-key"

How It Works

  1. Runs your target command transparently
  2. If it succeeds (exit code 0), quietly exits
  3. If it fails, streams stderr to gpt-4o-mini
  4. Prints an explanation and prompts: Would you like to auto-run this fix: ...?
  5. Hit Enter — done

Tech Stack

Package Purpose
openai GPT-4o-mini error analysis
execa Transparent command execution
TypeScript Type-safe implementation

License

MIT

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors