CodeRelay
By Raha
Share a code file on one computer. Open and edit it on another, inside VS Code.
Choose a shared path such as demo-project. CodeRelay keeps your shared files together, preserves names and extensions, and opens them in the normal VS Code editor.
1. Install and open
- Open Extensions in VS Code. Install
coderelay-0.1.0.vsix using Extensions: Install from VSIX... in the Command Palette.
- Restart extensions if VS Code requests it.
- Click the CodeRelay icon in the left Activity Bar.
- To open the right view too, open the Command Palette with Ctrl+Shift+P (Cmd+Shift+P on macOS) and run CodeRelay: Show Right Sidebar. Use Show Left Sidebar for the left view.
If the right view is hidden, enable View → Appearance → Secondary Side Bar. You can drag its CodeRelay tab beside your other right-sidebar tabs. VS Code remembers your layout.
The default hosted connection requires internet access, but no local server or token. Requires VS Code 1.106 or later.
2. Share your first file
- Open a source file, for example
main.py.
- Right-click it in Explorer, its editor tab, or inside the editor.
- Select CodeRelay: Share This File.
- Enter
demo-project and press Enter.
- The shared copy opens in an editor and appears in Shared Files.
Code sharing is automatic: there is no Code/Text question. Filenames and extensions are preserved. Sharing the same name and extension again updates the matching file; ambiguous duplicate names require a selection.
What is a shared path? It is the name of an online sharing space, not a folder you must create on your computer. Use the exact same spelling on each computer. demo-project and /demo-project refer to the same space.
3. Open it on another computer
- Install CodeRelay on the second computer.
- Open either CodeRelay sidebar.
- Enter the same path,
demo-project, and press Enter or click Open.
- Click
main.py to open it in the normal VS Code editor.
You can also right-click and choose CodeRelay: Open Shared Files, or run that command from the Command Palette. Reopening the sidebar automatically loads the saved path.
4. Edit and sync
- Edit the file opened from the CodeRelay sidebar.
- Pause briefly for automatic syncing, or press Ctrl+S (Cmd+S on macOS).
- Check the sync status beside the filename.
- Open the same shared file on the other computer to see updates.
Keep using VS Code's syntax highlighting, language detection, line numbers, search, undo, minimap, and ordinary editor tabs. Native editor icons follow your installed file icon theme.
Your original file and the shared copy are separate. To publish later changes from the original, share it again. For ongoing syncing, edit the copy opened from CodeRelay.
Find and create files
| Control |
How to use it |
| Path + Open |
Enter the space name and press Enter or Open. |
| Search |
Type part of a name or extension, such as main or .py. Clear the search to show all files. |
| New shared file (+) |
Click the plus icon in the Shared Files header, follow the filename prompts, and edit the new file. |
| Refresh |
Reload the file list immediately. |
| File row |
Click a filename to open its synced editor. |
| File menu (⋯) |
Open rename, delete, and history actions on a supported service. |
Share only selected lines
- Select the code you want to send in an editor.
- Right-click and choose CodeRelay: Share Selected Code.
- Enter the shared path.
- Only the selected text is uploaded, in a new file with a selection suffix and the original extension.
Understand sync status
| Status |
Meaning and next step |
| Saving |
Wait for the upload to finish. |
| Synced |
The latest save succeeded. Hover for its time. |
| Offline |
Check your connection. Keep your draft and retry saving when connected. |
| Local draft |
Unsynced content is preserved locally. Follow the recovery prompt when reopening. |
| Conflict |
Remote content changed while you had local edits. Compare before choosing what to keep. |
For conflicts, Compare opens the differences, Use Remote accepts the server's content, and Publish Mine publishes your draft as the chosen replacement. After comparing, save again to choose a resolution. Simultaneous typing is not merged automatically.
More tools: folders, history, and privacy
Service requirement: These tools require the upgraded version 2 sharing service supplied with version 0.7. If an upgrade message appears, the service administrator must deploy that update first. Installing the extension alone does not upgrade the server. Basic sharing remains available on supported legacy servers.
Organize files in folders
- Open your shared space and click New folder.
- Enter a folder name, then click the folder to browse it.
- Create or share files into that path, for example
demo-project/helpers.
- Click Up to return to the parent folder.
- Use a folder's ⋯ menu to rename it or delete an empty folder. Folders containing files or retained history cannot be deleted.
Rename or delete a file
- Open the file's ⋯ menu.
- Choose Rename file, enter the new name including its extension, and confirm.
- To remove a file from the list, choose Delete file, then confirm.
Deletion is recoverable; it is not permanent erasure.
Compare or restore an earlier version
- Open a file's ⋯ menu and choose Version history.
- Select a revision.
- Choose Compare with current to inspect differences in VS Code.
- Or choose Restore this version, then confirm Restore. Restoration creates a new revision.
Up to 20 earlier versions per file are retained, subject to a shared 2 MB history budget per space. Older versions can expire.
Recover a deleted file
- Open the folder where the file was deleted.
- Click Deleted files and select the file.
- Select a version, choose Restore this version, and confirm Restore.
- Open the recovered file from the refreshed list.
Create and unlock a private space
- Run CodeRelay: Create Private Space from the Command Palette.
- Choose a new, unused top-level path, such as
team-demo-private.
- Enter a shared passphrase of at least 12 characters.
- On another computer, run CodeRelay: Unlock Private Space, enter the same path and passphrase, and open its files. The sidebar's Unlock button also opens this flow.
- To disconnect access on this computer, run CodeRelay: Lock Private Space.
Access lasts 24 hours and is stored in VS Code Secret Storage. Unlock again when access expires. Locking removes stored access and disconnects shared editors; cached local copies remain on disk. Everyone with the passphrase has collaborator access. Existing public spaces are not converted to private spaces by this command.
Private spaces currently unlock in the VS Code extension. The website compatibility update supports public spaces.
The upgraded service checks file revisions during saves and rejects stale updates, helping prevent one collaborator from silently replacing another's work.
Connection options
For normal use, keep the default hosted connection on every computer.
To change the API origin, run CodeRelay: Configure Sync Connection, choose the hosted option, and enter your service's origin. Every computer must use the same service and path.
The separate Private self-hosted server option uses a server URL and token, then opens through CodeRelay: Open Named Pad. This alternative named-pad mode does not use the upgraded hosted file browser. The server must be reachable from every computer: localhost refers only to the current computer. A reachable LAN server can work without public internet.
Quick troubleshooting
| Problem |
Try this |
| Missing sidebar icon |
Enable the extension, restart extensions if prompted, then run Show Left Sidebar or Show Right Sidebar. |
| No files appear |
Check the path and service on both computers, clear the search, then Refresh. |
| My original file does not sync |
Share it again, or edit the shared copy opened from the sidebar. |
| Connection or save fails |
Check internet access and hover over the sync status for details. Keep your local draft. |
| A tool asks for an upgrade |
Deploy the version 2 service before using file management, folders, history, or private spaces. |
| Private access expired |
Unlock again using the same passphrase. |
Before sharing
- Anyone who knows a public path can access its files. Keep credentials and sensitive content out of public spaces.
- Source code and plain text are supported; binary files and legacy PIN-protected paths are not supported.
- The upgraded service supports 512 KB files, including nested folders. Legacy servers limit nested saves to approximately 94 KB.
- CodeRelay shares files; it does not execute shared code or merge simultaneous keystrokes.
Built by Raha. Share feedback to help improve CodeRelay.