Claude
Skills
Sign in
Back

modern-cli-tools

Included with Lifetime
$97 forever

Modern Unix command alternatives - faster, more user-friendly tools for everyday tasks When Claude is about to use legacy tools (find, grep, ls, cat, sed, du, df, ps) OR when user mentions fd, rg, eza, bat, or asks about faster alternatives

General

What this skill does


# Modern CLI Tools Agent

## What's New in 2025

- **eza Replaces exa**: Original exa is unmaintained (@ogham unreachable), use **eza** fork instead
- **eza v0.23.0+** (July 2025): Hyperlink support, custom themes, enhanced Git integration
- **ripgrep Performance**: SIMD optimizations (Teddy algorithm), 23x-fastest on benchmarks
- **fd Speed**: 23x faster than `find -iregex`, parallel directory traversal (~855ms vs 11-20s)
- **bat Integrations**: Git sidebar (+ for additions, ~ for modifications), fzf/ripgrep/man integration
- **Universal Adoption**: Modern tools now the de facto standard for Rust/Go development workflows

## Overview

This agent teaches modern alternatives to traditional Unix commands that are faster, more user-friendly, and feature-rich. These tools are written in Rust and other modern languages, providing significant performance improvements and better default behaviors.

**Important Note**: Always use **eza**, not exa. The original exa project is unmaintained (since 2023), and eza is the actively maintained community fork with new features and bug fixes.

## For Claude: Tool Selection Guidelines

**When performing file operations, ALWAYS prefer modern tools:**

- ❌ `find` → ✅ `fd` - Faster, simpler syntax, respects .gitignore
- ❌ `grep -r` → ✅ `rg` - 10-100x faster, better defaults
- ❌ `ls -la` → ✅ `eza -la` - Better formatting, git integration
- ❌ `cat file` → ✅ `bat file` - Syntax highlighting, line numbers
- ❌ `sed` → ✅ `sd` - Simpler syntax, safer
- ❌ `du -sh` → ✅ `dust` - Visual tree, faster
- ❌ `df -h` → ✅ `duf` - Better formatting
- ❌ `ps aux` → ✅ `procs` - Modern output, better filtering

**Before using legacy tools, check if modern alternatives are available.**

## Tool Comparison

| Traditional  | Modern Alternative | Key Benefits                                       |
| ------------ | ------------------ | -------------------------------------------------- |
| `find`       | `fd`               | Faster, simpler syntax, respects `.gitignore`      |
| `grep`       | `rg` (ripgrep)     | 10-100x faster, better defaults, auto-ignore       |
| `ls`         | `eza`              | Better formatting, colors, git integration         |
| `cat`        | `bat`              | Syntax highlighting, line numbers, git integration |
| `cd`         | `zoxide`           | Smart directory jumping based on frequency         |
| `sed`        | `sd`               | Simpler syntax, safer replacements                 |
| `top`/`htop` | `btop`             | Beautiful TUI, better metrics                      |
| `du`         | `dust`             | Visual tree, faster analysis                       |
| `df`         | `duf`              | Better formatting, clearer output                  |
| `ps`         | `procs`            | Modern output, better filtering                    |

## Installation

### macOS (Homebrew)

```bash
# Install all at once
brew install fd ripgrep eza bat fzf sd zoxide dust duf procs btop

# Or install individually
brew install fd           # find alternative
brew install ripgrep      # grep alternative (rg)
brew install eza          # ls alternative
brew install bat          # cat alternative
brew install fzf          # fuzzy finder
brew install sd           # sed alternative
brew install zoxide       # smart cd
brew install dust         # du alternative
brew install duf          # df alternative
brew install procs        # ps alternative
brew install btop         # top/htop alternative
```

### Linux (cargo - Rust package manager)

```bash
# Install Rust first
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Install tools
cargo install fd-find ripgrep eza bat-cat sd zoxide du-dust duf procs
```

## fd - Modern Find

### Basic Usage

```bash
# Find files by name (case-insensitive by default)
fd readme

# Find with extension
fd -e md
fd -e js -e ts

# Find in specific directory
fd pattern ~/projects

# Find directories only
fd -t d config

# Find files only
fd -t f

# Find hidden files
fd -H config

# Exclude patterns
fd -E node_modules -E .git

# Execute command on results
fd -e jpg -x convert {} {.}.png
```

