{"id":95771,"date":"2026-06-07T17:39:02","date_gmt":"2026-06-07T17:39:02","guid":{"rendered":"https:\/\/youzum.net\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/"},"modified":"2026-06-07T17:39:02","modified_gmt":"2026-06-07T17:39:02","slug":"googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal","status":"publish","type":"post","link":"https:\/\/youzum.net\/th\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/","title":{"rendered":"Google\u2019s New Colab CLI Lets Developers and AI Agents Run Python on Remote Colab GPUs and TPUs From the Terminal"},"content":{"rendered":"<p class=\"wp-block-paragraph\">This week, Google AI team released the <strong><a href=\"https:\/\/github.com\/googlecolab\/google-colab-cli\" target=\"_blank\" rel=\"noreferrer noopener\">Colab CLI<\/a><\/strong>. The tool connects your local terminal to remote Colab runtimes. It lets developers and AI agents run code on cloud GPUs and TPUs. You stay in your terminal the entire time. The CLI is open source under the Apache 2.0 license.<\/p>\n<h2 class=\"wp-block-heading\"><strong>What is Google Colab CLI<\/strong><\/h2>\n<p class=\"wp-block-paragraph\">The Colab CLI is a command-line interface for Google Colab. You can create sessions, run code, and manage files from the terminal.<\/p>\n<p class=\"wp-block-paragraph\">Any agent with terminal access can call the tool. That includes Claude Code, Codex, and Google\u2019s Antigravity. Google ships a prepackaged skill file named <code>COLAB_SKILL.md<\/code>. It gives agents built-in context on how to use the CLI.<\/p>\n<p class=\"wp-block-paragraph\">Installation uses a single <code>uv tool install<\/code> command from the GitHub repository.<\/p>\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\">\n<div class=\"control-language\">\n<div class=\"dm-buttons\">\n<div class=\"dm-buttons-left\">\n<div class=\"dm-button-snippet red-button\"><\/div>\n<div class=\"dm-button-snippet orange-button\"><\/div>\n<div class=\"dm-button-snippet green-button\"><\/div>\n<\/div>\n<div class=\"dm-buttons-right\"><a><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\">Copied<\/span><span class=\"dm-error-message\">Use a different Browser<\/span><\/a><\/div>\n<\/div>\n<pre class=\"no-line-numbers\"><code class=\"no-wrap language-php\">uv tool install git+https:\/\/github.com\/googlecolab\/google-colab-cli<\/code><\/pre>\n<\/div>\n<\/div>\n<p class=\"wp-block-paragraph\"><strong>A minimal session looks like this:<\/strong><\/p>\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\">\n<div class=\"control-language\">\n<div class=\"dm-buttons\">\n<div class=\"dm-buttons-left\">\n<div class=\"dm-button-snippet red-button\"><\/div>\n<div class=\"dm-button-snippet orange-button\"><\/div>\n<div class=\"dm-button-snippet green-button\"><\/div>\n<\/div>\n<div class=\"dm-buttons-right\"><a><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\">Copied<\/span><span class=\"dm-error-message\">Use a different Browser<\/span><\/a><\/div>\n<\/div>\n<pre class=\"no-line-numbers\"><code class=\"no-wrap language-php\">colab new                              # provision a CPU session\necho \"print('hello')\" | colab exec     # run code\ncolab stop                             # release the VM\n<\/code><\/pre>\n<\/div>\n<\/div>\n<h2 class=\"wp-block-heading\"><strong>How the Commands Work<\/strong><\/h2>\n<p class=\"wp-block-paragraph\">The CLI groups commands into sessions, execution, files, and automation. <code>colab new<\/code> provisions a session, with CPU as the default. Add <code>--gpu T4<\/code>, <code>--gpu L4<\/code>, <code>--gpu A100<\/code>, or <code>--gpu H100<\/code> for a GPU. TPU options are <code>v5e1<\/code> and <code>v6e1<\/code>.<\/p>\n<p class=\"wp-block-paragraph\"><code>colab exec<\/code> runs Python from stdin, a <code>.py<\/code> file, or a notebook. The <code>exec<\/code> reads files locally and ships their contents. Local edits therefore need no separate upload step. <code>colab stop<\/code> terminates the session and releases the VM.<\/p>\n<p class=\"wp-block-paragraph\">Other commands cover files and authentication. <code>colab upload<\/code> and <code>colab download<\/code> move files between local and remote. <code>colab drivemount<\/code> mounts Google Drive, defaulting to <code>\/content\/drive<\/code>. <code>colab auth<\/code> authenticates the VM for Google Cloud services.<\/p>\n<h2 class=\"wp-block-heading\"><strong><code>colab exec<\/code> and Artifact Recovery: The Core Loop<\/strong><\/h2>\n<p class=\"wp-block-paragraph\">The core loop is short. You provision a runtime, run a script, then pull results back. <code>colab download<\/code> retrieves models, datasets, and other files. <code>colab log<\/code> exports session history as <code>.ipynb<\/code>, <code>.md<\/code>, <code>.txt<\/code>, or <code>.jsonl<\/code>.<\/p>\n<p class=\"wp-block-paragraph\">So a remote run becomes a replayable notebook on your disk. <code>colab repl<\/code> and <code>colab console<\/code> give interactive access to the VM. <code>colab install<\/code> adds packages with <code>uv<\/code>, falling back to <code>pip<\/code>. Session metadata is stored at <code>~\/.config\/colab-cli\/sessions.json<\/code>.<\/p>\n<h2 class=\"wp-block-heading\"><strong>Example: Fine-Tuning Gemma 3 1B<\/strong><\/h2>\n<p class=\"wp-block-paragraph\">Google\u2019s official release demonstrates an agent-driven fine-tuning job. The task fine-tunes <code>google\/gemma-3-1b-it<\/code> using QLoRA. It trains on a Text-to-SQL dataset to improve SQL generation. The Antigravity agent runs the full pipeline with five commands.<\/p>\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\">\n<div class=\"control-language\">\n<div class=\"dm-buttons\">\n<div class=\"dm-buttons-left\">\n<div class=\"dm-button-snippet red-button\"><\/div>\n<div class=\"dm-button-snippet orange-button\"><\/div>\n<div class=\"dm-button-snippet green-button\"><\/div>\n<\/div>\n<div class=\"dm-buttons-right\"><a><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\">Copied<\/span><span class=\"dm-error-message\">Use a different Browser<\/span><\/a><\/div>\n<\/div>\n<pre class=\"no-line-numbers\"><code class=\"no-wrap language-php\">colab new --gpu T4\ncolab install transformers datasets peft trl bitsandbytes accelerate\ncolab exec -f finetune_run.py\ncolab log --output gemma_finetune_log.ipynb\ncolab stop<\/code><\/pre>\n<\/div>\n<\/div>\n<p class=\"wp-block-paragraph\">The agent then downloads the adapter model, adapter config, tokenizer config, and tokenizer. You can load and serve the fine-tuned model locally. No manual cloud provisioning command was typed by the user.<\/p>\n<h2 class=\"wp-block-heading\"><strong>Use Cases<\/strong><\/h2>\n<ul class=\"wp-block-list\">\n<li>Offload laptop-bound training to a remote GPU or TPU without leaving the terminal.<\/li>\n<li>Let agents like Claude Code, Codex, or Antigravity run end-to-end ML pipelines.<\/li>\n<li>Fine-tune small models, such as Gemma 3 1B, with QLoRA remotely.<\/li>\n<li>Script notebook execution and export replayable <code>.ipynb<\/code> logs for reproducibility.<\/li>\n<li>Debug interactively on the VM through <code>colab repl<\/code> \u0e2b\u0e23\u0e37\u0e2d <code>colab console<\/code>.<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\"><strong>Colab CLI vs Browser-Based Colab<\/strong><\/h2>\n<p class=\"wp-block-paragraph\">The CLI does not replace the notebook UI. It targets scripted, automated, and agent-driven work instead. Here is how the two workflows compare across common tasks.<\/p>\n<figure class=\"wp-block-table\">\n<table class=\"has-fixed-layout\">\n<thead>\n<tr>\n<th>Dimension<\/th>\n<th>Browser-Based Colab<\/th>\n<th>Colab CLI<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Interface<\/td>\n<td>Web notebook UI<\/td>\n<td>Local terminal<\/td>\n<\/tr>\n<tr>\n<td>Accelerator selection<\/td>\n<td>Runtime menu in the browser<\/td>\n<td><code>--gpu<\/code> \/ <code>--tpu<\/code> flags on <code>colab new<\/code><\/td>\n<\/tr>\n<tr>\n<td>Agent use<\/td>\n<td>Manual, UI-driven<\/td>\n<td>Any terminal agent via commands<\/td>\n<\/tr>\n<tr>\n<td>Run local scripts<\/td>\n<td>Paste or upload into cells<\/td>\n<td><code>colab exec -f script.py<\/code><\/td>\n<\/tr>\n<tr>\n<td>Artifact retrieval<\/td>\n<td>Manual download or Drive<\/td>\n<td><code>colab download<\/code>, <code>colab log<\/code><\/td>\n<\/tr>\n<tr>\n<td>Package install<\/td>\n<td><code>!pip<\/code> inside a cell<\/td>\n<td><code>colab install<\/code> (uv, then pip)<\/td>\n<\/tr>\n<tr>\n<td>Session control<\/td>\n<td>Browser-managed runtime<\/td>\n<td><code>colab new<\/code>, <code>colab stop<\/code>, <code>colab status<\/code><\/td>\n<\/tr>\n<tr>\n<td>Agent skill file<\/td>\n<td>None<\/td>\n<td>Bundled <code>COLAB_SKILL.md<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n<h2 class=\"wp-block-heading\"><strong>Strengths and Considerations<\/strong><\/h2>\n<h4 class=\"wp-block-heading\"><strong>Strengths:<\/strong><\/h4>\n<ul class=\"wp-block-list\">\n<li>Terminal-native workflow fits scripts, CI, and agent loops.<\/li>\n<li>One command provisions T4, L4, A100, or H100 GPUs.<\/li>\n<li><code>exec<\/code> ships local file contents, so no upload step is needed.<\/li>\n<li>Logs export to replayable notebook formats for reproducibility.<\/li>\n<li>Open source under Apache 2.0, with a bundled agent skill file.<\/li>\n<li>Works with multiple agents, not a single vendor\u2019s tool.<\/li>\n<\/ul>\n<h4 class=\"wp-block-heading\"><strong>Considerations:<\/strong><\/h4>\n<ul class=\"wp-block-list\">\n<li>Access requires authentication; the default strategy is <code>oauth2<\/code>.<\/li>\n<li><code>repl<\/code> and <code>console<\/code> need a TTY when run interactively.<\/li>\n<li>Pipe stdin to use those two commands inside scripts.<\/li>\n<li>Compute still runs on Colab\u2019s backend and its runtime model.<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\"><strong>Key Takeaways<\/strong><\/h2>\n<ul class=\"wp-block-list\">\n<li>Google\u2019s Colab CLI runs code on remote Colab GPUs and TPUs from your local terminal.<\/li>\n<li>One command provisions accelerators: <code>colab new --gpu T4<\/code> through <code>A100<\/code> and <code>H100<\/code>, plus TPUs.<\/li>\n<li><code>colab exec<\/code> ships local <code>.py<\/code> and <code>.ipynb<\/code> files to the runtime without an upload step.<\/li>\n<li>Any terminal agent \u2014 Claude Code, Codex, Antigravity \u2014 can drive it via a bundled <code>COLAB_SKILL.md<\/code>.<\/li>\n<li>It is open source under Apache 2.0, and <code>colab log<\/code> exports replayable notebook logs.<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\"><strong>Marktechpost Visual Explainer<\/strong><\/h2>\n<div>\n<div class=\"mtp-head\">\n    <span class=\"mtp-brand\">Google Colab CLI \u2014 Terminal Guide<\/span><br \/>\n    <span class=\"mtp-counter\">1 \/ 8<\/span>\n  <\/div>\n<div class=\"mtp-bar\"><span><\/span><\/div>\n<div class=\"mtp-stage\">\n<div class=\"mtp-slide active\">\n<div class=\"mtp-eyebrow\">Overview<\/div>\n<h2>Run Colab GPUs and TPUs from your terminal<\/h2>\n<p class=\"mtp-lead\">The Google Colab CLI connects your local terminal to remote Colab runtimes. Developers and AI agents run code on cloud accelerators without leaving the shell.<\/p>\n<p class=\"mtp-meta\">Announced June 5, 2026 \u2022 Open source under Apache 2.0<\/p>\n<\/div>\n<div class=\"mtp-slide\">\n<div class=\"mtp-eyebrow\">Step 1<\/div>\n<h3>What it is<\/h3>\n<ul>\n<li>A command-line interface for Google Colab.<\/li>\n<li>It connects your local terminal to remote Colab runtimes.<\/li>\n<li>You create sessions, run code, and manage files from the terminal.<\/li>\n<li>Any terminal-based AI agent can call it too.<\/li>\n<\/ul><\/div>\n<div class=\"mtp-slide\">\n<div class=\"mtp-eyebrow\">Step 2<\/div>\n<h3>Install and quick start<\/h3>\n<p class=\"mtp-lead\">Install with a single command, then run a first session.<\/p>\n<pre><code>uv tool install git+https:\/\/github.com\/googlecolab\/google-colab-cli\n\ncolab new                            <span class=\"mtp-cmt\"># provision a CPU session<\/span>\necho \"print('hello')\" | colab exec   <span class=\"mtp-cmt\"># run code<\/span>\ncolab stop                           <span class=\"mtp-cmt\"># release the VM<\/span><\/code><\/pre>\n<\/div>\n<div class=\"mtp-slide\">\n<div class=\"mtp-eyebrow\">Step 3<\/div>\n<h3>Provision GPUs and TPUs<\/h3>\n<p class=\"mtp-lead\">Request an accelerator when you create the session. CPU is the default.<\/p>\n<pre><code>colab new --gpu T4\ncolab new --gpu A100\ncolab new --tpu v6e1<\/code><\/pre>\n<p class=\"mtp-note\">Accelerator availability depends on your active Colab plan.<\/p>\n<\/div>\n<div class=\"mtp-slide\">\n<div class=\"mtp-eyebrow\">Step 4<\/div>\n<h3>Run local scripts remotely<\/h3>\n<p class=\"mtp-lead\">The exec command reads your file locally and ships its contents. No separate upload step is needed.<\/p>\n<pre><code>colab exec -f train.py<\/code><\/pre>\n<p class=\"mtp-note\">exec runs Python from stdin, a .py file, or a notebook.<\/p>\n<\/div>\n<div class=\"mtp-slide\">\n<div class=\"mtp-eyebrow\">Step 5<\/div>\n<h3>Retrieve models and logs<\/h3>\n<p class=\"mtp-lead\">Pull results back to your machine after the run.<\/p>\n<pre><code>colab download -s NAME checkpoints\/model.bin .\/model.bin\ncolab log -o report.ipynb<\/code><\/pre>\n<p class=\"mtp-note\">Logs export as .ipynb, .md, .txt, or .jsonl.<\/p>\n<\/div>\n<div class=\"mtp-slide\">\n<div class=\"mtp-eyebrow\">Step 6<\/div>\n<h3>Example: fine-tune Gemma 3 1B<\/h3>\n<p class=\"mtp-lead\">Google\u2019s blog shows an agent running a QLoRA pipeline on a Text-to-SQL dataset.<\/p>\n<pre><code>colab new --gpu T4\ncolab install transformers datasets peft trl bitsandbytes accelerate\ncolab exec -f finetune_run.py\ncolab log --output gemma_finetune_log.ipynb\ncolab stop<\/code><\/pre>\n<\/div>\n<div class=\"mtp-slide\">\n<div class=\"mtp-eyebrow\">Step 7<\/div>\n<h3>Built for AI agents<\/h3>\n<ul>\n<li>Any agent with terminal access can call the CLI.<\/li>\n<li>It works with Claude Code, Codex, and Antigravity.<\/li>\n<li>A bundled COLAB_SKILL.md gives agents built-in context.<\/li>\n<li>The result: scriptable, agent-ready Colab compute.<\/li>\n<\/ul><\/div>\n<\/div>\n<div class=\"mtp-nav\">\n    <button class=\"mtp-btn mtp-prev\" type=\"button\">\u2190 Prev<\/button>\n<div class=\"mtp-dots\">\n      <button class=\"mtp-dot active\" type=\"button\" aria-label=\"Slide 1\"><\/button><br \/>\n      <button class=\"mtp-dot\" type=\"button\" aria-label=\"Slide 2\"><\/button><br \/>\n      <button class=\"mtp-dot\" type=\"button\" aria-label=\"Slide 3\"><\/button><br \/>\n      <button class=\"mtp-dot\" type=\"button\" aria-label=\"Slide 4\"><\/button><br \/>\n      <button class=\"mtp-dot\" type=\"button\" aria-label=\"Slide 5\"><\/button><br \/>\n      <button class=\"mtp-dot\" type=\"button\" aria-label=\"Slide 6\"><\/button><br \/>\n      <button class=\"mtp-dot\" type=\"button\" aria-label=\"Slide 7\"><\/button><br \/>\n      <button class=\"mtp-dot\" type=\"button\" aria-label=\"Slide 8\"><\/button>\n    <\/div>\n<p>    <button class=\"mtp-btn mtp-next\" type=\"button\">Next \u2192<\/button>\n  <\/p><\/div>\n<div class=\"mtp-tagline\">\n    <strong>Marktechpost \u2014 practitioner AI &amp; ML coverage, no hype.<\/strong><br \/>\n    <span>Source: Marktechpost.com<\/span>\n  <\/div>\n<\/div>\n<p class=\"wp-block-paragraph\">\n<\/p><p class=\"wp-block-paragraph\">\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n<\/p><p class=\"wp-block-paragraph\">\n<\/p><p class=\"wp-block-paragraph\">Check out\u00a0the\u00a0<strong><a href=\"https:\/\/developers.googleblog.com\/introducing-the-google-colab-cli\/\" target=\"_blank\" rel=\"noreferrer noopener\">Technical details<\/a><\/strong> and <strong><a href=\"https:\/\/github.com\/googlecolab\/google-colab-cli\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub Repo here<\/a>.\u00a0<\/strong>Also,\u00a0feel free to follow us on\u00a0<strong><a href=\"https:\/\/x.com\/intent\/follow?screen_name=marktechpost\" target=\"_blank\" rel=\"noreferrer noopener\"><mark>Twitter<\/mark><\/a><\/strong>\u00a0and don\u2019t forget to join our\u00a0<strong><a href=\"https:\/\/www.reddit.com\/r\/machinelearningnews\/\" target=\"_blank\" rel=\"noreferrer noopener\">150k+ ML SubReddit<\/a><\/strong>\u00a0and Subscribe to\u00a0<strong><a href=\"https:\/\/www.aidevsignals.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">our Newsletter<\/a><\/strong>. Wait! are you on telegram?\u00a0<strong><a href=\"https:\/\/t.me\/machinelearningresearchnews\" target=\"_blank\" rel=\"noreferrer noopener\">now you can join us on telegram as well.<\/a><\/strong><\/p>\n<p class=\"wp-block-paragraph\">Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.?\u00a0<strong><a href=\"https:\/\/forms.gle\/wbash1wF6efRj8G58\" target=\"_blank\" rel=\"noreferrer noopener\"><mark>Connect with us<\/mark><\/a><\/strong><\/p>\n<p>The post <a href=\"https:\/\/www.marktechpost.com\/2026\/06\/06\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/\">Google\u2019s New Colab CLI Lets Developers and AI Agents Run Python on Remote Colab GPUs and TPUs From the Terminal<\/a> appeared first on <a href=\"https:\/\/www.marktechpost.com\/\">MarkTechPost<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>This week, Google AI team released the Colab CLI. The tool connects your local terminal to remote Colab runtimes. It lets developers and AI agents run code on cloud GPUs and TPUs. You stay in your terminal the entire time. The CLI is open source under the Apache 2.0 license. What is Google Colab CLI The Colab CLI is a command-line interface for Google Colab. You can create sessions, run code, and manage files from the terminal. Any agent with terminal access can call the tool. That includes Claude Code, Codex, and Google\u2019s Antigravity. Google ships a prepackaged skill file named COLAB_SKILL.md. It gives agents built-in context on how to use the CLI. Installation uses a single uv tool install command from the GitHub repository. Copy CodeCopiedUse a different Browser uv tool install git+https:\/\/github.com\/googlecolab\/google-colab-cli A minimal session looks like this: Copy CodeCopiedUse a different Browser colab new # provision a CPU session echo &#8220;print(&#8216;hello&#8217;)&#8221; | colab exec # run code colab stop # release the VM How the Commands Work The CLI groups commands into sessions, execution, files, and automation. colab new provisions a session, with CPU as the default. Add &#8211;gpu T4, &#8211;gpu L4, &#8211;gpu A100, or &#8211;gpu H100 for a GPU. TPU options are v5e1 and v6e1. colab exec runs Python from stdin, a .py file, or a notebook. The exec reads files locally and ships their contents. Local edits therefore need no separate upload step. colab stop terminates the session and releases the VM. Other commands cover files and authentication. colab upload and colab download move files between local and remote. colab drivemount mounts Google Drive, defaulting to \/content\/drive. colab auth authenticates the VM for Google Cloud services. colab exec and Artifact Recovery: The Core Loop The core loop is short. You provision a runtime, run a script, then pull results back. colab download retrieves models, datasets, and other files. colab log exports session history as .ipynb, .md, .txt, or .jsonl. So a remote run becomes a replayable notebook on your disk. colab repl and colab console give interactive access to the VM. colab install adds packages with uv, falling back to pip. Session metadata is stored at ~\/.config\/colab-cli\/sessions.json. Example: Fine-Tuning Gemma 3 1B Google\u2019s official release demonstrates an agent-driven fine-tuning job. The task fine-tunes google\/gemma-3-1b-it using QLoRA. It trains on a Text-to-SQL dataset to improve SQL generation. The Antigravity agent runs the full pipeline with five commands. Copy CodeCopiedUse a different Browser colab new &#8211;gpu T4 colab install transformers datasets peft trl bitsandbytes accelerate colab exec -f finetune_run.py colab log &#8211;output gemma_finetune_log.ipynb colab stop The agent then downloads the adapter model, adapter config, tokenizer config, and tokenizer. You can load and serve the fine-tuned model locally. No manual cloud provisioning command was typed by the user. Use Cases Offload laptop-bound training to a remote GPU or TPU without leaving the terminal. Let agents like Claude Code, Codex, or Antigravity run end-to-end ML pipelines. Fine-tune small models, such as Gemma 3 1B, with QLoRA remotely. Script notebook execution and export replayable .ipynb logs for reproducibility. Debug interactively on the VM through colab repl or colab console. Colab CLI vs Browser-Based Colab The CLI does not replace the notebook UI. It targets scripted, automated, and agent-driven work instead. Here is how the two workflows compare across common tasks. Dimension Browser-Based Colab Colab CLI Interface Web notebook UI Local terminal Accelerator selection Runtime menu in the browser &#8211;gpu \/ &#8211;tpu flags on colab new Agent use Manual, UI-driven Any terminal agent via commands Run local scripts Paste or upload into cells colab exec -f script.py Artifact retrieval Manual download or Drive colab download, colab log Package install !pip inside a cell colab install (uv, then pip) Session control Browser-managed runtime colab new, colab stop, colab status Agent skill file None Bundled COLAB_SKILL.md Strengths and Considerations Strengths: Terminal-native workflow fits scripts, CI, and agent loops. One command provisions T4, L4, A100, or H100 GPUs. exec ships local file contents, so no upload step is needed. Logs export to replayable notebook formats for reproducibility. Open source under Apache 2.0, with a bundled agent skill file. Works with multiple agents, not a single vendor\u2019s tool. Considerations: Access requires authentication; the default strategy is oauth2. repl and console need a TTY when run interactively. Pipe stdin to use those two commands inside scripts. Compute still runs on Colab\u2019s backend and its runtime model. Key Takeaways Google\u2019s Colab CLI runs code on remote Colab GPUs and TPUs from your local terminal. One command provisions accelerators: colab new &#8211;gpu T4 through A100 and H100, plus TPUs. colab exec ships local .py and .ipynb files to the runtime without an upload step. Any terminal agent \u2014 Claude Code, Codex, Antigravity \u2014 can drive it via a bundled COLAB_SKILL.md. It is open source under Apache 2.0, and colab log exports replayable notebook logs. Marktechpost Visual Explainer Google Colab CLI \u2014 Terminal Guide 1 \/ 8 Overview Run Colab GPUs and TPUs from your terminal The Google Colab CLI connects your local terminal to remote Colab runtimes. Developers and AI agents run code on cloud accelerators without leaving the shell. Announced June 5, 2026 \u2022 Open source under Apache 2.0 Step 1 What it is A command-line interface for Google Colab. It connects your local terminal to remote Colab runtimes. You create sessions, run code, and manage files from the terminal. Any terminal-based AI agent can call it too. Step 2 Install and quick start Install with a single command, then run a first session. uv tool install git+https:\/\/github.com\/googlecolab\/google-colab-cli colab new # provision a CPU session echo &#8220;print(&#8216;hello&#8217;)&#8221; | colab exec # run code colab stop # release the VM Step 3 Provision GPUs and TPUs Request an accelerator when you create the session. CPU is the default. colab new &#8211;gpu T4 colab new &#8211;gpu A100 colab new &#8211;tpu v6e1 Accelerator availability depends on your active Colab plan. Step 4 Run local scripts remotely The exec command reads your file locally and ships its contents. No separate<\/p>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"pmpro_default_level":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_pvb_checkbox_block_on_post":false,"footnotes":""},"categories":[52,5,7,1],"tags":[],"class_list":["post-95771","post","type-post","status-publish","format-standard","hentry","category-ai-club","category-committee","category-news","category-uncategorized","pmpro-has-access"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Google\u2019s New Colab CLI Lets Developers and AI Agents Run Python on Remote Colab GPUs and TPUs From the Terminal - YouZum<\/title>\n<meta name=\"description\" content=\"\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e42\u0e14\u0e23\u0e19\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/youzum.net\/th\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/\" \/>\n<meta property=\"og:locale\" content=\"th_TH\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Google\u2019s New Colab CLI Lets Developers and AI Agents Run Python on Remote Colab GPUs and TPUs From the Terminal - YouZum\" \/>\n<meta property=\"og:description\" content=\"\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e42\u0e14\u0e23\u0e19\" \/>\n<meta property=\"og:url\" content=\"https:\/\/youzum.net\/th\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/\" \/>\n<meta property=\"og:site_name\" content=\"YouZum\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DroneAssociationTH\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-06-07T17:39:02+00:00\" \/>\n<meta name=\"author\" content=\"admin NU\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin NU\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 \u0e19\u0e32\u0e17\u0e35\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/youzum.net\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/youzum.net\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/\"},\"author\":{\"name\":\"admin NU\",\"@id\":\"https:\/\/yousum.gpucore.co\/#\/schema\/person\/97fa48242daf3908e4d9a5f26f4a059c\"},\"headline\":\"Google\u2019s New Colab CLI Lets Developers and AI Agents Run Python on Remote Colab GPUs and TPUs From the Terminal\",\"datePublished\":\"2026-06-07T17:39:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/youzum.net\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/\"},\"wordCount\":1034,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/yousum.gpucore.co\/#organization\"},\"articleSection\":[\"AI\",\"Committee\",\"News\",\"Uncategorized\"],\"inLanguage\":\"th\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/youzum.net\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/youzum.net\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/\",\"url\":\"https:\/\/youzum.net\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/\",\"name\":\"Google\u2019s New Colab CLI Lets Developers and AI Agents Run Python on Remote Colab GPUs and TPUs From the Terminal - YouZum\",\"isPartOf\":{\"@id\":\"https:\/\/yousum.gpucore.co\/#website\"},\"datePublished\":\"2026-06-07T17:39:02+00:00\",\"description\":\"\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e42\u0e14\u0e23\u0e19\",\"breadcrumb\":{\"@id\":\"https:\/\/youzum.net\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/#breadcrumb\"},\"inLanguage\":\"th\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/youzum.net\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/youzum.net\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/youzum.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Google\u2019s New Colab CLI Lets Developers and AI Agents Run Python on Remote Colab GPUs and TPUs From the Terminal\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/yousum.gpucore.co\/#website\",\"url\":\"https:\/\/yousum.gpucore.co\/\",\"name\":\"YouSum\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/yousum.gpucore.co\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/yousum.gpucore.co\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"th\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/yousum.gpucore.co\/#organization\",\"name\":\"Drone Association Thailand\",\"url\":\"https:\/\/yousum.gpucore.co\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"th\",\"@id\":\"https:\/\/yousum.gpucore.co\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/youzum.net\/wp-content\/uploads\/2024\/11\/tranparent-logo.png\",\"contentUrl\":\"https:\/\/youzum.net\/wp-content\/uploads\/2024\/11\/tranparent-logo.png\",\"width\":300,\"height\":300,\"caption\":\"Drone Association Thailand\"},\"image\":{\"@id\":\"https:\/\/yousum.gpucore.co\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/DroneAssociationTH\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/yousum.gpucore.co\/#\/schema\/person\/97fa48242daf3908e4d9a5f26f4a059c\",\"name\":\"admin NU\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"th\",\"@id\":\"https:\/\/yousum.gpucore.co\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/youzum.net\/wp-content\/uploads\/avatars\/2\/1746849356-bpfull.png\",\"contentUrl\":\"https:\/\/youzum.net\/wp-content\/uploads\/avatars\/2\/1746849356-bpfull.png\",\"caption\":\"admin NU\"},\"url\":\"https:\/\/youzum.net\/th\/members\/adminnu\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Google\u2019s New Colab CLI Lets Developers and AI Agents Run Python on Remote Colab GPUs and TPUs From the Terminal - YouZum","description":"\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e42\u0e14\u0e23\u0e19","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/youzum.net\/th\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/","og_locale":"th_TH","og_type":"article","og_title":"Google\u2019s New Colab CLI Lets Developers and AI Agents Run Python on Remote Colab GPUs and TPUs From the Terminal - YouZum","og_description":"\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e42\u0e14\u0e23\u0e19","og_url":"https:\/\/youzum.net\/th\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/","og_site_name":"YouZum","article_publisher":"https:\/\/www.facebook.com\/DroneAssociationTH\/","article_published_time":"2026-06-07T17:39:02+00:00","author":"admin NU","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin NU","Est. reading time":"6 \u0e19\u0e32\u0e17\u0e35"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/youzum.net\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/#article","isPartOf":{"@id":"https:\/\/youzum.net\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/"},"author":{"name":"admin NU","@id":"https:\/\/yousum.gpucore.co\/#\/schema\/person\/97fa48242daf3908e4d9a5f26f4a059c"},"headline":"Google\u2019s New Colab CLI Lets Developers and AI Agents Run Python on Remote Colab GPUs and TPUs From the Terminal","datePublished":"2026-06-07T17:39:02+00:00","mainEntityOfPage":{"@id":"https:\/\/youzum.net\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/"},"wordCount":1034,"commentCount":0,"publisher":{"@id":"https:\/\/yousum.gpucore.co\/#organization"},"articleSection":["AI","Committee","News","Uncategorized"],"inLanguage":"th","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/youzum.net\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/youzum.net\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/","url":"https:\/\/youzum.net\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/","name":"Google\u2019s New Colab CLI Lets Developers and AI Agents Run Python on Remote Colab GPUs and TPUs From the Terminal - YouZum","isPartOf":{"@id":"https:\/\/yousum.gpucore.co\/#website"},"datePublished":"2026-06-07T17:39:02+00:00","description":"\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e42\u0e14\u0e23\u0e19","breadcrumb":{"@id":"https:\/\/youzum.net\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/#breadcrumb"},"inLanguage":"th","potentialAction":[{"@type":"ReadAction","target":["https:\/\/youzum.net\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/youzum.net\/googles-new-colab-cli-lets-developers-and-ai-agents-run-python-on-remote-colab-gpus-and-tpus-from-the-terminal\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/youzum.net\/"},{"@type":"ListItem","position":2,"name":"Google\u2019s New Colab CLI Lets Developers and AI Agents Run Python on Remote Colab GPUs and TPUs From the Terminal"}]},{"@type":"WebSite","@id":"https:\/\/yousum.gpucore.co\/#website","url":"https:\/\/yousum.gpucore.co\/","name":"YouSum","description":"","publisher":{"@id":"https:\/\/yousum.gpucore.co\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/yousum.gpucore.co\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"th"},{"@type":"Organization","@id":"https:\/\/yousum.gpucore.co\/#organization","name":"Drone Association Thailand","url":"https:\/\/yousum.gpucore.co\/","logo":{"@type":"ImageObject","inLanguage":"th","@id":"https:\/\/yousum.gpucore.co\/#\/schema\/logo\/image\/","url":"https:\/\/youzum.net\/wp-content\/uploads\/2024\/11\/tranparent-logo.png","contentUrl":"https:\/\/youzum.net\/wp-content\/uploads\/2024\/11\/tranparent-logo.png","width":300,"height":300,"caption":"Drone Association Thailand"},"image":{"@id":"https:\/\/yousum.gpucore.co\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DroneAssociationTH\/"]},{"@type":"Person","@id":"https:\/\/yousum.gpucore.co\/#\/schema\/person\/97fa48242daf3908e4d9a5f26f4a059c","name":"admin NU","image":{"@type":"ImageObject","inLanguage":"th","@id":"https:\/\/yousum.gpucore.co\/#\/schema\/person\/image\/","url":"https:\/\/youzum.net\/wp-content\/uploads\/avatars\/2\/1746849356-bpfull.png","contentUrl":"https:\/\/youzum.net\/wp-content\/uploads\/avatars\/2\/1746849356-bpfull.png","caption":"admin NU"},"url":"https:\/\/youzum.net\/th\/members\/adminnu\/"}]}},"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"admin NU","author_link":"https:\/\/youzum.net\/th\/members\/adminnu\/"},"rttpg_comment":0,"rttpg_category":"<a href=\"https:\/\/youzum.net\/th\/category\/ai-club\/\" rel=\"category tag\">AI<\/a> <a href=\"https:\/\/youzum.net\/th\/category\/committee\/\" rel=\"category tag\">Committee<\/a> <a href=\"https:\/\/youzum.net\/th\/category\/news\/\" rel=\"category tag\">News<\/a> <a href=\"https:\/\/youzum.net\/th\/category\/uncategorized\/\" rel=\"category tag\">Uncategorized<\/a>","rttpg_excerpt":"This week, Google AI team released the Colab CLI. The tool connects your local terminal to remote Colab runtimes. It lets developers and AI agents run code on cloud GPUs and TPUs. You stay in your terminal the entire time. The CLI is open source under the Apache 2.0 license. What is Google Colab CLI&hellip;","_links":{"self":[{"href":"https:\/\/youzum.net\/th\/wp-json\/wp\/v2\/posts\/95771","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/youzum.net\/th\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/youzum.net\/th\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/youzum.net\/th\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/youzum.net\/th\/wp-json\/wp\/v2\/comments?post=95771"}],"version-history":[{"count":0,"href":"https:\/\/youzum.net\/th\/wp-json\/wp\/v2\/posts\/95771\/revisions"}],"wp:attachment":[{"href":"https:\/\/youzum.net\/th\/wp-json\/wp\/v2\/media?parent=95771"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/youzum.net\/th\/wp-json\/wp\/v2\/categories?post=95771"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/youzum.net\/th\/wp-json\/wp\/v2\/tags?post=95771"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}