Skip to content

Instantly share code, notes, and snippets.

@bdunnette
Last active January 7, 2021 15:11
Show Gist options
  • Save bdunnette/b03389cdcde0ccd5e8d2b36ae37ca1c9 to your computer and use it in GitHub Desktop.
Save bdunnette/b03389cdcde0ccd5e8d2b36ae37ca1c9 to your computer and use it in GitHub Desktop.
Adding a Node.js command prompt to Windows Terminal

First, we'll need to get a GUID:

PS> [guid]::NewGuid()

Guid
----
75910903-ae85-44bb-95d9-f200eea9a8a9

Then, open Terminal settings and add a profile:

{
  "guid":"{75910903-ae85-44bb-95d9-f200eea9a8a9}", 
  "name": "Node.js command prompt",
  "startingDirectory":"C:\\Program Files\\nodejs",
  "commandline": "cmd.exe /k \"C:\\Program Files\\nodejs\\nodevars.bat\"",
  "hidden": false
},

(All of those extra backslashes are to escape characters that would mess up our JSON strings!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment