feat: create onboard script

This commit is contained in:
Joe Fleming
2026-03-13 17:45:21 -06:00
parent 3893d88365
commit 2d99d17d60
8 changed files with 173 additions and 13 deletions

View File

@@ -3,16 +3,19 @@ import { Command } from 'commander';
import pc from 'picocolors';
import { AgentLoop } from '../agent/loop.ts';
import { MessageBus } from '../bus/queue.ts';
import type { Config } from '../config/types.ts';
import { makeProvider } from '../provider/index.ts';
import type { Config } from '../config/types.ts';
export function agentCommand(program: Command, config: Config, workspace: string): void {
program
.command('agent')
.description('Run the agent interactively or send a single message.')
.option('-c, --config <path>', 'Path to config.json')
.option('-m, --message <text>', 'Single message to process (non-interactive)')
.option('-M, --model <model>', 'Model override')
.action(async (opts: { config?: string; message?: string; model?: string }) => {
console.info(pc.magenta(`workspace path: ${workspace}`));
const model = opts.model ?? config.agent.model;
const provider = makeProvider(
config.providers,