A simple and fast rebuild of the UNIX ls
command.

Download the latest release for your architecture:
macOS Apple Silicon (M1/M2/M3):
sudo mkdir -p /usr/local/bin
sudo curl -L $(curl -s https://api.github.com/repos/maclong9/list/releases/latest | grep "browser_download_url.*sls-aarch64" | cut -d\" -f4) -o /usr/local/bin/sls
sudo chmod +x /usr/local/bin/sls
macOS Intel:
sudo mkdir -p /usr/local/bin
sudo curl -L $(curl -s https://api.github.com/repos/maclong9/list/releases/latest | grep "browser_download_url.*sls-x86_64" | cut -d\" -f4) -o /usr/local/bin/sls
sudo chmod +x /usr/local/bin/sls
Manual Download:
Visit the releases page and download sls-aarch64
(Apple Silicon) or sls-x86_64
(Intel) directly.
mise settings experimental true
mise install spm:maclong9/swift-list
Generate completion scripts:
# Bash
sls --generate-completion-script bash > ~/.bash_completions/sls.bash
# Zsh
sls --generate-completion-script zsh > ~/.zsh/completion/_sls
# Fish
sls --generate-completion-script fish > ~/.config/fish/completions/sls.fish
Install by copying to your shell's completion directory or sourcing in your shell config.
sls [OPTIONS] [<path>]
-a, --all
— Display all files, including hidden-l, --long
— Display file attributes, one file per line-o, --one-line
— Display each file on its own line-d, --directory
— List directories themselves, not their contents
-c, --color
— Colorize the output-i, --icons
— Display icons denoting file type-F, --classify
— Append indicator (/, *, etc.) to entries--human-readable
— Display human readable file sizes (KB, MB, GB)--header
— Display column headers explaining the output format (requires-l
)
-t, --sort-time
— Sort by modification time (newest first)-S, --sort-size
— Sort by file size (largest first)
-r, --recurse
— Recurse into directories
--help
— Show help information--version
— Display version information
# Basic listing
sls
# Detailed view with colors and icons
sls -cli --human-readable
# Show headers for clarity
sls -l --header --human-readable
# Recursive exploration
sls -clir --human-readable
# Sort by time or size
sls -clit --human-readable # by time
sls -cliS --human-readable # by size