From c8081889b9637e87b4a3cb2a9ed7f3ca3a419a5d Mon Sep 17 00:00:00 2001 From: Zhengshou Lai Date: Sat, 27 Jun 2026 21:44:11 +0800 Subject: [PATCH] feat(server): add cloudcli service and per-service prebuild flag Add a CloudCLI (claude-code-ui) service on port 3020, and a prebuild flag so services backed by a global npm binary skip the Docusaurus-style `npm run build` step before serve. --- mytoolkit/commands/server.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mytoolkit/commands/server.py b/mytoolkit/commands/server.py index 19a87d8..7bf4a41 100644 --- a/mytoolkit/commands/server.py +++ b/mytoolkit/commands/server.py @@ -23,6 +23,7 @@ class Service: project_dir: Optional[Path] = None serve_cmd: Optional[list[str]] = None dev_cmd: Optional[list[str]] = None + prebuild: bool = True # run `npm run build` before serve (Docusaurus-style) @property def manageable(self) -> bool: @@ -69,6 +70,14 @@ KNOWN_SERVICES: list[Service] = [ serve_cmd=["npm", "run", "serve"], dev_cmd=["npm", "run", "dev"], ), + Service( + "cloudcli", + serve_port=3020, + description="CloudCLI (claude-code-ui) web server", + project_dir=Path.home() / ".cloudcli", + serve_cmd=["cloudcli", "start", "--port", "3020"], + prebuild=False, # global npm binary, no project build step + ), ] _BY_NAME: dict[str, Service] = {s.name: s for s in KNOWN_SERVICES} @@ -268,7 +277,7 @@ def server_start(name, dev, rebuild): env = no_color_env() - if not dev: + if not dev and svc.prebuild: build_dir = svc.project_dir / "build" if rebuild or not build_dir.exists(): reason = "forced rebuild" if rebuild else "build directory missing"