CLI that explains the output of your last command.
Just type wut and an LLM will help you understand whatever's in your terminal. You'll be surprised how useful this can be. It can help you:
- Understand stack traces
- Decipher error codes
- Fix incorrect commands
- Summarize logs
> pipx install wut-cliOnce installed, you can use OpenAI or Claude as your LLM provider. Just add the appropriate API key to your environment:
> export OPENAI_API_KEY="..."
> export ANTHROPIC_API_KEY="..."You can also use a local model with Ollama. Just add the model name that's being served to your environment:
> export OLLAMA_MODEL="..."Alternatively, you can use Perplexity by installing the Perplexity CLI and setting your API key:
> curl -s https://raw.githubusercontent.com/dawid-szewc/perplexity-cli/main/perplexity.py > ~/.local/bin/perplexity
> chmod +x ~/.local/bin/perplexity
> export PERPLEXITY_API_KEY="..."If you're using OpenAI, you can customize your model and API URL by adding the following to your environment:
> export OPENAI_MODEL="..." # Default to "gpt-4o"
> export OPENAI_BASE_URL="..." # Default to NonePut the following in ~/.bash_profile when you use bash:
eval "$(wut --activate-shell bash)"Put the following in ~/.zshrc when you use zsh:
eval "$(wut --activate-shell zsh)"Put the following in ~/.config/fish/config.fish when you use fish:
wut --activate-shell fish | sourcewut must be used inside a tmux or screen session to capture the last command's output. To use it, just type wut after running a command:
> git create-pr
git: 'create-pr' is not a git command.
> wutYou'll quickly get a brief explanation of the issue:
This error occurs because Git doesn't have a built-in `create-pr` command.
To create a pull request, you typically need to:
1. Push your branch to the remote repository
2. Use the GitHub web interface
If you have a specific question about your last command, you can include a query:
> brew install pip
...
> wut "how do i add this to my PATH variable?"To use Perplexity instead of your default LLM provider, add the -p flag:
> git create-pr
git: 'create-pr' is not a git command.
> wut -p- If possible, drop the requirement of being inside a tmux or screen session.
- Add a
--fixoption to automatically execute a command suggested bywut. - Add
wutto Homebrew. - Make some unit tests.