Skip to content

v0.7.5.1

Choose a tag to compare

@github-actions github-actions released this 03 Nov 14:13
· 118 commits to main since this release
6b1f193

First release of this fork: Google's Colab CLI 0.7.5 with Windows fixes and extra features on top. Versions are numbered 0.7.5.N to show the Google release they are based on.

Changed

  • update: colab update and the daily check offer this fork's GitHub releases (and colab update --install installs the release wheel). Google's PyPI releases are only announced when Google ships a newer base version, never installed, so an update can no longer replace the fork with Google's package.
  • ssh: Every colab ssh WebSocket now sends X-Colab-Client-Agent: colab-cli and the query values colab-client-agent=colab-cli and colab-client-agent=ssh-mode-<mode>, where the mode is interactive for plain colab ssh, cmd for colab ssh -- CMD, and proxy otherwise.
  • ssh: When the server rejects a connection with HTTP 429 and reports its
    SSH session limit, colab ssh now says the limit is reached (N of N sessions
    in use on the runtime) and that the limit depends on the Colab plan. A 429
    without a usable limit keeps the previous message.
  • exec, run: --timeout now defaults to no limit; a value interrupts the kernel when it is exceeded and exits 1 with one line. Before, code that ran longer than the old 30 s default could fail with Timeout waiting for reply after it had finished.

Added

  • secrets: colab secret set NAME[=SOURCE]... and --secret on colab exec and colab run put tokens into the kernel's environment without taking the value on the command line. SOURCE is env (default), env:VAR, prompt, hf-cli or gh-cli; values are written as *** in the session history.
  • ssh: colab ssh -L PORT (repeatable, also LOCAL:REMOTE and LOCAL:HOST:REMOTE), -N/--no-shell, and colab forward PORT... forward local ports to the runtime. The runtime is kept alive while a forward is open (--no-keep-alive to turn it off).
  • share: colab share PORT [--via cloudflared|ngrok] gives a runtime port a public URL; it keeps the runtime alive until Ctrl+C, or --detach leaves the tunnel running. --list and --stop [PORT] manage shares.
  • keepalive: colab keepalive [--minutes N] keeps a runtime alive without running code.
  • hf: colab hf login and colab hf download REPO_ID for Hugging Face on the runtime.
  • clone: colab clone REPO [DEST] clones owner/name or an https URL onto the runtime; private GitHub repositories use GH_TOKEN, GITHUB_TOKEN or the local gh login, and the token is not stored in the URL or .git/config.
  • ssh: colab ssh [-s NAME] -- CMD runs one command on an existing runtime and exits with its status. Output is byte-exact when piped (a PTY only when stdin and stdout are terminals), and it never creates a runtime. Its handshake is tagged ssh-mode-cmd.
  • prompts: COLAB_CLI_PROMPT_FROM_STDIN=1 makes CLI prompts read their answer from stdin, for programs that drive the CLI and own the terminal.

Fixed

  • ssh: colab --config FILE ssh and colab --auth adc ssh now keep those options in the ProxyCommand that colab ssh starts, so it uses the same sessions file and auth provider instead of the defaults.
  • windows: colab console works in PowerShell and cmd.exe (raw keys, ANSI color), and colab drivemount shows the consent link and waits for Enter on the console.
  • windows: colab edit no longer fails with PermissionError on its temporary file, and Windows $EDITOR paths (backslashes, .cmd launchers) work.
  • console: piped colab console no longer cuts off its output on a fresh runtime or leaks terminal replies into the next prompt.
  • exec: colab exec exits 1 when the code or a notebook cell raises; --cells, --stop-on-error, --check and --check-only select and pre-check notebook cells.
  • sessions: a running command reports a stopped session in one line instead of a traceback, and no longer puts a stopped session back into sessions.json.
  • ssh: a % in a session name or identity path no longer breaks the ProxyCommand; a passphrase-protected --identity key asks for its passphrase instead of hanging.
  • windows: non-ASCII scripts and output work in every Windows code page. colab exec -f and colab run read scripts like Python does (coding cookie or BOM, else UTF-8) instead of failing with UnicodeDecodeError, and redirected output and colab.log are UTF-8, so Japanese and other text no longer raises UnicodeEncodeError in a pipe or file.