This week, Google AI staff launched the Colab CLI. The software connects your native terminal to distant Colab runtimes. It lets builders and AI brokers run code on cloud GPUs and TPUs. You keep in your terminal the whole time. The CLI is open supply underneath the Apache 2.0 license.
What’s Google Colab CLI
The Colab CLI is a command-line interface for Google Colab. You may create classes, run code, and handle information from the terminal.
Any agent with terminal entry can name the software. That features Claude Code, Codex, and Google’s Antigravity. Google ships a prepackaged talent file named COLAB_SKILL.md. It offers brokers built-in context on the right way to use the CLI.
Set up makes use of a single uv software set up command from the GitHub repository.
uv software set up git+https://github.com/googlecolab/google-colab-cli
A minimal session appears like this:
colab new # provision a CPU session
echo "print('good day')" | colab exec # run code
colab cease # launch the VM
How the Instructions Work
The CLI teams instructions into classes, execution, information, and automation. colab new provisions a session, with CPU because the default. Add --gpu T4, --gpu L4, --gpu A100, or --gpu H100 for a GPU. TPU choices are v5e1 and v6e1.
colab exec runs Python from stdin, a .py file, or a pocket book. The exec reads information regionally and ships their contents. Native edits subsequently want no separate add step. colab cease terminates the session and releases the VM.
Different instructions cowl information and authentication. colab add and colab obtain transfer information between native and distant. colab drivemount mounts Google Drive, defaulting to /content material/drive. colab auth authenticates the VM for Google Cloud providers.
colab exec and Artifact Restoration: The Core Loop
The core loop is brief. You provision a runtime, run a script, then pull outcomes again. colab obtain retrieves fashions, datasets, and different information. colab log exports session historical past as .ipynb, .md, .txt, or .jsonl.
So a distant run turns into a replayable pocket book in your disk. colab repl and colab console give interactive entry to the VM. colab set up provides packages with uv, falling again to pip. Session metadata is saved at ~/.config/colab-cli/classes.json.
Instance: Positive-Tuning Gemma 3 1B
Google’s official launch demonstrates an agent-driven fine-tuning job. The duty fine-tunes google/gemma-3-1b-it utilizing QLoRA. It trains on a Textual content-to-SQL dataset to enhance SQL era. The Antigravity agent runs the complete pipeline with 5 instructions.
colab new --gpu T4
colab set up transformers datasets peft trl bitsandbytes speed up
colab exec -f finetune_run.py
colab log --output gemma_finetune_log.ipynb
colab cease
The agent then downloads the adapter mannequin, adapter config, tokenizer config, and tokenizer. You may load and serve the fine-tuned mannequin regionally. No handbook cloud provisioning command was typed by the consumer.
Use Circumstances
- Offload laptop-bound coaching to a distant GPU or TPU with out leaving the terminal.
- Let brokers like Claude Code, Codex, or Antigravity run end-to-end ML pipelines.
- Positive-tune small fashions, akin to Gemma 3 1B, with QLoRA remotely.
- Script pocket book execution and export replayable
.ipynblogs for reproducibility. - Debug interactively on the VM by means of
colab replorcolab console.
Colab CLI vs Browser-Based mostly Colab
The CLI doesn’t substitute the pocket book UI. It targets scripted, automated, and agent-driven work as a substitute. Right here is how the 2 workflows examine throughout frequent duties.
| Dimension | Browser-Based mostly Colab | Colab CLI |
|---|---|---|
| Interface | Net pocket book UI | Native terminal |
| Accelerator choice | Runtime menu within the browser | --gpu / --tpu flags on colab new |
| Agent use | Handbook, UI-driven | Any terminal agent by way of instructions |
| Run native scripts | Paste or add into cells | colab exec -f script.py |
| Artifact retrieval | Handbook obtain or Drive | colab obtain, colab log |
| Bundle set up | !pip inside a cell |
colab set up (uv, then pip) |
| Session management | Browser-managed runtime | colab new, colab cease, colab standing |
| Agent talent file | None | Bundled COLAB_SKILL.md |
Strengths and Issues
Strengths:
- Terminal-native workflow matches scripts, CI, and agent loops.
- One command provisions T4, L4, A100, or H100 GPUs.
execships native file contents, so no add step is required.- Logs export to replayable pocket book codecs for reproducibility.
- Open supply underneath Apache 2.0, with a bundled agent talent file.
- Works with a number of brokers, not a single vendor’s software.
Issues:
- Entry requires authentication; the default technique is
oauth2. replandconsolewant a TTY when run interactively.- Pipe stdin to make use of these two instructions inside scripts.
- Compute nonetheless runs on Colab’s backend and its runtime mannequin.
Key Takeaways
- Google’s Colab CLI runs code on distant Colab GPUs and TPUs out of your native terminal.
- One command provisions accelerators:
colab new --gpu T4by means ofA100andH100, plus TPUs. colab execships native.pyand.ipynbinformation to the runtime with out an add step.- Any terminal agent — Claude Code, Codex, Antigravity — can drive it by way of a bundled
COLAB_SKILL.md. - It’s open supply underneath Apache 2.0, and
colab logexports replayable pocket book logs.
Marktechpost Visible Explainer
Google Colab CLI — Terminal Information
1 / 8
Marktechpost — practitioner AI & ML protection, no hype.
Supply: Marktechpost.com
Take a look at the Technical particulars and GitHub Repo right here. Additionally, be happy to comply with us on Twitter and don’t overlook to affix our 150k+ ML SubReddit and Subscribe to our E-newsletter. Wait! are you on telegram? now you may be a part of us on telegram as effectively.
Must accomplice with us for selling your GitHub Repo OR Hugging Face Web page OR Product Launch OR Webinar and so on.? Join with us

