Categorygithub.com/74th/remote-vscode-cmd
modulepackage
0.0.0-20220619010228-f9002867339d
Repository: https://github.com/74th/remote-vscode-cmd.git
Documentation: pkg.go.dev

# README

rcode

Calling client VS Code from remote host.

If you use remote development using ssh, you can use code command on integrated terminal. But other terminals connecting to the remote host (such as iTerm2) can not use code command rcode enables to call VS Code from remote host.

Restriction

This needs to be able to connect client host machine from remote host.

how to use

MacOS client and Linux remote server on Virtual Machine on mac

MacOS

Install rcode.

go install github.com/74th/remote-vscode-cmd/cmd/rcode@latest

Create rcode.command file to launch rcode. 10.37.129.2 is MacOS IP on Host Only Network.

/Users/nnyn/go/bin/rcode -server -addr 10.37.129.2:5450 -command code
chmod 755 rcode.command

Setting to launch rcode.command. "System Preferences..." -> "Users & Groups" -> select user -> "Login Items" -> Add -> select rcode.command

Virtual Machine

Install rcode.

go install github.com/74th/remote-vscode-cmd/cmd/rcode@latest

Create /$HOME/.rcode.yaml .

  • client: MacOS IP on Host Only Network
  • remote_hostname: host name used by Remote Development SSH
client: 10.37.129.2:5450
remote_hostname: linux

using on Virtual Machine

rcode /some/dir

It will open /some/dir on VS Code on MacOS.

how it works

code has an argument --remote, it launches VS Code with Remote Development.

code --remote ssh-remote+hostname /some/dir

rcode /some/dir on the remote host connects rcode server on the client, and rcode on the client calls code --remote ssh-remote+hostname /some/dir.

how to build

go get

export GOBIN=`pwd`/.bin
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]

protoc --plugin=.bin/protoc-gen-go --go_out=. --go_opt=paths=source_relative \
    --plugin=.bin/protoc-gen-go-grpc --go-grpc_out=. --go-grpc_opt=paths=source_relative \
    rcode.proto

go build cmd/rcode

# Packages

No description provided by the author

# Functions

No description provided by the author
No description provided by the author
NewServer starts rcode server.
No description provided by the author

# Variables

No description provided by the author
Rcode_ServiceDesc is the grpc.ServiceDesc for Rcode service.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
UnimplementedRcodeServer must be embedded to have forward compatible implementations.

# Interfaces

RcodeClient is the client API for Rcode service.
RcodeServer is the server API for Rcode service.
UnsafeRcodeServer may be embedded to opt out of forward compatibility for this service.