Back to services

mcfly

Fly through your shell history. Great Scott!

View alternatives to mcfly
Suggest edit
Open source
Self-hostable
MIT
Recent reviews

Alternatives

Tech stack

No tech stack added yet. Sign in to suggest some

Note: We couldn't fetch the official site (the GitHub repository page) this time, so the content below is based on existing knowledge of the project. For specific installation methods and configuration options, please refer to the repository README.

Overview

McFly replaces your shell's default Ctrl-R reverse history search with a full-screen interactive search interface. Regular shell history is ordered only by time, but McFly records more context and then uses a small neural network to score and rank candidate commands, so the command you most likely want appears first.

Key Features

  • Smart ranking: Ranking takes many factors into account, including the directory the command was run in, the commands run before and after it, how often it's used, how recently it was used, and whether it succeeded (exit status).
  • Richer history: The extra information is stored in a local SQLite database, while the shell's own history file is still written as usual.
  • Interactive search interface: Results are filtered as you type. Use the arrow keys to select, press Enter to run a command right away, or select it and edit it first.
  • Delete entries from history: You can remove unwanted history commands directly from the interface.
  • Customizable: Environment variables let you adjust behavior such as the key scheme (e.g. Vim style), light or dark theme, and fuzzy search.

Target Users and Use Cases

McFly suits developers, operations engineers, and system administrators who work in the terminal a lot, especially those who switch between multiple project directories and often repeat long, complex commands. McFly can prioritize relevant commands based on the current directory; for example, in a given project directory it shows that project's build or deploy commands first.

Installation and Configuration

Common installation methods:

  • Homebrew on macOS / Linux: brew install mcfly
  • Rust's Cargo: cargo install mcfly
  • Download a prebuilt binary from GitHub Releases

After installing, add an initialization line to your shell configuration file, for example:

  • Bash (~/.bashrc): eval "$(mcfly init bash)"
  • Zsh (~/.zshrc): eval "$(mcfly init zsh)"
  • Fish (~/.config/fish/config.fish): mcfly init fish | source

After reopening your terminal, press Ctrl-R to open the McFly search interface.

Technical Highlights

  • Written in Rust, with fast startup and low resource usage
  • All data is stored locally, with no reliance on cloud services
  • Open source project, hosted on GitHub