[GUIDE] Integrating Cmdr with Platformio Terminal


There is an issue with Platformio where an environment variable set in Atom conflicts with npm/yarn commands and prevents you from using them as usual. This guide is for Cmdr, but the general fix (setting NODE_ENV in path in your terminal emulator’s startup config) should be able to be applied to any popular Console/Terminal emulator package.

  1. Set CMDER_ROOT environment variable, either via Windows “Settings”, “Edit system environment variables” and creating a new key, or running:
    set CMDER_ROOT=[Your root Cmdr install directory here, for me “C:/Cmder”]

  2. In Cmder/Config/user-profile.cmd, set NODE_ENV var to “development”. My file looks like this:
    :: use this file to run your own startup commands
    :: use in front of the command to prevent printing the command

    :: call “%GIT_INSTALL_ROOT%/cmd/start-ssh-agent.cmd”
    :: set “PATH=%CMDER_ROOT%\vendor\whatever;%PATH%”

    set NODE_ENV=development

  3. In Platformio-Terminal-IDE settings, set the default shell to cmd.exe (you may to have have enabled the “force default shell” option in ConEmu for this to work), and start it with the flag “/k %CMDER_ROOT%\vendor\init.bat”

Hope somebody gets some use out of this, took me a good while to figure out why it was breaking!


could you explaind how do this?


In the ConEmu settings, the setting referred to is under Integration -> Default term at the top.


I am wondering how you get the colors back. This solution worked great to get the commands in there but I don’t have the natural colors.