Show HN: Cwhy – Explain and fix terminal errors using AI (written in Go)
Posted by faalantir 8 hours ago
Comments
Comment by faalantir 8 hours ago
I built cwhy this weekend because I was tired of fixing the same Terraform and Kubernetes errors multiple times.
It’s a CLI tool (written in Go) that acts as a pipe for your stderr. Usage: `terraform apply | cwhy` or `docker logs container | cwhy`
It does two things: 1. Explains the error using OpenAI (GPT-3.5/4). 2. Caches the fix to a shared "Team Memory" (Supabase). If a teammate encounters the exact same error hash later, they get the cached solution instantly without hitting the AI API.
The stack is simple: - Go for the CLI (cobra) - OpenAI API for generation - Supabase for the shared vector/hash storage
I’m currently scrubbing standard API keys before sending logs, but looking for feedback on better PII sanitization strategies.
Repo is here: https://github.com/faalantir/cwhy Binary releases available for Mac/Linux/Windows.
Would love to hear your thoughts on the "shared memory" approach.