run method
- @override
- @cliCommand
- String? source,
- String? type,
- String? prefix,
- int? maxSize,
- bool? removeComments,
- String? format,
- String? profile,
- bool yes = false,
- bool verbose = false,
override
Generate combined output files from source code
Scans the source directory for files, applies ignore patterns, optionally removes comments, and generates chunked output files.
Implementation
@override
@cliCommand
Future<void> run({
/// Source directory to scan (default: auto-detect)
String? source,
/// Project type: auto, dart, python, javascript, typescript, go, rust, java, kotlin, swift, cpp, csharp, ruby, php, web, generic
String? type,
/// Output file prefix (default: CLAUDIO)
String? prefix,
/// Maximum size per output file in KB (default: 1000)
int? maxSize,
/// Remove comments from output (default: true)
bool? removeComments,
/// Output format: text, markdown, or json (default: text)
String? format,
/// Load settings from a saved profile
String? profile,
/// Skip interactive confirmation
bool yes = false,
/// Show verbose output
bool verbose = false,
}) async {
try {
// Build configuration
final config = await _buildConfig(
source: source,
type: type,
prefix: prefix,
maxSize: maxSize,
removeComments: removeComments,
format: format,
profile: profile,
verbose: verbose,
);
// Interactive confirmation (unless --yes)
if (!yes) {
final confirmed = await UserPrompt.confirmConfiguration(config);
if (!confirmed) {
warn('Operation cancelled by user');
return;
}
}
// Run the generation
await _runGeneration(config);
} catch (e) {
error('Generation failed: $e');
exit(1);
}
}