JSPM

oops-ai

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q54125F
  • License MIT

Pipe error messages to AI for instant solutions

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (oops-ai) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    πŸ’₯ oops

    Your terminal just crashed. oops knows why.

    npm version npm downloads License: MIT Node.js Version


    npm run build 2>&1 | oops

    Pipe 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.com

    Then 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 | oops

    The 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 curl

    Git 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 main

    Kubernetes 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 ... | oops when every second counts
    • Learn new languages β€” Rust borrow checker, Go interfaces explained instantly
    • Pre-commit check β€” npm test 2>&1 | oops before pushing broken code

    How It Works

    1. Reads error output from stdin
    2. Auto-detects language/framework
    3. Sends to Claude AI for analysis
    4. 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 help

    Pro 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 1

    vs 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

    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 EADDRINUSE before you even need oops.

    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.