lstr Plugin
Fast, minimalist directory tree viewer with theme-aware coloring, git integration, file permissions, sizes, and .gitignore support. Classic mode for headless output and optional interactive TUI.
Commands
Directory Tree
lstr dir tree— Generate a directory tree listing
Utility
lstr self version— Print lstr versionlstr _ _— Passthrough to lstr CLI
Usage Examples
- "Show the directory tree for the current folder"
- "List files with git status indicators"
- "Show file sizes and permissions in a tree"
- "Generate a tree respecting .gitignore"
- "Show only directories"
Installation
brew install lstr
Examples
# Basic tree for current directory
lstr dir tree
# Tree for a specific directory
lstr dir tree /path/to/dir
# Show file sizes
lstr dir tree -s
# Show file permissions
lstr dir tree -p
# Show git status (Modified, New, Untracked)
lstr dir tree -G
# Combine options: sizes, permissions, and git status
lstr dir tree -s -p -G
# Show icons (requires Nerd Font)
lstr dir tree --icons
# Respect .gitignore
lstr dir tree -g
# Limit depth to 3 levels
lstr dir tree -L 3
# Show only directories
lstr dir tree -d
# Combine: gitignore + depth 2 + git status
lstr dir tree -g -L 2 -G
Key Features
- Classic and interactive modes:
lstrfor headless output,lstr interactivefor TUI - Theme-aware coloring: Respects
LS_COLORSenvironment variable - Git integration: Show file statuses (
-G) like Modified, New, Untracked - File permissions:
-pshows permission bits - File sizes:
-sshows human-readable sizes - Icons:
--iconsdisplays file-specific icons (requires Nerd Font) - .gitignore support:
-gautomatically filters ignored files - Depth control:
-Llimits recursion depth - Directories only:
-dshows only directories - Piping support: Output can be piped to
fzf,less,bat, etc.
Notes
- Running
lstrwithout arguments generates a tree for the current directory - Use
lstr interactivedirectly for the keyboard-driven TUI mode (not via supercli) - Theme colors are fully customizable via the
LS_COLORSenvironment variable - Works great in pipelines:
lstr | fzf,lstr | less,lstr | bat