Skip to content

dancingmadkefka/dirtree

Repository files navigation

DirTree

A directory tree generator with smart filtering and LLM-friendly export.

Features

  • Smart filtering - Automatically excludes .git, node_modules, and other clutter
  • LLM export - Generate markdown files with directory structure and file contents for AI assistants
  • Multiple styles - Unicode, ASCII, bold, rounded, emoji, and minimal tree formats
  • File size display - See file sizes at a glance
  • Pattern filtering - Include/exclude files with glob patterns
  • Interactive mode - Browse and select directories visually

Requirements

  • Python 3.8 or higher

Installation

git clone https://github.com/dancingmadkefka/dirtree.git
cd dirtree
pip install -e .

On Windows, also install windows-curses for interactive mode:

pip install windows-curses

Quick Start

# Interactive mode (recommended)
dirtree -i

# Basic tree
dirtree

# Limit depth
dirtree -d 2

# Show file sizes
dirtree --size

# Show hidden files
dirtree -H

# Export for LLM (Python and Markdown files only)
dirtree --llm --llm-ext py,md

For all options:

dirtree --help

LLM Export

Generate a markdown file with your directory structure and file contents, ready for AI assistants:

# Export with default settings
dirtree --llm

# Limit file size
dirtree --llm --llm-max-size 50k

# Only include specific extensions
dirtree --llm --llm-ext py,js,ts

Upload the generated .md file to ChatGPT, Claude, or your preferred AI assistant.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages