Skip to content

Templatree is a lightweight Python CLI tool that scaffolds directory structures from simple text templates, flat paths or file lists. It also supports automatic virtual environment creation.

License

Notifications You must be signed in to change notification settings

3rt4nm4n/templatree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Templatree

Templatree is a lightweight Python CLI tool that scaffolds directory structures from simple text templates, flat paths or file lists. It also supports automatic virtual environment creation.

Features

  • Generate project folders from:
    • A tree-style structure (e.g., ├── main.py)
    • A flat path list (project/static/index.html)
  • Load structure from an external .txt file using --from-file
  • Create a virtual environment inside the project with -venv
  • Clean and simple CLI interface

Example use cases:

Template:

templatree create exampleproject
Would you like to send a (1) tree-style template or (2) flat path list? (1 or 2): 1
Enter your structure (end with a line containing only 'EOD'):
exampleproject/
├── main.py
├── static/
│   ├── index.html
│   ├── index.css
│   └── index.js
├── config/
│   └── settings.py
├── requirements.txt
└── README.md
EOD

Flat paths:

templatree create myproj
Would you like to send a (1) tree-style template or (2) flat path list? (1 or 2): 2
Enter your structure (end with a line containing only 'EOD'):
myproj/main.py
myproj/static/index.html
myproj/static/index.css
myproj/static/index.js
myproj/config/settings.py
myproj/requirements.txt
myproj/README.md
EOD

From a file:

templatree create -venv example_virtualenv --from-file example.txt exampleproject

Installation

pip install templatree

About

Templatree is a lightweight Python CLI tool that scaffolds directory structures from simple text templates, flat paths or file lists. It also supports automatic virtual environment creation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published