Skip to content

DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.

feat: add deeptutor start command to launch backend and frontend together

Xinyu Du2b9bf9a4f1ff
diff --git a/deeptutor_cli/main.py b/deeptutor_cli/main.py
index 83f3d8b67..71ce99fa6 100644
--- a/deeptutor_cli/main.py
+++ b/deeptutor_cli/main.py
@@ -103,6 +103,17 @@ def run_capability(
maybe_run(run_turn_and_render(app=DeepTutorApp(), request=request, fmt=fmt))
+def start() -> None:
+ """Launch backend + frontend together."""
+ import subprocess
+ import sys
+ from pathlib import Path
+
+ script = str(Path(__file__).resolve().parent.parent / "scripts" / "start_web.py")
+ subprocess.run([sys.executable, script])
+
+
@app.command()
def serve(
host: str = typer.Option("0.0.0.0", help="Bind address."),