HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
cantino
mcfly
Rust2018–2026
cantino / mcfly

mcfly

Fly through your shell history. Great Scott!

42Distinct people
55Mentions
1Explicit recommenders
7.8KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Fly through your shell history. Great Scott!

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

This can be made much more powerful by McFly, I recommend: https://github.com/cantino/mcfly

PufPufPuf used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year55 dated mentions

Observed mentions: 2018-12-03 21:08:18 UTC to 2026-04-02 11:34:14 UTC.

051015202018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 3 mentions; 2 submissions, 1 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 19 mentions; 3 submissions, 16 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 10 mentions; 1 submissions, 9 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC312
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC321
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC505
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC19316
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC1019
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC514
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC606
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC303

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
Seeking co-maintainers: I don't have much time to maintain this project these days. If someone would like to jump in and become a co-maintainer, it would be appreciated! McFly - fly through your shell history McFly replaces your default ctrl-r shell history search with an intelligent search engine that takes into account your working directory and the context of recently executed commands. McFly's suggestions are prioritized in real time with a small neural network. TL;DR: an upgraded ctrl-r where history results make sense for what you're working on right now. Features Rebinds ctrl-r to bring up a full-screen reverse history search prioritized with a small neural network. Augments your shell history to track command exit status, timestamp, and execution directory in a SQLite database. Maintains your normal shell history file as well so that you can stop using McFly whenever you want. Unicode support throughout. Includes a simple action to scrub any history item from the McFly database and your shell history files. Designed to be extensible for other shells in the future. Written in Rust, so it's fast and safe. You can type % to match any number of characters when searching. Supports Zsh, Bash (version 3+), and PowerShell (version 7+) Prioritization The key feature of McFly is smart command prioritization powered by a small neural network that runs in real time. The goal is for the command you want to run to always be one of the top suggestions. When suggesting a command, McFly takes into consideration: The directory where you ran the command. You're likely to run that command in the same directory in the future. What commands you typed before the command (e.g., the command's execution context). How often you run the command. When you last ran the command. If you've selected the command in McFly before. The command's historical exit status. You probably don't want to run old failed commands. Installation Install with Homebrew (on macOS or Linux) Install mcfly: brew install mcfly Add the following to the end of your ~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish file: Bash: eval "$(mcfly init bash)" Zsh: eval "$(mcfly init zsh)" Fish: mcfly init fish | source Run . ~/.bashrc / . ~/.zshrc / source ~/.config/fish/config.fish or restart your terminal emulator. Uninstalling with Homebrew Remove mcfly: brew uninstall mcfly Remove the lines you added to ~/.bashrc / ~/.zshrc / ~/.config/fish/config.fish. Install with MacPorts (on macOS) Update the ports tree sudo port selfupdate Install mcfly: sudo port install mcfly Add the following to the end of your ~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish file, as appropriate: Bash: eval "$(mcfly init bash)" Zsh: eval "$(mcfly init zsh)" Fish: mcfly init fish | source Run . ~/.bashrc / . ~/.zshrc / source ~/.config/fish/config.fish or restart your terminal emulator. Uninstalling with MacPorts Remove mcfly: sudo port uninstall mcfly Remove the lines you added to ~/.bashrc / ~/.zshrc / ~/.config/fish/config.fish. Install using WinGet on Windows (we do not maintain this install script and cannot vouch for its accuracy or safety) Install mcfly: winget install AndrewCantino.McFly Add the following to your $PROFILE: Invoke-Expression -Command $(mcfly init powershell | Out-String) Restart your terminal Uninstall using Winget Remove mcfly: winget uninstall AndrewCantino.McFly Remove the lines you added to $PROFILE. Installing using our install script (macOS or Linux) curl -LSfs https://raw.githubusercontent.com/cantino/mcfly/master/ci/install.sh | sh -s -- --git cantino/mcfly (or, if the current user doesn't have permissions to edit /usr/local/bin, then use sudo sh -s.) Add the following to the end of your ~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish file, respectively: Bash: eval "$(mcfly init bash)" Zsh: eval "$(mcfly init zsh)" Fish: mcfly init fish | source Run . ~/.bashrc / . ~/.zshrc / source ~/.config/fish/config.fish or restart your terminal emulator. Installing manually from GitHub (macOS or Linux) Download the latest release from GitHub. Install to a location in your $PATH. (For example, you could create a directory at ~/bin, copy mcfly to this location, and add export PATH="$PATH:$HOME/bin" to your .bashrc / .zshrc, or run set -Ua fish_user_paths "$HOME/bin" for fish.) Add the following to the end of your ~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish, respectively: Bash: eval "$(mcfly init bash)" Zsh: eval "$(mcfly init zsh)" Fish: mcfly init fish | source Run . ~/.bashrc / . ~/.zshrc / source ~/.config/fish/config.fish or restart your terminal emulator. Install manually from source (macOS, Linux, or Windows) Install Rust 1.40 or later Run git clone https://github.com/cantino/mcfly and cd mcfly Run cargo install --path . Ensure ~/.cargo/bin is in your $PATH. Add the following to the end of your ~/.bashrc, ~/.zshrc, ~/.config/fish/config.fish, or powershell $PROFILE, respectively: Bash: eval "$(mcfly init bash)" Zsh: eval "$(mcfly init zsh)" Fish: mcfly init fish | source Powershell Core (pwsh) Invoke-Expression -Command $(mcfly init powershell | out-string) Run . ~/.bashrc / . ~/.zshrc / source ~/.config/fish/config.fish / . $PROFILE or restart your terminal emulator. Install by Zinit Add below code to your zshrc. zinit ice lucid wait"0a" from"gh-r" as"program" atload'eval "$(mcfly init zsh)"' zinit light cantino/mcfly It will download mcfly and install for you. $(mcfly init zsh) will be executed after prompt iTerm2 To avoid McFly's UI messing up your scrollback history in iTerm2, make sure this option is unchecked: Dump history McFly can dump the command history into stdout. For example: mcfly dump --since '2023-01-01' --before '2023-09-12 09:15:30' will dump the command run between 2023-01-01 00:00:00.0 to 2023-09-12 09:15:30(exclusive) as json. You can specify csv as dump format via --format csv as well. Each item in dumped commands has the followi
Read the full README on GitHub

