Skip to content

Google Colab notebook

Hand someone runnable code they open in a browser tab and press play — no install, no terminal, nothing to set up. They read it, run it cell by cell, see the output, and click Copy to Drive to make their own version. It shares like a Google Doc: a link, or named people.

Reach for it when the code itself is the point and your recipient should see and run it. Skip it when they only want the result — a notebook still asks them to press play — or when they'll build on it as a whole project.

Last verified: 2026-06-07 · Confidence: high on sharing, the no-account-to-view rule, and runtime limits (Colab's FAQ + Drive sharing help); the idle-timeout duration is unclear.


It allows you to

  • Hand over code that just runs. Open the link, press play — no Python install, no terminal, no environment. The wall that stops non-coders at a repo isn't here. [confirmed]
  • Let them read every line first. The code sits right there cell by cell, with its saved output — readable before they trust it. [confirmed]
  • Give them their own copy in one click. Copy to Drive drops an editable version in their Drive; your original never moves. [confirmed]
  • Share it like a Doc — and close it like one. It is a Drive file, so it carries the same access model as a Google Doc: view/comment/edit roles, the just-you / named / link rungs, instant revoke. The Colab-only twist is below. [confirmed]

Ideal for

  • An analysis a semi-technical colleague reruns on their own numbers — like the AI Safety Field Growth Analysis 2025 notebook, link-shared "for reproducing the graphs in this post": they press Run all, the charts regenerate, then Copy to Drive to point it at their own data.
  • A teaching notebook for a workshop — each attendee opens one link, copies it, runs cells live on a borrowed laptop, no setup eating the first 20 minutes.
  • A one-off script too fiddly to email — a "pull this API, clean it, plot it" notebook a programme officer runs once a quarter, where a .py file would mean "now install Python."

Who can get in

Access works exactly like any Drive file — pick the audience, invite named people at view/comment/edit, or open it to a link; viewing then needs no Google account, and revoke is instant. The mechanics are on the Google Doc page. The one thing that's different on a notebook:

  • Running always needs a sign-in. Pressing play (or Copy to Drive) spins up a free machine tied to a Google account, so the runner needs one — even when viewing didn't. The un-delegable friction. The fine print. [confirmed]

Which rungs it can hold. Just you / named people / anyone with the link — no clean org-only rung unless your org runs Workspace. → Who can see it? [confirmed]

Handing data to the host. The notebook lives in your Google Drive, so the same stance applies as any Drive file — the shared Google truths (ads, the Gemini knob, Workspace no-training) are on the Google entry → Can you trust the company?. [confirmed]


What you do to set it up

  • Ask: tell Claude Code "write this as a Colab notebook, put it in my Google Drive, and give me the link." Your agent writes the cells and drops the .ipynb into Drive; the one click left to you is the Share dialog, exactly like a Doc. Every share after: one sentence. [confirmed]
  • One-time, in order:

    1. Set up Claude Code — does the rest, ~10 min once.
    2. A Google account, signed in — ~5 min once; the sign-up is the un-delegable bit.
    3. The Google Drive tooling connected, so your agent can write into your Drive — ~5 min once.
  • Rather click? Open in Colab → Share → set access → Copy link, ~30 sec → Share a Colab notebook.


What the other person does

  • Just look: click the link, read the code and its saved output. ~5 sec, no account. [confirmed]
  • Run it: Copy to Drive, then press the play triangle or Runtime → Run all. Needs a free Google sign-in; the first run connects to a machine in a few seconds, no install. [confirmed]
  • Change it: in their copy they edit any cell freely; yours stays untouched. [confirmed]
  • Pay: nothing — viewing, copying, and the free runtime are all free.

Full recipient walk-through, plus the API-key (Secrets) case → Share a Colab notebook.


Other ways to share

  • It should just run for a non-technical viewer — no press-play, no sign-in? → a deployed website opens as a live thing in any browser, nothing to run, no account.
  • They should run and co-edit a real multi-file app, several people live at once?Replit — a notebook is one runnable file; Replit is the whole running app, edited together in the browser.
  • They're ready for the real source — every file, full history, changes sent back? → a GitHub repo hands over everything; a notebook is one self-contained file.
    • The deliverable is the model or dataset itself, not a notebook to run it? → the Hugging Face Hub — share the weights/data for a one-line pull, where Colab just lets someone run a demo.

Sources


Good to know

The runtime limits, the running-needs-a-sign-in catch, the API-key behaviour, and what "anyone with the link" really means are collected in the fine print — the highest-staleness details, dated and sourced.