At this time we’re saying the Google Colab Command-Line Interface (CLI), which bridges the hole between your native terminal and distant Colab runtimes, offering a zero-friction execution platform for each builders and AI brokers. The Colab CLI provides:
- Zero-Friction Accelerator Provisioning: Request high-powered GPUs or TPUs immediately (e.g.,
colab --gpu A100orcolab --gpu T4). - Easy Distant Execution: Run your native Python scripts and complicated ML pipelines straight on Colab runtimes utilizing
colab exec. - Seamless Artifact Restoration: Simply retrieve fashions, datasets, and replayable
.ipynblogs by way ofcolab obtainandcolab log. - Interactive Entry: Drop into an interactive setting in your distant Colab runtime with
colab replorcolab console.
Agent-driven workflows in motion
As a result of the Colab CLI integrates seamlessly into normal terminal environments, it may be utilized by any agent with terminal entry. To make sure your AI assistants can hit the bottom operating, the CLI features a prepackaged Colab ability file that gives brokers with prompt, built-in context on precisely how one can leverage the CLI. Let’s take a look at an actual life instance of one thing a person or agent may strive with the Colab CLI.
*Word that whereas the instance under highlights Antigravity agent utilizing Colab CLI as a device, Colab CLI can simply be utilized by Claude Code, Codex, and different brokers.
Right here is how an Agent can use the Colab CLI for a real-world ML workflow:
Nice-tuning Gemma 3-1B
The CLI can be utilized to run an actual QLoRA pipeline that runs end-to-end with only a handful of instructions. Offload heavy computational lifting to a GPU with out typing a single cloud provisioning command by Instructing Antigravity (or your agent of selection) to construct a distant fine-tuning job. On this situation, we ask our agent to make use of the Colab CLI to fine-tune google/gemma-3-1b-it on a Textual content-to-SQL dataset to make the mannequin higher at writing SQL queries.
The Antigravity immediate:
Use the Colab CLI (https://github.com/googlecolab/google-colab-cli) to fine-tune Gemma 3 1B utilizing QLoRA. Provision a Colab T4 GPU occasion, set up the mandatory ML packages (transformers, datasets, peft, trl, and so on.), run my native ~finetune_run.py script remotely, obtain the ensuing safetensors adapter, save the pocket book log, and cleanup.
Antigravity executes:
$ 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
Shell
Antigravity additionally makes use of the “colab obtain” command to obtain the adapter mannequin, adapter config, tokenizer config, and tokenizer, which can be utilized to load and run your fine-tuned mannequin domestically. Now you could have a remotely fine-tuned mannequin able to serve out of your native gadget!
Attempt it out now
The Colab CLI makes highly effective Colab compute accessible, programmable, and agent-ready. It’s light-weight and simply accessible to any terminal-based AI agent. To start out utilizing the Colab CLI your self, head over to the Google Colab CLI GitHub repository for setup directions.
We’re excited to see how this accelerates your improvement course of and stay up for seeing what you and your brokers construct!







