Skip to main content
One developer. Many personas. Manage your VS Code profiles, PowerShell profiles, and Git identity in one place.

Introducing the Personas Extension for Visual Studio Code

· 10 min read

If you use more than one VS Code profile, you've probably asked yourself this question: which of my profiles already has this extension? VS Code only shows one profile's extensions at a time, so I used to answer it by switching profiles, scrolling through the extensions view, and trying to remember what I'd seen in the last one...over and over again!

There had to be an easier way, so I built one! I'm excited to share Personas with all of my friends who still enjoy looking at code. It started with that one question about extensions, and it grew from there. Here's a quick preview of the main features:

  • Extension Matrix: an interactive grid that shows at a glance which extensions are installed in which VS Code profiles, and lets you install or uninstall them in any profile with one click.
  • PowerShell profiles: discover and easily edit all PowerShell profiles on your system, even if they haven't been created yet.
  • Git configuration: view your effective Git configuration and the file each value comes from. Personas reads the system, global, local, and worktree scopes, including your include and includeIf files.

Click to download Personas right away and try it out!

The Personas sidebar beside the Extension Matrix in a dark theme, comparing five VS Code profiles The same Personas sidebar and Extension Matrix in a light theme

Select either screenshot to open it full size.

The Personas Concept​

You may have read the introduction and questioned where the name came from or what the purpose of VS Code profiles is. Let's dive into that.

How you work in VS Code changes with what you're working on. A lot of that comes down to the language. A developer on a .NET project leans on a different set of extensions, snippets, and settings than someone building a Node.js app or a Java service. The same goes for writing: when I'm working on documentation or a blog post, I want Markdown tooling and a spell checker, and very little else.

VS Code profiles exist for exactly this. Each profile keeps its own extensions, settings, snippets, and keyboard shortcuts, so you can switch your whole editor from one kind of work to another without the tools for one job getting in the way of the next.

The editor is only part of the picture, though. Your shell has its own startup scripts, which for me means PowerShell profiles. Then there's Git. The configuration inside a single repository may be specific to that project, but your Git configuration also decides who you are when you commit: the name and email on every commit, and often the signing key and credentials that go with them.

Put those together and you get what I call a persona. It's the mode you switch into for a particular kind of work, made up of a VS Code profile and its extensions, the PowerShell profiles your shell loads, and the Git identity in effect. I'm one person, but I'm a slightly different developer at work than I am on an open source project or when I'm writing a post like this one.

The trouble is that each piece lives somewhere different, and none of them is easy to see as a whole. VS Code shows you one profile's extensions at a time. PowerShell profile scripts are scattered across several paths. Your Git identity is the result of several config files layered on top of one another, and anyone who has pushed a commit to a public repository with a work email address knows how easy it is to lose track of which one won. Personas puts all three in one sidebar, so you can see what each setup contains and change it in one place.

While workspaces definitely have their place in the mix, I ultimately found a use for profiles like these:

  • Default: includes the extensions, settings, and snippets that I most commonly rely on for general work. (Of course, this profile is fully decked out and ready for PowerShell!)
  • Doc Writer: while writing blogs or documentation, I rely on a set of extensions geared more heavily toward Markdown and Docusaurus. I also prefer to write in light mode instead of dark mode (gasp!) with minimal distractions.
  • Then there are different profiles specific to .NET Dev and TypeScript Dev. I don't do much work with either of those, but when I do, their core set of extensions is different enough that I don't want them cluttering up my Default profile. (Yes, a workspace could have also sufficed for both of these, but that still becomes a tedious chore to manage when I want to add or remove extensions in different workspaces. Personas actually makes VS Code profiles easier!)

Personas Features​

When open, Personas provides a sidebar with three summary views (VS Code Profiles, PowerShell Profiles, and Git Configuration) and the Extension Matrix in the main editor tab.

PowerShell Profile Management​

I'll start with the feature that hasn't gotten much attention yet: managing your PowerShell profiles. If you have ever wondered which PowerShell profiles you have already created and what is in them, this extension is for you. Whether it's your CurrentUserCurrentHost or AllUsersAllHosts, you now have one-click access to edit or create each profile, or to reveal the file in your file manager.

The PowerShell Profiles view, listing PowerShell 7 and Windows PowerShell profile scripts by host and scope

The PowerShell Profiles view groups your profile scripts by edition and lists them in the order PowerShell loads them. PowerShell 7 is covered on Windows, macOS, and Linux, and Windows PowerShell 5.1 and the ISE show up on Windows. Locations that don't have a script yet fold into a single "not created" line per edition, so the profiles that do exist stay easy to find. Select one of those empty locations and Personas offers to create the script and open it. Each row's menu can also copy the path or move the script to the Trash.

