πŸš€ Structify CLI: Automate Project Structure with Ease

PyGen LabsPyGen Labs
3 min read

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
0
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.