Migration from thefuck
oops is designed as a faster, simpler replacement for thefuck. Migration is straightforward and your muscle memory will carry over.
Why Migrate?
| Metric | oops (Rust) | thefuck (Python) |
|---|---|---|
| Startup time | ~30ms | ~300ms |
| Binary size | ~5MB | N/A (requires Python) |
| Memory usage | ~10MB | ~50MB |
| Dependencies | None | Python + pip packages |
| Rules | 177+ | 170 |
Quick Migration
Step 1: Install oops
# Linux/macOS
curl -fsSL https://animeshkundu.github.io/oops/install.sh | bash
# macOS with Homebrew
brew install animeshkundu/tap/oops
# Windows (PowerShell)
irm https://animeshkundu.github.io/oops/install.ps1 | iex
Step 2: Update Shell Config
Replace your thefuck initialization:
# Before
eval "$(thefuck --alias)"
# After
eval "$(oops --alias)"
Step 3: (Optional) Convert Config
If you have custom settings, convert ~/.config/thefuck/settings.py to ~/.config/oops/config.toml.
Configuration Conversion
Python to TOML
Before (~/.config/thefuck/settings.py):
rules = ['ALL']
exclude_rules = ['git_push_force']
require_confirmation = True
wait_command = 3
no_colors = False
priority = {'sudo': 10}
slow_commands = ['lein', 'gradle']
After (~/.config/oops/config.toml):
rules = ["ALL"]
exclude_rules = ["git_push_force"]
require_confirmation = true
wait_command = 3
no_colors = false
slow_commands = ["lein", "gradle"]
[priority]
sudo = 10
Key Syntax Differences
| Python | TOML |
|---|---|
True / False | true / false |
['item'] | ["item"] |
{'key': value} | [section] + key = value |
None | Omit the key |
# comment | # comment |
Environment Variables
Great news: Environment variables work identically!
# These work the same in both tools
export THEFUCK_RULES="sudo:git_push"
export THEFUCK_REQUIRE_CONFIRMATION=false
export THEFUCK_WAIT_COMMAND=5
export THEFUCK_EXCLUDE_RULES="rm_root"
Keep Your Alias
If you prefer the fuck alias, use TF_ALIAS:
# Bash/Zsh
eval "$(TF_ALIAS=fuck oops --alias)"
# Fish
TF_ALIAS=fuck oops --alias | source
# PowerShell
$env:TF_ALIAS="fuck"; Invoke-Expression (oops --alias | Out-String)
Key Differences
No Dynamic Rules
oops doesn't support loading custom Python rules from ~/.config/oops/rules/. All rules are compiled in.
Workarounds:
- Open an issue to add your rule upstream
- Fork and compile your own version
- Use environment-based workarounds
No Plugin Support
Third-party thefuck_contrib_* packages don't work with oops. Most popular plugin functionality is built-in.
TOML vs Python Config
Python expressions don't work in TOML:
# This won't work in TOML
rules = [r for r in ALL if 'git' in r]
Use explicit lists or environment variables instead.
Feature Comparison
| Feature | thefuck | oops |
|---|---|---|
| Built-in rules | 170 | 177+ |
| Shell support | 6 | 6 |
| Config format | Python | TOML |
| Custom rules | Yes (.py) | No |
| Plugins | Yes | No |
| Instant mode | Yes | Partial |
| Startup time | ~300ms | ~30ms |
| Memory | ~50MB | ~10MB |
Running Both
You can run both tools side-by-side during migration:
# Use different aliases
eval "$(thefuck --alias fuck)" # Python version as 'fuck'
eval "$(oops --alias)" # Rust version as 'oops'
Rollback
If you need to go back to thefuck:
- Uninstall oops
- Restore your shell config to use
thefuck --alias - Your Python thefuck installation should still work
Troubleshooting
Rules Not Matching
Enable debug mode to see what's happening:
oops --debug
Wrong Shell Detected
Set explicitly:
export TF_SHELL=zsh
Config Not Loading
Check the file location:
# Should be at:
~/.config/oops/config.toml
# Not:
~/.config/thefuck/settings.toml # Wrong location!
Missing Rule
If a thefuck rule isn't in oops:
- Check if it has a different name
- Check the full rules list
- Open an issue on GitHub
If you run into issues, check our GitHub Issues or start a Discussion.