WCMD - WebSocket Interface for VS CodeThe WCMD extension provides a WebSocket interface for executing commands within Visual Studio Code. While designed to complement the web app at http://cmdkeys.github.io, it offers a flexible tool that can be used for various custom purposes. The interface is open to third-party integrations and is distributed under an open-source license. WebSocket Server OverviewBy default, the WebSocket server listens on port 5813. Once connected, the server offers two primary functions:
To explore the full list of available VS Code commands, visit the VS Code Command Guide. Example local IP: 192.168.1.203 Testing the WebSocket InterfaceYou can test the WebSocket functionality using this tool: WebSocket Test Page. On systems like Linux, you may need to open port 5813. You can check port availability with the following command:
Usage ExamplesExecuting VS Code CommandsTo execute a VS Code command, send a JSON message like the following after establishing a connection:
This will open a new VS Code window. Executing Terminal CommandsTo run terminal commands, send a message specifying the command and an optional terminal name:
This will execute the Executing Commands with Return ValuesTo execute a command and return the result in the WebSocket response, use:
This will return the result of the Example response: Release NotesVersion 0.0.2
Available Functions (Registered Commands)
author website : https://bueltan.github.io/ |