Modern Linux command-line environments require memorising hundreds of intricate commands, obscure arguments, and complex syntax patterns. While traditional man pages provide exhaustive technical documentation and history files store past entries, recalling exact arguments under pressure often slows productivity. The open-source Rust-based utility navi solves this challenge by delivering interactive, fuzzy-searchable cheatsheets that prompt users for variable parameters before executing commands.
What Is navi and Why Is It Valuable?
Unlike static cheatsheet websites or plain text notes, navi is an active terminal assistant. It pairs a high-speed fuzzy finder with structured recipe templates to transform command discovery into an interactive workflow:
- Fuzzy Search Filtering: Type natural language descriptions to filter through hundreds of system administration, Docker, Git, and Kubernetes commands instantly.
- Interactive Parameter Prompts: When a command requires variable inputs (such as IP addresses, branch names, or container IDs),
naviprompts you for values or automatically executes sub-commands to populate dynamic selection lists. - Seamless Shell Integration: Can be mapped directly to keyboard shortcuts such as
Ctrl + Gin Bash, Zsh, or Fish to autocomplete commands directly into your active prompt. - Community and Custom Repositories: Easily import community-curated cheatsheets or author personal cheat files tailored to your infrastructure.
Installing navi on Linux
You can install navi using package managers, Cargo, or direct release binaries across any modern distribution.
Method 1: Installing via Cargo
If you have Rust and Cargo configured on your machine, compile and install navi from crates.io:
cargo install --locked navi
Method 2: Installing on Arch Linux
On Arch Linux and derived systems, navi is available directly through the official repositories:
sudo pacman -S navi
Method 3: Installing via Pre-Compiled Binaries on Debian and Ubuntu
Download the pre-compiled binary from the project’s official GitHub releases:
curl -s https://api.github.com/repos/denisidoro/navi/releases/latest \
| grep "browser_download_url.*x86_64-unknown-linux-musl.tar.gz" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi -
tar -xzf navi-*-x86_64-unknown-linux-musl.tar.gz
sudo mv navi /usr/local/bin/
Running navi and Navigating Cheatsheets
When launching navi for the first time without arguments, it prompts you to download community cheatsheets:
navi
Select Download community cheatsheets and choose standard collections like denisidoro/cheats. Once imported, the interface displays an interactive three-pane layout:
- Left Pane: Filterable list of command descriptions.
- Right Pane: The corresponding shell command template.
- Top Prompt: Interactive search bar where you can type keywords (e.g., “tar extract” or “docker logs”).
Targeting Queries Directly
To skip the initial browsing menu and jump directly to specific topics, supply the query flag:
navi --query "git commit"
Authoring Custom Cheatsheet Files
The true utility of navi emerges when creating custom recipes for internal company scripts and recurring tasks. Custom sheets use the .cheat file extension and follow a clean syntax:
- Create a directory for your personal recipes:
mkdir -p ~/.local/share/navi/cheats/personal
nano ~/.local/share/navi/cheats/personal/sysadmin.cheat
- Structure your file using standard syntax tags:
- Lines starting with
%define tags and categories. - Lines starting with
#provide human-readable descriptions. - Lines directly beneath descriptions contain executable commands.
- Lines starting with
$populate dynamic variable suggestions.
- Lines starting with
- Add sample commands to the file:
% docker, containers
# Follow live container logs with timestamps
docker logs -f --tail <lines> <container_id>
$ container_id: docker ps --format '{{.ID}}\t{{.Names}}' --- --column 1 --delimiter '\t'
$ lines: echo "50\n100\n500"
- Save the file. When you search for this recipe in
navi, selecting it will trigger an interactive menu to choose active container IDs from livedocker psoutput.
Configuring Shell Keybindings for Seamless Autocomplete
To insert commands directly into your terminal cursor position without copying and pasting, integrate navi into your shell configuration.
For Bash Users
Append the following initialisation string to your ~/.bashrc file:
eval "$(navi widget bash)"
For Zsh Users
Append the initialisation string to your ~/.zshrc file:
eval "$(navi widget zsh)"
Reload your shell (source ~/.bashrc or source ~/.zshrc). Now, pressing Ctrl + G anywhere in your terminal opens navi, allowing you to select a command and automatically paste the completed syntax straight into your prompt.