merlin tree
Interactive code structure visualization and dependency analysis. Explore file organization, analyze project structure patterns, and understand code relationships.
Basic Usage
# Display project structure merlin tree . # Show with summary format merlin tree . --format summary # Limit depth to 3 levels merlin tree . --depth 3
Pro Tip
Use merlin tree . --show-dependencies to visualize how your modules connect and identify potential refactoring opportunities.
Visualization Features
Structure Analysis
- File hierarchy display
- Directory organization
- File type classification
- Project structure patterns
- Code organization insights
File Metrics
- File size analysis
- File count statistics
- Directory depth tracking
- Size-based filtering
- Project size overview
Dependency Tracking
- File dependency relationships
- Dependency visualization
- Relationship mapping
- Connection analysis
- Dependency depth
Output Formats
- Interactive terminal display
- Summary statistics
- Detailed analysis
- JSON data export
- Statistics tables
Advanced Options
--formatOutput format (interactive, summary, detailed, json)
--depthMaximum depth to traverse (default: unlimited)
--show-dependenciesShow file dependencies
--file-typesFilter by specific file types
--excludeExclude patterns (e.g., __pycache__, *.pyc)
--min-sizeMinimum file size in bytes
--max-sizeMaximum file size in bytes
Output Formats
interactiveRich terminal visualization with navigation
Best for: Interactive exploration of codebase structure
summaryConcise overview with key metrics
Best for: Quick project overview and statistics
detailedComprehensive analysis with all information
Best for: In-depth structural analysis
jsonStructured data for automation
Best for: Integration with other tools and scripts
Example Tree Output
Dependency Visualization
Interactive Dependency Maps
Generate visual dependency graphs that show how your modules connect, identify bottlenecks, and highlight refactoring opportunities.
Related Commands
Use tree visualization alongside other Merlin analysis tools for comprehensive code insights.