@@ -101,38 +101,51 @@ type ParsedArgs = {
101101function parseArgs ( ) : ParsedArgs {
102102 const program = new Command ( )
103103
104- program
105- . name ( IS_FREEBUFF ? 'freebuff' : 'codebuff' )
106- . description ( IS_FREEBUFF ? 'Freebuff - Free AI coding assistant' : 'Codebuff CLI - AI-powered coding assistant' )
107- . version ( loadPackageVersion ( ) , '-v, --version' , 'Print the CLI version' )
108- . option (
109- '--agent <agent-id>' ,
110- 'Run a specific agent id (skips loading local .agents overrides)' ,
111- )
112- . option ( '--clear-logs' , 'Remove any existing CLI log files before starting' )
113- . option (
114- '--continue [conversation-id]' ,
115- 'Continue from a previous conversation (optionally specify a conversation id)' ,
116- )
117- . option (
118- '--cwd <directory>' ,
119- 'Set the working directory (default: current directory)' ,
120- )
121-
122- if ( ! IS_FREEBUFF ) {
104+ if ( IS_FREEBUFF ) {
105+ // Freebuff: simplified CLI - no prompt args, no agent override, no clear-logs
106+ program
107+ . name ( 'freebuff' )
108+ . description ( 'Freebuff - Free AI coding assistant' )
109+ . version ( loadPackageVersion ( ) , '-v, --version' , 'Print the CLI version' )
110+ . option (
111+ '--continue [conversation-id]' ,
112+ 'Continue from a previous conversation (optionally specify a conversation id)' ,
113+ )
114+ . option (
115+ '--cwd <directory>' ,
116+ 'Set the working directory (default: current directory)' ,
117+ )
118+ . helpOption ( '-h, --help' , 'Show this help message' )
119+ . parse ( process . argv )
120+ } else {
121+ // Codebuff: full CLI with all options
123122 program
123+ . name ( 'codebuff' )
124+ . description ( 'Codebuff CLI - AI-powered coding assistant' )
125+ . version ( loadPackageVersion ( ) , '-v, --version' , 'Print the CLI version' )
126+ . option (
127+ '--agent <agent-id>' ,
128+ 'Run a specific agent id (skips loading local .agents overrides)' ,
129+ )
130+ . option ( '--clear-logs' , 'Remove any existing CLI log files before starting' )
131+ . option (
132+ '--continue [conversation-id]' ,
133+ 'Continue from a previous conversation (optionally specify a conversation id)' ,
134+ )
135+ . option (
136+ '--cwd <directory>' ,
137+ 'Set the working directory (default: current directory)' ,
138+ )
124139 . option ( '--free' , 'Start in FREE mode' )
125140 . option ( '--lite' , 'Start in FREE mode (deprecated, use --free)' )
126141 . option ( '--max' , 'Start in MAX mode' )
127142 . option ( '--plan' , 'Start in PLAN mode' )
143+ . helpOption ( '-h, --help' , 'Show this help message' )
144+ . argument ( '[prompt...]' , 'Initial prompt to send to the agent' )
145+ . allowExcessArguments ( true )
146+ . parse ( process . argv )
128147 }
129148
130- program
131- . helpOption ( '-h, --help' , 'Show this help message' )
132- . argument ( '[prompt...]' , 'Initial prompt to send to the agent' )
133- . allowExcessArguments ( true )
134- . parse ( process . argv )
135-
136149 const options = program . opts ( )
137150 const args = program . args
138151
0 commit comments