import { Button } from "@/components/ui/button"; import { Terminal, CheckCircle2, AlertCircle, RefreshCw, } from "lucide-react"; import type { CliStatus } from "../shared/types"; interface CliStatusProps { status: CliStatus | null; isChecking: boolean; onRefresh: () => void; } export function CodexCliStatus({ status, isChecking, onRefresh, }: CliStatusProps) { if (!status) return null; return (

OpenAI Codex CLI

Codex CLI enables GPT-5.1 Codex models for autonomous coding tasks.

{status.success && status.status === "installed" ? (

Codex CLI Installed

{status.method && (

Method: {status.method}

)} {status.version && (

Version:{" "} {status.version}

)} {status.path && (

Path:{" "} {status.path}

)}
{status.recommendation && (

{status.recommendation}

)}
) : status.status === "api_key_only" ? (

API Key Detected - CLI Not Installed

{status.recommendation || "OPENAI_API_KEY found but Codex CLI not installed. Install the CLI for full agentic capabilities."}

{status.installCommands && (

Installation Commands:

{status.installCommands.npm && (

npm:

{status.installCommands.npm}
)}
)}
) : (

Codex CLI Not Detected

{status.recommendation || "Install OpenAI Codex CLI to use GPT-5.1 Codex models for autonomous coding."}

{status.installCommands && (

Installation Commands:

{status.installCommands.npm && (

npm:

{status.installCommands.npm}
)} {status.installCommands.macos && (

macOS (Homebrew):

{status.installCommands.macos}
)}
)}
)}
); }