What is sls?
sls (Swift List) is a modern CLI tool that serves as a drop-in replacement for the traditional ls command. Built with Swift, it provides enhanced functionality for listing directory contents with improved formatting, icons, colors, and flexible sorting options.
Command Syntax
Components
- paths - Optional. One or more paths to list. Defaults to current directory if omitted.
- options - Flags and options that control output format, filtering, and sorting.
How sls Differs from ls
While maintaining compatibility with commonls patterns, sls offers:
- Modern output formatting - Clean, readable display with optional icons and colors
- Simplified flags - Intuitive short and long forms for all options
- Type safety - Built with Swift for robust error handling
- Flexible sorting - Sort by name (default), time, or size
- Depth-controlled recursion - Limit how deep recursive listings go
- Human-readable sizes - Easy-to-read file size formatting
Quick Examples
Learn More
Explore the complete command reference:Basic Usage
Core usage patterns and common workflows
Options Reference
Complete list of all flags and options
Examples
Real-world examples and use cases