Repository navigation
v0.7.5.1
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 updateand the daily check offer this fork's GitHub releases (andcolab update --installinstalls 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 sshWebSocket now sendsX-Colab-Client-Agent: colab-cliand the query valuescolab-client-agent=colab-cliandcolab-client-agent=ssh-mode-<mode>, where the mode isinteractivefor plaincolab ssh,cmdforcolab ssh -- CMD, andproxyotherwise. - ssh: When the server rejects a connection with HTTP 429 and reports its
SSH session limit,colab sshnow 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:
--timeoutnow 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 withTimeout waiting for replyafter it had finished.
Added
- secrets:
colab secret set NAME[=SOURCE]...and--secretoncolab execandcolab runput tokens into the kernel's environment without taking the value on the command line. SOURCE isenv(default),env:VAR,prompt,hf-cliorgh-cli; values are written as***in the session history. - ssh:
colab ssh -L PORT(repeatable, alsoLOCAL:REMOTEandLOCAL:HOST:REMOTE),-N/--no-shell, andcolab forward PORT...forward local ports to the runtime. The runtime is kept alive while a forward is open (--no-keep-aliveto 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--detachleaves the tunnel running.--listand--stop [PORT]manage shares. - keepalive:
colab keepalive [--minutes N]keeps a runtime alive without running code. - hf:
colab hf loginandcolab hf download REPO_IDfor Hugging Face on the runtime. - clone:
colab clone REPO [DEST]clonesowner/nameor an https URL onto the runtime; private GitHub repositories useGH_TOKEN,GITHUB_TOKENor the localghlogin, and the token is not stored in the URL or.git/config. - ssh:
colab ssh [-s NAME] -- CMDruns 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 taggedssh-mode-cmd. - prompts:
COLAB_CLI_PROMPT_FROM_STDIN=1makes CLI prompts read their answer from stdin, for programs that drive the CLI and own the terminal.
Fixed
- ssh:
colab --config FILE sshandcolab --auth adc sshnow keep those options in the ProxyCommand thatcolab sshstarts, so it uses the same sessions file and auth provider instead of the defaults. - windows:
colab consoleworks in PowerShell and cmd.exe (raw keys, ANSI color), andcolab drivemountshows the consent link and waits for Enter on the console. - windows:
colab editno longer fails withPermissionErroron its temporary file, and Windows$EDITORpaths (backslashes,.cmdlaunchers) work. - console: piped
colab consoleno longer cuts off its output on a fresh runtime or leaks terminal replies into the next prompt. - exec:
colab execexits 1 when the code or a notebook cell raises;--cells,--stop-on-error,--checkand--check-onlyselect 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--identitykey asks for its passphrase instead of hanging. - windows: non-ASCII scripts and output work in every Windows code page.
colab exec -fandcolab runread scripts like Python does (coding cookie or BOM, else UTF-8) instead of failing withUnicodeDecodeError, and redirected output andcolab.logare UTF-8, so Japanese and other text no longer raisesUnicodeEncodeErrorin a pipe or file.