Quickly fix a mistyped git or docker command without retyping it.
Automatically add sudo to a command that failed due to permission denial.
Correct common shell typos and command misspellings on the fly.
Speed up terminal workflows by skipping manual command correction and retyping.
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.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.