Analysis updated 2026-06-20
Fix a mistyped terminal command instantly without retyping it, just type 'fuck' to see and run the corrected version.
Automatically add 'sudo' when a command fails due to missing permissions, without knowing you needed it upfront.
Correct misspelled git, docker, brew, or apt subcommands with a single word instead of hunting for the right spelling.
| nvbn/thefuck | fastapi/fastapi | openai/whisper | |
|---|---|---|---|
| Stars | 96,802 | 97,946 | 99,006 |
| Language | Python | Python | Python |
| Setup difficulty | easy | easy | moderate |
| Complexity | 2/5 | 2/5 | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires adding one alias line to your shell startup file (.bashrc or .zshrc) so the 'fuck' command works in new sessions.
The Fuck is a command-line helper that fixes the previous command you typed wrong. When you mistype something in your terminal, for example you forget to put sudo in front of a system command, you misspell a git or docker subcommand, or you try to push a branch that has no upstream, your shell prints an error and stops. Instead of retyping the corrected version, you type the word "fuck" and press enter, the tool guesses what you meant, shows you the corrected command, and runs it once you confirm. Inside, the project is a collection of named rules, each of which knows how to recognise one specific kind of mistake and how to rewrite the command to fix it. The README lists rules for cd, git, docker, brew, apt, cargo, ag, aws, conda, gem, lein, and many other tools, plus generic ones like adding sudo when permission is denied or fixing common typos. When you trigger the tool, it walks through the matching rules, picks the most likely correction, and offers it. People typically install it on their personal machine through a package manager such as pip, Homebrew, apt, pacman, or pkg, then add an alias line to their shell startup file so the word "fuck" works in any new terminal session. There is also an experimental instant mode, options to skip the confirmation step, and a way to retry until a command finally succeeds. The project is written in Python (version 3.5 or later is required) and is released under the MIT licence.
The Fuck is a command-line tool that automatically corrects the last mistyped shell command, just type 'fuck' after an error and it suggests the fixed version and runs it for you.
Mainly Python. The stack also includes Python.
MIT licence, free to use and modify for any purpose, including commercially.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.