Google 推出全新 Colab CLI,讓開發者與 AI 代理從終端機執行遠端 Colab GPU 與 TPU Python 程式
重點摘要
本週 Google AI 團隊釋出了 Colab CLI。這款工具可將您的本機終端機連線至遠端 Colab 執行環境,讓開發者與 AI 代理能直接在雲端 GPU 與 TPU 上執行程式碼,全程無需離開終端機。CLI 以 Apache 2.0 授權開放原始碼。Colab CLI 是專為 Google Colab 設計的命令列介面,您可從終端機建立工作階段、執行程式碼與管理檔案。任何具備終端機存取權限的代理(包括 Claude Code、Codex 與 Google Antigravity)皆可呼叫此工具。Google 亦附帶預先封裝的技能檔案 COLAB_SKILL.md,提供代理使用 CLI 的內建指南。只需從 GitHub 儲存庫執行單一 uv tool install 指令即可完成安裝。
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’s 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 Browseruv tool install git+https://github.com/googlecolab/google-colab-cli A minimal session looks like this: Copy CodeCopiedUse a different Browsercolab new # provision a CPU session echo "print('hello')" | 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 --gpu T4, --gpu L4, --gpu A100, or --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’s 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 Browsercolab new --gpu T4 colab install transformers datasets peft trl bitsandbytes accelerate colab exec -f finetune_run.py colab log --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. DimensionBrowser-Based ColabColab CLIInterfaceWeb notebook UILocal terminalAccelerator selectionRuntime menu in the browser--gpu / --tpu flags on colab newAgent useManual, UI-drivenAny terminal agent via commandsRun local scriptsPaste or upload into cellscolab exec -f script.pyArtifact retrievalManual download or Drivecolab download, colab logPackage install!pip inside a cellcolab install (uv, then pip)Session controlBrowser-managed runtimecolab new, colab stop, colab statusAgent skill fileNoneBundled 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’s 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’s backend and its runtime model. Key Takeaways Google’s Colab CLI runs code on remote Colab GPUs and TPUs from your local terminal. One command provisions accelerators: colab new --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 — Claude Code, Codex, Antigravity — 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 #mtp-colab-cli-slider *{box-sizing:border-box;margin:0;padding:0} #mtp-colab-cli-slider{ background:#000!important;color:#f4f4f4!important; border:1px solid #2a2a2a!important;border-radius:14px!important; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif!important; max-width:820px;margin:24px auto;padding:0;overflow:hidden;line-height:1.5; -webkit-font-smoothing:antialiased } #mtp-colab-cli-slider hr,#mtp-colab-cli-slider p:empty,#mtp-colab-cli-slider del,#mtp-colab-cli-slider s{display:none!important} #mtp-colab-cli-slider .mtp-head{ display:flex;align-items:center;justify-content:space-between; padding:16px 26px;border-bottom:1px solid #1f1f1f!important } #mtp-colab-cli-slider .mtp-brand{font-size:13px;letter-spacing:.16em;color:#9a9a9a!important;text-transform:uppercase;font-weight:600} #mtp-colab-cli-slider .mtp-counter{font-size:13px;color:#ffffff!important;font-variant-numeric:tabular-nums;border:1px solid #333!important;border-radius:999px;padding:3px 11px} #mtp-colab-cli-slider .mtp-bar{height:1px!important;background:#1c1c1c!important;width:100%} #mtp-colab-cli-slider .mtp-bar span{display:block;height:1px!important;background:#ffffff!important;width:12.5%;transition:width .3s ease} #mtp-colab-cli-slider .mtp-stage{padding:30px 30px 6px 30px;min-height:330px;position:relative} #mtp-colab-cli-slider .mtp-slide{display:none!important} #mtp-colab-cli-slider .mtp-slide.active{display:block!important;animation:mtpfade .28s ease} @keyframes mtpfade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}} #mtp-colab-cli-slider .mtp-eyebrow{font-size:12px;letter-spacing:.18em;text-transform:uppercase;color:#7d7d7d!important;font-weight:700;margin-bottom:12px} #mtp-colab-cli-slider h2{font-size:27px;color:#ffffff!important;font-weight:700;letter-spacing:-.01em;margin-bottom:10px;line-height:1.2} #mtp-colab-cli-slider h3{font-size:22px;color:#ffffff!important;font-weight:700;letter-spacing:-.01em;margin-bottom:14px} #mtp-colab-cli-slider .mtp-lead{font-size:17px;color:#cfcfcf!important;margin-bottom:14px;max-width:620px} #mtp-colab-cli-slider .mtp-meta{font-size:13px;color:#7d7d7d!important;margin-top:6px} #mtp-colab-cli-slider ul{list-style:none;margin:6px 0} #mtp-colab-cli-slider li{ font-size:16px;color:#dcdcdc!important;padding:9px 0 9px 22px;position:relative; border-bottom:1px solid #141414!important } #mtp-colab-cli-slider li:last-child{border-bottom:0!important} #mtp-colab-cli-slider li:before{content:"";position:absolute;left:2px;top:17px;width:6px;height:6px;background:#ffffff!important;border-radius:50%} #mtp-colab-cli-slider pre{ background:#0c0c0c!important;color:#e8e8e8!important;border:1px solid #262626!important; border-left:3px solid #ffffff!important;border-radius:8px!important; padding:15px 17px!impor
Related
相關文章

