MCPcopy Index your code
hub / github.com/estruyf/vscode-remote-control

github.com/estruyf/vscode-remote-control @v1.9.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.9.0 ↗ · + Follow
12 symbols 27 edges 4 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Remote Control

Visual Studio Marketplace

Number of installs

Ratings

Buy me a coffee

This extension allows you to remotely control Visual Studio Code. Run commands from anywhere you want on your device. The extension allows you to take VSCode automation to the next level.

In the background it uses websockets in order to listen to commands it should execute in your VSCode instance.

Info: This is a sample of how I use the Remote Control extension in combination with the macOS Raycast app.

Extension Settings

The extension has the following settings which you can use to configure it:

  • remoteControl.enable: enable/disable this extension
  • remoteControl.host: the hostname of the websocket server. Default: 127.0.0.1.
  • remoteControl.port: set the port number for the websocket to start the server
  • remoteControl.fallbacks: an array of port numbers to fallback to if the port is already in use
  • remoteControl.noAutoFallback: when enabled, the extension will not fall back to other ports when the configured port is already in use. The server will not start if the port is unavailable. Default: false.
  • remoteControl.onlyWhenInFocus: allows you to broadcast commands to all VSCode instances and only the one with focus will execute it.

Current port in use

Once the extension starts, it will show the port number in the status bar. This way you can easily see which port is used.

Usage

When you install this extension, it will automatically open a websocket on port 3710. This port can be changed on in the VSCode settings. When you are going to use multiple VSCode sessions at the same time, it is best to configure it on workspace level or use the remoteControl.fallbacks setting to specify fallback ports when the previous one is already in use.

Once installed, you can execute commands for VSCode remotely by calling the Remote Control its websocket. Here is an example how to open the terminal in VSCode:

echo "{ \"command\": \"workbench.action.terminal.new\" }" | websocat ws://localhost:3710

The text you need to pass to the websocket listener is as you can see a stringified JSON object. The object currently consists of:

  • Command: <command-id>

Passing arguments

to pass additional arguments use

echo "{ \"command\": \"command.id.with.arguments\", \"args\": [\"value\"] }" | websocat ws://localhost:3710

How do I get the command ID?

To get the command ID, open the Command Palette and type Show all commands. This will give you a list with all the available commands.

Behind each command, there is a gear button. When you click on it, it brings you to the shortcut configuration. Where you can right-click on the command and copy its ID.

Feedback / issues / ideas

Please submit your feedback/issues/ideas by creating an issue in the project repository: issue list.

Extension points exported contracts — how you extend this code

CommandData (Interface)
(no doc)
src/models/CommandData.ts

Core symbols most depended-on inside this repo

info
called by 5
src/services/Logger.ts
error
called by 5
src/services/Logger.ts
warning
called by 2
src/services/Logger.ts
warningNotification
called by 1
src/extension.ts
startWebsocketServer
called by 1
src/extension.ts
getInstance
called by 1
src/services/Logger.ts
activate
called by 0
src/extension.ts
deactivate
called by 0
src/extension.ts

Shape

Method 5
Function 4
Class 2
Interface 1

Languages

TypeScript100%

Modules by API surface

src/services/Logger.ts7 symbols
src/extension.ts4 symbols
src/models/CommandData.ts1 symbols

For agents

$ claude mcp add vscode-remote-control \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact