7 Powerful Ways the Navi Cheatsheet Tool Speeds Up Your Terminal

The navi cheatsheet tool solves a problem every Linux user has: you know a command exists, you have typed it before, but the exact flags escape you. Instead of digging through shell history or opening a browser tab, navi gives you a fuzzy-searchable menu of commands right in the terminal. You pick one, fill in the blanks, and it runs. The project by Denis Isidoro has passed 17,000 stars on GitHub, and after a few weeks of daily use I understand why.

Navi is written in Rust and uses fzf under the hood for the search interface. If you already use fzf for file and history search, the muscle memory transfers instantly.

What the Navi Cheatsheet Tool Does Differently

Plenty of tools show you command examples. The difference here is interactivity. A navi cheatsheet is not static text. Commands contain variables, and navi prompts you for each one, often with a live-generated list of valid values.

Take a Docker example. A cheat for killing a container can declare that the container name variable should be populated from docker ps. When you select that cheat, navi runs docker ps in the background and shows you a picker with your actual running containers. You never type a container name by hand again.

Installing Navi on Debian, Fedora, and Arch

On Arch, navi sits in the official repositories:

sudo pacman -S navi

On Debian, Ubuntu, and Fedora there is no official package yet, so the install script is the fastest route:

bash <(curl -sL https://raw.githubusercontent.com/denisidoro/navi/master/scripts/install)

If you have Rust installed, cargo install navi works too. Homebrew users on Linux can run brew install navi. Whichever route you take, confirm the install with navi --version. I tested version 2.24 on Debian 13 for this article.

You also need fzf on the machine, since navi shells out to it for the selection UI. Most distributions package it as fzf.

Running Your First Navi Cheatsheet Search

Type navi with no arguments. On first run it offers to download cheat repositories. Accept the featured repo to get a starter set covering git, docker, kubernetes, and common shell tasks.

The interface is a single fuzzy-search prompt. Type a few characters of what you want to do, not the command name. Searching for “list open ports” finds the right ss invocation even if you forgot that ss is the tool for the job. That reverse lookup, from intent to command, is the core habit change.

Two flags I use constantly:

  • navi --print: prints the selected command instead of executing it, so you can inspect or edit first
  • navi --query "docker": opens the picker pre-filtered to a topic

Writing Your Own Navi Cheatsheet Files

The bundled repos are fine, but the tool earns its place once you write your own cheats. A navi cheatsheet is a plain text file with a .cheat extension. The syntax takes about two minutes to learn:

% docker, containers

# Remove a container
docker rm 

$ container: docker ps -a --format '{{.Names}}'

The % line sets tags, # lines are searchable descriptions, and the command follows. The $ line is where it gets useful: it tells navi to populate the variable by running docker ps -a and letting you pick from the output.

Run navi info cheats-path to find where local cheats live, usually ~/.local/share/navi/cheats. Drop your file in a subdirectory there and it shows up in the next search. I keep a cheat file for every server role I manage: one for the mail host, one for the web servers, each holding the exact restore and log-inspection commands for that box.

Adding Community Repositories

Beyond your own files, navi can pull cheat collections from any git repository:

navi repo browse
navi repo add denisidoro/cheats

The browse subcommand lists featured repositories with descriptions. Adding one clones it into your cheat path. Since cheats are plain text in git, sharing a team’s operational runbook becomes a one-line setup step for new hires.

The Shell Widget: Ctrl-G Everything

The single best configuration change is the shell widget. Add this to ~/.bashrc:

eval "$(navi widget bash)"

Zsh and fish variants exist as well. After reloading the shell, Ctrl-G opens navi, and the command you pick lands on your prompt instead of executing immediately. You get a chance to review and adjust before pressing Enter. For anything touching production, that pause matters.

The widget also reads whatever you have already typed on the line and uses it as the initial search query. Half-remember a flag? Type the fragment, hit Ctrl-G, and pick the full command.

Navi Cheatsheet Workflow vs tldr and fzf History

How does this compare to the alternatives? The tldr command shows curated examples for a tool you name, which is great for reading but leaves the typing to you. Plain fzf history search only finds commands you have already run on that machine. The navi cheatsheet approach covers the gap: commands you have never run, made executable with your values filled in.

The three stack well together. I use tldr to learn a tool, shell history via atuin for recent work, and navi for the rehearsed, parameterized commands I refuse to memorize.

When Not to Use the Navi Cheatsheet Tool

Skip it for one-off commands you will never repeat. Writing a cheat has a small cost, and it only pays back on the second use. It is also not a documentation system: a cheat holds a command, not the reasoning behind it. Keep runbooks for the why, navi for the what.

Interactive selection also needs a real terminal. In scripts and cron jobs, call navi --best-match --query "your search" --print if you must, but honestly, scripts should hardcode their commands.

Worth the Ten Minutes

Setup takes ten minutes: install the binary, add the widget, import one repo. From there, every gnarly command you look up gets captured as a cheat once and reused forever. My tar flag lookups dropped to zero in the first week.

The navi GitHub repository has full documentation, including cheat syntax details and the official community cheat collection. Start with the featured repo, then write the first cheat for whatever command you googled most recently. That one is the navi cheatsheet you actually needed.

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts