maram 0.1.0

A modern, high-performance alternative to the Unix tree command
Documentation

๐ŸŒณ maram

A blazing-fast, modern alternative to the Unix tree command written in Rust

Crates.io License: MIT Downloads

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 .gitignore files

๐Ÿ› ๏ธ 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

cargo install maram
git clone https://github.com/mufeedvh/maram
cd maram
cargo install --path .
# Coming soon
brew install maram

๐Ÿš€ Quick Start

# Display current directory
maram

# Show files with sizes and line counts
maram --show-size --show-lines

# Beautiful Unicode tree with colors
maram -u --show-size

# Filter and sort Rust files by size
maram --include='\.rs$' --sort=size --reverse

# Show disk usage distribution
maram --dist=ext --format=chart

๐Ÿ“ธ 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
maram --dist=type --format=chart

# Show top 20 largest files by extension
maram --dist=ext --top=20 --format=table

# Show distribution grouped by size buckets
maram --dist=size --format=chart
maram --help

โšก 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:

[display]
unicode = true          # Use Unicode tree characters
show_size = true        # Always show file sizes
show_lines = false      # Show line counts
dir_sizes = false       # Calculate directory sizes
total_size = true       # Show total size summary

[filters]
show_hidden = false     # Show hidden files
gitignore = true        # Respect .gitignore
max_depth = 10          # Maximum traversal depth
max_files = 100         # Max files per directory
sort_by = "name"        # Sort by: name, size, time, type

[performance]
threads = 0             # CPU threads (0 = auto-detect)
max_file_size = 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.