Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:0xsline OpenChatCut Codex Installation

From Leeroopedia
Knowledge Sources
Domains Codex, Agent
Last Updated 2026-10-22 14:00 GMT

Overview

Detects and validates the Codex CLI installation by finding the binary on PATH and checking it meets the minimum version requirement.

Description

The Codex Installation module searches PATH for the `codex` executable (handles Windows `.exe`/`.cmd`/`.bat`). Checks version against `MINIMUM_CODEX_VERSION` ('0.146.0'). 10s timeout for version check. Returns `CodexInstallation` with installed, supported, path, and version fields.

Usage

  • Codex agent plugin: Checks if Codex CLI is available before starting agent turns.

Code Reference

Source Location

  • Repository: OpenChatCut
  • File: server/codex/installation.ts
  • Lines: 1-122

Signature

export const MINIMUM_CODEX_VERSION = '0.146.0';

export interface CodexInstallation {
  installed: boolean;
  supported: boolean;
  path?: string;
  version?: string;
}

export async function inspectCodexInstallation(): Promise<CodexInstallation>;

Import

import { inspectCodexInstallation, MINIMUM_CODEX_VERSION, type CodexInstallation } from './codex/installation.ts';

I/O Contract

Inputs

Name Type Required Description
(none) — — Searches PATH automatically

Outputs

Name Type Description
inspectCodexInstallation() returns Promise<CodexInstallation> Installation status with version

Usage Examples

Checking Codex Installation

import { inspectCodexInstallation } from './codex/installation.ts';

const install = await inspectCodexInstallation();
if (!install.installed) {
  console.log('Codex CLI not found');
} else if (!install.supported) {
  console.log(`Codex ${install.version} too old (need ${MINIMUM_CODEX_VERSION})`);
}

Related Pages

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment