thefuck
agent-ready non-interactive
Magnificent app which corrects your previous console command.
How to install thefuck
pip install thefuck thefuck use case
Automatically correct mistyped or erroneous console commands in a shell environment.
When to use thefuck
- After a command fails due to a simple typo or misspelling (e.g., 'puthon' instead of 'python').
- When a command requires elevated privileges (e.g., missing 'sudo') and thefuck can prepend it.
- After a git command fails because of missing upstream branch or unknown subcommand.
When not to use thefuck
- When the command output is ambiguous or not covered by thefuck's rule set.
- When automatic correction could lead to unintended destructive actions (e.g., applying 'sudo' without caution).
thefuck features
- · Corrects previous console command based on common mistakes and output patterns.
- · Interactive selection of multiple correction candidates via keyboard shortcuts.
- · Supports many rules for git, apt-get, python, ssh, and more.
- · Experimental instant mode for faster performance.
Want your agent to find this automatically?
Add the MCP server to your agent config and it will discover tools like thefuck on its own.
Set up MCP →