The F*ck - A Really Helpful Command Line Tool πŸ’»

Giving a f*ck might actually save you time! πŸ˜‚

If you want a video version of this guide:

Or else continue reading. πŸ§‘πŸ»β€πŸ’»

This tool makes me laugh and makes me faster with the command line tools so it's a win-win.

Today we will look at "The F*ck" which is a super helpful CLI tool that lets you use those suggested commands in the terminal without having to retype everything again.

Have you ever had that frustrating moment where you type a wrong command, something like grabbing a new branch with git?

Mistyping git branch in terminal

But git from that nice suggestion there already knew what we meant so instead we think "f*ck", and start to type out what we really meant. But thanks to this CLI tool we can just type fuck and it gives us the suggested command and execute it for us.

Saving the day with fuck

So this works with a variety of tools and has a really good matching sequence which you can check out in more detail in their documentation here.

If you are using a Zsh terminal like myself you may need to add an alias to get it working as I have above (or if you want something a little more suitable for work it's always an option too but there's no fun in not typing "fuck" as you mistype).

You can install it on Windows with pip and there are a few alternative install guides for Mac and Linux in the docs here:


Demo of The Fuck working

What do you think of The Fuck?

Are you enjoying adding it to your workflow as much as me?

Follow me on Twitter

Subscribe on CodΓΊ Community

Omotola Shogunle's photo

Haha, great tool, can we customise the command so instead of 'fuck' something else?

Niall Maher's photo

Yes you can make an alias that is suitable for work πŸ˜‚

Mohd Shad Mirza's photo

Great read. On a side note, I absolutely love all of your blog covers.

Niall Maher's photo

Oh thanks! I just use Canva

hatem ben tayeb's photo

I recommend the zsh shell with the oh-my-zsh plugins and for command completion is better to try zsh-autosuggestions it's super cool!

Niall Maher's photo

I haven't tried that! I will take a look.

Niladri Roy's photo

That was effing awesome!πŸ˜…

Niall Maher's photo

Hahaha thank you!