News for hackers. Stuff that matters.

Show HN: Wut – a CLI that explains the output of your last command with an LLM

https://github.com/shobrook/wut

Just type wut and an LLM will explain whatever's in your terminal. You’ll be surprised how useful this is. I use it mainly to understand and debug stack traces, but there are a bunch of other use cases:

- Deciphering error codes

- Fixing incorrect commands

- Summarizing logs

You can connect wut to OpenAI, Anthropic, or a local model via Ollama.

I hope y’all find this as helpful as I do!

( 3 comments | 2 points | on HN )
Re:Show HN: Wut – a CLI that explains the output of your las... by jas39 on Sunday December 22, 2024 @04:47PM (#42489420)
Very useful tool. The tmux/screen requirement is a design flaw though.
Re:Show HN: Wut – a CLI that explains the output of your las... by jshobrook on Sunday January 05, 2025 @12:24AM (#42599970)
Unfortunately, I don't see a way around it. There's no other way to capture the output buffer.
Re:Show HN: Wut – a CLI that explains the output of your las... by jas39 on Friday January 10, 2025 @02:23PM (#42659052)
Of course there is; tmux does it. Try redirecting the file descriptor so that you can capture stdout. For bash, something like: 'exec > >(tee -a "$LOG_FILE") 2>&1'.

This could be injected in .bashrc, and activated by default or by a bash function. The >(...) syntax is called process substitution.