list method

  1. @cliCommand
Future<void> list()

List all saved profiles

Implementation

@cliCommand
Future<void> list() async {
  final manager = ProfileManager.withDefaults();
  final profiles = await manager.listProfiles();

  if (profiles.isEmpty) {
    info('No saved profiles found');
    info('Create one with: claudio gen profile save <name>');
    return;
  }

  print('\nSaved Profiles:');
  print('\u2500' * 60);

  for (final profile in profiles) {
    final config = profile.config;
    print('  \u2022 ${profile.name}');
    print('    Type: ${config.projectTypeName}, Source: ${config.sourceDir}');
    print('    Format: ${config.outputFormatName}, Size: ${config.targetSizeKB}KB');
    print('');
  }

  print('\u2500' * 60);
  success('Found ${profiles.length} profile(s)');
}