Command-line tool that provides practical usage examples for Unix commands as an alternative to man pages
eg is a command-line reference tool that provides practical usage examples for common Unix commands. Instead of parsing through verbose man pages to find basic usage patterns, developers can run eg <command> to see real-world examples with concrete file names and clear explanations. For instance, eg find shows actual find command examples rather than the complete flag reference.
The tool ships with a curated collection of examples stored as markdown files in an examples/ directory. Each command gets its own .md file (like find.md for find examples) that eg pipes through a pager like less. The examples follow a consistent format with the most common use cases shown first, followed by basic usage patterns and specialized sections.
Users can extend eg with custom examples by creating their own .md files in a custom directory. The tool supports extensive configuration through an .egrc file, including custom colors, output formatting, regex-based substitutions, and pager settings. Commands like eg --list show all available examples, while eg -e <command> opens an editor to modify custom examples directly.
# via pip
pip install eg
# via Homebrew
brew install eg-examples

