Skip to content

Feat/cli dev command#54

Open
howold-lab wants to merge 10 commits intoChesterRa:mainfrom
howold-lab:feat/cli-dev-command
Open

Feat/cli dev command#54
howold-lab wants to merge 10 commits intoChesterRa:mainfrom
howold-lab:feat/cli-dev-command

Conversation

@howold-lab
Copy link
Contributor

  1. src/cccc/cli/dev_cmds.py (new)

Core implementation of cccc dev command. The cmd_dev() function:

  • Locates web/ directory — walks up from source file to find the web/ directory containing package.json
  • Pre-flight checks — verifies node_modules exists and npm is in PATH
  • Starts daemon — reuses existing logic; detects running daemon and reuses it, restarts on version mismatch
  • Starts uvicorn — runs API server on a background thread (:8848), serving /api/* routes
  • Starts Vite dev server — spawns npm run dev as subprocess (:5173) with HMR, proxying /api to :8848
  • Process lifecycle management — monitor threads detect daemon/vite crashes; Ctrl+C gracefully shuts down in order: vite → uvicorn → daemon
  1. src/cccc/cli/main.py (modified)
  • Added from .dev_cmds import * import
  • Registered dev subcommand with argparse, supports --port flag for custom Vite port
  1. src/cccc/cli/init.py (modified)
  • Added from .dev_cmds import * import
  • Added cccc.cli.dev_cmds to _PATCH_FORWARD_MODULES tuple for consistent attribute forwarding

xuhaihui and others added 10 commits February 21, 2026 18:43
When SSE disconnects and reconnects, the backend stream seeks to EOF,
causing events written during the disconnect window to be missed in the
UI. Add a hasConnectedOnceRef to distinguish first connect from reconnect,
and call loadGroup on reconnect to compensate for missed events.
Start daemon, API server (uvicorn :8848), and Vite dev server (HMR :5173)
with a single command. Supports --port to customize the Vite port.
Ctrl+C gracefully shuts down all processes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant