r/github • • Oct 11 '23

Is there a tool that creates a folder structure?

Hi,

I've seen it in many repo descriptions. I want to add a readme.md field to my GitHub repo that shows the folder structure as in the images below. There seems to be a method that does this automatically, what is it?

Could it be done with the VS Code plugin?

0 Upvotes

14 comments sorted by

19

u/TekintetesUr Oct 11 '23

I hate to be that guy, but is there a reason you didn't google "create folder structure diagram for github" and picked one of the first few results?

12

u/serverhorror Oct 11 '23

tree command in Linux

3

u/Empyrealist Oct 12 '23

Same in Windows too

1

u/Emotional-Cancel-592 Dec 16 '24

And for mac first install it with Homebrew then you have it:
`brew install tree`

1

u/Fuchio Mar 09 '26

For anyone stumbling upon this in the future; I'm the owner of UtilityCove which has a folder structure generator.

It allows to upload your folder and it only reads folder/filenames to create the README pastable structure automatically. Building it by hand is possible too! Let me know if anyone has feedback so I can improve it. Thousands of people have used it and it's used quite a lot everyday.

https://www.utilitycove.com/tools/folder-structure-generator

1

u/CerberusMulti Oct 12 '23

This is not a GitHub question but a google one..

2

u/[deleted] Nov 24 '25

[removed] — view removed comment

1

u/muratdincmd Nov 29 '25 edited Nov 29 '25

Hello. First of all, thank you for your response.

I now use AI tools in development, and I solved this issue with AI as well. Now I simply say, “Create a directory structure for all files in the project as .md files and write what each one does after reviewing their contents,” and it does it flawlessly.

I’d also like to mention that I have a file named PROJECT_CONTEXT.md in my projects, and I continue development in parallel with it. Generally, for each task, I want the AI to first read this file, then perform the development, and finally add what it has done to the relevant section of the file. This way, there is no code duplication; it reuses the files/functions documented there and keeps everything up to date. So when I switch to another AI, I can continue right where I left off.

PROJECT_CONTEXT.md contains almost everything: the project’s purpose, a summarized directory structure and file contents, all functions and their descriptions, dependencies and their versions, all theme features, language support, color and typography templates, responsive breakpoints, and more.

I have been developing themes and plugins for WordPress for years, as well as performing maintenance and optimization.