Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/estruyf/vscode-remote-control
Remote Control your Visual Studio Code - 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.
https://github.com/estruyf/vscode-remote-control
code control extension remote remote-control vscode vscode-extension
Last synced: about 2 months ago
JSON representation
Remote Control your Visual Studio Code - 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.
- Host: GitHub
- URL: https://github.com/estruyf/vscode-remote-control
- Owner: estruyf
- License: mit
- Created: 2021-04-21T13:50:33.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-06T19:31:20.000Z (8 months ago)
- Last Synced: 2024-10-12T08:28:53.293Z (2 months ago)
- Topics: code, control, extension, remote, remote-control, vscode, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-remote-control
- Size: 2.23 MB
- Stars: 22
- Watchers: 4
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
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.
![](assets/example.gif)
> **Info**: This is a sample of how I use the Remote Control extension in combination with the macOS [Raycast](https://raycast.com/) 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.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.
![](assets/statusbar-item.png)
## 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:
```bash
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`: ``
### 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.
![](assets/command-id.png)
## Feedback / issues / ideas
Please submit your feedback/issues/ideas by creating an issue in the project repository: [issue list](https://github.com/estruyf/vscode-remote-control/issues).