Overview Version History Q & A Rating & Review
Folder Structure Generator
A powerful VS Code extension that generates complete folder structures from ASCII tree diagrams. Save time by automatically creating your project structure with intelligent templates and predefined patterns.
🚀 Features
Core Functionality
✅ Parse ASCII tree structures with ├──, │, └── symbols
✅ Automatically create folders and files with proper nesting
✅ Smart file templates with appropriate content based on file type
✅ Comment support - Add descriptions that become file comments
✅ Safe operations - Prevent overwriting existing files
✅ Support for complex nested structures
New Enhanced Features
🎯 Project Templates - Predefined structures for React, Node.js, Python, Vue.js
⚡ Quick Add Structures - Common patterns (components, utils, hooks, pages, API)
📤 Export Current Structure - Generate tree diagram from existing folders
📝 Insert at Cursor - Quickly insert small structures while editing
📚 Auto READMEs - Automatic documentation for folders with comments
📊 Barrel Exports - Auto-create index.ts files for component folders
🎨 Enhanced Templates - Better default content for all file types
Usage
Method 1: Generate from Tree Structure
Create a file with your folder structure in ASCII tree format
Select the text (or leave unselected for entire document)
Press Ctrl+Shift+P and run "Generate Folder Structure from Tree"
Confirm the action when prompted
All folders and files will be created automatically!
Method 2: Use Project Templates
Press Ctrl+Shift+P
Run "Generate from Template"
Choose from predefined templates (React, Node.js, Python, Vue.js)
Select the generated structure and run "Generate Folder Structure from Tree"
Method 3: Quick Add Common Structures
Press Ctrl+Shift+P
Run "Quick Add Structure"
Choose a pattern (Components, Utils, Hooks, Pages, API)
Select the generated structure and run "Generate Folder Structure from Tree"
Method 4: Export Existing Structure
Press Ctrl+Shift+P
Run "Export Current Structure"
Get a tree diagram of your current workspace
Method 5: Insert at Cursor
Place cursor where you want to insert structure
Press Ctrl+Shift+P
Run "Insert Structure at Cursor"
Choose a structure to insert directly
Examples
my-project/
├── src/ # Source code directory
│ ├── components/ # React components
│ │ ├── Button.tsx # Button component
│ │ └── Header.tsx # Header component
│ ├── hooks/ # Custom React hooks
│ │ └── useAuth.ts # Authentication hook
│ └── utils/ # Utility functions
│ └── helpers.ts # Helper functions
├── public/ # Static files
│ └── index.html # Main HTML file
├── package.json # Project dependencies
└── README.md # Project documentation
React Component Structure:
components/
├── common/ # Shared components
│ ├── Button/
│ │ ├── Button.tsx # Button component
│ │ ├── Button.module.css # Button styles
│ │ └── index.ts # Barrel export
│ └── Modal.tsx # Modal component
├── forms/ # Form components
│ ├── ContactForm.tsx # Contact form
│ └── LoginForm.tsx # Login form
└── layout/ # Layout components
├── Header.tsx # Page header
└── Footer.tsx # Page footer
API Backend Structure:
api/
├── controllers/ # Route controllers
│ ├── userController.ts # User management
│ └── authController.ts # Authentication
├── routes/ # API routes
│ ├── index.ts # Main router
│ └── userRoutes.ts # User routes
├── middleware/ # Custom middleware
│ ├── auth.ts # Authentication
│ └── validation.ts # Input validation
└── types/ # Type definitions
├── user.ts # User types
└── api.ts # API types
🛠 Supported File Types
The extension automatically creates intelligent templates for:
Frontend Files
.js - JavaScript with export statements
.jsx - React components with functional syntax
.ts - TypeScript with type definitions
.tsx - TypeScript React components with interfaces
.vue - Vue.js single-file components
.html - HTML5 boilerplate with proper structure
.css - CSS with class naming conventions
Backend Files
.php - PHP classes with proper syntax
.py - Python scripts with main function
.java - Java classes with main method
Configuration Files
.json - JSON structures (package.json, tsconfig.json)
.md - Markdown with proper headers and sections
Others - Basic header comment with creation date
⚙️ Configuration
Customize the extension behavior in VS Code settings:
{
"folderStructureGenerator.autoCreateContent": true,
"folderStructureGenerator.includeReadme": true,
"folderStructureGenerator.createIndexFiles": true
}
Command Description
Generate Folder Structure from Tree Parse selected ASCII tree and create structure Ctrl+Shift+P
Generate from Template Choose from predefined project templates Ctrl+Shift+P
Quick Add Structure Add common patterns to your project Ctrl+Shift+P
Export Current Structure Generate tree diagram from existing folders Ctrl+Shift+P
Insert Structure at Cursor Insert small structures at cursor position Ctrl+Shift+P
🤝 Contributing
Found a bug or have a feature request? Please open an issue on GitHub!
👨💻 Author
Shayan Shah
GitHub: ShayanShahDev
Email: shayanshahdev@gmail.com
License
MIT License - feel free to use this extension for personal or commercial projects.