WebXTerm VSCode Extension
WebXTerm VSCode Extension brings WebXTerm directly into Visual Studio Code — browse your machines in the sidebar, open integrated terminal sessions, browse remote files, and forward ports without leaving your IDE.
Overview
The VSCode extension provides:
- Machine explorer — sidebar tree view of all your registered machines with online/offline status
- Integrated terminal — full terminal sessions inside VS Code via WebSocket tunneling
- Remote file browser — browse and open files on remote machines
- Port forwarding — forward remote ports to your local machine
- Two connection modes — WebSocket tunnel (recommended) or SSH via Remote-SSH extension
Installation
From VSCode Marketplace
- Open VSCode
- Go to Extensions (
Ctrl+Shift+X) - Search for "WebXTerm"
- Click Install
From Command Line
code --install-extension vsay.vsay-terminal
Getting Started
1. Sign In
- Open Command Palette (
Ctrl+Shift+P) - Type "WebXTerm: Login"
- Enter your WebXTerm backend API URL (e.g.
https://your-webxterm-instance.com) - Enter your email and password
Your JWT token is kept in memory only for the current VS Code session. You will be asked to sign in again after reloading VS Code.
2. View Your Machines
After signing in, click the WebXTerm icon in the Activity Bar. The sidebar shows all your machines with their current status (Online / Offline).
3. Connect to a Machine
Click the 📡 WebSocket icon next to a machine name to open a terminal session.
Connection Modes
WebSocket Mode (Recommended)
The extension connects to the WebXTerm backend over WebSocket and tunnels your terminal through the backend to the vsay-agent running on the machine — identical to the Web Terminal.
How it works:
- Extension opens a WebSocket to:
ws://your-webxterm-instance.com/api/terminal/{agent_id}/ws?session_id=...&token=JWT&source=vscode
- A VS Code integrated terminal opens, wired to the WebSocket stream
- A remote filesystem provider is registered (
vsay-remote-{agentId}://) for file browsing - Port forwarding is available for the session
Advantages:
- No SSH setup required on the remote machine
- Works through firewalls (outbound WebSocket only)
- No agent SSH port exposure needed
SSH Mode
If you prefer traditional SSH, the extension can configure ~/.ssh/config and launch the Remote-SSH extension.
How it works:
- Click the 🔌 SSH icon next to a machine
- The extension adds a Host entry to
~/.ssh/config:Host vsay-{agent_id}HostName <machine-ip>User <linux-user> - The Remote-SSH extension opens the connection
Requirements: Remote-SSH extension installed; SSH access to the machine.
Features
Machine Explorer
The sidebar tree shows all machines organized by status:
- Online — agent is connected and heartbeating
- Offline — agent has not sent a heartbeat recently
Integrated Terminal
When connected via WebSocket mode, a VS Code terminal opens with full interactive shell access:
- Full color and Unicode support
- Copy/paste works natively
- Multiple terminal sessions in tabs
- All commands are logged to the WebXTerm audit log
Remote File Explorer
Browse files on connected machines:
- Right-click a machine → "Browse Files"
- Navigate the remote filesystem in VS Code's Explorer panel
- Open, edit, and save files directly
Port Forwarding
Forward a port from the remote machine to your local machine within an active WebSocket session:
- Right-click machine → "Forward Port"
- Enter the remote port number
- The port is accessible at
localhost:<port>on your machine
Configuration
Open VS Code Settings (Ctrl+,) and search for "WebXTerm":
{
"vsay.apiUrl": "https://your-webxterm-instance.com"
}
Commands
Open Command Palette (Ctrl+Shift+P) and type "WebXTerm":
| Command | Description |
|---|---|
| WebXTerm: Login | Authenticate with your WebXTerm backend |
| WebXTerm: Logout | Clear credentials |
| WebXTerm: Refresh Machines | Reload machine list |
| WebXTerm: Connect (WebSocket) | Open WebSocket terminal session |
| WebXTerm: Connect (SSH) | Open via Remote-SSH extension |
Troubleshooting
Connection Issues
- Check that the machine shows Online in the web dashboard
- Verify your API URL is correct in settings
- Try WebXTerm: Refresh Machines from the Command Palette
- Check that the
vsay-agentservice is running on the remote machine:systemctl status vsay-agent
Extension Not Loading
- Check VS Code version (requires 1.70+)
- Reload window:
Ctrl+Shift+P→ "Reload Window"
Community vs Enterprise
| Feature | Community | Enterprise |
|---|---|---|
| Machine explorer | ✅ | ✅ |
| WebSocket terminal | ✅ | ✅ |
| Remote file browser | ✅ | ✅ |
| Port forwarding | ✅ | ✅ |
| SSH connection mode | ✅ | ✅ |
| OIDC/OAuth2 authentication | ❌ | ✅ |
| Multi-org support | ❌ | ✅ |