exec method
Run command.
The contents of katana.yaml and the arguments of the command are passed to context.
コマンドを実行します。
contextにkatana.yamlの内容やコマンドの引数が渡されます。
Implementation
@override
Future<void> exec(ExecContext context) async {
final claudeCode =
context.yaml.getAsMap("generative_ai").getAsMap("claude_code");
final enableClaudeCode = claudeCode.get("enable", false);
final enableClaudeCodeBackground = claudeCode.get("background", false);
await const DesignsAiCode().exec(context);
await const ImplsAiCode().exec(context);
await const DocsAiCode().exec(context);
await const TestsAiCode().exec(context);
await GitAgentsMarkdownCliCode(
availabeBackground: enableClaudeCodeBackground,
).generateFile("AGENTS.md");
if (enableClaudeCode) {
label("Create agents");
await const AgentsAiCode().exec(context);
label("Create settings.local.json");
await const GitClaudeSettingsCliCode()
.generateFile("settings.local.json");
label("Create .mcp.json");
await const McpMcpCode().exec(context);
}
}