What Hacker News says

55 sources
Mcfly[1] takes your working directory into account when searching shell history. From the readme: > The key feature of McFly is smart command prioritization powered by a small neural network that runs in real time. The goal is for the command you want to run to always be one of the top suggestions. > When suggesting a command, McFly takes into consideration: - The directory where you ran the command. You're likely to run that command in the same directory in the future. - What commands you typed before the command (e.g., the command's execution context). - How often you run the command. - When you last ran the command. - If you've selected the command in McFly before. - The command's historical exit status. You probably don't want to run old failed commands. [1] https://github.com/cantino/mcfly
In Zoxide: A Better CD Command
I've been using McFly [1] recently, and like it a lot. > McFly replaces your default ctrl-r shell history search with an intelligent search engine that takes into account your working directory and the context of recently executed commands. McFly's suggestions are prioritized in real time with a small neural network. [1] https://github.com/cantino/mcfly
In Better Shell History Search
My current secrets: * cht.sh is a great way to avoid a lot of this stuff - there's a commandline tool as well * usable cli ai setup: simonw's llm (https://github.com/simonw/llm) + openrouter (https://github.com/simonw/llm-openrouter) + free models (https://openrouter.ai/models?max_price=0) + glow (https://github.com/charmbracelet/glow) + adding this to your .rc file: function lm { local input="$*" llm -s 'Answer as short and concise as possible' ${input} | glow } Here's an example, $ lm "ssh command to forward the port 5050 on user@remote to my localhost:7001" ssh -L 7001:localhost:5050 user@remote $ Now for a sophisticated use-case I have a small tmux program where I can capture what's on the pane, enter a prompt and it will query
Read the rest
an llm so I can say things like "How do I fix this error" or "what debian package do I need to get this to run right?" ... both these are recent patterns I've started and they've been real game changers Some lesser game-changers: * tmux extrakto - opens an "fzf" like search of all the text on the screen. So after a "git status", I can do git add (run extracto - enter partial path, press tab) and continue: https://github.com/laktak/extrakto * mcfly history: https://github.com/cantino/mcfly just watch the demo, you'll see * ugrep: grep with a powerful tui: https://github.com/Genivia/ugrep - I became an instant convert. * batcat: https://github.com/sharkdp/bat ... you really need to use some of its other features to leverage it. It's really nice.
In Some terminal frustrations

Showing the 15 most recent of 55 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.