Terminal GuideTerminal Guide
navi icon

navi

Dev Tools
macOSLinux
Rust

Interactive cheatsheet tool for command-line.

Official Website

Features

InteractiveCheatsheetsParameterizedShell Integration

Installation

Homebrew
brew install navi
Cargo (Rust)
cargo install navi

Why use navi?

navi is an interactive cheatsheet tool that helps you remember and execute complex command-line snippets. Instead of searching the internet or scrolling through history, browse categorized cheatsheets, fill in parameters interactively, and execute commands instantly.

Built-in Cheatsheets

Access hundreds of pre-written command snippets across different tools and languages. Organized by category for easy browsing.

Interactive Parameters

Fill in placeholders with interactive prompts. Navi guides you through required and optional parameters.

Quick Execution

Execute commands directly from navi without copying and pasting. Preview commands before running.

Extensible

Add custom cheatsheets for your team's tools. Share knowledge across your organization.

Installation

Installation
# macOS (Homebrew)
brew install navi

# Linux/macOS (Cargo)
cargo install navi

# Linux - Binary
curl -sSL https://github.com/denisidoro/navi/releases/download/v2.25.0/navi-v2.25.0-x86_64-unknown-linux-musl.tar.gz | tar xz
sudo mv navi /usr/local/bin/

# Post-install: Enable shell integration
navi widget bash  # For Bash
navi widget zsh   # For Zsh
navi widget fish  # For Fish

# Optional: Update built-in cheatsheets
navi update

Basic Usage

Opening navi

Getting Started
# Open interactive cheatsheet browser
navi

# Search for specific tool/command
navi --query 'docker'

# Browse by category
navi ls  # List all available cheatsheets

# Show help
navi --help

# Update cheatsheets from remote
navi update

Navigation

KeyAction
↓/↑Navigate up/down in list
EnterSelect item or execute command
Ctrl+CExit or go back
/Search within cheatsheets
?Show help/documentation

Working with Cheatsheets

Cheatsheets
# View all available cheatsheets
navi ls

# List cheatsheets for specific tool
navi ls docker

# Search for keyword
navi --query 'restart'

# Show cheatsheet content
navi --search 'docker'

# Browse all git commands
navi --query 'git'

Common Use Cases

Docker Commands

Docker
# Search for Docker-related commands
navi --query 'docker'

# Find container management commands
navi --query 'container'

# Browse image operations
navi --query 'image'

# Search networking
navi --query 'network'

# Find volume commands
navi --query 'volume'

Git Workflows

Git
# Search git commands
navi --query 'git'

# Find branching commands
navi --query 'branch'

# Rebase operations
navi --query 'rebase'

# Stash management
navi --query 'stash'

# Cherry-pick commands
navi --query 'cherry'

System Administration

System Admin
# Search system commands
navi --query 'systemctl'

# Find file operations
navi --query 'chmod'

# User management
navi --query 'user'

# Network diagnostics
navi --query 'ping'

# Process management
navi --query 'kill'

Programming/Development

Development
# Python snippets
navi --query 'python'

# JavaScript/Node commands
navi --query 'npm'

# Java compilation and execution
navi --query 'java'

# Go development
navi --query 'go'

# Rust tooling
navi --query 'cargo'

Shell Integration

Shell Integration
# Bind to keyboard shortcut in bash
navi widget bash | source

# Bind to keyboard shortcut in zsh
eval "$(navi widget zsh)"

# Bind to keyboard shortcut in fish
navi widget fish | source

# Now use Ctrl+G to open navi (configurable)
# Fill in parameters interactively
# Press Enter to execute or copy to clipboard

Creating Custom Cheatsheets

Cheatsheet Format

Custom Cheatsheet
# Create a custom cheatsheet: ~/.local/share/navi/cheats/my-tools.cheat
% kubernetes

# Get pod logs
kubectl logs <pod_name>

# Get pod details
kubectl describe pod <pod_name>

# Port forward to pod
kubectl port-forward <pod_name> <local_port>:<pod_port>

# Execute command in pod
kubectl exec -it <pod_name> -- <command>

$ pod_name: kubectl get pods | awk '{print $1}' | tail -n +2

Cheatsheet Structure

Syntax
# Comments start with %
% category

# Commands are followed by description (without %)
# Command snippets are just text

# Variables are wrapped in < >
# Example: <variable_name>

# Variable suggestions use $ at line start
$ variable_name: shell command to generate suggestions

# Example with suggestions
# Create directory structure
mkdir -p <path>

$ path: find . -type d | head -10

Sharing Custom Cheatsheets

Sharing
# Add remote cheatsheet source
navi add <remote_url>

# Example: Add team cheatsheets from GitHub
navi add https://github.com/myteam/cheatsheets

# List enabled cheatsheet sources
navi source list

# Disable a source
navi source disable <source_name>

# Update all sources
navi update

Advanced Features

Command-line Options

Advanced Options
# Search without opening interactive UI
navi --query 'git' --best-match --print

# Print command instead of executing
navi --print

# Skip confirmation before execution
navi --no-confirm

# Use specific cheatsheet file
navi --cheatsheet /path/to/custom.cheat

# Export environment
navi --export

Integration with Scripts

Scripting
# Use navi output in bash script
COMMAND=$(navi --query 'docker' --print)
echo "Executing: $COMMAND"

# Chain multiple navi calls
navi --query 'git' --print | navi --query 'status' --print

# Save frequently used command
navi --query 'docker' --print > my-command.sh
chmod +x my-command.sh

# Use with pipes
navi --query 'compress' --print | bash

Customization

Customization
# Configure navi behavior
# Edit config file: ~/.config/navi/config.yaml

# Set preferred editor
export EDITOR=vim

# Set preferred shell for suggestions
export SHELL=bash

# Customize keyboard shortcuts
# (See documentation for binding options)

# Enable/disable cheatsheet sources
navi source list
navi source disable official

Tips and Best Practices

  • Set up shell widget binding immediately after installation for the best experience. Use navi widget bash (or zsh/fish)
  • Run navi update regularly to get the latest community cheatsheets
  • Create custom cheatsheets for your project-specific commands and share them with your team via GitHub
  • Use navi with --print flag to review commands before executing them
  • Combine navi with other tools by piping output. Example: navi --query 'find' --print | bash
  • Browse cheatsheets during onboarding to help new team members learn complex commands
Written by Dai AokiPublished: 2026-01-20

Related Articles

Explore More