Introduction
navi solves a very specific problem: you remember there's a command for "rebase the last 3 commits interactively" but forget the exact flags. Instead of googling again, navi shows you a fuzzy-searchable list of snippets, prompts for any parameters, and runs the command directly.
With over 17,000 GitHub stars, navi is the go-to interactive cheatsheet tool. The navi widget hook integrates with zsh/bash/fish so you can invoke it anywhere with a keystroke.
What navi Does
navi reads Markdown-like .cheat files that contain titled commands with parameter placeholders. It indexes them, lets you fuzzy-search (fzf-style), prompts for each parameter, and executes (or pastes) the resolved command. Community cheatsheets cover Git, Docker, Kubernetes, ffmpeg, tmux, AWS CLI, and hundreds more.
Architecture Overview
[.cheat files]
commands with titles + tags + parameters
% Git
# Interactively rebase last N commits
git rebase -i HEAD~<n>
$ n: echo 1 2 3 4 5 6 7 8 9 10 --- --column 1
|
[navi]
- indexes cheats from repos + local folders
- fzf-based fuzzy search
- interactive parameter prompts (shell command or static list)
|
[Shell widget]
Ctrl+G opens navi
Resolved command goes into command buffer
|
[Execution]Self-Hosting & Configuration
# ~/.local/share/navi/cheats/work.cheat
% k8s, kubernetes
# Get pods in a namespace
kubectl get pods -n <namespace>
$ namespace: kubectl get ns -o name --- --column 1 | sed "s|namespace/||"
# Tail logs for a pod
kubectl logs -f <pod> -n <namespace>
$ pod: kubectl get pods -n <namespace> -o name --- --column 1 | sed "s|pod/||"
$ namespace: kubectl get ns -o name --- --column 1 | sed "s|namespace/||"# Workflow
navi # browse all cheats
navi --query "git rebase" # pre-filtered
navi fn welcome # take the interactive tour
navi info cheats-example # see example cheat format
navi add denisidoro/cheats # install community cheatsKey Features
- Fuzzy-search cheatsheets — find any command in a second
- Interactive parameter prompts — prompted for each
<placeholder> - Dynamic parameter sources — shell commands populate choices (e.g., your namespaces)
- Shell widget — Ctrl+G from any prompt to open navi
- Community cheatsheets — pull from denisidoro/cheats and dozens more repos
- Private repos + folders — keep team/personal cheats in your dotfiles
- Stdout or execute — print the resolved command or run it
- Cross-platform — macOS, Linux, Windows (via WSL/shell)
Comparison with Similar Tools
| Feature | navi | tldr | cheat | howdoi | ai shell (gh copilot) |
|---|---|---|---|---|---|
| Source | Cheat files (community + local) | Curated pages | Cheat files | Stack Overflow scraper | LLM |
| Interactive params | Yes | No | No | No | No |
| Offline | Yes | Yes | Yes | No | No |
| Dynamic param sources | Yes (shell commands) | No | No | No | LLM-generated |
| Keyboard shortcut | Yes (widget) | No | No | No | Via gh copilot suggest |
| Best For | Team+personal cheats | Quick reference | Simple cheats | Legacy | AI-generated |
FAQ
Q: navi vs tldr? A: tldr shows canonical docs (one source of truth). navi lets you run commands with interactive prompts for parameters. Complementary: tldr for reference, navi for execution.
Q: How do I add my own cheats?
A: Create ~/.local/share/navi/cheats/mine.cheat with navi's format. Use % for tags, # for commands, $ for parameter sources. navi info dirs shows the cheatsheet directories.
Q: Can I use navi with fish?
A: Yes — navi widget fish | source in config.fish. Binds Ctrl+G by default.
Q: How do I resolve conflicts when multiple cheats have the same command?
A: navi fuzzy-search will show them grouped by tag. Organize your cheats with % tags (e.g., % git, work) to filter quickly.
Sources
- GitHub: https://github.com/denisidoro/navi
- License: Apache-2.0