UNPKG

hataraku

Version:

An autonomous coding agent for building AI-powered development tools. The name "Hataraku" (働く) means "to work" in Japanese.

55 lines 2.32 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.registerConfigCommands = registerConfigCommands; const chalk_1 = __importDefault(require("chalk")); const config_loader_1 = require("../../config/config-loader"); const first_run_manager_1 = require("../../config/first-run-manager"); function registerConfigCommands(program) { // Add configuration command program .command('config') .description('Manage configuration') .action(async () => { const configLoader = new config_loader_1.ConfigLoader(); try { const config = await configLoader.loadConfig(); console.log(chalk_1.default.bold('\nConfiguration Summary:')); console.log(chalk_1.default.gray('─'.repeat(30))); console.log(`${chalk_1.default.blue('Active Profile:')} ${config.activeProfile}`); console.log(`${chalk_1.default.blue('Profiles:')} ${config.profiles.length}`); console.log(`${chalk_1.default.blue('Agents:')} ${config.agents.length}`); console.log(`${chalk_1.default.blue('Tasks:')} ${config.tasks.length}`); console.log(`${chalk_1.default.blue('Tools:')} ${config.tools.length}`); console.log(''); } catch (error) { console.error(chalk_1.default.red('Error loading configuration:'), error); process.exit(1); } }); program .command('init') .description('Initialize configuration') .option('-y, --yes', 'Skip confirmation') .action(async (options) => { try { const firstRunManager = new first_run_manager_1.FirstRunManager(); if (options.yes) { await firstRunManager.initializeDefaults(); } else { await firstRunManager.runSetupWizard(); } process.exit(0); } catch (error) { console.error(chalk_1.default.red('Error initializing configuration:'), error); process.exit(1); } }); return program; } //# sourceMappingURL=config.js.map