The Fuck: Automatically Correct Your Previous Console Commands

This repository profile is provided by osrepos.com, an open source repository discovery platform.

The Fuck: Automatically Correct Your Previous Console Commands

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

Analyzed by OSRepos on January 31, 2026

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

Related repositories

Similar repositories that may be relevant next.

MarkLLM: An Open-Source Toolkit for LLM Watermarking

MarkLLM: An Open-Source Toolkit for LLM Watermarking

June 23, 2026

MarkLLM is an open-source toolkit designed to simplify the research and application of watermarking technologies for large language models (LLMs). It offers a unified framework for implementing various watermarking algorithms, alongside robust visualization and comprehensive evaluation tools. This toolkit helps researchers and the broader community understand and assess the authenticity and origin of machine-generated text.

large-language-modelsllmsafety
Agent-Reach: Empower Your AI Agents with Internet Access, Zero API Fees

Agent-Reach: Empower Your AI Agents with Internet Access, Zero API Fees

June 21, 2026

Agent-Reach is a powerful GitHub repository that equips AI agents with the ability to access and search the entire internet, including platforms like Twitter, Reddit, YouTube, and Bilibili. It provides a streamlined CLI experience, eliminating the need for complex API configurations and associated fees. This project ensures your AI agent can "see" and interact with web content effortlessly.

ai-agentagent-infrastructureai-search
REAL Video Enhancer: AI-Powered Video Interpolation, Upscaling, and Denoising

REAL Video Enhancer: AI-Powered Video Interpolation, Upscaling, and Denoising

June 19, 2026

REAL Video Enhancer is a powerful open-source application designed to enhance video quality across Linux, Windows, and macOS. It leverages AI models for advanced video processing tasks such as frame interpolation, upscaling, decompression, and denoising. This tool provides a modern alternative to older software, making high-quality video enhancement accessible to a wider audience.

video-enhancementaiupscaling
NVIDIA PhysicsNeMo: Deep Learning Framework for Physics-ML Models

NVIDIA PhysicsNeMo: Deep Learning Framework for Physics-ML Models

June 16, 2026

NVIDIA PhysicsNeMo is an open-source deep learning framework designed for building, training, and fine-tuning Physics AI models. It leverages state-of-the-art scientific machine learning methods, enabling real-time predictions by combining physics knowledge with data. This framework provides scalable, GPU-optimized tools for AI4Science and engineering applications.

deep-learningmachine-learningphysics-ml

Source repository

Open the original repository on GitHub.

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️