#dev #editor #code #profile #switch

bin+lib ecode

Ena Code simple Visual Studio Code profile switcher

12 releases (3 stable)

1.0.2 May 30, 2022
1.0.1 May 24, 2022
1.0.0 Apr 30, 2022
0.1.9 Dec 15, 2021
0.1.3 Apr 29, 2021

#514 in Command line utilities

Download history 1/week @ 2022-11-20 1/week @ 2022-11-27 6/week @ 2022-12-04 4/week @ 2022-12-11 19/week @ 2022-12-18 2/week @ 2022-12-25 1/week @ 2023-01-01 1/week @ 2023-01-15 3/week @ 2023-01-22 32/week @ 2023-01-29 14/week @ 2023-02-05 23/week @ 2023-02-12 48/week @ 2023-02-19 1/week @ 2023-03-05

72 downloads per month


670 lines


A little profile switcher for Visual Studio Code, making it possible to segregate configs and extensions according to the context/lang.

Bulding and installation:



Install the latest version from crates.io:

$ cargo install ecode

Or, in the project folder, use cargo to install from the source:

$ cargo install --path .


$ ecode [PROFILE] [PATH]

Being PROFILE and PATH optional arguments.


  • -b <PROFILE>: The profile used as base to new profiles. (Default: Default)
  • -v Enables verbose mode for debugging

Ena Code uses {userFolder}/.ena-code folder to save the profiles and settings.

In the configuration file (.ena-code/config.yml), it's possible to change the profiles folder, the VSCode executable, the base profile, if the configs are shared between the profiles and if the default folder will be the current folder.

Ena-Code Manager

Ena-Code manager is an utility that ships with Ena-Code, helping to manage profiles and edit Ena-Code's configuration.



  • Delete profile:
    $ ecode-manager profiles remove <NAME>
  • List profiles
    $ ecode-manager profiles list


  • Change default profile:
    $ ecode-manager config default-profile <PROFILE>
  • Change profiles folder:
    $ ecode-manager config profiles-folder <PATH>
  • Set if the profiles configs are shared:
    $ ecode-manager config shared-profiles-configs <enable/disable>
  • Set if the current folder is the default:
    $ ecode-manager config use-current-folder <enable/disable>
  • Change VSCode path:
    $ ecode-manager config vs-code-path <PATH>

All subcommands also have a help command, showing how you can use it, like:

$ ecode-manager config help

Ena-Code URL Handler

Ena-Code now has an URL handler, neccessary for handling vscode:// URLs.

Note that the URL Handler still doesn't work properly on Windows systems.


$ ecode-url-handler <URL>

This will open a graphical interface that lets you choose the profile to open the URL with: URL Handler profile select screen

If you want to open the URLs directly from browser, without using the command line, you can use a custom scheme handler.

Linux example XDG .desktop file

File based on VSCode's code-url-handler.desktop

[Desktop Entry]
Name=Ena-Code URL Handler
Comment=URL Handler for Ena-Code
GenericName=Text Editor
Exec=/path/to/ecode-url-handler %U

You can put this file in your ~/.local/share/applications. After running:

$ update-desktop-database ~/.local/share/applications

Ena-Code URL Handler will probably be available while handling vscode:// URLs.


This project is licensed under The Unlicense license, belonging to the public domain.


~380K SLoC