google-colab-cli: A command-line interface for provisioning Google Colab runtimes, executing code, managing remote files, and orchestrating automated cloud pipelines from a terminal.
What problem it solves
Developers need a terminal-based way to provision cloud runtimes, run local code against them, manage remote files, and automate complete session lifecycles. The CLI addresses workflows that require developer productivity, headless automation, and integration with AI agents.
Key features
Runtime provisioning — Create CPU, GPU, or TPU runtime sessions, including high-memory machine shapes, and manage their status and lifecycle.
Source: README
Local and remote code execution — Run local Python scripts, Jupyter notebooks, piped input, interactive REPLs, and raw TTY console shells on a Colab runtime.
Source: README
Ephemeral job runner — Provision a fresh runtime, execute a local script with forwarded arguments, retrieve output files, and tear down the runtime in one command.
Source: README
Remote file management — List, upload, download, delete, and edit files in the remote runtime filesystem.
Source: README
Workspace automation and archival — Mount Google Drive, authenticate GCP services, install dependencies, and export session history in several notebook, text, and structured formats.
Source: README
Quick start
Copied verbatim from the project's README.
# Using uv (recommended)
uv tool install google-colab-cli
# Using pip
pip install google-colab-cli# 1. Provision a new session
colab new
# 2. Execute code from stdin
echo 'print("Hello from Google Colab!")' | colab exec
# 3. Stop and release the VM resource
colab stopWho it may suit
This CLI may suit developers and science or research users who want to run Python scripts and notebooks on managed cloud compute from Linux or macOS.
Topics to discuss
Which workflow should be the first candidate for a complete automated session-lifecycle example?
How should the CLI balance interactive terminal experiences with headless pipeline use?
What additional integrations or agent-oriented commands would materially improve automation?
Written by ReadmeX AI from the project's README, source and public GitHub data; it may contain mistakes.
Read the original README https://github.com/googlecolab/google-colab-cli#readme
ReadmeX opened this community for a trending project; it is not run by the project. Maintainers can claim it from the community page.
Comments
…