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.

VS Code Extension
Cloudflare Worker coder-gwieditor
Coder Plugin 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


Installation

1
Download the .vsix file
Grab coder-gwi-connector-1.0.0.vsix from the VS Code Releases page or directly from GitHub Releases.
2
Install from VSIX
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P), search for Extensions: Install from VSIX..., and select the downloaded file.
3
Reload VS Code
VS Code may prompt you to reload after installing. Do so to activate the extension. A ⚡ GWI: Not connected item will appear in the status bar.
You can also install via the CLI: code --install-extension coder-gwi-connector-1.0.0.vsix

Connecting 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:

Minecraft
/coder editor start

The session token will appear in your in-game chat.

Connect from VS Code

1
Open the Coder GWI panel
Click the ⚡ Coder GWI icon in the activity bar (left sidebar), or click the status bar item at the bottom.
2
Connect to Session
Click Connect to Session in the session panel, or run Coder GWI: Connect to Session from the Command Palette.
3
Enter your token and display name
Paste the session token from in-game, then enter a display name that will be shown to the server operator waiting to approve you.
4
Approve in-game
The server operator approves your request with /coder editor approve <name>. VS Code will show a notification once connected and the file tree will populate.
Sessions expire after ~30 minutes of inactivity. The extension will notify you automatically and reset the connection state when this happens.

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.

A brief status bar flash ✓ GWI: Saved filename confirms each successful save. If a save fails, an error notification appears instead.

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:

ExtensionRuntime
.javaJVM (Java 21–25)
.pyPython 2.7
.luaLua 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).

CommandDescription
Coder GWI: Connect to SessionStart the connection flow — prompts for token and display name, then requests server access
Coder GWI: DisconnectClose the current session (with confirmation), clears the file tree and virtual FS
Coder GWI: Refresh File ListRe-fetch the complete file tree from the server
Coder GWI: New FileCreate a new file on the server; opens it in the editor immediately
Coder GWI: New FolderCreate a new directory on the server
Coder GWI: RenameRename a file or folder in the tree
Coder GWI: DeleteDelete a file or folder (requires confirmation, cannot be undone)
Coder GWI: Save File to ServerManually 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.

SettingDefaultDescription
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.
settings.json
{
  "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.

MethodEndpointBody / ParamsDescription
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
The extension's 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.