Boost Your Terminal Productivity with navi: Install, Customize, and Use Cheat Sheets
The article introduces the open‑source terminal tool navi, explains how to install it on macOS or Linux via Homebrew or manual cloning, shows how to create custom Chinese cheat‑sheet files, and demonstrates its interactive command lookup features.
Overview
navi is an open‑source terminal utility that provides instant, searchable cheat‑sheets for command‑line tools. It loads cheat‑sheet files written in a simple markup and displays matching entries as the user types.
Installation
For macOS or Linux systems that have Homebrew or Linuxbrew installed, run: brew install denisidoro/tools/navi If a package manager is not available, clone the repository and install manually. The fuzzy‑finder fzf must be installed beforehand.
git clone --depth 1 https://github.com/denisidoro/navi /opt/navi
cd /opt/navi
sudo make install
# ensure fzf is installed, e.g.:
# brew install fzf (macOS) or follow https://github.com/junegunn/fzfBasic usage
After installation, invoke navi (or navi search) and type a keyword. Matching cheat‑sheet entries appear with a short description. Navigate with the arrow keys and press Enter to paste the selected command into the current shell.
Creating custom cheat‑sheets
Custom cheat‑sheets are plain‑text files with the .cheat suffix placed in navi’s cheat directory. When installed via Homebrew the default path is: /usr/local/Cellar/navi/0.8.1/libexec/cheat/ The file format consists of three sections:
Header : starts with % followed by the cheat name and optional tags, e.g. %ffmpeg video.
Body : each line contains a comment (starting with #) followed by the command. The comment appears in the UI, the command is executed. Variables are written as <variable>. Example:
Variable definitions (optional): placed after a blank line, each line defines how a variable is generated using the syntax $ variable: generation‑method. If omitted, navi prompts the user to type the value.
Example ffmpeg.cheat file:
%ffmpeg video
# Convert video to mp4
ffmpeg -i <input> -c:v libx264 -preset fast <output>
$ input: file
$ output: fileWhen invoked, navi asks for input and output files, then inserts the completed command.
Repository
Source code and additional documentation are hosted at:
https://github.com/denisidoro/navi
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