Edge AI Daily 早報(6月19日)
AI Engineer World's Fair 2026規模再創新高,標誌AI工程從幕後走向舞臺中央。行業面臨結構性調整:楊立昆警示OpenAI年虧210億美元揭示商業模式脆弱性,Transformer之父轉投OpenAI反映人才爭奪白熱化。Anthropic多線佈局——語音支持七種語言、加入碳清除聯盟、落子首爾辦事處,展現生態擴張野心。監管壓力加劇,意大利依據DMA調查蘋果iCloud,巴西開放iOS側載佣金降至5%,蘋果圍牆花園持續崩塌。

今天起,Claude Design要把設計師和程序員變成同一種人了
猝不及防!Anthropic深夜甩出Claude Design大更新,設計系統一鍵導入,代碼雙向同步,9大平臺一鍵導出。Anthropic設計師親自下場錄屏:AI跑了八輪自查,才敢把設計稿給你看。

OpenAI 成為 Rust 基金會白金會員,合計贊助 60 萬美元
OpenAI 正式成為 Rust 基金會白金會員,將提供總計 60 萬美元資金,用於支持 Rust 開源項目維護者及 Rust 創新實驗室等計劃。這標誌著 AI 巨頭對安全、高效系統編程語言的重視。 #OpenAI #Rust #開源

Claude Design 上線首周用戶破百萬,和 Claude Code 共享 AI 配額
Anthropic 今天(6 月 18 日)發佈公告,在宣佈 Claude Design 上線首周用戶規模突破 100 萬後,進一步強化和 Claude Code 的雙向聯動,實現從設計到編程的無縫工作流。
谷歌時隔6年再發智能音箱,Gemini上桌,售價不到700元
智東西 編譯 | 劉煜 編輯 | 陳駿達 智東西6月18日消息,谷歌昨日宣佈,其首款搭載居家版Gemini語音助手的智能音箱(Google Home Speaker)已開啟預售,將於當地時間6月25日正式上市,售價為99.99美元(約合人民幣677.03元)。在此之前,谷歌已有6年沒有推出過獨立智能音箱產品。 谷歌這款智能音箱外觀近似球形,風格類似亞馬遜新一代Echo音箱與蘋果舊款音箱HomePod Mini。 ▲谷歌智能音箱(圖源:谷歌官網) 使用音箱時,用戶只需通過口令“Hey Google”或“OK Google”喚醒Gemini,就可以繼續下達相應指令。這與谷歌舊款音箱、智能顯示屏等喚醒語音助手的方式相同。此外,用戶只要按照日常說話習慣下達命令,Gemini便能理解用戶意圖,相比之前大大提升溝通效率。 一、加強短時對話記憶,會員可與Gemini不限次數對話 谷歌此次推出的全新音箱升級諸多功能。其中,音箱搭載的Gemini語音助手擁有10款全新擬人化語音音色,用戶可以根據喜好自行選擇聲線。音箱還可支持用戶一次性下達多條語音指令,即使指令未能說對、說完整,用戶中途改口Gemini也能識別。 Gemini還具備多鏈路推理能力,落地到實際生活場景中比較實用。例如,用戶問:“我支持的足球隊下場比賽天氣如何?”Gemini收到指令後,會自動查詢賽事時間、舉辦地點,同時匹配相應時段天氣,再給出答覆。 同時,Gemini加強了短時對話記憶,能承接上下文實現連續對話功能。即使用戶連續追問、甚至串聯多項任務、不重複交代前置條件,該語音助手也能實現來回連貫交流。 ▲谷歌Gemini對話場景(圖源:谷歌官網) 不僅如此,Gemini搭配的連續對話功能,能讓應答後的音箱麥克風保持短暫收音,用戶無需重複喊“OK Google”就能繼續提問。該功能現已全面支持所有Gemini原生適配的語言,包括

微軟,考慮接入DeepSeek
這篇消息聚焦「微軟,考慮接入DeepSeek」。原始導語提到:Copilot Cowork轉為按量計費。 從 AI 情報角度來看,這類內容值得關注其背後的技術進展、產品落地、產業競爭與後續市場影響。