Mold
A lightweight VS Code extension for creating projects from predefined templates.
Mold lets you create a project structure in a few clicks. Choose a language, select a project architecture, give your project a name, and Mold generates the structure for you.
Features
- Create projects from predefined templates
- Interactive project creation through the VS Code Command Palette
- Multiple languages and project architectures
- Customizable template structures
- Automatically copies nested folders and files
- Lightweight — no external project-generation service required
Supported Templates
Python
- Basic — Simple Python project structure
- Backend — General-purpose backend architecture
- FastAPI — FastAPI-oriented backend structure
Node.js
- Basic — Simple Node.js / TypeScript project
- Backend — Structured backend architecture
- Express — Express.js backend structure
Rust
- Basic — Simple Rust application
- CLI — Command-line application structure
- Backend — Structured Rust backend architecture
Templates are continuously being expanded and improved.
Usage
Open the Command Palette:
Ctrl + Shift + P
Run:
Project Maker: Create Project
Then:
- Select a language.
- Select a project structure.
- Enter a project name.
- Select the destination folder.
- Mold generates the project.
For example:
Create Project
↓
Python
↓
FastAPI
↓
MyAPI
↓
~/Projects
Produces:
MyAPI/
├── app/
│ ├── api/
│ ├── core/
│ ├── models/
│ ├── schemas/
│ ├── services/
│ └── main.py
├── tests/
├── .env.example
├── .gitignore
├── README.md
└── pyproject.toml
How It Works
Mold uses a simple template-based approach.
Templates live inside the extension:
templates/
├── Python/
├── Node/
├── Rust/
└── Roblox/
Each template contains the actual files and folders that should be generated.
For example:
templates/
└── Python/
└── Basic/
├── src/
├── tests/
├── main.py
└── README.md
When the user selects that template, Mold copies the template into the selected destination.
This makes adding a new project structure simple: create a new template directory rather than modifying the generator itself.
Development
Clone the repository and install dependencies:
npm install
Compile the extension:
npm run compile
Running in Development
Open the project in VS Code and press:
F5
This launches the Extension Development Host.
Inside the development window, open the Command Palette and run:
Project Maker: Create Project
Running Tests
Run:
npm test
Project Structure
Mold/
├── src/
│ ├── extension.ts
│ ├── generate.ts
│ ├── templates.ts
│ └── test/
│
├── templates/
│ ├── Python/
│ ├── Node/
│ ├── Rust/
│ └── Roblox/
│
├── package.json
├── tsconfig.json
└── README.md
Adding a Template
Create a new directory under the appropriate language:
templates/
└── Python/
└── MyStructure/
Place the desired project files and directories inside it.
Then register the template in templates.ts.
The generator will copy the structure automatically.
Roadmap
- [ ] More language templates
- [ ] Custom user templates
- [ ] Template variables
- [ ] Better project-name validation
- [ ] Git initialization option
- [ ] Open generated project automatically
- [ ] Template configuration
- [ ] Template marketplace / remote templates
Contributing
Contributions are welcome.
If you have a useful project architecture that would work well as a Mold template, feel free to contribute a template or open an issue describing it.
License
License information will be added before the first public release.