← All reportsPublic report

nvbn/thefuck

Magnificent app which corrects your previous console command.

98k stars Python View on GitHubprofiled 11d ago
Try GitZoid
0PRs this week
0Contributors
0Deps scanned
0Issues found
01 · Repo overview

How thefuck is put together

The Fuck is a Python 3 CLI application that corrects errors in previously executed console commands. It works as a shell alias: the shell invokes `thefuck` with the failed command and its output (via history files, re-running the command, or a shell logger), and the corrector matches that input against ~150 pluggable rule modules under `thefuck/rules/`, each exposing `match(command)` and `get_new_command(command)`. The matched fix is presented to the user for confirmation via a select UI and then executed through an abstraction over Bash/Zsh/Fish/Powershell/tcsh (`thefuck/shells`). Entry points live in `thefuck/entrypoints` (main dispatch, alias generation, fix-command flow, first-run auto-configuration), with cross-cutting support in `conf`, `logs`, `types`, `utils`, and `system`. There are no servers, databases, or network services; everything is local process/file interaction.

Languages

Python

Frameworks

setuptoolspytesttox

Infrastructure

snapcraft.yaml (Snap packaging).devcontainer/Dockerfile (dev container)install.shGitHub Actions CI (workflow badges referenced in README)

Major components

thefuck.entrypoints

CLI entry points: argument parsing dispatch (main.py), shell alias script generation (alias.py), the fix-command pipeline (fix_command.py), first-run alias auto-configuration (not_configured.py), and optional shell logging (shell_logger.py).

thefuck.corrector

Core engine that loads enabled rules, matches them against the captured failed command/output, orders candidates by priority, and returns corrected commands.

thefuck.rules

~150 self-contained rule modules, each defining match/get_new_command logic plus optional priority and requires_output for a specific tool's failure pattern.

thefuck.output_readers

Obtains the previous command's output via three strategies: reading shell logs, re-running the failed command (rerun.py), or parsing recorded logs (read_log.py).

thefuck.shells

Abstraction over supported shells (Bash, Zsh, Fish, Powershell, tcsh) providing history access, command quoting/composition helpers, and per-shell alias configuration details.

thefuck.conf / settings

Loads and initializes user settings (e.g., require_confirmation, rules enable/disable lists) consumed across the app.

thefuck.ui

Interactive confirmation UI letting the user accept, cycle through, or abort proposed corrected commands.

thefuck.specific / utils / system / types

Shared plumbing: tool-specific helpers (e.g., git_support decorator), generic utilities, path/process system wrappers, and the Command/CorrectedCommand types.

02 · Weekly changes

No digest this week

1 weeksWeek of

03 · Security check

Dependencies and code review

0 dependencies scanned

Dependency advisories

Security Watch

No known advisories across 0 scanned dependencies.

No known advisories in the scanned dependencies.

Code review

No concrete code-level issues confirmed.

Get this report every week for your repos.

GitZoid learns each repo, reports what changed, and flags what needs attention. One flat price for the whole team.

$19 a month, flat · First 10 outputs free · No card required