@@ -7,6 +7,12 @@ const fs = require('fs');
77const path = require ( 'path' ) ;
88const { execSync } = require ( 'child_process' ) ;
99
10+ // Get the current directory name for default output file
11+ const getCurrentDirectoryName = ( ) => {
12+ const currentPath = process . cwd ( ) ;
13+ return path . basename ( currentPath ) + '.md' ;
14+ } ;
15+
1016// Package information
1117program
1218 . name ( 'code2prompt-manager' )
@@ -19,7 +25,7 @@ program
1925 . option ( '-d, --directory <path>' , 'Directory to scan' , '.' )
2026 . option ( '-e, --extra-exclude <patterns>' , 'Additional exclude patterns (comma-separated)' )
2127 . option ( '-i, --include <patterns>' , 'Include patterns (comma-separated)' )
22- . option ( '-O, --output-file <file>' , 'Output file name' , 'codebase.md' )
28+ . option ( '-O, --output-file <file>' , 'Output file name' , getCurrentDirectoryName ( ) )
2329 . option ( '-F, --output-format <format>' , 'Output format: markdown, json, or xml' , 'markdown' )
2430 . option ( '--include-priority' , 'Include files in case of conflict between include and exclude patterns' )
2531 . option ( '--full-directory-tree' , 'List the full directory tree' )
0 commit comments