Skip to content

Your lightweight open-source personal agent.

feat: improve onboard with merge-or-overwrite prompt

Re-bin12540ba8cba9
diff --git a/README.md b/README.md
index 207df8203..b5fdffa0b 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@
⚡️ Delivers core agent functionality in just **~4,000** lines of code — **99% smaller** than Clawdbot's 430k+ lines.
-📏 Real-time line count: **3,582 lines** (run `bash core_agent_lines.sh` to verify anytime)
+📏 Real-time line count: **3,583 lines** (run `bash core_agent_lines.sh` to verify anytime)
## 📢 News
diff --git a/nanobot/cli/commands.py b/nanobot/cli/commands.py
index 18c23b149..b8d58df13 100644
--- a/nanobot/cli/commands.py
+++ b/nanobot/cli/commands.py
@@ -162,13 +162,19 @@ def onboard():
config_path = get_config_path()
if config_path.exists():
- # Load existing config — Pydantic fills in defaults for any new fields
- config = load_config()
- save_config(config)
- console.print(f"[green]✓[/green] Config refreshed at {config_path} (existing values preserved)")
+ console.print(f"[yellow]Config already exists at {config_path}[/yellow]")
+ console.print(" [bold]y[/bold] = overwrite with defaults (existing values will be lost)")
+ console.print(" [bold]N[/bold] = refresh config, keeping existing values and adding new fields")
+ if typer.confirm("Overwrite?"):
+ config = Config()
+ save_config(config)
+ console.print(f"[green]✓[/green] Config reset to defaults at {config_path}")
+ else:
+ config = load_config()
+ save_config(config)
+ console.print(f"[green]✓[/green] Config refreshed at {config_path} (existing values preserved)")
else:
- config = Config()
- save_config(config)
+ save_config(Config())
console.print(f"[green]✓[/green] Created config at {config_path}")
# Create workspace