By Marcelo Lewin Logo

TreeX

About

TreeX is a cross-platform CLI tool for visualizing and exporting folder structures. It provides emoji-based directory trees with extensive export capabilities to multiple formats text documents and images.

Features

  • 🎨 Emoji Display - Folder 📂, file 📄, hidden 🫥, and locked 🔒 icons
  • 📤 Multi-Format Export - SVG, PNG, WebP, and Markdown with perfect emoji rendering
  • Smart Filtering - Configurable ignore lists and display options
  • 🔍 Detailed Information - File permissions, hidden file detection and more
  • 🎯 Flexible Output - Console display or export to files
  • 🌍 Cross-Platform - Works on Windows, macOS, and Linux
  • 🎨 Emoji Management - Customize folder, file, and status emojis with easy list, update, and restore

🚀 Installation

npm install -g @icodewith-ai/treex

Note for Linux users: You may need to use sudo:

sudo npm install -g @icodewith-ai/treex

Option 2: Development Installation

# Clone the repository
git clone https://github.com/icodewith-ai/treex.git
cd treex

# Install dependencies
npm install

# Make it globally available
npm link

System Requirements

  • Node.js: Version 14.0.0 or higher
  • Image exports: Currently supported on Windows and macOS only

Note for Linux users: Image exports (PNG, WebP, SVG) are not available on Linux due to rendering compatibility issues. Markdown export is fully supported on all platforms.

⚡ Quick Start

# Basic usage - scan current directory
treex

# Show help with styled interface  
treex --help

# Scan specific directory
treex ./my-project

# Export to multiple formats
treex -E "svg,png,md" -S my-tree ./my-project

# Show detailed information
treex -d ./my-project

📖 Command Reference

Basic Syntax

treex [directory] [options]

Core Options

OptionShortDescription
--details-dShow extra details like locked files and hidden indicators
--collapsed-cOnly show top-level folders/files (non-recursive)
--folders-only-fShow only folders recursively, omit files
--help-hDisplay help information
--version-VShow version number

Export Options

OptionShortDescription
--export-as <types>-EExport format(s) - comma-separated (md, svg, png, webp)
--save-to <filename>-SExport filename without extension

File / Folder Ignore Management Options

OptionShortDescription
--show-ignored-sList currently ignored files/folders and exit
--add-ignored <items>-aComma-separated names to add to ignored list
--remove-ignored <items>-rComma-separated names to remove from ignored list

Emoji Management Options

OptionShortDescription
--list-emojis-leList current emoji configuration and exit
--update-emoji <type> <emoji>-ueUpdate emoji for specified type (folder, file, hidden, locked, permissionDenied)
--restore-emojis-reRestore all emojis to default configuration

📁 Export Formats

TreeX supports multiple export formats with emoji support:

Image Formats (Windows & macOS only)

  • PNG (png) - High-quality raster image
  • WebP (webp) - Modern compressed format
  • SVG (svg) - Vector graphics

Text Formats (All platforms)

  • Markdown (md) - Code blocks with emoji support

Linux Note: Image exports are currently disabled on Linux due to compatibility issues.