TreeGen is a lightweight, cross-platform CLI utility that transforms plain-text blueprints into actual folder and file structures.
Whether you prefer tree-style notation, flat structures, or full-path formats, TreeGen handles it all with ease. Generate your structure with AI tools like ChatGPT or write your own—TreeGen brings it to life in seconds.
- Multiple Structure Formats
- 🌿 Tree-style (with
├──
,│
,└──
symbols and indentation) - 📋 Flat-style (simple lists with no indentation)
- 🛣️ Full-path style (e.g.,
project/src/main.py
)
- 🌿 Tree-style (with
- Advanced Capabilities
- 📁 Handles deeply nested directories
- 📄 Creates empty files as specified
- 💬 Ignores comments and blank lines
- 🖥️ Works across Windows, macOS, and Linux
No installation required!
- Python Users: Download
structuregen.py
and run with Python 3.6+ - Non-Python Users: Download pre-built binaries from Releases
-
Create a structure file (e.g.,
project-structure.txt
):my-app/ ├── backend/ │ ├── app.py │ └── db/ │ └── connection.py ├── frontend/ │ └── src/ │ └── App.jsx └── README.md
-
Run TreeGen:
# Using Python python structuregen.py project-structure.txt # Using binary (Windows) .\treegen.exe project-structure.txt # Using binary (Linux/macOS) ./treegen project-structure.txt
-
Watch your structure come to life!
TreeGen is flexible and accepts several notation formats:
project/
├── src/
│ └── main.py
└── README.md
project/
src/
main.py
README.md
project/
project/src/main.py
project/README.md
Syntax Rules:
- Directories must end with
/
- Lines starting with
#
are treated as comments - Inline comments after
#
are ignored - Blank lines are skipped
Pre-built binaries are available for:
- Windows:
treegen.exe
- Linux:
treegen
(executable)
.\treegen.exe my-structure.txt
chmod +x treegen
./treegen my-structure.txt
This project is licensed under the MIT License.
Developed by Arun (Github Copilot)