dew/packages/cli/bin/dew.dart
Chris Hendrickson 31f9ba4726 dew init with module init hooks (DEW-0010)
- DewInitHook interface and DewInitOptions added to packages/core/src/init.dart
- InitCommand: creates .project/dew.yaml from default template, calls hooks
  --path/-p option (default '.'), --[no-]gitkeep flag (default true)
- CommandRegistry gains initHooks list and registerInitHook()
- KanbanInitHook: creates column dirs, archive/, attachments/ under
  .project/kanban/; adds .gitkeep to freshly-created dirs when enabled
- KanbanInitHook registered in kanban.registerCommands()
- CLI wires InitCommand(registry.initHooks) as a top-level command

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 19:58:53 -04:00

20 lines
617 B
Dart

import 'package:args/command_runner.dart';
import 'package:dew_core/dew_core.dart';
import 'package:dew_kanban/dew_kanban.dart' as kanban;
import 'package:dew_mcp/dew_mcp.dart' as mcp;
Future<void> main(List<String> args) async {
final commandRegistry = CommandRegistry();
kanban.registerCommands(commandRegistry);
mcp.registerCommands(commandRegistry);
final runner = CommandRunner<void>('dew', 'A project management tool.');
runner.addCommand(InitCommand(commandRegistry.initHooks));
for (final command in commandRegistry.commands) {
runner.addCommand(command);
}
await runner.run(args);
}