π Structify CLI: Automate Project Structure with Ease

Setting up a project manually can be tedious, especially when organizing folders and files. Structify CLI is designed to make this process effortless by letting you define your project structure using a simple syntax.
This guide will take you through:
β
Setting up a virtual environment.
β
Installing Structify CLI.
β
Initializing and generating a project.
β
Future plans and enhancements.
π Step 1: Create a Project Directory
First, create a new folder for your project and navigate into it:
mkdir my_project && cd my_project
This ensures all project files remain in one place.
π Step 2: Set Up a Virtual Environment
A virtual environment (venv
) is essential to isolate dependencies and avoid conflicts.
Run the following command to create a virtual environment inside your project folder:
python -m venv venv
β Activate the Virtual Environment
On Windows:
venv\Scripts\activate
On macOS/Linux:
source venv/bin/activate
After activation, your terminal will show (venv)
, indicating the environment is active.
π Step 3: Install Structify CLI
With the virtual environment activated, install Structify CLI using pip
:
pip install structify-cli
β Expected Output
pgsqlCopyEditCollecting structify-cli
Using cached structify_cli-0.1.0-py3-none-any.whl.metadata (192 bytes)
Using cached structify_cli-0.1.0-py3-none-any.whl (4.1 kB)
Installing collected packages: structify-cli
Successfully installed structify-cli-0.1.0
Now, structify
is installed and ready to use.
π Step 4: Initialize a New Project
Run the following command inside your virtual environment:
structify init
β Interactive Prompt
Enter project name: Demo
Enter files and folders (use '/' for folders, ';' for root files, and '?' to nest inside last folder):
Here, you define the folder and file structure.
π Step 5: Define Project Structure
Use Structifyβs custom syntax:
/
β Create a folder.;
β Separate files at the root level.?
β Nest a file inside the last created folder.
π Example Input
app.py; templates?index.html; static/style.css
β Expected Output
Structify will generate:
cppCopyEditDemo/
βββ app.py
βββ templates/
β βββ index.html
βββ static/
β βββ style.css
π Another Example
Structure: app.py; requirements.txt; templates/index.html, main.html; static/style.css; scripts/app.js
β Generated Structure
cppCopyEditDemo/
βββ app.py
βββ requirements.txt
βββ templates/
β βββ index.html
β βββ main.html
βββ static/
β βββ style.css
βββ scripts/
β βββ app.js
Once complete, Structify will confirm:
Project "Demo" created successfully.
π Step 6: Running Your Project
If your project has a Python file, test it by running:
python app.py
β Example Execution
PS C:\Users\ameer\OneDrive\Desktop\testing> & C:/Users/ameer/OneDrive/Desktop/testing/.venv/Scripts/python.exe C:/Users/ameer/OneDrive/Desktop/testing/main.py
Hello World!
π Future Plans & Enhancements
Structify CLI is designed to be lightweight, fast, and flexible, but many powerful features are planned for future updates:
π Upcoming Features
β
Predefined Templates β Generate structures for web apps, APIs, and CLI tools instantly.
β
Custom Configuration Files β Save and reuse project structures.
β
Dependency Management β Auto-create requirements.txt
for Python projects.
β
Version Control Initialization β Option to auto-initialize a Git repository.
β
Multi-Language Support β Generate structures for JavaScript, Go, and Rust projects.
β
GUI Tool β A graphical interface for easier project setup.
π― Conclusion
Structify CLI makes project setup seamless by automating folder and file creation. With virtual environments, you ensure projects remain organized without system-wide conflicts.
π Try Structify today and speed up your workflow!
π Get started:
mkdir my_project && cd my_project
python -m venv venv
source venv/bin/activate # (or venv\Scripts\activate on Windows)
pip install structify-cli
structify init
Subscribe to my newsletter
Read articles from PyGen Labs directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

PyGen Labs
PyGen Labs
Iβm Ameer Hamza Khan, a 9th-grade student, self-taught developer, and founder of PyGen Labs. Passionate about technology, AI, and innovation, I build tools that solve real-world problems. I started PyGen Labs as a way to create meaningful and practical solutions. My first project, ProjXs, is a note and idea management tool designed to help users organize their thoughts efficiently. Despite limited resources, I experiment with Python, JavaScript, Flask, Google Sheets as a database, and AI models to push my learning further. I document my journey through my blog, sharing insights on coding, startups, and self-learning. Beyond tech, Iβm also writing a book, "Emily the Detective of Maplewood", published under Iqbal Khan Books Blits, named after my grandfather. Currently, I study at Delhi Model Virtual School (DMVS) while building my own startup from scratch. My goal is to create innovative tools that make technology accessible to everyoneβstudents, professionals, and even those without technical knowledge. Follow my journey as I explore coding, AI, and entrepreneurship, one step at a time.