Skip to content
Skills Library
DevOps & cloud · Tool integration

colab-cli

/colab-cli

Use when the user wants headless/terminal control of Google Colab - provisioning CPU/GPU/TPU runtimes, running scripts on Colab VMs, uploading/downloading files, or automating pipelines with the official google-colab-cli. Also use when the user says "colab new", "colab exec", or asks to run heavy code on Colab GPUs without a browser notebook. Does not cover the browser-paired colab-mcp workflow - that is the colab-mcp skill.

Licence
Apache-2.0
Last repository change
05.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 05.11.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Use when the user wants headless/terminal control of Google Colab - provisioning CPU/GPU/TPU runtimes, running scripts on Colab VMs, uploading/downloading files, or automating pipelines with the official google-colab-cli. Also use when the user says "colab new", "colab exec", or asks to run heavy code on Colab GPUs without a browser notebook. Does not cover the browser-paired colab-mcp workflow - that is the colab-mcp skill.

Triggers from the description

colab newcolab exec
Original author description

Use when the user wants headless/terminal control of Google Colab - provisioning CPU/GPU/TPU runtimes, running scripts on Colab VMs, uploading/downloading files, or automating pipelines with the official google-colab-cli. Also use when the user says "colab new", "colab exec", or asks to run heavy code on Colab GPUs without a browser notebook. Does not cover the browser-paired colab-mcp workflow - that is the colab-mcp skill.

How it works

  1. Requirements and platform
  2. Command reference
  3. Typical agent workflow (GPU job)
  4. Agent tips
Original SKILL.md headings · 71 lines, 517 words
SKILL.md preview
---
name: colab-cli
description: Use when the user wants headless/terminal control of Google Colab - provisioning CPU/GPU/TPU runtimes, running scripts on Colab VMs, uploading/downloading files, or automating pipelines with the official google-colab-cli. Also use when the user says "colab new", "colab exec", or asks to run heavy code on Colab GPUs without a browser notebook. Does not cover the browser-paired colab-mcp workflow - that is the colab-mcp skill.
---

# colab-cli — headless Colab from the terminal

Official Google repo: https://github.com/googlecolab/google-colab-cli (Apache-2.0). The CLI controls
Colab runtimes via Jupyter/WebSocket protocols; session metadata lives in
`~/.config/colab-cli/sessions.json` (override with `--config`).

## Requirements and platform

- Install with `uv tool install google-colab-cli` (preferred) or `pip install google-colab-cli`.
- **Windows is NOT officially supported** — upstream targets Linux/macOS and the supported
  path on Windows is **WSL** (`wsl -d <distro>` then use `colab` there; files stay in the
  WSL filesystem for speed). Verified in practice (2026-11-05): the CLI installs via pip and
  loads on Windows, and the OAuth flow initiates correctly — but full runtime behavior
  (SSH tunnels, TTY console) is untested there, so prefer WSL for real work.
- Accelerators: T4, L4, G4, H100, A100 GPUs; TPU v5e1/v6e1. High-RAM shapes require
  Colab Pro/Pro+. L4/TPU shapes ignore `--high-mem`.
- Auth strategies via global option `--auth {oauth2,adc}` (default `oauth2`): on first use
  the CLI prints a Google OAuth URL and waits for the authorization code — every command
  requires completing this flow once in an interactive terminal. ADC
  (`--auth adc`) uses Application Default Credentials (e.g. `gcloud auth
  application-default login`).

## Command reference

**Global flags**: `-s NAME` selects a named session for any command; `--auth {oauth2,adc}`.

**Sessions**
- `colab new [-s NAME] [--gpu T4|L4|G4|H100|A100] [--tpu ...] [--high-mem]` — provision a runtime
- `colab sessions` — list sessions
- `colab status [-s NAME]` — show session state / wait until ready
- `colab url [-s NAME]`
- `colab restart-kernel`, `colab stop [-s NAME]` — release the VM
- `colab ssh [-s NAME]` — WebSocket shell, or OpenSSH ProxyCommand for IDEs

**Execution**
- For agent use, prefer `colab exec`: it transmits file contents directly to the kernel —
  no manual upload needed.
- `echo 'print(1)' | colab exec` — run code from stdin
- `colab exec -f script.py [-s NAME]` — run a .py or .ipynb file
- `colab run [--gpu T4] script.py [args...]` — ephemeral job: provisions VM, runs script, tears down
- `colab repl` — interactive; `colab console` — tmux TTY shell

**Files**
- `colab upload [-s NAME] local remote` / `colab download [-s NAME] remote local`
- `colab ls / rm / edit` — remote file management

**Automation**
- `colab install -s trainer torch transformers` — install packages (uv, pip fallback)
- `colab log [-s NAME]` — export session log to .ipynb/.md/.txt/.jsonl
- `colab usage`, `colab pay` — usage/compute points status
- `colab drivemount` — mount Google Drive

## Typical agent workflow (GPU job)

```bash
colab new -s trainer --gpu A100
colab install -s trainer torch transformers
colab exec -s trainer -f train.py
colab download -s trainer checkpoints/model.bin ./model.bin
colab stop -s trainer
```

## Agent tips

- **Always `colab stop -s NAME` when done** — releases the VM so the user's compute points aren't drained by idle time.
- `colab exec -f` sends file contents to the kernel (no upload step); use `colab upload/download` for artifacts like checkpoints.
- Shebang trick for runnable GPU scripts:
  `#!/usr/bin/env -S colab run --gpu L4 --keep`
- For interactive/inspect workflows in a notebook the user has open in their browser, prefer the [[colab-mcp]] skill instead.

Versions

The database has no other skills named colab-cli.

Database snapshot: 13.11.2026 · package version 8d60f4e32f11 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100colab-operator
    Operate Google Colab environments via the `colab` CLI. Use when asked to create or manage GPU/TPU sessions, run Python/shell on a remote Colab VM, sync files, automate environment setup (packages, auth, Drive), or export session history.
  • 90colab-mcp
    Use when the user wants ZCode to interact with a live Google Colab notebook through the official colab-mcp server (run/inspect cells, use the notebook's kernel state, work inside the user's browser Colab session). Covers pairing ZCode with a browser Colab session, the dynamic…
  • 100colab-gpu
    Set up and use a Google Colab GPU runtime as a remote compute backend through the Google Colab API over the public internet (no VPN or tailnet needed). Trigger when a task needs a GPU or CUDA, model training, fine-tuning, heavy inference that exceeds local laptop resources, or…
  • 90colab-yoga
    Run and manage a paid Google Colab GPU that serves your own LLMs with Colab-yoga on Windows - install it, bind the Google account, wake or release the runtime, check balance, burn rate and which model runs, switch models, extend the idle timer. Use when the user wants a Colab…
  • 100colab-llm-service
    Deploy and operate large-model services on Google Colab through this repository's one-notebook/one-script convention and unified colabllm CLI. Use for service setup, lifecycle, project-global domains, Cloudflare Tunnel or SSH-managed FRP/Caddy, API key lookup and rotation, uv…
  • 85ultra-colab-h3-viral-video
    用 Google AI Ultra / Colab Pro+ 的 H100 跑 ComfyUI + MiniMax H3,接續 Flow 影片批次生成鏡頭、4K 後製、存回 Drive;涉及 Colab 爆款影片產線時使用。

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.