macOS
brew install thefucklocal Homebrew formula metadata
sudo port install thefuckMacPorts ports tree · python/thefuck/Portfile · 来源: api.github.com
安装
brew install thefucklocal Homebrew formula metadata
sudo port install thefuckMacPorts ports tree · python/thefuck/Portfile · 来源: api.github.com
sudo apk add thefuckAlpine Linux edge package indexes · thefuck · 来源: dl-cdn.alpinelinux.org
sudo apt install thefuckDebian stable package indexes · thefuck · 来源: deb.debian.org
sudo dnf install thefuckFedora Rawhide package metadata · thefuck · 来源: dl.fedoraproject.org
sudo pacman -S thefuckArch Linux sync databases · thefuck · 来源: geo.mirror.pkgbuild.com
概览
Programmatically correct mistyped console commands
历史
The Fuck is a Python command-line utility for correcting a previously failed shell command. Its official README presents it as an app inspired by a tweet and built around the `fuck` alias, which lets a user rerun a corrected version of the last command after errors such as missing `sudo`, misspelled Git subcommands, command-not-found typos, or bad package-manager invocations.
The project grew around a rules engine: the README says it matches the previous command against enabled rules, creates a replacement command, and executes it after confirmation. The rule list spans common developer and system tools, including package managers, Git, Docker, language toolchains, shells, and file utilities, making the project less a spelling corrector than a catalog of everyday terminal failure modes.
The Fuck became unusually visible for a shell helper: the official GitHub page shows tens of thousands of stars and thousands of forks, while the assigned package facts list packages across Homebrew, Debian, Ubuntu, Fedora, Arch, Alpine, MacPorts, and other ecosystems. Its README also documents installation through Homebrew, FreeBSD packages, Chromebrew, Arch packages, and pip, which reflects the tool's spread through both language and OS package-manager culture.
The normal workflow is to install the package, add `eval $(thefuck --alias)` to a shell startup file, run a command that fails, and then type the alias to accept or select a corrected command. The README also documents options such as running without confirmation, recursively retrying fixes, customizing rules in `settings.py`, and using environment variables to tune behavior.
For package nerds, The Fuck is interesting because many of its examples and built-in rules encode package-manager ergonomics: it can add `sudo` for `apt-get`, correct Chocolatey package suffixes, fix Homebrew- and system-tool-adjacent command mistakes, and turn common install-time errors into repeatable command rewrites. It is also a good example of a package whose memorable command name helped it become a cross-distro terminal utility.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
~/.config/thefuck/settings.py可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
fuck | cli | 全局可执行文件 | |
thefuck | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/nvbn/thefuck
安装元数据
| 软件包键 | brew:thefuck |
|---|---|
| 版本 | 3.32 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/thefuck |
| 主页 | https://github.com/nvbn/thefuck |
| 仓库 | https://github.com/nvbn/thefuck |
| 上游文档 | https://github.com/nvbn/thefuck#readme |
| 许可证 | MIT |
| 源码归档 | https://files.pythonhosted.org/packages/ac/d0/0c256afd3ba1d05882154d16aa0685018f21c60a6769a496558da7d9d8f1/thefuck-3.32.tar.gz |
| 最后更新 | 2026-07-14T17:14:18+09:00 |
| Pulse | updated |
| 依赖 | python@3.14 |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
| 注意事项 | Add the following to your .bash_profile, .bashrc or .zshrc: eval $(thefuck --alias) For other shells, check https://github.com/nvbn/thefuck/wiki/Shell-aliases |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | thefuck |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
thefuck 3.32-0.3
spelling corrector of console commands
https://github.com/nvbn/thefuck
sudo apt install thefuckthefuck 3.29-0.3ubuntu1
spelling corrector of console commands
https://github.com/nvbn/thefuck
sudo apt install thefuckthefuck 3.32-r6
The Fuck is a magnificent app that corrects errors in previous console commands.
https://github.com/nvbn/thefuck
sudo apk add thefuckthefuck-pyc 3.32-r6
Precompiled Python bytecode for thefuck
https://github.com/nvbn/thefuck
sudo apk add thefuck-pycthefuck 3.32-20.fc44
App that corrects your previous console command
https://github.com/nvbn/thefuck
sudo dnf install thefuckthefuck 3.32-12
Magnificent app which corrects your previous console command
https://github.com/nvbn/thefuck
sudo pacman -S thefuckthefuck
sudo port install thefuck来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.