WhatTheFuck is a command-line tool that leverages LLMs to correct and enhance previously executed terminal commands. Inspired by wut
and The Fuck
, it’s designed to save your time and sanity by fixing errors, summarizing logs, and more.
$ (wtf): git brnch
git: 'brnch' is not a git command. See 'git --help'.
The most similar command is
branch
$ (wtf): wtf
The error message indicates that 'brnch' is not recognized as a valid Git command. The correct command is 'branch', which is likely what you intended to use to list, create,
or delete branches in your repository. The suggestion for 'branch' highlights this common typo. To avoid such errors, ensure command spelling is accurate.
Run `git branch`? [y/N]: y
* main
※LLM's streamed outputs are omitted for simplicity
- LLM Switching: Easily switch between different llms.(OpanAI, Anthropic, Vertex)
- Instant Command Fixes: Detect and fix incorrect terminal commands effortlessly.
- One-Click Execution: Run corrected commands seamlessly.
- Log Summarization: Summarize logs from previous terminal commands for quick insights.
- Web Search Integration: Perform real-time web searches to gather relevant information or troubleshoot issues directly from the tool.
Note
WTF utilizes script(Unix)
to log and analyze the previously executed command.
$ pip install wtf-cli
# or
$ uv add wtf-cli
# or
$ poetry add wtf-cli
This repo uses Semantic Versioning.
WhatTheFuck is released under the MIT License. See LICENSE for additional details.