Coder GWI Connector
A VS Code extension that connects directly to your Coder GWI Editor session — edit, save, create, rename, delete, and execute Minecraft server scripts without ever opening a browser.
The extension mounts your server's files as a virtual file system under the gwi:// scheme, giving you full VS Code language support, IntelliSense, extensions, and keyboard shortcuts while working on remote server scripts.
How It Works
The extension communicates with the same Cloudflare Worker that powers the browser-based GWI Editor. Your VS Code instance talks to the worker over REST, and the worker relays commands to the Coder plugin running on your Minecraft server.
Files are stored in Firestore during the session and synced in real time. Sessions expire after roughly 30 minutes of inactivity. The extension polls the worker on a configurable interval to detect auth state changes and session termination.
Requirements
- VS Code 1.85.0 or later
- Coder plugin v2.3 or later installed on your Minecraft server
- An active GWI session started with
/coder editor start - Network access to the Cloudflare Worker (default:
coder-gwieditor.firesmasher.workers.dev)
Installation
coder-gwi-connector-1.0.0.vsix from the VS Code Releases page or directly from GitHub Releases.Ctrl+Shift+P / Cmd+Shift+P), search for Extensions: Install from VSIX..., and select the downloaded file.⚡ GWI: Not connected item will appear in the status bar.code --install-extension coder-gwi-connector-1.0.0.vsixConnecting to a Session
Start a GWI session in-game
On your Minecraft server, run the following command as an operator to open a new editor session and generate a token:
/coder editor start
The session token will appear in your in-game chat.
Connect from VS Code
Coder GWI: Connect to Session from the Command Palette./coder editor approve <name>. VS Code will show a notification once connected and the file tree will populate.Pre-filling credentials
To skip the input prompts on every connect, save your token and name in VS Code settings under coderGWI.sessionToken and coderGWI.browserUser. See Settings for all options.
Editing Files
Once connected, your server files appear in the Files tree inside the Coder GWI activity bar panel. Click any file to open it in the editor. Files are opened with the gwi:// scheme, so VS Code treats them as regular source files — syntax highlighting, IntelliSense, and all installed extensions work normally.
Saving
Press Ctrl+S (or Cmd+S) to save. The extension also triggers on VS Code's built-in Save Document event, so any autosave configuration you have will also push changes to the server instantly.
Creating files and folders
Right-click any folder in the file tree and choose Coder GWI: New File or New Folder. You can also use the + icons in the tree view title bar. New files open automatically in the editor.
Renaming and deleting
Right-click a file or folder and choose Rename or Delete. Deletion requires confirmation and cannot be undone.
Executing Scripts
Scripts with a supported extension can be queued for server-side execution. Supported runtimes:
| Extension | Runtime |
|---|---|
.java | JVM (Java 21–25) |
.py | Python 2.7 |
.lua | Lua 5.3 |
To execute, right-click an executable file in the tree and choose Coder GWI: Execute File ▶, or click the play icon that appears inline next to executable files. You can also click the ▶ button in the editor title bar when a gwi:// file is open.
Commands
All commands are available from the Command Palette (Ctrl+Shift+P).
| Command | Description |
|---|---|
Coder GWI: Connect to Session | Start the connection flow — prompts for token and display name, then requests server access |
Coder GWI: Disconnect | Close the current session (with confirmation), clears the file tree and virtual FS |
Coder GWI: Refresh File List | Re-fetch the complete file tree from the server |
Coder GWI: New File | Create a new file on the server; opens it in the editor immediately |
Coder GWI: New Folder | Create a new directory on the server |
Coder GWI: Rename | Rename a file or folder in the tree |
Coder GWI: Delete | Delete a file or folder (requires confirmation, cannot be undone) |
Coder GWI: Save File to Server | Manually push the active gwi:// file to the server (also bound to Ctrl+S) |
Coder GWI: Execute File ▶ | Queue the active or selected script for server-side execution |
Settings
Settings are under File › Preferences › Settings → search Coder GWI, or edit your settings.json directly.
| Setting | Default | Description |
|---|---|---|
coderGWI.workerUrl |
https://coder-gwieditor.firesmasher.workers.dev |
URL of the GWI Cloudflare Worker. Change this if you self-host the worker. |
coderGWI.sessionToken |
empty | Pre-fill your session token from /coder editor start. If set, the connect flow will skip the token prompt. |
coderGWI.browserUser |
empty | Pre-fill your display name shown to the server operator. If set, the connect flow will skip the name prompt. |
coderGWI.pollIntervalMs |
2000 |
How often (in milliseconds) to poll the worker for auth status during login. Once connected, the polling interval is multiplied by 5. |
{
"coderGWI.workerUrl": "https://coder-gwieditor.firesmasher.workers.dev",
"coderGWI.sessionToken": "abc123xyz",
"coderGWI.browserUser": "FireSmasher",
"coderGWI.pollIntervalMs": 2000
}
API Endpoints
The extension communicates with the GWI Cloudflare Worker using the following REST endpoints. All requests go to the base worker URL configured in coderGWI.workerUrl.
| Method | Endpoint | Body / Params | Description |
|---|---|---|---|
POST | /api/auth/request | { token, browserUser } | Send an access request to the server operator |
GET | /api/auth/status | ?token= | Poll auth status — returns waiting, trusted, rejected, or stopped |
GET | /api/files | ?token= | Load all files in the session — returns { files: [{name, content}] } |
GET | /api/file | ?token=&name= | Fetch a single file by name |
POST | /api/save | { token, fileName, content } | Save file content to the server |
POST | /api/create_file | { token, fileName } | Create a new empty file |
POST | /api/create_folder | { token, folderName } | Create a new directory |
POST | /api/rename | { token, oldName, newName } | Rename a file or folder |
POST | /api/delete | { token, fileName } | Delete a file or folder |
POST | /api/execute | { token, fileName } | Queue a script for server-side execution |
GET | /api/poll | ?token= | Poll the server-to-client action queue |
POST | /api/close | { token } | Cleanly close and dispose of the session |
GWISession class in src/session.ts wraps all of these endpoints. If you're building your own integration, it's a useful reference for the full API surface.