Personas finds your PowerShell installations without starting PowerShell. It then asks each one for its real profile paths in the background with -NoProfile, so a Documents folder that has been redirected (to OneDrive, for example) still resolves correctly and none of your profile scripts run as a side effect. If you would rather it not start PowerShell at all, there's a setting to turn that off.

Git Configuration​

A key part of my own Git configuration strategy relies on includeIf files. I start by organizing my cloned repositories based on (1) the identity I use to authenticate with Git and (2) the Git-based version control system (e.g. GitHub, GitLab, or Azure DevOps) that is used for each project. For example:

~/Code/
├── Public/
│ ├── PSPreworkout/
│ ├── Personas/
│ ├── Locksmith/
│ ├── maester/
│ ├── DLLPickle/
│ └── samerde.github.io/
├── Private/
│ ├── wouldn't-you-like-to-know/
│ ├── just-kidding/
│ └── private-workshop/
└── Work/
├── SecureShield365/
├── MXDR365/
├── AIShield/
└── PatriotAcademy/

My base ~/.gitconfig file then references a unique identity and configuration as needed for the folders above. Here's the general shape:

# ~/.gitconfig
[user]
name = Your Name
email = you@personal.example

[includeIf "gitdir:~/Code/Work/"]
path = ~/.gitconfig-work
# ~/.gitconfig-work
[user]
email = you@work.example

Every repository under ~/Code/Work/ picks up the work email, and everything else keeps the default. It works well, but the result is invisible until you go looking for it.

The Git Configuration view, showing user.name and user.email with their source files and an applied includeIf file

The Git Configuration view shows the user.name and user.email in effect for the current repository, and the file each one comes from. Below that it lists the system, global, local, and worktree config files, with every include and includeIf file nested under the file that names it.

Environment variables win

Your Git config isn't always the last word on who you are when you commit. If GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME, or GIT_COMMITTER_EMAIL is set in your environment, Git uses those values instead, and the Git Configuration view doesn't show them (yet!). I'm tracking a warning for that in #196.

For the whole picture, Show Effective Git Configuration opens a list of every value in the order Git reads it. The view is read-only: Personas never writes to a Git config file, though each file has a button that opens it in your editor window. This is also the first stage of something bigger. Saving named Git identities and applying them to the right repositories might be on the roadmap.

Extension Matrix​

Back to the feature that started it all: managing extensions across multiple VS Code profiles. If you have multiple profiles like I do, Personas now shows all of your extensions across a per-profile matrix! Simply click to install or uninstall an extension in each one, or in every profile at once! Hover over an extension's name for its details and the bulk actions, Install in every profile and Remove from every profile.

The hover card for EditorConfig in the Extension Matrix, with its details and the Install in every profile, Remove from every profile, and Apply to all profiles (Experimental) actions

Once the list gets long, you can search by name, ID, or publisher, filter by category, publisher, or install source, and group the rows by name or publisher. Each filter choice shows how many extensions it matches.

The Extension Matrix with the Filters panel open, showing extension counts for each category, publisher, and install source

Hidden Gems​

There are a few additional hidden gems:

  • A Current workspace column shows which extensions are running in the folder or workspace you have open. If an installed extension isn't running, Personas can't tell you why.
  • Orphaned extensions, which are still on disk but no longer in any profile, can be reviewed and moved to the Trash.
  • An experimental Apply to all profiles action marks an extension the way VS Code's own Apply Extension to all Profiles option does, with the native flow always available beside it.
  • The matrix follows your VS Code theme, including high contrast, and works fully from the keyboard and with screen readers.

Those are the highlights. I'll let you discover the rest as you need them!

Getting Started​

  1. Install Personas from the Marketplace.
  2. Select the Personas icon in the Activity Bar. The sidebar opens, and so does the Extension Matrix.
  3. Check or clear a cell in the matrix to install or uninstall an extension in that profile.
  4. Look at the PowerShell Profiles and Git Configuration views to see the rest of your setup.

Personas needs VS Code 1.101 or newer, and runs on Windows, macOS, and Linux. It manages the local desktop install it runs in, so remote windows (SSH, WSL, dev containers) and VS Code for the Web aren't supported (yet!). The user guide covers every feature in detail.

Thanks for reading and for trying out Personas. My hope is that it makes your day just a little easier and more productive! What else would you like Personas to help you manage? Share your ideas in a feature request on GitHub!

Sam