thefuck — The Only F*ck That Might Save You

Suman SharmaSuman Sharma

You mistype a command. Terminal yells at you. You stare at the error, retype the whole thing, mistype it again.

Or you just say fuck.

That's the whole product.

Terminal demo of thefuck correcting puthon to python, git branhc to git branch, and adding sudo to apt-get

What it is

thefuck is a magnificent little terminal app that corrects your previous console command.

Mistype git brnach? Forget sudo? Type fuck. It looks at the error, suggests the fix, and runs it when you hit enter.

How to install

Pick whatever matches your machine:

brew install thefuck
pacman -S thefuck
pip install thefuck

How to configure

Alias it in your shell config — ~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish:

eval $(thefuck --alias) # or a softer word: # eval $(thefuck --alias damn)

Reload the shell. Break something on purpose. Type fuck. Smile.

Why I keep it around

Not because it's clever. Because it matches how I already talk to my terminal when things go wrong.

One word. One enter. Back to work.

If you live in the CLI and your fingers occasionally invent new spellings for python, this is the rare tool that earns the swear in its name.

Contact

Get in Touch

Want to call me? book a call and I'll respond in the available time slot. I will ignore all soliciting.