feat: add regolith onboard CLI wizard with daemon installation
Some checks failed
Update token count / update-tokens (push) Has been cancelled

- Interactive setup wizard: deps check, env config, WhatsApp auth, daemon install, health check
- CLI entry point via yargs with bin registration (regolith onboard)
- Flags: --install-daemon, --non-interactive, --pairing-code, --json, --skip-*
- launchd (macOS) and systemd (Linux) service installation
- Refactored whatsapp-auth.ts to export authenticate() for programmatic use
- 72 tests across 6 test files
- Updated README.md and CLAUDE.md with onboard CLI docs
This commit is contained in:
2026-02-19 14:05:18 -05:00
parent 6c1c908fce
commit 4b2b22d044
20 changed files with 2981 additions and 164 deletions

31
src/cli/types.ts Normal file
View File

@@ -0,0 +1,31 @@
export interface WizardFlags {
installDaemon: boolean;
nonInteractive: boolean;
pairingCode: boolean;
json: boolean;
skipDeps: boolean;
skipEnv: boolean;
skipWhatsapp: boolean;
skipHealth: boolean;
}
export interface StepResult {
name: string;
status: 'passed' | 'failed' | 'skipped' | 'warning';
message: string;
details?: Record<string, unknown>;
}
export interface WizardContext {
flags: WizardFlags;
projectRoot: string;
platform: 'darwin' | 'linux';
envValues: Record<string, string>;
containerRuntime: 'apple-container' | 'docker' | null;
containerVersion: string | null;
whatsappAuthed: boolean;
daemonInstalled: boolean;
results: StepResult[];
}
export type WizardStep = (ctx: WizardContext) => Promise<StepResult>;