Files
automaker/apps/server/src/routes/setup/routes/install-claude.ts
SuperComboGamer 8d578558ff style: fix formatting with Prettier
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 20:31:57 -05:00

24 lines
745 B
TypeScript

/**
* POST /install-claude endpoint - Install Claude CLI
*/
import type { Request, Response } from 'express';
import { getErrorMessage, logError } from '../common.js';
export function createInstallClaudeHandler() {
return async (_req: Request, res: Response): Promise<void> => {
try {
// In web mode, we can't install CLIs directly
// Return instructions instead
res.json({
success: false,
error:
'CLI installation requires terminal access. Please install manually using: npm install -g @anthropic-ai/claude-code',
});
} catch (error) {
logError(error, 'Install Claude CLI failed');
res.status(500).json({ success: false, error: getErrorMessage(error) });
}
};
}