Skip to content

basteez/vscode-profile-generator

Repository files navigation

VS Code Profiles Setup

Automated scripts to create VS Code profiles with predefined extension sets. Each profile includes a common set of extensions plus profile-specific ones.

📁 File Structure

├── extensions-common.txt      # Extensions included in ALL profiles (required)
├── extensions-*.txt           # Profile-specific extensions (create your own!)
├── setup-profiles.ps1         # Windows PowerShell script
├── setup-profiles.sh          # Linux/macOS Bash script
└── README.md                  # This file

Example Extension Files (Included)

├── extensions-minimal.txt     # Minimal profile example
├── extensions-python.txt      # Python development example
├── extensions-java.txt        # Java development example
├── extensions-web.txt         # Web development example
├── extensions-cpp-dotnet.txt  # C++ and .NET example
└── extensions-devops.txt      # DevOps and containers example

🎯 How It Works

The scripts automatically discover all extensions-*.txt files in the directory and create a profile for each one:

  1. Reads extensions-common.txt (included in all profiles)
  2. Scans for all extensions-<ProfileName>.txt files
  3. Creates a VS Code profile for each file found
  4. Installs common + profile-specific extensions (duplicates removed)

Profile Naming

Profile names are automatically normalized from filenames:

  • Converts to lowercase first, then capitalizes each word
  • Replaces dashes (-) and underscores (_) with spaces
  • Case-insensitive: extensions-python.txt, extensions-PYTHON.txt, extensions-PyThOn.txt → all create Python profile

Examples:

  • extensions-python.txtPython profile
  • extensions-web-dev.txtWeb Dev profile
  • extensions-MY_custom_SETUP.txtMy Custom Setup profile
  • extensions-c++.txtC++ profile

📋 Example Profiles (Included)

The repository includes these example profiles:

Profile Extensions Description
Minimal Common + 1 Basic setup with org-mode
Python Common + 9 Python, Jupyter, and data science tools
Java Common + 13 Java, Spring Boot, Maven, Gradle
Web Common + 8 Tailwind, Node.js, Live Server
C++ and .NET Common + 8 C++, C#, .NET DevKit
DevOps Common + 5 Docker, Azure, Remote containers

Note: These are just examples! You can modify them or create your own.

Common Extensions (15)

All profiles include these extensions:

  • Themes: Catppuccin theme and icons, VSCode icons
  • AI: GitHub Copilot and Copilot Chat
  • IntelliCode: AI-assisted development
  • Git: GitLens
  • Editor: Prettier, ESLint
  • Utilities: Rainbow CSV, Version Lens, Path IntelliSense, NPM IntelliSense
  • Keybindings: IntelliJ IDEA keybindings

🚀 Usage

Windows (PowerShell)

Test without making changes (Dry Run)

.\setup-profiles.ps1 -DryRun

Create profiles

.\setup-profiles.ps1

Linux/macOS (Bash)

Make script executable (first time only)

chmod +x setup-profiles.sh

Test without making changes (Dry Run)

./setup-profiles.sh --dry-run
# or
./setup-profiles.sh -d

Create profiles

./setup-profiles.sh

📝 Using Profiles

Once created, you can launch VS Code with a specific profile:

# Launch with a specific profile
code --profile "Python"
code --profile "Java"
code --profile "Web"

# Or switch profiles from VS Code
# Click on the profile icon in the bottom left corner

✏️ Creating Your Own Profiles

Quick Start

  1. Create a new file named extensions-<YourProfileName>.txt

    # Example: Create a React profile
    touch extensions-react.txt
    # or on Windows
    New-Item extensions-react.txt
  2. Add extension IDs (one per line)

    dsznajder.es7-react-js-snippets
    burkeholland.simple-react-snippets
    msjsdiag.vscode-react-native
    
  3. Run the setup script

    # The script will automatically detect the new file
    ./setup-profiles.ps1        # Windows
    ./setup-profiles.sh         # Linux/macOS
  4. Launch VS Code with your new profile

    code --profile React

File Naming Convention

  • extensions-golang.txtGolang profile
  • extensions-rust-dev.txtRust Dev profile
  • extensions-data-science.txtData Science profile
  • my-extensions.txt → Won't be detected (must start with extensions-)
  • extensions-common.txt → Reserved for common extensions

Finding Extension IDs

  1. Open VS Code Extensions view (Ctrl+Shift+X / Cmd+Shift+X)
  2. Click on an extension
  3. Find the ID in the extension details (e.g., ms-python.python)

Modifying Existing Profiles

Simply edit the corresponding extensions-*.txt file and run the script again.

Sharing Profiles

Share your extensions-*.txt files with your team! They can:

  1. Copy the files to their directory
  2. Run the setup script
  3. Get the same extensions automatically

⚙️ How It Works

  1. Scans directory for all extensions-*.txt files
  2. Reads common extensions from extensions-common.txt
  3. For each profile file found:
    • Extracts profile name from filename
    • Reads profile-specific extensions
    • Merges common + specific extensions
    • Removes duplicates
    • Creates the VS Code profile
    • Installs all extensions

💡 Use Cases

Team Standardization

Create extensions-team-standard.txt with your team's required extensions.

Project-Specific Profiles

  • extensions-frontend.txt - React, Vue, Angular
  • extensions-backend.txt - Node.js, databases, API tools
  • extensions-mobile.txt - React Native, Flutter

Language-Specific Profiles

  • extensions-rust.txt
  • extensions-golang.txt
  • extensions-typescript.txt

Workflow-Specific Profiles

  • extensions-data-analysis.txt
  • extensions-ml-research.txt
  • extensions-game-dev.txt

🔧 Requirements

  • VS Code installed and available in PATH
  • PowerShell 5.1+ (Windows) or Bash (Linux/macOS)
  • Internet connection for downloading extensions

⏱️ Execution Time

The full setup takes approximately 5-10 minutes depending on:

  • Number of extensions
  • Internet connection speed
  • VS Code startup time

🐛 Troubleshooting

Script fails with permission error (Windows)

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Extension installation fails

  • Check internet connection
  • Verify extension ID is correct
  • Some extensions may not be available in all regions

No profiles detected

  • Ensure you have at least one extensions-*.txt file (besides extensions-common.txt)
  • Check file naming: must start with extensions- and end with .txt
  • Verify files are in the same directory as the script

Profile not appearing

  • Restart VS Code
  • Check the profile icon in the bottom left corner
  • Verify the script completed without errors

📄 License

Free to use and modify as needed.

🤝 Contributing

Feel free to:

  • Add more extension lists
  • Improve the scripts
  • Share your profile configurations

Note: Extensions are installed from the VS Code Marketplace. Make sure you review extensions before installing them in production environments.

About

A small PS/bash script to geneate VSCode profiles with a set of pre-installed extensions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published