Skip to content
| Marketplace
Sign in
Visual Studio Code>Data Science>Colab SyncNew to Visual Studio Code? Get it now.
Colab Sync

Colab Sync

Sujit Kumar

|
2 installs
| (0) | Free
Bidirectional synchronization between a local VS Code workspace and a Google Colab notebook runtime, with Python and R kernel support.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Colab Sync

Run on Colab. Work locally. Stay synchronized.

Colab Sync keeps a local VS Code workspace synchronized with the project files used by a Google Colab notebook. Work with your research or data science project locally in VS Code while the notebook runs on Colab.

Features

  • Bidirectional local and Colab project synchronization
  • Supports Python and R Colab kernels only
  • Automatically uses your local project folder as the Colab project folder
  • Supports nested folders and empty folders
  • Relative paths work from the synchronized project root
  • Local file deletions can be synchronized to Colab
  • Remote changes are checked every 10 seconds by default
  • Notebook edits do not trigger the conflict danger notification
  • Local work is preserved if the Colab runtime is lost

Before you start

Install these VS Code extensions:

  1. Google Colab: the official Google Colab extension
  2. Jupyter: Microsoft
  3. Colab Sync

Sign in to Google Colab through the official Google Colab extension before using Colab Sync.

Recommended setup

1. Open your project

Open the local folder you want to synchronize in VS Code. For example:

D:\Research\YourProjectName

Colab Sync automatically uses the project folder name for the Colab project:

Local:  D:\Research\YourProjectName
Remote: /content/YourProjectName

You do not need to enter the remote /content/... path manually.

2. Open your notebook

Open the .ipynb file that you want to use with Colab.

3. Select the Colab kernel

In the notebook toolbar, select the Colab kernel and choose the runtime you want.

Colab Sync supports Python and R Colab kernels only.

When VS Code asks for Jupyter kernel access, allow Colab Sync. You can also use Jupyter: Manage Access to Jupyter Kernels.

4. Connect Colab Sync

Open the Command Palette and run:

Colab Sync: Connect

Colab Sync automatically prepares the selected Colab kernel for the connection. You do not need to run one of your own notebook cells just to establish the connection.

On the first connection, your local project is used to initialize the Colab project. After that, synchronization works in both directions.

Python and R

Colab Sync supports both Python and R Colab kernels.

For example, a Python notebook can use:

import pandas as pd

df = pd.read_csv("data/file.csv")

An R notebook can use:

data <- read.csv("data/file.csv")

Project-relative paths are resolved from the synchronized project root.

Notebook behavior

Notebook files are handled separately because running a notebook can change outputs and execution information.

Local notebook edits do not show the conflict danger notification. During normal synchronization, the local notebook is used when both sides have changed. Use Colab Sync: Pull Remote Changes when you intentionally want the remote notebook version.

Empty folders

Empty directories are synchronized too. For example:

D:\Research\YourProjectName\data\raw

creates the matching project directory in Colab.

Commands

Command Purpose
Colab Sync: Connect Connect to the selected Colab notebook kernel
Colab Sync: Disconnect Stop synchronization without deleting local files
Colab Sync: Sync Now Run an immediate synchronization
Colab Sync: Push Local Changes Send local changes to Colab
Colab Sync: Pull Remote Changes Bring remote changes to local
Colab Sync: Initialize Project Create the project configuration and automatic remote mapping
Colab Sync: Resolve Conflicts Review genuine two-sided file conflicts
Colab Sync: Show Status View connection and synchronization status
Colab Sync: Reconnect Runtime Reconnect to the selected notebook kernel

Settings

Setting Default Description
colabsync.autoSync true Automatically synchronize local changes and remote polling
colabsync.pollInterval 10 Remote polling interval in seconds; 0 disables polling
colabsync.transferConcurrency 3 Maximum concurrent file transfers
colabsync.maxFileSize 524288000 Maximum file size to transfer, 500 MiB
colabsync.logLevel info error, warn, info, or debug

Troubleshooting

Colab Sync says no active notebook kernel is available

  1. Open the .ipynb file.
  2. Select the Colab kernel in the notebook toolbar.
  3. Make sure the Google Colab extension is signed in and connected.
  4. Open Jupyter: Manage Access to Jupyter Kernels and allow Colab Sync.
  5. Run Colab Sync: Connect and give the selected runtime a moment to become ready.

R notebook gives a Python syntax error

Make sure the notebook is using the R Colab kernel.

Files are not appearing immediately

Remote changes are checked every 10 seconds by default. You can also run Colab Sync: Sync Now.

Creator

Sujit Kumar
GitHub profile: https://github.com/sujit-kumar-lab
Website: https://datainferix.com

License

Apache-2.0

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft