DEV Community

sium_hossain
sium_hossain

Posted on

3

Represent a directory tree in a Github README.md

Do you want to add your project structure tree in your .readme file?

directory_tree

Install tree



sudo apt install tree


Enter fullscreen mode Exit fullscreen mode

Just type tree inside of your project directory



tree


Enter fullscreen mode Exit fullscreen mode

If you want to ignore a folder from your tree like node_modules, you can do this by



tree -I node_modules


Enter fullscreen mode Exit fullscreen mode

How about you want to ignore multiple folder from your tree, you can do this by



tree -I "node_modules|venv|lib"


Enter fullscreen mode Exit fullscreen mode

Top comments (0)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more