Context-Aware History With mcfly

Replace Ctrl-R with a neural-ish ranked history search that adapts to your project.

macOSsearchshellcliLow risk
Bind mcfly to Ctrl-R via shell init, then press Ctrl-R and type to search.

01Command

Command
$ mcfly search

02What it does

mcfly trains a small model on your shell history and prioritizes commands likely to be useful in the current directory, also showing a short description of what each command does. It runs as a fast Rust TUI.

03Risk

RiskLow risk
CompatibilitymacOS with Homebrew installed
!Warning: It needs a one-time shell hook to record history; without that hook it falls back to the plain history file.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Homebrew formula: mcfly
    Homebrew · vendor-doc · 2026-09-20
    Evidence: Packages mcfly, a shell history search tool that ranks by context and recency.

Last verified: 2026-09-22 · Category: Developer

06Related solutions