navi — Interactive Cheatsheet Tool for the Command Line
navi turns cheatsheets into executable commands. Browse a fuzzy-finder list of snippets (git, docker, kubectl, ffmpeg), fill in parameters with interactive prompts, and run — no more copy-pasting from Stack Overflow.
Agent 可直接安装
这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。
npx -y tokrepo@latest install a691b1ab-380a-11f1-9bc6-00163e2b0d79 --target codex先 dry-run 确认安装计划,再运行此命令。
What it is
navi is a Rust-based command-line tool that turns plain-text cheatsheets into an interactive, executable interface. You search for a command by description (e.g., 'rebase last N commits'), navi shows matching snippets with parameter placeholders, you fill them in, and the command runs.
It is built for developers and sysadmins who work across multiple CLI tools -- git, docker, kubectl, ffmpeg, aws -- and cannot keep every flag combination in memory. Community-maintained cheatsheet repositories cover hundreds of tools out of the box.
How it saves time or tokens
Instead of opening a browser, searching Stack Overflow, copying a command, and adapting it to your situation, navi keeps the entire lookup-to-execution cycle inside the terminal. A single keystroke (Ctrl+G when configured as a shell widget) opens fuzzy search over all your cheatsheets.
For AI agent workflows, navi cheatsheets serve as structured command references that agents can parse. The .cheat file format is simple enough that an LLM can generate new cheatsheets on demand.
How to use
- Install navi:
# macOS
brew install navi
# Or via Cargo
cargo install navi
- Run
navito open the interactive fuzzy finder. On first launch, it prompts you to install community cheatsheets.
- Add shell integration for instant access:
# Add to ~/.zshrc
eval "$(navi widget zsh)"
# Now Ctrl+G opens navi anywhere
Example
A .cheat file entry looks like this:
% git, rebase
# Interactively rebase the last N commits
git rebase -i HEAD~<n>
$ n: echo '3 5 10' | tr ' ' '\n'
When you search for 'rebase' in navi, this entry appears. You select it, navi prompts for n with suggested values (3, 5, 10), and runs git rebase -i HEAD~5 for you.
# Using navi with a specific cheat repo
navi --path ~/my-cheats
# Preview mode (shows command without running)
navi --print
# Add a community repo
navi repo add denisidoro/cheats
Related on TokRepo
- CLI and Automation Tools -- More terminal productivity tools for developers
- AI Tools for Coding -- AI-powered development tools that pair well with CLI workflows
Common pitfalls
- navi requires fzf or skim for fuzzy search. If neither is installed, it falls back to a basic selector that lacks fuzzy matching.
- Custom
.cheatfiles must follow the exact format:%for tags,#for descriptions,$for variable suggestions. Deviating from this format causes silent parse failures. - Shell widget integration (Ctrl+G) only works after restarting your shell or sourcing your rc file. Forgetting to reload is the most common setup complaint.
常见问题
tldr and cheat.sh are read-only references -- they show you the command but you still copy-paste and edit it. navi is interactive: it prompts for parameters and can execute the command directly. It also supports custom private cheatsheets alongside community ones.
Yes. Create `.cheat` files in `~/.local/share/navi/cheats/` or any directory you point navi to. The format uses `%` for tags, `#` for descriptions, and `$` for parameter suggestions. See the navi GitHub wiki for the full syntax reference.
Yes. navi supports bash, zsh, fish, and elvish. The shell widget command differs per shell: use `navi widget fish` for fish integration. The interactive fuzzy search and command execution work identically across shells.
The `.cheat` file format is plain text with a simple structure, making it easy for LLMs to read, generate, or modify. An AI agent could generate project-specific cheatsheets and add them to a navi directory for the user.
Run `navi repo browse` to see available repositories, or `navi repo add <repo>` to add a specific one. To update existing repos, navigate to the cheatsheet directory and run `git pull` in each cloned repository.
引用来源 (3)
- navi GitHub Repository— navi is an interactive cheatsheet tool for the command line
- navi README— Supports bash, zsh, fish, and elvish shell integration
- navi Cheat Repositories— Community cheatsheets cover git, docker, kubectl, and hundreds more tools
讨论
相关资产
jless — Command-Line JSON Viewer with Interactive Navigation
jless is a Rust-based terminal JSON viewer designed for reading, exploring, and searching through large JSON data with vim-like key bindings and collapsible tree navigation.
GraphQL Voyager — Interactive Visual GraphQL Schema Explorer
An interactive visualization tool that represents any GraphQL API as a navigable graph, letting developers explore relationships between types, trace query paths, and understand complex schemas visually.
broot — A Better Way to Navigate Directories
broot gives you a tree view of your filesystem with fuzzy search, built-in file operations, git status, and previews — all in the terminal. It replaces the clunky `tree | less` workflow with an interactive alternative.
Wavesurfer.js — Interactive Audio Waveform Visualization
A customizable audio waveform visualization library built on the Web Audio API and HTML5 Canvas that provides navigable, zoomable waveforms with plugin support.