Skip to content

Your lightweight open-source personal agent.

add feature to onboarding that will ask to generate missing workspace files

Luke Milbyf016025f632e
diff --git a/nanobot/cli/commands.py b/nanobot/cli/commands.py
index 2aa56887d..3ced25e5a 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:")