pacmax beta

Alfred Pac by denisidoro on GitHub

navi

An interactive cheatsheet tool for the command-line

From their README

navi icon 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.

Latest release

19 earlier releases
  • 2.24.01 year ago

    🐛 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.

  • 2.23.02 years ago

    ✨ 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)
  • 2.22.13 years ago, 2.5 MBDownload

    :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

  • 2.20.14 years ago, 3.0 MBDownload

    :bug: Fixes

    • 91763 Fix version in Cargo.toml (#731)
  • 2.20.04 years ago, 3.0 MBDownload

    :sparkles: New features

    • 67d6a Release binary for Linux ARM64 (#728)
    • 77403 Make width configurable for snippet column
    • 6a76a Add shared paths for cheat directory and config file
    • f86f9 Add build feature to disable repo management
    • 9d20d Add build feature to disable command execution

    :computer: Code quality

    • 28195 Bump all possible dependencies (#729)
    • ff638 Temporarily remove lint checks (#730)
    • 7e297 Fix path-related tests (#727)
    • 6dc6b Fix minor typos
    • 9f949 Remove references to Linuxbrew
  • 2.19.04 years ago, 3.0 MBDownload

    :sparkles: New features

    • 91783 Add smart replace functionality to the fish shell widget (#655)

    :bug: Fixes

    • 87256 Allow multi-word shell.command config (#644)

    :computer: Code quality

    • cb27f Bump serde_yaml from 0.8.21 to 0.8.23 (#653)
    • a3a48 Bump anyhow from 1.0.45 to 1.0.52 (#662)
    • 35b54 Bump clap from 3.0.0-beta.5 to 3.0.6 (#668)
    • b5568 Improve fish widget code (#671)
    • 153d0 Update legacy syntax from Elvish widget (#670)
  • 2.18.05 years ago, 3.0 MBDownload

    :sparkles: New features

    • 3b103 Add support for multiline variables (#631)

    :computer: Code quality

    • 03534 Bump clap from 3.0.0-beta.2 to 3.0.0-beta.4 (#606)
    • 70b8e Bump anyhow from 1.0.42 to 1.0.43 (#607)
    • 7c27e Bump crossterm from 0.20.0 to 0.21.0 (#612)
    • 4c030 Bump serde from 1.0.127 to 1.0.128 (#613)
    • 7f9dc Bump serde_yaml from 0.8.17 to 0.8.20 (#615)
    • fce30 Bump thiserror from 1.0.26 to 1.0.28 (#616)
    • 58604 Bump serde from 1.0.128 to 1.0.130 (#617)
    • 97064 Bump strip-ansi-escapes from 0.1.0 to 0.1.1 (#618)
    • 86b5b Bump thiserror from 1.0.28 to 1.0.29 (#619)
    • 83921 Bump serde_yaml from 0.8.20 to 0.8.21 (#622)
    • 1e449 Bump anyhow from 1.0.43 to 1.0.44 (#623)
    • 8672c Bump thiserror from 1.0.29 to 1.0.30 (#627)
    • 63e9d Bump crossterm from 0.21.0 to 0.22.1 (#636)
    • 95e57 Update to rust 1.56.0 and 2021 edition (#637)
    • e08b6 Bump anyhow from 1.0.44 to 1.0.45 (#638)
  • 2.17.05 years ago, 2.9 MBDownload

    :sparkles: New features

    • c9701 Print an empty line between previews (#536)
    • 54ff5 Add icon SVG (#537)
    • 4c958 Replace ~ by $HOME in paths (#565)
    • dd1cd Interpolate env variables in NAVI_PATH (#588)
    • 954bc yaml: add support for cheats.paths
    • e6acb Add support for --expand
    • 85ca6 Add cheats for navi itself (#599)

    :bug: Fixes

    • 26ec4 Fix preview-window in Windows (#531)
    • baa47 Fix navi fn welcome (#534)
    • 30fbb Use absolute path for navi when possible (#535)
    • 327f9 Pass delimiter to finder
    • 4ac39 Respect BIN_DIR in install script (#566)
    • 72578 Fix preview-var when using fish (#567)
    • 63068 Respect fzf-overrides in shell widget (#568)
    • fe37c Fix finder options (#590)
    • 59362 Fix behavior for snippets with duplicated lines
    • 0f95a Fix --map when using zsh
    • 32a37 Fix colors in help message
    • 3abd3 Widget: fix interpretation of ||
    • 9396f Widget: fix replacements in case of multiple occurrences

    :computer: Code quality

    • 8a031 Use cargo directly in makefile
    • d48d5 Bump regex from 1.4.5 to 1.4.6 (#538)
    • 14017 Upgrade to GitHub-native Dependabot (#540)
    • 5e7b2 Fix clippy warnings
    • cd57b Fix path for bash used in tests (#591)
    • 425ce Use correct bash binary in Makefile

    :bangbang: Breaking changes

    • 3f300 Prevent snippet autoselection
    • 954bc yaml: deprecate support for cheats.path
    • 02fc8 Do not collapse empty lines in snippets (#595)
    • a36c2 Close widget on single ESC (#597)
  • 2.16.05 years ago, 2.9 MBDownload

    :bangbang: Breaking changes

    :sparkles: New features

    • 5acdb Add navi fn map::expand
    • 86b0a Allow tag filtering (#508)
    • 42ef1 Allow configuration of shell used for shell out (#511)
    • 7fb2b Add support for config files (#518)

    :bug: Fixes

    :computer: Code quality

    :information_source: Context

    Please check navi --help and /docs for more instructions in case you use the features removed in this release.

  • 2.15.15 years ago, 7.6 KBDownload

    :sparkles: New features

    • 9095e Publish binaries for more platforms, including Windows (#490)

    :bug: Fixes

    :computer: Code quality

    • 33c01 Update demo video (#488)
    • fb6a2 Add link to more shell instructions
  • 2.15.05 years ago, 7.6 KBDownload

    :bangbang: Breaking changes

    • 4c297 Make --map behave as function body (#468)

    :sparkles: New features

    • deca1 Make preview var content streamable
    • 307f0 Improve bash and zsh widgets (#486)

    :bug: Fixes

    • 5da5c If command not found in cheatsh, report and return
    • 19487 Make preview window show mapped values

    :computer: Code quality

    • 347c1 Fix warnings (#464)
    • 17cd4 Fix all new warnings (#467)
    • 23be6 Move common helpers to src/ (#465)
    • b6be9 Bump all dependencies (#466)
    • f966e Remove unused code for global flag
    • 43f01 Correctly show preview var window for --multi (#472)
    • fe07f Refactor finder packages (#473)
    • 16a8b Refactor terminal_width package
    • 3870c Refactor core package (#476)
    • b2816 Refactor fetcher packages (#477)
    • 30c64 Rename display package
    • a8ddc Add instructions for shell widget customization (#480)
    • f415e Use Pathbufs appropriately (#481)
    • 58dec Use remove_dir_all crate (#482)
    • 243a2 Use crossterm instead of termion and terminal_width
    • 1f356 Refactor env_vars package (#485)
  • 2.14.05 years ago, 7.6 KBDownload

    :sparkles: New features

    • 8e324 Add keybinding for editing cheatsheet entry
    • 5c43c Improve argument parsing (#452)

    :bug: Fixes

    • 93058 Add UX workaround for nested variables
    • dd519 Convert - to _ for env vars (#454)

    :computer: Code quality

  • 2.13.15 years ago, 7.6 KBDownload

    :bug: Fixes

    • ae3d4 Prevent invisible preview window in case of :hidden in FZF_DEFAULT_OPTS (#446)
    • f31ee Update help commands
  • 2.13.06 years ago, 7.6 KBDownload

    :sparkles: New features

    • 8e324 Trigger edit on the current cheat file

    :bug: Fixes

    • 14997 Fix error when pressing enter with nothing selected (#438)
    • 6dcbc Improve support for variable prompt in shell scripting (#428)
    • 648eb Alfred workflow: fix quoting (#430)
    • ca458 Fix autoselect-1 when using skim (#429)
    • ff84a Fix error when downloading repo using tab (#427)
    • 9cf12 Fix trailing slash in $NAVI_PATH (#426)

    :computer: Code quality

    • 0e2f2 Bump Github actions dependencies (#439)
    • 0ddf7 Make break logic simpler
  • 2.12.16 years ago, 7.4 KBDownload

    :bug: Fixes

    • de061 Fix support for fish shell (#421)
    • 7724e Fix typo in aliases.md

    :computer: Code quality

  • 2.12.06 years ago, 7.4 KBDownload

    :sparkles: New features

    • 2868d Add navi info cheats-path command (#409)
    • fa08d Repo: add option for importing all files (#407)
    • 16e40 Restart navi after adding a repo (#404)
    • 52b52 Make cheat finding recursive (#403)
    • 0e902 Add ctrl-r binding for toggle-all (#402)
    • 6808d Allow variable suggestions to use preview window (#399)

    :computer: Code quality

    :bug: Fixes

    • 5fad7 Prevent deprecation notice in shell widget (#405)
  • 2.11.06 years ago, 7.4 KBDownload

    :sparkles: New features

    • 566f7 Revamp preview window for argument selection (#398)

    :bug: Fixes

    • 566f7 Fix preview-window height in skim (#398)
  • 2.10.06 years ago, 7.4 KBDownload

    :sparkles: New features

    • abae4 Allow color and width customization (#386)
    • 4ba03 Allow initial support for tldr and cheat.sh (#387)

    :computer: Code quality

  • 2.9.06 years ago, 7.4 KBDownload

    :sparkles: New features

    • 00fe2 Add ability to extend cheatsheets (#382)

    :computer: Code quality

    • e64d1 Make variable-map multi-indexed (#381)