Skip to main content

Overview

Proxy for the tree command with intelligent output filtering and compaction.

Syntax

Options

All native tree flags are supported and passed through:
number
Descend only level directories deep
flag
List directories only
flag
Show all files (including hidden)
string
Exclude files matching pattern
string
List only files matching pattern
flag
Filter files according to .gitignore

Examples

Basic Tree

Output:

Limited Depth

Directories Only

Output:

Features

  • Gitignore-aware: Automatically respects .gitignore patterns
  • Compact output: Removes excessive whitespace and formatting
  • Token-optimized: Aggregates file counts, truncates deep trees

Token Savings

Average token reduction: 60%

Implementation

Source: src/tree.rs