Sunday, June 7, 2026

Google’s New Colab CLI Lets Builders and AI Brokers Run Python on Distant Colab GPUs and TPUs From the Terminal

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 .ipynb logs for reproducibility.
  • Debug interactively on the VM by means of colab repl or colab 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.
  • exec ships 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.
  • repl and console want 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 T4 by means of A100 and H100, plus TPUs.
  • colab exec ships native .py and .ipynb information 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 log exports replayable pocket book logs.

Marktechpost Visible Explainer

Google Colab CLI — Terminal Information
1 / 8

Overview

Run Colab GPUs and TPUs out of your terminal

The Google Colab CLI connects your native terminal to distant Colab runtimes. Builders and AI brokers run code on cloud accelerators with out leaving the shell.

Introduced June 5, 2026 • Open supply underneath Apache 2.0

Step 1

What it’s

  • A command-line interface for Google Colab.
  • It connects your native terminal to distant Colab runtimes.
  • You create classes, run code, and handle information from the terminal.
  • Any terminal-based AI agent can name it too.

Step 2

Set up and fast begin

Set up with a single command, then run a primary session.

uv software set up git+https://github.com/googlecolab/google-colab-cli

colab new                            # provision a CPU session
echo "print('good day')" | colab exec   # run code
colab cease                           # launch the VM

Step 3

Provision GPUs and TPUs

Request an accelerator if you create the session. CPU is the default.

colab new --gpu T4
colab new --gpu A100
colab new --tpu v6e1

Accelerator availability will depend on your energetic Colab plan.

Step 4

Run native scripts remotely

The exec command reads your file regionally and ships its contents. No separate add step is required.

colab exec -f practice.py

exec runs Python from stdin, a .py file, or a pocket book.

Step 5

Retrieve fashions and logs

Pull outcomes again to your machine after the run.

colab obtain -s NAME checkpoints/mannequin.bin ./mannequin.bin
colab log -o report.ipynb

Logs export as .ipynb, .md, .txt, or .jsonl.

Step 6

Instance: fine-tune Gemma 3 1B

Google’s weblog reveals an agent operating a QLoRA pipeline on a Textual content-to-SQL dataset.

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

Step 7

Constructed for AI brokers

  • Any agent with terminal entry can name the CLI.
  • It really works with Claude Code, Codex, and Antigravity.
  • A bundled COLAB_SKILL.md offers brokers built-in context.
  • The end result: scriptable, agent-ready Colab compute.

Marktechpost — practitioner AI & ML protection, no hype.
Supply: Marktechpost.com


Take a look at the Technical particulars and GitHub Repo right hereAdditionally, 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


Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles