Colab is a VS Code extension for code sharing. Colab is for code what Zoom is for video chats.
The extension has a menu, with all the functionalities
The buttons allow the following functionalities:
- Setup Publisher - create a new network and become the publisher (presenter)
- Setup Subscriber - join an existing network using the publisher's ID
- Disconnect - leave the network and destroy the session (automatic reconnection is impossible)
- Send project files - execute the current directory in a Docker container on a remote machine (requires Dockerfile)
- Destroy container - stops the remote Docker container
The bottom section is Session
, which has information about which peers are connected to the network.
The first peer is always the current host.
The URLs listed are the IDs of the peer.
A common workflow is:
- A Publisher starts
- The Publisher copies their ID from the
Session
tab and shares it with others - Everyone else uses the ID to start a Subscriber
- When starting a Subscriber you have the option to select "Sync Workspace" to fetch the latest state
- The Publisher can now edit/create/delete files and they will be synced with the other peers
Colab | Live Share | |
---|---|---|
Peer connection | p2p | Tries p2p but defaults to centralized cloud |
Peers who can edit | Only 1 - the publisher | Everyone |
Execute remotely | Yes with Docker | No |
Edit permissions | No | Yes |
Reconnect to network | Yes | No |
Network dies after creator leaves | No | Yes |
- The extension works only on local network
- When joining a network as a subscriber the opened workspace directory will be cleaned of all files