๐ณ maram
A blazing-fast, modern alternative to the Unix tree command written in Rust
maram (เดฎเดฐเด) - Malayalam word for "tree" - is a high-performance filesystem tree visualizer with advanced features like inline file sizes, line counts, powerful filtering, and beautiful visualizations.
โจ Features
๐ Performance
- Blazing Fast - Custom iterative walker with parallelism
- Smart Filtering - Early pruning for efficiency
- Memory Efficient - Iterative traversal, no stack limits
- Platform Optimized - Direct syscalls on Unix/Linux
๐จ Rich Display
- Beautiful Trees - ASCII/Unicode visualization
- Inline Metrics - File sizes and line counts
- Size Charts - Visual disk usage distribution
- Colored Output - Syntax highlighting for clarity
๐ Advanced Filtering
- Regex Patterns - Include/exclude with regex
- Size Ranges - Filter by file size
- Time-based - Filter by modification time
- Gitignore - Respect
.gitignorefiles
๐ ๏ธ Flexibility
- Multiple Formats - Tree, JSON, CSV, plain text
- Configurable - Via
~/.maram.toml - Cross-Platform - Linux, macOS, Windows
- Sorting Options - By name, size, time, type
๐ฆ Installation
# Coming soon
๐ Quick Start
# Display current directory
# Show files with sizes and line counts
# Beautiful Unicode tree with colors
# Filter and sort Rust files by size
# Show disk usage distribution
๐ธ Screenshots
๐ Basic Tree View
๐ Size Distribution Chart
๐ฏ Powerful Filtering
๐จ Unicode Tree with Colors
๐ Project Overview with Limits
๐ Usage
Basic Commands
| Command | Description |
|---|---|
maram |
Display current directory tree |
maram /path/to/dir |
Display specific directory |
maram -u |
Use Unicode characters for tree |
maram --show-lines |
Show line counts for text files |
maram --show-size |
Show file sizes inline |
Filtering Options
| Option | Example | Description |
|---|---|---|
--include |
--include='\.rs$' |
Include files matching regex |
--exclude |
--exclude='node_modules' |
Exclude paths matching regex |
--only-dirs |
--only-dirs |
Show only directories |
--min-size |
--min-size=1MB |
Show files larger than size |
--newer-than |
--newer-than=1d |
Show files modified recently |
--gitignore |
--gitignore |
Respect .gitignore files |
Display Options
| Option | Example | Description |
|---|---|---|
--sort |
--sort=size --reverse |
Sort by size (descending) |
--max-files |
--max-files=10 |
Limit files per directory |
-L, --depth |
-L 3 |
Maximum depth to traverse |
--output |
--output=json |
Output format (tree/json/csv/plain) |
Size Distribution
# Show size distribution by file type
# Show top 20 largest files by extension
# Show distribution grouped by size buckets
โก Performance
maram is designed for speed and efficiency:
| Benchmark | maram | tree | find | fd |
|---|---|---|---|---|
| Small directory (318 files) | 2.2ms | 4.1ms | 3.0ms | 29.6ms |
| Large directory (7,234 files) | 12.4ms | 89.5ms | 29.8ms | 198.3ms |
Why is maram so fast?
- ๐ง Custom Walker - Optimized filesystem traversal with inline filtering
- ๐ Zero Allocations - Pre-allocated buffers in hot paths
- โก Direct Syscalls - Bypasses standard library overhead on Unix
- ๐ Parallelism - Multi-threaded processing with rayon
- ๐ฏ Smart Pruning - Skip branches that don't match filters early
โ๏ธ Configuration
Create ~/.maram.toml to customize defaults:
[]
= true # Use Unicode tree characters
= true # Always show file sizes
= false # Show line counts
= false # Calculate directory sizes
= true # Show total size summary
[]
= false # Show hidden files
= true # Respect .gitignore
= 10 # Maximum traversal depth
= 100 # Max files per directory
= "name" # Sort by: name, size, time, type
[]
= 0 # CPU threads (0 = auto-detect)
= 1073741824 # Max file size for line counting (1GB)
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.