visual-studio-codevscode-remote

VSCode - open remote from cli


I use the new VS Code remote feature all the time and it is superb. I'm wondering if it is possible to open a specific ssh host / folder from the cli. That way I can script a spin up of my dev environment (vm, vs-code, etc)!

I had a look at code-insiders --help but couldn't see anything that would allow me to do this. That perhaps makes this a feature request, but thought I'd post here before doing so on the github repo.

Thanks!


Solution

  • Run this on your cmd or PowerShell

    code --remote ssh-remote+<remoteHost> <remotePath>
    

    source: https://github.com/microsoft/vscode-remote-release/issues/656#issuecomment-584209378