navi

denisidoroApache-2.0活跃维护 有专家点评

命令行交互式速查表工具,用模糊搜索快速查找并执行常用 shell 命令片段,省去翻笔记和背参数。

An interactive cheatsheet tool for the command-line

v2.24.0发布于 2025-01-29 23:18 UTC17,853star +9 / 7 天584fork同步于 2026-11-10 23:26 UTC

专家点评

上手难度:进阶更新于 2026-11-11

把散落在 dotfiles 和笔记里的命令片段变成可模糊检索、带参数补全的交互式速查表

适用场景

  • 记不住长参数组合的日常运维:把 kubectl/aws/ffmpeg 这类参数多、用得又不频繁的命令写成 .cheat,用 fzf 选而不是翻 history 或 man,比 alias 灵活、比笔记软件少一次切窗口
  • 团队共享命令规范:把 .cheat 放 git 仓库里,navi repo add 拉下来,新人不用问人就知道部署、日志排查的标准命令长什么样,比 wiki 更不容易过期
  • 参数值需要现场枚举的场景:候选值由命令动态生成(分支名、容器名、profile 名),选完直接拼成可执行命令,省掉复制粘贴和手改占位符
  • 已经重度用 fzf 的 shell 工作流:作为 widget 挂在 bash/zsh/fish 里,按快捷键唤出,不改变现有习惯

踩坑

  • 首次运行会引导下载速查表到 ~/.local/share/navi/cheats/,离线或受限网络环境下这一步会卡住,需要提前手动放好 .cheat 文件
  • 底层必须自备 fzf 或 skim,README 把它当外部前置依赖而非内置,装完 navi 直接跑会失败
  • issue 里反复出现的是 shell 集成覆盖不全:bash/zsh/fish 的 widget 是反应数最高的一条,Windows cmd/PowerShell 和 Nushell 也各有长期未闭环的请求,如果你的主力 shell 不在已支持列表里,别指望开箱即用
  • 项目已进入维护模式,不再新增功能;tldr 集成在 tealdeer 上有失败报告,依赖这类外部数据源的用法要自己验证

同类对比

同类可看 pet(同样管理 snippet,但更偏存储而非交互式浏览)和 cheat/cheat.sh(纯文本速查,没有参数补全和 fzf 选择层)。如果你要的是 shell history 搜索而不是手写片段,atuin 是另一条路。

怎么上手

由 README 提炼,执行前请确认
brew install navi
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

命令行交互式速查表工具,让你浏览并执行自己或他人维护的命令片段,不用死记 CLI

命令行交互式速查表工具,用模糊搜索快速查找并执行常用 shell 命令片段,省去翻笔记和背参数。

核心能力

  • 用 .cheat 文件描述命令片段与参数
  • 参数候选值动态生成并列表展示
  • 底层依赖 fzf 或 skim 做模糊选择
  • 可作为命令、shell 组件或 Tmux 组件使用
  • 支持导入 git 仓库及 tldr、cheat.sh 的速查表

容易踩的坑

需预先安装 fzf 或 skim 作为底层选择器;首次运行会引导下载速查表,默认存于 ~/.local/share/navi/cheats/;项目已进入维护模式,不再新增功能

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v2.24.0
  1. v2.25.0-beta1Test Release for v2.25.0-beta1pre-release2025-04-09 · 2025-04-09 18:30 UTC
    查看更新说明

    ⚠️ Unstable release ⚠️

    This pre-release aims to evaluate the current stability of navi v2.25.0-beta1. Early adopters can try it but this release is not guaranteed to be stable.

    What's Changed

    New Contributors

    Full Changelog: https://github.com/denisidoro/navi/compare/v2.24.0...v2.25.0-beta1

  2. v2.24.02.24.0最新正式版2025-01-29 · 2025-01-29 23:18 UTC

    🐛 Fixes

    • Improvements for Windows
    • Improvements for the fish plugin

    💻 Code quality

    • Documentation improvements

    Note: builds for Apple devices are broken right now. They'll be available in the next release.

  3. v2.23.02.23.02023-12-10 · 2023-12-10 09:46 UTC
    查看更新说明

    ✨ New features

    • 21f93 Use XDG conventions on macOS too (#833)

    🐛 Fixes

    💻 Code quality

    • 29e58 Add pacman instructions (#831)
    • a8f38 Improve docs on directory defaults and env vars (#859)
    • e1c26 Improve docs on cheat files (#864)
  4. v2.22.12.22.12023-04-09 · 2023-04-09 14:22 UTC
    查看更新说明

    :sparkles: New features

    • e3920 Add --prevent-interpolation flag (#824)
    • 4b07d Add support for code blocks using markdown syntax (#807)

    :bug: Fixes

    • f8192 Fix publish script (#825)
    • f6414 Prevent variable selection content from being limited to 3 columns (#821)
    • 89637 Correctly calculate character widths (#820)
    • dee8f Fix typos
    • 41aa4 Fix preview map "leaking" with multiple variables
    • 8b78d Improve error handling for cheatsh and tldr (#766)
    • d68c4 Support multi-word arguments in FZF overrides (#765)
    • 81cd7 Fallback to nano if EDITOR isn't set (#764)

    :computer: Code quality

    • 2b03c Remove link to Katacoda (#819)
    • b56d7 Use dns_common library (#818)
    • 8cf9c Update dependencies (#817)
    • 317d1 Add xonsh support instructions to Installation.md
    • cb999 Refresh README
    • 63681 Add link to TiddlyWiki plugin
    • d05fc Add documentation about Tmux-widget
    • 1823e Fix install script
    • 69075 Delete dependabot.yml
    • 5c6da Prettify md/yaml files
    • 9d862 Minor code base improvements (#767)
    • ebb02 Refactor code base (#760)
    • 80f4a Fix typo in installation docs
    • 9c903 feat: add install docu for windows powershell

    :bangbang: Breaking changes

    • bd2fe Replace target: aarch64-apple-ios by aarch64-apple-darwin (#827)

    Note: the release before this one is v2.20.1

  5. v2.20.12.20.12022-05-18 · 2022-05-18 12:09 UTC
    查看更新说明

    :bug: Fixes

    • 91763 Fix version in Cargo.toml (#731)

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    navi GitHub release

    An interactive cheatsheet tool for the command-line.

    [!NOTE] Maintenance mode. navi still gets bug fixes, but no new features are planned. For a more modern alternative, check out ezlo.

    Demo

    navi allows you to browse through cheatsheets (that you may write yourself or download from maintainers) and execute commands. Suggested values for arguments are dynamically displayed in a list.

    Pros

    • it will spare you from knowing CLIs by heart
    • it will spare you from copy-pasting output from intermediate commands
    • it will make you type less
    • it will teach you new one-liners

    It uses fzf or skim under the hood and it can be either used as a command or as a shell widget (à la Ctrl-R).

    Table of contents

    Installation

    The recommended way to install navi is by running:

    brew install navi
    

    [!NOTE] For more details on how to install Navi, see docs/installation

    navi can be installed with the following package managers:

    Packaging status

    Usage

    There are multiple ways to use navi:

    • by typing navi in the terminal
      • pros: you have access to all possible subcommands and flags
    • as a shell widget for the terminal
      • pros: the shell history is correctly populated (i.e. with the actual command you ran instead of navi) and you can edit the command as you wish before executing it
    • as a Tmux widget
      • pros: you can use your cheatsheets in any command-line app even in SSH sessions
    • as aliases
    • as a shell scripting tool

    In particular, check these instructions if you want to replicate what's shown in the demo above.

    Cheatsheet repositories

    Running navi for the first time will help you download and manage cheatsheets. By default, they are stored at ~/.local/share/navi/cheats/.

    You can also:

    Cheatsheet syntax

    Cheatsheets are described in .cheat files that look like this:

    % git, code
    
    # Change branch
    git checkout <branch>
    
    $ branch: git branch | awk '{print $NF}'
    

    The full syntax and examples can be found here.

    Customization

    You can:

    More info

    Please run the following command to read more about all possible options:

    navi --help
    

    In addition, please check the /docs folder or the website.