If you work across multiple stacks, VS Code can feel noisy fast. You open an Elixir service and still carry Java and Python tooling. Then you open a frontend repo and have to remember which profile to switch to.

I built vs-code-profile-helpers to fix that. It’s a small set of shell scripts that keeps stack-based VS Code profiles at user level and opens any repo with the right one automatically — nothing committed into your projects.

Before You Start

This is macOS + zsh only for now — Linux, Windows, and bash support are on the roadmap. You’ll also need VS Code with the code CLI available in your $PATH.

Bootstrap Once

Clone and run the setup script with VS Code fully closed:

git clone https://github.com/nuno-barreiro/vs-code-profile-helpers.git 
cd vs-code-profile-helpers
./setup-vscode-profiles.zsh

It creates profiles for Elixir, Java, Rails, Python, Web, Scala, and DotNet, installs a shared set of extensions into each, then adds the stack-specific ones on top. Re-running it is safe — existing profiles are skipped and extensions are updated to their latest versions.

VS Code must be fully closed before running. The script writes directly to VS Code’s profile storage and will abort early if it detects a running instance.

Open Any Repo With the Right Profile

Source vscode-profiles.zsh from your ~/.zshrc and you get a copen command:

copen my-service        # resolves to $VSCODE_REPOS_DIR/my-service
copen .                 # current directory
copen ~/code/foo-api    # absolute path

Profile is picked from indicator files in the repo root — mix.exs for Elixir, build.sbt for Scala, Gemfile for Rails, package.json for Web, and so on. If nothing matches, it opens with the default profile.

For repos where that doesn’t work — monorepos, mixed stacks, no indicator files at the root — there’s a vscode-map command to pin a directory to a specific profile:

vscode-map ~/Repos/analytics-api Java
vscode-map ~/Repos/infra Default

Daily Flow

copen some-repo

That’s usually it. Nothing goes into project directories, personal config stays out of Git, and git pull is all it takes to pick up changes. Adding a new stack is just a new extensions array in the setup script.

There are a couple of known limitations — extension dependency bleed into the default profile, and opening repos with the default profile while VS Code is already running. Both are documented in the repo README.

See you in the next post.