googlecolab/google-colab-cli

A CLI for interacting with Google Colab runtimes

What it solves

This project provides a command-line interface (CLI) to interact with Google Colab runtimes directly from your terminal. It eliminates the need to use a browser-based notebook interface for tasks like provisioning high-performance hardware, running automated scripts, or managing remote files, making it ideal for headless automation and developer workflows.

How it works

The CLI communicates with the Colab backend to manage virtual machine (VM) lifecycles. You can provision CPU, GPU, or TPU runtimes, execute local Python scripts or Jupyter notebooks on those remote machines, and manage files through commands similar to standard shell utilities. It supports both interactive sessions (like REPLs or SSH access) and ephemeral "run" commands that automatically provision a machine, execute a task, and tear down the resource upon completion.

Who it’s for

It is designed for developers, data scientists, and engineers who want to integrate Google Colab’s compute resources into their existing terminal-based workflows, automated pipelines, or AI agent integrations on Linux and macOS systems.

Highlights

  • Instant provisioning of CPU, GPU (T4, L4, A100, H100), and TPU runtimes.
  • Ephemeral job runner to execute scripts and automatically release resources.
  • Seamless file management, including Google Drive mounting and remote file editing.
  • Support for SSH access and remote development bridges.
  • Transparent code execution that transmits local scripts to remote kernels without manual uploads.
  • Built-in session logging and history export to formats like Markdown and JSONL.

Related

  • Project
  • Project
  • Project
  • Project