@@ -111,36 +111,32 @@ async function launchDevServer(cwd: string, { yolo = false }: { yolo?: boolean }
111111 }
112112}
113113
114- export async function runInit ( ) : Promise < void > {
115- p . intro ( pc . red ( "0pflow" ) + pc . dim ( " — create a new project" ) ) ;
114+ export async function runRun ( ) : Promise < void > {
115+ p . intro ( pc . red ( "0pflow" ) ) ;
116116
117117 if ( ! isClaudeAvailable ( ) ) {
118118 p . log . error ( "Claude Code CLI not found. Install it from https://claude.ai/code" ) ;
119119 process . exit ( 1 ) ;
120120 }
121121
122- // ── Existing project check ─── ───────────────────────────────────────
122+ // ── Existing project → launch ───────────────────────────────────────
123123 if ( isExisting0pflow ( ) ) {
124- const action = await p . select ( {
125- message : "This directory is already an 0pflow project. " ,
124+ const mode = await p . select ( {
125+ message : "Launch mode " ,
126126 options : [
127- { value : "claude" as const , label : "Launch Dev UI" } ,
128- { value : "claude-yolo" as const , label : "Launch Dev UI with --dangerously-skip-permissions" } ,
129- { value : "new" as const , label : "Create a new project in a subdirectory" } ,
127+ { value : "normal" as const , label : "Launch" } ,
128+ { value : "yolo" as const , label : "Launch with --dangerously-skip-permissions" } ,
130129 ] ,
131130 } ) ;
132131
133- if ( p . isCancel ( action ) ) {
132+ if ( p . isCancel ( mode ) ) {
134133 p . cancel ( "Cancelled." ) ;
135134 process . exit ( 0 ) ;
136135 }
137136
138- if ( action === "claude" || action === "claude-yolo" ) {
139- p . outro ( pc . green ( "Launching Dev UI..." ) ) ;
140- await launchDevServer ( process . cwd ( ) , { yolo : action === "claude-yolo" } ) ;
141- return ;
142- }
143- // fall through to normal wizard (cwdEmpty will be false, so directory defaults to ./<name>)
137+ p . outro ( pc . green ( "Launching..." ) ) ;
138+ await launchDevServer ( process . cwd ( ) , { yolo : mode === "yolo" } ) ;
139+ return ;
144140 }
145141
146142 const cwdEmpty = isCwdEmpty ( ) ;
@@ -390,7 +386,7 @@ export async function runInit(): Promise<void> {
390386 } else {
391387 s . stop ( pc . yellow ( "Database not ready yet" ) ) ;
392388 p . log . warn (
393- `Run later: 0pflow init won't retry. Use the MCP tools or set up manually.` ,
389+ `Run later: 0pflow run won't retry. Use the MCP tools or set up manually.` ,
394390 ) ;
395391 }
396392 } else {
@@ -400,19 +396,19 @@ export async function runInit(): Promise<void> {
400396 }
401397 }
402398
403- // ── Launch Dev UI? ──────────────────────────────────────────────────
399+ // ── Launch? ─────── ──────────────────────────────────────────────────
404400 const launchChoice = await p . select ( {
405- message : "Launch Dev UI to design your first workflow ?" ,
401+ message : "Launch now ?" ,
406402 options : [
407- { value : "claude " as const , label : "Yes" } ,
408- { value : "claude- yolo" as const , label : "Yes, with --dangerously-skip-permissions" } ,
403+ { value : "normal " as const , label : "Yes" } ,
404+ { value : "yolo" as const , label : "Yes, with --dangerously-skip-permissions" } ,
409405 { value : "no" as const , label : "No, I'll do it later" } ,
410406 ] ,
411407 } ) ;
412408
413409 if ( ! p . isCancel ( launchChoice ) && launchChoice !== "no" ) {
414- p . outro ( pc . green ( "Launching Dev UI ..." ) ) ;
415- await launchDevServer ( resolve ( appPath ) , { yolo : launchChoice === "claude- yolo" } ) ;
410+ p . outro ( pc . green ( "Launching..." ) ) ;
411+ await launchDevServer ( resolve ( appPath ) , { yolo : launchChoice === "yolo" } ) ;
416412 return ;
417413 }
418414
@@ -421,7 +417,7 @@ export async function runInit(): Promise<void> {
421417
422418 p . outro ( pc . green ( "Project created!" ) ) ;
423419 console . log ( ) ;
424- console . log ( pc . bold ( " To launch the Dev UI later:" ) ) ;
425- console . log ( pc . cyan ( ` ${ cdCmd } 0pflow dev ` ) ) ;
420+ console . log ( pc . bold ( " To launch later:" ) ) ;
421+ console . log ( pc . cyan ( ` ${ cdCmd } 0pflow run ` ) ) ;
426422 console . log ( ) ;
427423}
0 commit comments