Project Template Manager - Development Guide
April 5, 2025 · View on GitHub
This document provides instructions for building, installing, and using the Project Template Manager extension.
Building and Installing the Extension
Prerequisites
Building the Extension
-
Clone the repository
git clone https://github.com/artinmajdi/Project-Template-Manager.git cd Project-Template-Manager/vscode-extension -
Install dependencies
npm install -
Compile the extension
npm run compile -
Package the extension
# Install vsce if you don't have it npm install -g @vscode/vsce # Create the VSIX package vsce packageThis will generate a
project-template-manager-0.0.1.vsixfile.
Installing the Extension
In VS Code
code --install-extension project-template-manager-0.0.1.vsix
In Cursor IDE
cursor --install-extension project-template-manager-0.0.1.vsix
Using the Extension with Template Examples
Adding the Template Example to Your Extension
The Project Template Manager uses the extension directory as the source for templates. To use the provided pythonic_template as your template:
-
Option 1: Copy to Extension Directory
- Copy the contents of the
pythonic_templatedirectory to the extension's installation directory - This allows the template example to be used immediately
Note: Finding the extension directory varies by platform:
- Windows:
%USERPROFILE%\.vscode\extensions\artinmajdi.project-template-manager-0.0.1 - macOS:
~/.vscode/extensions/artinmajdi.project-template-manager-0.0.1 - Linux:
~/.vscode/extensions/artinmajdi.project-template-manager-0.0.1
For Cursor IDE, replace
.vscodewith.cursor - Copy the contents of the
-
Option 2: Create a Symbolic Link
- Create a symbolic link from the extension directory to your template example
# On macOS/Linux ln -s /path/to/pythonic_template/* ~/.vscode/extensions/artinmajdi.project-template-manager-0.0.1/template # On Windows (Command Prompt as Administrator) mklink /D "%USERPROFILE%\.vscode\extensions\artinmajdi.project-template-manager-0.0.1\template" "path\to\pythonic_template"
Using the Extension
After installation, you can use the extension with the following commands:
-
Create a Full Project
- Press
Cmd+Shift+P(macOS) orCtrl+Shift+P(Windows/Linux) to open the Command Palette - Type "Project Template: Create Full Project" and select it
- Choose a destination folder where you want to create the project
- Enter a name for the new project folder
- The extension will create a new project with the template structure
- Press
-
Add Template Items to an Existing Project
- Open the folder/workspace where you want to add template items
- Press
Cmd+Shift+P(macOS) orCtrl+Shift+P(Windows/Linux) to open the Command Palette - Type "Project Template: Add Files/Folders from Template" and select it
- Select the files or folders from the template that you want to add to your project
- The selected items will be copied to your workspace
Making Changes to Templates
When you make changes to your template files:
- If using Option 1 (direct copy), you'll need to copy the updated files to the extension directory again.
- If using Option 2 (symbolic link), changes will be reflected automatically since you're working with the linked files.
Troubleshooting
- If commands aren't showing up in the Command Palette, try reloading the window (
Cmd+Shift+P→ "Developer: Reload Window") - Check the Output panel (
View→Output) and select "Project Template Manager" from the dropdown to see debug logs
Further Development
- To make changes to the extension itself, modify the files in the
srcdirectory - After making changes, rebuild the extension following the steps in the "Building the Extension" section
- For significant changes, increment the version number in
package.json