The Fuck: Automatically Correct Your Previous Console Commands
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
The Fuck is a magnificent and highly popular Python application designed to automatically correct errors in your previous console commands. Inspired by a tweet, this tool aims to significantly enhance productivity for anyone frequently working in the terminal by fixing common typos and mistakes. With over 95,000 stars on GitHub, it's a widely adopted solution for command-line efficiency.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
The Fuck is a magnificent and highly popular Python application designed to automatically correct errors in your previous console commands. Inspired by a tweet, this tool aims to significantly enhance productivity for anyone frequently working in the terminal by fixing common typos and mistakes. With over 95,000 stars on GitHub, it's a widely adopted solution for command-line efficiency.
Installation
Installing The Fuck is straightforward and supported across various platforms.
On macOS or Linux (via Homebrew):
brew install thefuck
On Ubuntu / Mint:
sudo apt update
sudo apt install python3-dev python3-pip python3-setuptools
pip3 install thefuck --user
On Arch based systems:
sudo pacman -S thefuck
On other systems (via pip):
pip install thefuck
After installation, it is recommended to add an alias to your shell configuration file (e.g., .bashrc, .zshrc):
eval $(thefuck --alias)
# You can use a custom alias, for example:
eval $(thefuck --alias FUCK)
Remember to source your shell config file or open a new session for changes to take effect.
Updating:
To update The Fuck to the latest version, use:
pip3 install thefuck --upgrade
Examples
The Fuck shines in its ability to correct a wide range of common command-line errors. Here are a few illustrative examples:
Fixing sudo permissions:
? apt-get install vim
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
? fuck
sudo apt-get install vim [enter/?/?/ctrl+c]
[sudo] password for nvbn:
Reading package lists... Done
...
Correcting Git upstream issues:
? git push
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin master
? fuck
git push --set-upstream origin master [enter/?/?/ctrl+c]
Counting objects: 9, done.
...
Typo correction for basic commands:
? puthon
No command 'puthon' found, did you mean:
Command 'python' from package 'python-minimal' (main)
Command 'python' from package 'python3' (main)
zsh: command not found: puthon
? fuck
python [enter/?/?/ctrl+c]
Python 3.4.2 (default, Oct 8 2014, 13:08:17)
...
The tool also supports running fixed commands without confirmation using fuck --yeah or fuck -y.
Why Use It
The Fuck is an invaluable tool for anyone who spends a significant amount of time in the terminal. Its primary benefits include:
- Increased Productivity: By automatically correcting common mistakes, it saves time and reduces the frustration of retyping commands.
- Reduced Errors: It intelligently identifies and fixes a vast array of errors, from simple typos to complex Git command issues and permission problems.
- Extensibility: Users can create their own custom rules to address specific workflows or unique command patterns, making it highly adaptable.
- Broad Compatibility: It supports various shells (Bash, Zsh, Fish, Powershell, tcsh) and integrates seamlessly into existing command-line environments.
- Instant Mode: For even faster corrections, an experimental instant mode is available, which logs output and reads it directly, bypassing the need to re-run commands.
Links
- GitHub Repository: https://github.com/nvbn/thefuck
- Official Installation Wiki: https://github.com/nvbn/thefuck/wiki/Installation
- Shell Aliases Wiki: https://github.com/nvbn/thefuck/wiki/Shell-aliases
Related repositories
Similar repositories that may be relevant next.

text-to-cad: AI Agent Skills for CAD, CAE, and CAM Workflows
September 24, 2026
text-to-cad is a comprehensive Python library developed by earthtojake, providing a rich set of agent skills for Computer-Aided Design (CAD), Computer-Aided Engineering (CAE), and Computer-Aided Manufacturing (CAM). It enables AI agents to generate, inspect, source, slice, and manage CAD and robot-description artifacts, streamlining complex engineering processes.

dcc-mcp-blender: AI-Driven 3D Workflows with an Embedded MCP Server
September 24, 2026
dcc-mcp-blender is a powerful Blender addon that integrates an embedded Streamable HTTP MCP server directly into Blender. This allows any MCP-compatible AI client to seamlessly control and automate your 3D modeling, animation, and rendering workflows. It offers over 200 pre-built tools and an extensible skill system for robust production environments.

i-have-adhd: Streamline Your Coding Agent's Output for Clarity
September 23, 2026
i-have-adhd is a powerful skill designed to transform your coding assistant's responses into clear, actionable, and concise outputs. It prevents AI agents from burying essential information, ensuring you receive direct answers and numbered steps without unnecessary preamble or fluff. This tool is ideal for developers seeking enhanced productivity and straightforward guidance from their AI coding partners.
Guaardvark: Your Self-Hosted AI Studio for Agents, Media, and Code
September 21, 2026
Guaardvark is a comprehensive, self-hosted AI studio designed for local execution of advanced AI tasks. It integrates coding agents, media generation (video, image, music, voice), and robust RAG capabilities, all running on a single GPU. This platform prioritizes privacy and user control, enabling a full AI workstation experience on your own hardware.
Source repository
Open the original repository on GitHub.
15 counted GitHub visits