feat(cli): add onboard alias for setup wizard
This commit is contained in:
@@ -73,6 +73,7 @@ Flynn provides a full CLI via the `flynn` binary (or `npx tsx src/cli/index.ts`
|
|||||||
| `flynn backup` | Create a snapshot backup and optionally upload to MinIO |
|
| `flynn backup` | Create a snapshot backup and optionally upload to MinIO |
|
||||||
| `flynn completion <shell>` | Generate shell completions (bash, zsh, fish) |
|
| `flynn completion <shell>` | Generate shell completions (bash, zsh, fish) |
|
||||||
| `flynn setup` | Interactive setup wizard |
|
| `flynn setup` | Interactive setup wizard |
|
||||||
|
| `flynn onboard` | Guided onboarding alias for setup wizard |
|
||||||
| `flynn gmail-auth` | Authenticate with Gmail via OAuth2 |
|
| `flynn gmail-auth` | Authenticate with Gmail via OAuth2 |
|
||||||
| `flynn gcal-auth` | Authenticate with Google Calendar via OAuth2 |
|
| `flynn gcal-auth` | Authenticate with Google Calendar via OAuth2 |
|
||||||
| `flynn skills` | List/install/manage skills |
|
| `flynn skills` | List/install/manage skills |
|
||||||
|
|||||||
@@ -160,6 +160,20 @@
|
|||||||
],
|
],
|
||||||
"test_status": "pnpm test:run src/tools/builtin/browser/tools.test.ts src/tools/policy.test.ts passing"
|
"test_status": "pnpm test:run src/tools/builtin/browser/tools.test.ts src/tools/policy.test.ts passing"
|
||||||
},
|
},
|
||||||
|
"onboard-command-alias-for-setup-wizard": {
|
||||||
|
"status": "completed",
|
||||||
|
"date": "2026-02-17",
|
||||||
|
"updated": "2026-02-17",
|
||||||
|
"summary": "Added a first-class `flynn onboard` CLI entrypoint as an explicit guided-onboarding alias to the setup wizard (`runSetup`), improving onboarding discoverability and OpenClaw-style command-surface parity without changing setup behavior.",
|
||||||
|
"files_modified": [
|
||||||
|
"src/cli/onboard.ts",
|
||||||
|
"src/cli/index.ts",
|
||||||
|
"src/cli/index.test.ts",
|
||||||
|
"README.md",
|
||||||
|
"docs/plans/state.json"
|
||||||
|
],
|
||||||
|
"test_status": "pnpm test:run src/cli/index.test.ts + pnpm typecheck passing"
|
||||||
|
},
|
||||||
"browser-tools-activation-clarity": {
|
"browser-tools-activation-clarity": {
|
||||||
"status": "completed",
|
"status": "completed",
|
||||||
"date": "2026-02-17",
|
"date": "2026-02-17",
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ describe('CLI program', () => {
|
|||||||
expect(commandNames).toContain('config');
|
expect(commandNames).toContain('config');
|
||||||
expect(commandNames).toContain('skills');
|
expect(commandNames).toContain('skills');
|
||||||
expect(commandNames).toContain('backup');
|
expect(commandNames).toContain('backup');
|
||||||
|
expect(commandNames).toContain('setup');
|
||||||
|
expect(commandNames).toContain('onboard');
|
||||||
|
|
||||||
expect(commandNames).toContain('openai-auth');
|
expect(commandNames).toContain('openai-auth');
|
||||||
expect(commandNames).toContain('openai-key');
|
expect(commandNames).toContain('openai-key');
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import { registerConfigCommand } from './config-cmd.js';
|
|||||||
import { registerTuiCommand } from './tui.js';
|
import { registerTuiCommand } from './tui.js';
|
||||||
import { registerCompletionCommand } from './completion.js';
|
import { registerCompletionCommand } from './completion.js';
|
||||||
import { registerSetupCommand } from './setup.js';
|
import { registerSetupCommand } from './setup.js';
|
||||||
|
import { registerOnboardCommand } from './onboard.js';
|
||||||
import { registerGmailAuthCommand } from './gmail-auth.js';
|
import { registerGmailAuthCommand } from './gmail-auth.js';
|
||||||
import { registerGcalAuthCommand } from './gcal-auth.js';
|
import { registerGcalAuthCommand } from './gcal-auth.js';
|
||||||
import { registerGdocsAuthCommand } from './gdocs-auth.js';
|
import { registerGdocsAuthCommand } from './gdocs-auth.js';
|
||||||
@@ -45,6 +46,7 @@ export function createProgram(): Command {
|
|||||||
registerConfigCommand(program);
|
registerConfigCommand(program);
|
||||||
registerCompletionCommand(program);
|
registerCompletionCommand(program);
|
||||||
registerSetupCommand(program);
|
registerSetupCommand(program);
|
||||||
|
registerOnboardCommand(program);
|
||||||
registerGmailAuthCommand(program);
|
registerGmailAuthCommand(program);
|
||||||
registerGcalAuthCommand(program);
|
registerGcalAuthCommand(program);
|
||||||
registerGdocsAuthCommand(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