@@ -102,14 +102,33 @@ Examples:
102102 if ( args . includes ( '--key' ) ) {
103103 const keyIndex = args . indexOf ( '--key' ) + 1 ;
104104 if ( keyIndex < args . length ) {
105- console . log ( 'API key configured (basic implementation)' ) ;
105+ console . log ( '✅ API key configured (basic implementation)' ) ;
106+ console . log ( 'Note: In full version, this would save your API key securely.' ) ;
106107 } else {
107- console . log ( 'Error: Please provide an API key' ) ;
108+ console . log ( '❌ Error: Please provide an API key' ) ;
109+ console . log ( 'Usage: gemini-flow auth --key YOUR_API_KEY' ) ;
108110 }
109111 } else if ( args . includes ( '--status' ) ) {
110- console . log ( 'Authentication status: Not implemented in basic CLI' ) ;
112+ const hasKey = process . env . GEMINI_API_KEY || process . env . GOOGLE_AI_API_KEY ;
113+ console . log ( '\nAuthentication Status:' ) ;
114+ console . log ( `API Key in Environment: ${ hasKey ? '✅ Found' : '❌ Not found' } ` ) ;
115+ if ( ! hasKey ) {
116+ console . log ( '\nTo set your API key:' ) ;
117+ console . log ( ' export GEMINI_API_KEY="your-key-here"' ) ;
118+ console . log ( ' or' ) ;
119+ console . log ( ' gemini-flow auth --key YOUR_API_KEY' ) ;
120+ }
121+ } else if ( args . includes ( '--test' ) ) {
122+ console . log ( '🔧 Testing API key...' ) ;
123+ console . log ( '(Basic implementation - cannot actually test API key)' ) ;
124+ } else if ( args . includes ( '--clear' ) ) {
125+ console . log ( '🧹 API key cleared (basic implementation)' ) ;
111126 } else {
112- console . log ( 'Auth commands: --key <key>, --status, --test, --clear' ) ;
127+ console . log ( '\nAuth Commands:' ) ;
128+ console . log ( ' --key <key> Set API key' ) ;
129+ console . log ( ' --status Show authentication status' ) ;
130+ console . log ( ' --test Test current API key' ) ;
131+ console . log ( ' --clear Clear authentication' ) ;
113132 }
114133 }
115134}
0 commit comments