TL;DR — Quick Summary

McFly replaces Ctrl+R with an intelligent shell history search. It uses a neural network to prioritize commands based on context — directory, exit status, and recency.

McFly makes Ctrl+R smarter. It ranks your shell history by context — what you’ve run in this directory, recent exit codes, and frequency — so the right command is always at the top.

Installation

# macOS
brew install mcfly

# Arch Linux
sudo pacman -S mcfly

# Cargo
cargo install mcfly

# Add to ~/.bashrc
eval "$(mcfly init bash)"

# Add to ~/.zshrc
eval "$(mcfly init zsh)"

# Add to ~/.config/fish/config.fish
mcfly init fish | source

Usage

# Ctrl+R opens McFly search (replaces default)
# Type to filter history
# Arrow keys to navigate results
# Enter to execute selected command
# F2 to delete a history entry
# Esc to cancel

# Environment variables:
export MCFLY_RESULTS=50            # Number of results
export MCFLY_FUZZY=2               # Fuzzy search tolerance
export MCFLY_INTERFACE_VIEW=BOTTOM # Show at bottom
export MCFLY_KEY_SCHEME=vim        # Vi keybindings

Comparison

FeatureMcFlyAtuinfzf+historyCtrl+R
Smart rankingNeural netFrecencyNoNo
Context-awareYesPartialNoNo
Cross-machineNoYesNoNo
Fuzzy searchYesYesYesNo
Exit code awareYesYesNoNo
Shell supportBash/Zsh/FishAllAllAll

Summary

  • McFly replaces Ctrl+R with intelligent, context-aware history search
  • Neural network ranks results by directory, frequency, recency, exit status
  • Supports Bash, Zsh, and Fish with zero-config integration
  • Fuzzy search, delete entries, vim keybindings option
  • Written in Rust — instant results from your entire history