# Is @openai/codex ESM-only? Can you require() it?

> @openai/codex@0.153.4 has no importable main entry. No JavaScript entry point.

Codex CLI is a coding agent from OpenAI that runs locally on your computer.

Latest version 0.153.4, published Sep 4, 2026.

@openai/codex does not expose a JavaScript entry point in package.json. It is likely a CLI, a stylesheet, a type-definition package, or an asset bundle, so require() and import are not the way to use it.

## What to do

1. Do not require() or import @openai/codex: it has no JavaScript entry point. Use it as a CLI (npx @openai/codex), a stylesheet, an asset, or a type-definition package as its README describes.
2. TypeScript: no types are available for @openai/codex; declare the module yourself if you need them.

## Facts

- Latest: 0.153.4 (Sep 4, 2026)
- Module format: No JS entry point
- Last CommonJS version: n/a
- TypeScript types: none
- Node engines: >=16
- Weekly downloads: 21.1M
- License: Apache-2.0

## Runtime test results for @openai/codex@0.153.4

Runtime probe pending for this version (install failed: PROBE_TIMEOUT). The facts above come from package.json.

## How to import @openai/codex

ES modules:

```js
import * as codex from "@openai/codex";
```

## Module format by version

Derived from the type, main and exports fields of every stable release on npm (185 versions; the newest 60 shown).

| Versions | Format | First published |
|---|---|---|
| 0.111.0 – 0.153.4 | No JS entry point | Mar 5, 2026 |

## Frequently asked

**Is @openai/codex ESM-only?**

@openai/codex@0.153.4 has no importable main entry. @openai/codex does not expose a JavaScript entry point in package.json. It is likely a CLI, a stylesheet, a type-definition package, or an asset bundle, so require() and import are not the way to use it.

**Does @openai/codex ship TypeScript types?**

No. @openai/codex ships no type declarations and there is no @types package for it.

## Links

- [@openai/codex on npm](https://www.npmjs.com/package/@openai/codex)
- [Source repository](https://github.com/openai/codex)
- [HTML version](https://canirequire.com/package/@openai/codex/)
- [JSON version](https://canirequire.com/package/@openai/codex.json)

---

For scripts and AI agents: any package is at https://canirequire.com/package/<name>/index.md (Markdown) or https://canirequire.com/package/<name>.json (JSON); the site index is https://canirequire.com/llms.txt. Fetch the URL directly; no search needed.
