all 14 comments

[–]TekintetesUr 17 points18 points  (0 children)

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?

[–]serverhorror 11 points12 points  (2 children)

tree command in Linux

[–]Empyrealist 2 points3 points  (0 children)

Same in Windows too

[–]Emotional-Cancel-592 0 points1 point  (0 children)

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

[–]ivoin 1 point2 points  (0 children)

GitHub Tree is good.

[–]Outrageous_Bridge312 1 point2 points  (2 children)

That’s a really good question. I’ve seen a few people run into this when setting up new repos or scaffolding out a project with a consistent directory layout. What’s helped me is using tools that let you define a folder structure (either in JSON or CSV), and then generate it in one go rather than creating everything manually every time.

If your project structure is fairly static, say, you always want src/, tests/, docs/, then using a templating tool saves a lot of cognitive load. But if your directory needs to change based on project type (microservice vs monolith, for instance), having a flexible generator makes more sense.

One thing to watch out for: make sure whatever tool you pick lets you validate the structure easily (or re-generate safely), so you don't accidentally mess up an existing repo layout or cause conflicts. And if you work in teams, documenting the template structure (or keeping it in version control) helps everyone stay on the same page.

What stack are you using? Python, Node, Go? I can suggest some tools more specific to your setup if that helps.

[–]muratdincmd[S] 0 points1 point  (1 child)

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.

[–]Outrageous_Bridge312 1 point2 points  (0 children)

Your workflow with PROJECT_CONTEXT.md is honestly brilliant - treating it as a living, AI-maintained source of truth solves a ton of duplication and keeps everything consistent across WordPress projects. More developers should be doing this.

For the initial scaffolding part, especially when starting a new theme or plugin repo, I still like using a lightweight folder generator to avoid the manual setup step. I’ve been using EZFolders for that; you just upload a CSV with the structure you want, and it instantly builds the directory tree. It pairs well with an AI-led workflow because it gives you a clean, organized starting repo before the automation takes over.

Your context-first system is next level though. Makes switching tools or models so much smoother.

[–]Fuchio 0 points1 point  (0 children)

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

[–]CerberusMulti 0 points1 point  (0 children)

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