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.

nanobot: An Ultra-Lightweight, Self-Hosted Personal AI Agent Framework

nanobot: An Ultra-Lightweight, Self-Hosted Personal AI Agent Framework

August 9, 2026

nanobot is an ultra-lightweight, open-source, self-hosted personal AI agent framework built in Python. It offers a WebUI, tools, memory, multi-agent workflows, and automation capabilities, making it a versatile solution for personal AI tasks. Users can deploy it across various platforms, including chat apps, for seamless integration.

ai-agentagent-frameworkpython
ReMe: An Advanced Memory Management Kit for AI Agents

ReMe: An Advanced Memory Management Kit for AI Agents

August 7, 2026

ReMe is an innovative, local-first memory layer designed for AI agents, transforming conversations and resources into file-based long-term memory. It continuously indexes, links, and consolidates this information, enabling advanced recall and supporting the development of self-evolving agents. This kit helps agents remember and refine their experiences effectively.

agentai-agentsmemory
code-review-graph: AI-Powered Code Intelligence for Smarter Reviews

code-review-graph: AI-Powered Code Intelligence for Smarter Reviews

August 6, 2026

code-review-graph is a local-first code intelligence graph that optimizes AI coding tools by building a persistent map of your codebase. It significantly reduces context for AI reviews and large-repo workflows, ensuring AI assistants read only the most relevant code. This leads to more efficient and cost-effective code analysis.

ai-codingcode-reviewknowledge-graph
Nikola: A Powerful Static Website and Blog Generator

Nikola: A Powerful Static Website and Blog Generator

August 6, 2026

Nikola is an open-source static website and blog generator written in Python. It transforms content into a deployable website, offering a secure and resource-efficient alternative to dynamic sites. With features like theming, fast builds, and multilingual support, Nikola is a versatile tool for web development.

pythonstatic-sitestatic-site-generator

Source repository

Open the original repository on GitHub.

10 counted GitHub visits

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 ❤️