Convert Figma logo to code with AI

denisidoro logonavi

An interactive cheatsheet tool for the command-line

14,818
492
14,818
82

Top Related Projects

63,665

:cherry_blossom: A command-line fuzzy finder

47,483

ripgrep recursively searches directories for a regex pattern while respecting your gitignore

33,285

A simple, fast and user-friendly alternative to 'find'

50,319

📚 Collaborative cheatsheets for console commands

12,273

cheat allows you to create and view interactive cheatsheets on the command-line. It was designed to help remind *nix system administrators of options for commands that they use frequently, but not frequently enough to remember.

🖥 📊 🕹 🛠 A curated list of command line apps

Quick Overview

navi is an interactive cheatsheet tool for the command line. It allows users to browse and search through a collection of customizable cheatsheets, providing quick access to command-line snippets and explanations. navi aims to improve productivity by reducing the need to memorize complex commands or search online for syntax.

Pros

  • Highly customizable with support for user-created cheatsheets
  • Interactive interface with fuzzy search capabilities
  • Integration with shell history for context-aware suggestions
  • Cross-platform support (Linux, macOS, Windows)

Cons

  • Requires initial setup and creation of cheatsheets for maximum benefit
  • Learning curve for creating and managing custom cheatsheets
  • May not be as comprehensive as dedicated documentation for specific tools

Getting Started

To install navi, you can use one of the following methods:

# Using Homebrew (macOS and Linux)
brew install navi

# Using Cargo (Rust package manager)
cargo install navi

