docs: better document the restart command (#35)

Seth Troisi committed May 29, 2026 at 17:59 UTC 7907e76ed22704fb76bea3580ff1c0fc22a082a2
3 files changed +5 -5
src/colab_cli/commands/run.py
+1 -1
@@ -234,7 +234,7 @@ def run_command(
234 ),
235 ] = False,
236 ):
237 - """Run a Python script on a fresh Colab VM, then release the VM.
237 + """Run a Python script on a fresh Colab VM, then release the VM
238
239 Designed to be used as a shebang interpreter, e.g.
240
src/colab_cli/commands/session.py
+3 -3
@@ -27,7 +27,6 @@ from colab_cli.client import (
27 PostAssignmentResponse,
28 Variant,
29 )
30 -from colab_cli.commands.automation import INTERACTIVE_AUTOMATION_TIMEOUT_SEC
30 from colab_cli.utils import get_status_code
31 from colab_cli.state import SessionState
32 from colab_cli.runtime import ColabRuntime
@@ -247,11 +246,12 @@ def new(
246 typer.echo("[colab] Session READY.")
247
248
250 -def restart(
249 +def restart_kernel(
250 session: Annotated[
251 Optional[str], typer.Option("-s", "--session", help="Session name")
252 ] = None,
253 ):
254 + """Restart a session's kernel"""
255 from colab_cli.common import state
256
257 name = state.resolve_session(session)
@@ -505,7 +505,7 @@ def keep_alive(
505 def register(app: typer.Typer):
506 app.command()(new)
507 app.command(name="sessions")(sessions_command)
508 - app.command()(restart)
508 + app.command(name="restart-kernel")(restart_kernel)
509 app.command()(status)
510 app.command()(stop)
511 app.command(hidden=True)(keep_alive)
src/colab_cli/runtime.py
+1 -1
@@ -154,7 +154,7 @@ class ColabRuntime:
154 raise e
155
156 return self._kernel_client
157 -
157 +
158 def restart(
159 self,
160 timeout: Optional[float] = None,