PHPackages                             neosoftware/openai-codex-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. neosoftware/openai-codex-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

neosoftware/openai-codex-sdk
============================

PHP 8.2 SDK for OpenAI Codex CLI agent

v0.125.0(1mo ago)00MITPHPPHP ^8.2

Since Jun 5Pushed 1mo agoCompare

[ Source](https://github.com/NEOSoftWare/openai-codex-sdk)[ Packagist](https://packagist.org/packages/neosoftware/openai-codex-sdk)[ RSS](/packages/neosoftware-openai-codex-sdk/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

OpenAI Codex SDK for PHP
========================

[](#openai-codex-sdk-for-php)

PHP 8.2 SDK for working with the [OpenAI Codex](https://openai.com/codex) CLI agent. An exact port of the [`@openai/codex-sdk`](https://www.npmjs.com/package/@openai/codex-sdk) package (TypeScript).

Requirements
------------

[](#requirements)

- PHP **8.2+**
- Composer

Installation
------------

[](#installation)

```
composer require neosoftware/openai-codex-sdk
```

Codex Binary
------------

[](#codex-binary)

The SDK runs `codex` (Codex CLI) as a subprocess. Specify its path in one of the following ways:

**Via `CodexOptions`** — explicitly for a specific instance:

```
new CodexOptions(codexPathOverride: '/usr/local/bin/codex')
```

**Installation into `vendor/bin`** — convenient for containers and servers where Codex CLI is not installed globally. The command downloads the binary for your platform from npm and adds a `vendor/bin/codex` symlink:

```
vendor/bin/install-codex
```

`allow-plugins` permissions are not required.

Quick Start
-----------

[](#quick-start)

```
