colab-cli

Run Google Colab and Modal GPU jobs from the terminal.

1|Updated Mar 15, 2025
One-click install
npx skills add https://github.com/adikpb/dotfiles --skill colab-cli-adikpb
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: colab-cli
Source: https://github.com/adikpb/dotfiles/tree/main/.hermes/skills/mlops/colab-cli
Command: npx skills add https://github.com/adikpb/dotfiles --skill colab-cli-adikpb

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires google-colab-cli, jupyter-kernel-client, modal, and includes references (resource) components.

What problem does it solve? Running large ML workloads requires GPU resources that local machines often lack, and managing remote Colab runtimes or Modal jobs manually involves quota limits, auth flows, kernel hangs, and silent failures that waste hours. ## Core Features & Use Cases - Colab VM orchestration: Allocate T4/L4/A100 VMs, execute .py/.ipynb files remotely, stream logs, download artifacts, and stop sessions to preserve quota. - Headless notebook hardening: Guard against getpass hangs, files.download failures, and numpy ABI breakage when running notebooks non-interactively. - Modal escalation path: When a Colab T4 (~14.5 GiB) cannot hold 27B+ models in NF4 quantization, run the same pipeline on Modal L4/A100 with a verified image recipe. - Use Case: You need to abliterate and convert a 27B model to GGUF. Start on a free Colab T4, detect the OOM, then escalate to a Modal L4 job with keepalive logging and volume-based artifact delivery. ## Quick Start Ask the agent to allocate a Colab T4 session named myjob, run your training script remotely, and stop the VM when finished.

Frequently Asked Questions about colab-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a Colab notebook from the terminal?▼

Install google-colab-cli with uv, authenticate once via the OAuth URL printed by colab new, then run colab exec -s NAME -f notebook.ipynb. Outputs are written to <base>_output.ipynb and artifacts can be pulled with colab download.

When should I use Modal instead of Google Colab?▼

Use Modal when a Colab T4 (~14.5 GiB allocatable) cannot fit your model, typically 27B+ parameters in bitsandbytes NF4. Modal's free Starter tier offers $30/month credits with L4 (~$0.80/hr) and A100 GPUs plus 512 GiB ephemeral disk.

Why does google-colab-cli crash with a KernelClient AttributeError?▼

jupyter-kernel-client 1.0.0 removed the top-level KernelClient class, breaking CLI 0.6.0. Reinstall with uv tool install google-colab-cli --with "jupyter-kernel-client==0.9.0" and verify the class exists in the installed package.

How do I fix TooManyAssignmentsError on colab new?▼

This error means an unmanaged browser session still holds the runtime, since the free tier allows only one concurrent VM. Query the assignments API with your OAuth token and unassign the orphan endpoint, appending ?authuser=0 to avoid 400 errors.

Why do Colab notebooks hang when run headlessly?▼

Interactive features like getpass() and files.download() block under colab exec. Read secrets from os.environ instead, print output paths rather than calling files.download, and pull artifacts with colab download from the terminal.

Can a Colab T4 run a 27B model in 4-bit quantization?▼

No. A 27B model in bitsandbytes NF4 needs roughly 13.8-14.5 GiB at load, leaving zero headroom on a T4's 14.56 GiB. Escalate to an L4 or A100 on Modal, which provides 24-40 GB of VRAM.