# Using the installation script
bash <(curl -sL https://raw.githubusercontent.com/denisidoro/navi/master/scripts/install)

After installation, you can start using navi by running:

navi

To create a new cheatsheet:

navi new

To import community cheatsheets:

navi repo add

To search for a specific command:

navi search <query>

For shell integration, add the following to your shell configuration file (e.g., .bashrc or .zshrc):

eval "$(navi widget zsh)"

This allows you to use Ctrl+G to open navi interactively within your shell.

Competitor Comparisons

63,665

:cherry_blossom: A command-line fuzzy finder

Pros of fzf

  • More versatile, can be used for general-purpose fuzzy finding beyond just command-line snippets
  • Highly customizable with extensive options for appearance and behavior
  • Faster performance, especially with large datasets

Cons of fzf

  • Steeper learning curve, requires more setup for specific use cases
  • Less focused on command-line snippet management compared to navi

Code Comparison

fzf:

find * -type f | fzf > selected

navi:

navi --query "git commit"

Summary

fzf is a powerful and flexible fuzzy finder that can be used for various purposes, including file searching, command history browsing, and more. It offers extensive customization options and excellent performance.

navi, on the other hand, is specifically designed for managing and accessing command-line snippets. It provides a more focused and user-friendly experience for this particular use case, with features like cheatsheet management and interactive prompts.

While fzf excels in versatility and speed, navi offers a more streamlined experience for command snippet management. The choice between the two depends on the user's specific needs and preferences.

47,483

ripgrep recursively searches directories for a regex pattern while respecting your gitignore

Pros of ripgrep

  • Extremely fast and efficient for searching large codebases
  • Supports various file types and encoding formats out of the box
  • Respects .gitignore rules by default, making it more convenient for developers

Cons of ripgrep

  • Limited to text search functionality, lacks interactive features
  • Requires command-line proficiency for effective use
  • Does not provide a cheatsheet or quick reference for common commands

Code comparison

ripgrep:

rg "pattern" /path/to/search
rg -i "case insensitive" ./src
rg -t py "python specific" ./project

navi:

navi
navi --query "git commit"
navi --tldr tar

Summary

ripgrep is a powerful, fast text search tool optimized for code repositories, while navi is an interactive cheatsheet manager for command-line interfaces. ripgrep excels in speed and efficiency for searching large codebases, whereas navi focuses on providing an interactive way to learn and use command-line tools. The choice between the two depends on the specific use case: ripgrep for rapid text searches, and navi for command discovery and learning.

33,285

A simple, fast and user-friendly alternative to 'find'

Pros of fd

  • Faster and more efficient file searching compared to traditional find command
  • User-friendly syntax with smart case sensitivity and regex support
  • Cross-platform compatibility (Linux, macOS, Windows)

Cons of fd

  • Limited to file searching functionality
  • Lacks the interactive cheat sheet and command suggestion features
  • May require additional tools for more complex operations

Code Comparison

fd:

fd -e txt
fd '^foo.*bar' /path/to/search

navi:

navi
navi --query 'git commit'

Key Differences

navi is an interactive cheat sheet tool for command-line interfaces, while fd is a fast and user-friendly alternative to the find command. navi focuses on providing a searchable repository of commands and snippets, whereas fd specializes in efficient file searching.

navi offers a more comprehensive solution for command discovery and learning, making it particularly useful for beginners or those working with complex command-line tools. fd, on the other hand, excels in quickly locating files and directories based on various criteria.

While both tools aim to improve command-line productivity, they serve different purposes and can be complementary in a user's toolkit. fd's simplicity and speed make it ideal for file operations, while navi's interactive nature and extensive command database provide a broader range of assistance for command-line tasks.

50,319

📚 Collaborative cheatsheets for console commands

Pros of tldr

  • Larger community and more contributors, resulting in a wider range of command examples
  • Simpler and more straightforward interface for quick command lookups
  • Available in multiple languages, making it accessible to a global audience

Cons of tldr

  • Limited to static, pre-defined command examples
  • Lacks interactive features for command customization and execution
  • No built-in search functionality for finding specific commands

Code Comparison

tldr example (command lookup):

tldr tar

navi example (interactive command search and execution):

navi --query "tar"

Summary

tldr is a straightforward command-line tool that provides concise examples for various commands, making it ideal for quick reference. It benefits from a large community and multilingual support. However, it lacks interactive features and customization options.

navi, on the other hand, offers an interactive interface with advanced search capabilities and the ability to execute commands directly. It allows for more flexibility in command usage but may have a steeper learning curve and a smaller community compared to tldr.

Both tools serve the purpose of helping users navigate command-line interfaces, but they cater to different user preferences and use cases.

12,273

cheat allows you to create and view interactive cheatsheets on the command-line. It was designed to help remind *nix system administrators of options for commands that they use frequently, but not frequently enough to remember.

Pros of cheat

  • Simpler and more straightforward to use
  • Supports multiple backends (local files, git repositories)
  • Easier to create and edit cheatsheets directly

Cons of cheat

  • Less interactive and feature-rich interface
  • Limited search capabilities compared to navi
  • Lacks advanced features like variable substitution and shell integration

Code comparison

navi:

navi --query "git commit"

cheat:

cheat git commit

Summary

cheat is a simpler tool focused on quick access to command-line cheatsheets. It's easier to create and edit cheatsheets directly, and supports multiple backends. However, it lacks the advanced features and interactivity of navi.

navi offers a more interactive and feature-rich experience, with advanced search capabilities, variable substitution, and shell integration. It's more powerful but may have a steeper learning curve.

Both tools serve the purpose of providing quick access to command-line references, but cater to different user preferences and needs. cheat is better for those who want a straightforward, no-frills approach, while navi is ideal for users who desire more advanced features and interactivity in their cheatsheet tool.

🖥 📊 🕹 🛠 A curated list of command line apps

Pros of awesome-cli-apps

  • Comprehensive collection of CLI apps across various categories
  • Regularly updated with new additions and community contributions
  • Serves as a valuable resource for discovering new CLI tools

Cons of awesome-cli-apps

  • Not an interactive tool, just a curated list
  • Requires manual exploration to find specific tools
  • No built-in functionality for running or managing the listed apps

Code comparison

navi:

navi
navi --query "git commit"
navi --tldr git

awesome-cli-apps:

# No executable code, as it's a curated list
## Example entry:
- [fx](https://github.com/antonmedv/fx) - Command-line JSON processing tool

Summary

navi is an interactive command-line tool for browsing and running shell commands, while awesome-cli-apps is a curated list of command-line applications. navi offers a more hands-on approach with its interactive interface and ability to run commands directly, whereas awesome-cli-apps provides a broader overview of available CLI tools across various categories. The choice between them depends on whether you need an interactive command runner (navi) or a comprehensive reference list of CLI applications (awesome-cli-apps).

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

navi icon Actions Status GitHub release

An interactive cheatsheet tool for the command-line.

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, skim, or Alfred under the hood and it can be either used as a command or as a shell widget (à la Ctrl-R).

Table of contents

Installation

navi can be installed with the following package managers:

Packaging status

The recommended way to install navi is by running:

brew install navi

If brew isn't available, you can check alternative install instructions.

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
  • as an Alfred workflow

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

Similar tools

There are many similar projects out there (beavr, bro, cheat, cheat.sh, cmdmenu, eg, how2, howdoi, Command Line Interface Pages and tldr, to name a few).

They are excellent projects, but navi remains unique in the following ways:

  • it's natural to write cheatsheets tailored to your needs
  • arguments are neither hardcoded nor a simple template

Etymology

Navi is a character from The Legend of Zelda Ocarina of Time that provides Link with a variety of clues to help him solve puzzles and make progress in his quest.