@@ -23,7 +23,6 @@ import { TermAppRenderer } from '@/term-app'; // Import TermAppRenderer
2323// Removed import { initializeUI, updateUI, cleanupUI } from '@/term-app';
2424import { startWebServers , stopWebServers } from './webServer' ;
2525import chalk from 'chalk' ;
26- import os from 'os' ;
2726
2827interface CliOptions {
2928 workers ? : number ;
@@ -197,30 +196,6 @@ program
197196
198197 //console.log(config)
199198
200- // Check if any API key is set in environment variables or config file
201- const hasApiKey = process . env . ANTHROPIC_API_KEY ||
202- ( config . llm && 'options' in config . llm && 'apiKey' in config . llm . options && config . llm . options . apiKey ) ;
203-
204- // Check if user is authenticated through Claude Code
205- let hasClaudeCodeAuth = false ;
206- try {
207- const CREDS_PATH = path . join ( os . homedir ( ) , '.magnitude' , 'credentials' , 'claudeCode.json' ) ;
208- const data = await fs . promises . readFile ( CREDS_PATH , 'utf-8' ) ;
209- const creds = JSON . parse ( data ) ;
210- hasClaudeCodeAuth = creds . expires_at > Date . now ( ) + 60000 ;
211- } catch ( error ) {
212- hasClaudeCodeAuth = false ;
213- }
214-
215- if ( ! hasApiKey && ! hasClaudeCodeAuth ) {
216- console . error ( "Missing API key for LLM provider" ) ;
217- console . error ( "You can either:" ) ;
218- console . error ( " - Set ANTHROPIC_API_KEY environment variable" ) ;
219- console . error ( " - Configure an API key in your magnitude.config.ts" ) ;
220- console . error ( " - Authenticate with Claude Code" ) ;
221- process . exit ( 1 ) ;
222- }
223-
224199 // // If planner not provided, make a choice based on available environment variables
225200 // if (!config.planner) {
226201 // const planner = tryDeriveEnvironmentPlannerClient();
0 commit comments