@@ -14,7 +14,7 @@ function usage() {
1414webmux — Dev dashboard for managing Git worktrees
1515
1616Usage:
17- webmux Start the dashboard
17+ webmux serve Start the dashboard server
1818 webmux init Interactive project setup
1919 webmux service Manage webmux as a system service
2020 webmux update Update webmux to the latest version
@@ -24,16 +24,18 @@ Usage:
2424 webmux close Close a worktree session without removing it
2525 webmux remove Remove a worktree
2626 webmux merge Merge a worktree into the main branch and remove it
27- webmux --port N Set port (default: 5111)
28- webmux --debug Show debug-level logs
29- webmux --help Show this help message
27+
28+ Options:
29+ --port N Set port (default: 5111)
30+ --debug Show debug-level logs
31+ --help Show this help message
3032
3133Environment:
3234 BACKEND_PORT Same as --port (flag takes precedence)
3335` ) ;
3436}
3537
36- type RootCommand = "init" | "service" | "update" | "add" | "list" | "open" | "close" | "remove" | "merge" | null ;
38+ type RootCommand = "serve" | " init" | "service" | "update" | "add" | "list" | "open" | "close" | "remove" | "merge" | null ;
3739
3840interface ParsedRootArgs {
3941 port : number ;
@@ -43,7 +45,8 @@ interface ParsedRootArgs {
4345}
4446
4547function isRootCommand ( value : string ) : value is NonNullable < RootCommand > {
46- return value === "init"
48+ return value === "serve"
49+ || value === "init"
4750 || value === "service"
4851 || value === "update"
4952 || value === "add"
@@ -180,7 +183,14 @@ if (isWorktreeCommand(parsed.command)) {
180183 process . exit ( exitCode ) ;
181184}
182185
183- // ── Check for .webmux.yaml ───────────────────────────────────────────────────
186+ // ── No command → show help ───────────────────────────────────────────────────
187+
188+ if ( parsed . command === null ) {
189+ usage ( ) ;
190+ process . exit ( 0 ) ;
191+ }
192+
193+ // ── serve: Check for .webmux.yaml ────────────────────────────────────────────
184194
185195if ( ! existsSync ( resolve ( process . cwd ( ) , ".webmux.yaml" ) ) ) {
186196 console . error ( "No .webmux.yaml found in this directory.\nRun `webmux init` to set up your project." ) ;
0 commit comments