feat(cli): add onboard alias for setup wizard
This commit is contained in:
@@ -14,6 +14,8 @@ describe('CLI program', () => {
|
||||
expect(commandNames).toContain('config');
|
||||
expect(commandNames).toContain('skills');
|
||||
expect(commandNames).toContain('backup');
|
||||
expect(commandNames).toContain('setup');
|
||||
expect(commandNames).toContain('onboard');
|
||||
|
||||
expect(commandNames).toContain('openai-auth');
|
||||
expect(commandNames).toContain('openai-key');
|
||||
|
||||
@@ -17,6 +17,7 @@ import { registerConfigCommand } from './config-cmd.js';
|
||||
import { registerTuiCommand } from './tui.js';
|
||||
import { registerCompletionCommand } from './completion.js';
|
||||
import { registerSetupCommand } from './setup.js';
|
||||
import { registerOnboardCommand } from './onboard.js';
|
||||
import { registerGmailAuthCommand } from './gmail-auth.js';
|
||||
import { registerGcalAuthCommand } from './gcal-auth.js';
|
||||
import { registerGdocsAuthCommand } from './gdocs-auth.js';
|
||||
@@ -45,6 +46,7 @@ export function createProgram(): Command {
|
||||
registerConfigCommand(program);
|
||||
registerCompletionCommand(program);
|
||||
registerSetupCommand(program);
|
||||
registerOnboardCommand(program);
|
||||
registerGmailAuthCommand(program);
|
||||
registerGcalAuthCommand(program);
|
||||
registerGdocsAuthCommand(program);
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import type { Command } from 'commander';
|
||||
import { getConfigPath } from './shared.js';
|
||||
import { runSetup } from './setup.js';
|
||||
|
||||
export function registerOnboardCommand(program: Command): void {
|
||||
program
|
||||
.command('onboard')
|
||||
.description('Run guided onboarding (alias for setup wizard)')
|
||||
.option('-c, --config <path>', 'Config file path')
|
||||
.action(async (opts: { config?: string }) => {
|
||||
const configPath = opts.config ?? getConfigPath();
|
||||
await runSetup(configPath);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user