From f016025f632ee54165a28e52cfae985dc3c16cd1 Mon Sep 17 00:00:00 2001 From: Luke Milby Date: Thu, 12 Feb 2026 22:20:56 -0500 Subject: [PATCH] add feature to onboarding that will ask to generate missing workspace files --- nanobot/cli/commands.py | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/nanobot/cli/commands.py b/nanobot/cli/commands.py index 2aa5688..3ced25e 100644 --- a/nanobot/cli/commands.py +++ b/nanobot/cli/commands.py @@ -163,20 +163,32 @@ def onboard(): if config_path.exists(): console.print(f"[yellow]Config already exists at {config_path}[/yellow]") - if not typer.confirm("Overwrite?"): - raise typer.Exit() - - # Create default config - config = Config() - save_config(config) - console.print(f"[green]✓[/green] Created config at {config_path}") + if typer.confirm("Overwrite?"): + # Create default config + config = Config() + save_config(config) + console.print(f"[green]✓[/green] Created config at {config_path}") + else: + # Create default config + config = Config() + save_config(config) + console.print(f"[green]✓[/green] Created config at {config_path}") # Create workspace workspace = get_workspace_path() - console.print(f"[green]✓[/green] Created workspace at {workspace}") + + create_templates = True + if workspace.exists(): + console.print(f"[yellow]Workspace already exists at {workspace}[/yellow]") + if not typer.confirm("Create missing default templates? (will not overwrite existing files)"): + create_templates = False + else: + workspace.mkdir(parents=True, exist_ok=True) + console.print(f"[green]✓[/green] Created workspace at {workspace}") # Create default bootstrap files - _create_workspace_templates(workspace) + if create_templates: + _create_workspace_templates(workspace) console.print(f"\n{__logo__} nanobot is ready!") console.print("\nNext steps:")