Command-line tool that provides practical usage examples for common CLI utilities like find, tar, and grep.
eg is a command-line reference tool that provides practical usage examples for common CLI utilities. It serves as a companion to man pages by offering real-world examples rather than comprehensive documentation. When you run eg find, it displays curated examples of how to use the find command in typical scenarios, helping users quickly recall common usage patterns without parsing through verbose manual pages.
The tool includes built-in examples for many standard Unix utilities and allows users to create custom example collections. Examples are stored as markdown files following a naming convention (e.g., find.md for find examples). Users can configure custom directories to store their own examples, which appear alongside the default examples when displayed.
eg supports extensive customization through configuration files, including color schemes, output formatting, regex-based substitutions, and custom pager settings. The tool uses less as the default pager with specific flags optimized for displaying colored, formatted examples. It also provides options like --squeeze to remove excess blank lines and --list to show all available example commands.
The tool targets developers and system administrators who frequently use command-line utilities but need quick reminders of common usage patterns. Rather than searching through man pages or online resources, users can get immediate, contextual examples tailored to practical scenarios.
# via pip
pip install eg
# via Homebrew
brew install eg-examples

