StructGen is a lightweight VS Code extension that helps you generate complex folder structures from a simple JSON input. It's great for scaffolding domain-driven folder architectures in seconds.
- Current Version: v1.0.0
- VS Code: VS Code v1.90.0 and higher
- Node.js: v22.14.0^
- npm: v10.9.2^
To install StructGen for use as a Visual Studio Code extension, you can follow these simple steps:
Open your terminal and run the following command to download and install the extension:
For Windows (PowerShell):
powershell -Command "curl.exe -L 'https://github.com/FragsterDev/StructGen/releases/download/StructGen/structgen-1.0.0.vsix' -o $env:TEMP\structgen.vsix; code --install-extension $env:TEMP\structgen.vsix; rm $env:TEMP\structgen.vsix"
For Windows (CMD):
curl -L "https://github.com/FragsterDev/StructGen/releases/download/StructGen/structgen-1.0.0.vsix" -o "%TEMP%\structgen.vsix" && code --install-extension "%TEMP%\structgen.vsix" && del "%TEMP%\structgen.vsix"
For macOS/Linux (Bash terminal):
curl -L https://github.com/FragsterDev/StructGen/releases/download/StructGen/structgen-1.0.0.vsix -o /tmp/structgen.vsix && code --install-extension /tmp/structgen.vsix && rm /tmp/structgen.vsix
This will download the .vsix
file and install the extension automatically in Visual Studio Code.
Download the extension package using one of these methods:
-
From GitHub Releases:
- Visit the StructGen Releases page
- Download
structgen-1.0.0.vsix
from the "Assets" section
-
Direct Download (recommended):
▶️ Download structgen-1.0.0.vsix now
(Right-click → "Save Link As" if needed)
Open a terminal (where you have downloaded the release file) and run:
code --install-extension path/to/structgen-1.0.0.vsix
code --install-extension "%USERPROFILE%\Downloads\structgen-1.0.0.vsix"
code --install-extension "$HOME/Downloads/structgen-1.0.0.vsix"
Once the installation is complete, you can verify that the extension is installed by checking the Extensions view in Visual Studio Code (Ctrl+Shift+X
) and searching for StructGen.
- Generate nested folders and files instantly from a single JSON file.
- Supports nested object structure and arrays of files.
- Perfect for backend architecture, monorepos, or boilerplate setups.
- Open VS Code in any workspace.
- Press
Cmd+Shift+P (macOS)
orCtrl+Shift+P (Windows/Linux)
to open the Command Palette. - Search and run:
Generate Folder Structure
. - First, select the target directory where you want to create the folder structure.
- Then, select your
JSON file
describing the structure. - The folder structure will be
generated
in yourselected directory!
The extension will process your JSON structure and create folders and files accordingly:
- Keys
without
file extensions becomefolders
- Keys
with
file extensions becomefiles
with thespecified content
- See the example below to learn more.
{
"src": {
"folder1": {
"file1.py": "#file content"
},
"folder2": {
"file1.py": "#file content"
},
"file3.py": "#file content",
"folder3": {
"folder4": {
"file-in-folder-4.py": "# content in folder 4"
}
},
"main.py": "# content in main"
}
}
To contribute to StructGen or collaborate with others, follow these steps:
Clone the project repository by running the following command in your terminal:
git clone https://github.com/your-username/structgen.git
Navigate to the project directory and install the necessary npm packages:
cd structgen
npm install
You can test the extension locally within VS Code:
- Open the project folder in Visual Studio Code.
- Press
F5
to start the extension in a new VS Code window (Extension Development Host). - In the new window, open any folder and run the
Generate Folder Structure
command from the Command Palette to test the functionality.