### Advanced Patterns

```bash
# Regex search
fd '^[A-Z].*\.md$'

# Show full path
fd -p src/components

# Search by file size
fd -S +1m  # Files larger than 1MB
fd -S -100k  # Files smaller than 100KB

# Modified time
fd -c never  # Changed within never
fd --changed-within 1d  # Changed within 1 day
fd --changed-before 1w  # Changed before 1 week

# Case sensitive
fd -s README

# Max depth
fd -d 3 config
```

### Common Use Cases

```bash
# Find all TypeScript files excluding node_modules
fd -e ts -E node_modules

# Find config files
fd -g '*config*'

# Find and delete empty directories
fd -t d -x sh -c 'rmdir {} 2>/dev/null'

# List all test files
fd test -e ts -e js

# Find large log files
fd -e log -S +100m
```

## rg (ripgrep) - Modern Grep

### Basic Usage

```bash
# Search for pattern
rg "TODO"

# Case insensitive
rg -i "readme"

# Whole word match
rg -w "config"

# Show line numbers (default)
rg "error"

# Show context (3 lines before and after)
rg -C 3 "function"

# Search specific file types
rg -t ts "interface"
rg -t md "# Heading"

# Exclude file types
rg -T js "pattern"

# Search hidden files
rg -. "secret"

# Search without ignoring (.gitignore)
rg -u "pattern"
```

### Advanced Patterns

```bash
# Regex search
rg '^\s*function\s+\w+'

# Multiple patterns (OR)
rg -e "error" -e "warning"

# Invert match (show non-matching lines)
rg -v "test"

# Count matches
rg -c "import"

# Show only filenames
rg -l "TODO"

# Show only matching parts
rg -o '\b[A-Z]{3,}\b'

# Replace (preview only)
rg "old" -r "new"

# Multiline search
rg -U 'function.*\{.*\}'
```

### Common Use Cases

```bash
# Find all TODOs in code
rg "TODO|FIXME|HACK"

# Find imports of a specific module
rg "import.*from.*'react'"

# Find function definitions
rg "function\s+\w+\s*\("

# Search in specific directories
rg "API_KEY" src/

# Find unused exports
rg -w "export" | rg -v "import"

# Case-insensitive search in markdown files
rg -i -t md "claude code"

# Find potential secrets (be careful!)
rg -i "(password|secret|api[_-]?key)\s*[:=]"

# Search git history
rg --no-ignore --hidden "sensitive_data"
```

## eza - Modern ls (Maintained Fork of exa)

**Important**: eza is the actively maintained fork of exa. The original exa project has been unmaintained since 2023 (maintainer @ogham unreachable). Use **eza** for latest features and bug fixes.

### What's New in eza v0.23.0+ (July 2025)

- **Hyperlink Support**: Clickable file/directory links in terminal
- **Custom Themes**: User-defined color schemes
- **Enhanced Git Integration**: Better git status visualization
- **Performance Improvements**: Faster tree rendering
- **More File Type Icons**: Expanded icon support for modern file types

### Basic Usage

```bash
# List files (basic)
eza

# Long format
eza -l

# All files including hidden
eza -a

# Long format with all files
eza -la

# Tree view
eza -T

# Tree with depth limit
eza -T -L 2

# Sort by time
eza -l --sort modified

# Sort by size
eza -l --sort size

# Reverse sort
eza -lr
```

### Advanced Features (v0.23.0+)

```bash
# Git status integration (enhanced in v0.23)
eza -l --git

# Hyperlinks (clickable in compatible terminals)
eza -l --hyperlink

# Custom theme
eza -l --color-scale

# Show file headers
eza -lh

# Group directories first
eza -l --group-directories-first

# Show icons (with nerd fonts)
eza -l --icons

# Color scale for file ages
eza -l --color-scale

# Show file times
eza -l --time-style long-iso
eza -l --time modified
eza -l --time accessed
eza -l --time created

# Binary size units
eza -l --binary

# Show inode
eza -li

# Only directories
eza -lD

# Only files
eza -lf
```

### Common Use Cases

```bash
# Beautiful tree with git status
eza -T --git-ignore --icons

# Recently modified files
eza -l --sort modified -r | head -10

# Largest files in directory
eza -l --sort size -r

# Show all with git stat

Related in General