Open Codex

Open Codex is an open-source, community-maintained fork of OpenAI's Codex CLI tooling, maintained by ymichael on GitHub. It provides a terminal-based interface designed to execute code modifications, script runs, and automated development tasks directly from your shell environment. In standard workflows, Open Codex operates through the `codex-cli` interface. It processes natural language instructions, analyzes repository context, and generates or modifies source files while prompting users based on configurable execution safeguards. User preferences and runtime behaviors—such as automated tool execution and command confirmation levels—are managed via configuration files located at `~/.codex/config.json` or `~/.codex/config.yaml`, which can also be overridden via command-line flags. What differentiates Open Codex from the upstream repository and other commercial coding assistants is its community-driven fork status, which removes proprietary Contributor License Agreement (CLA) hurdles and incorporates community-submitted configuration improvements, such as persistent approval mode flags. It gives developers full access to the underlying TypeScript codebase for customization and local modifications. Open Codex is distributed as open-source software under its repository repository license. Usage costs depend strictly on the underlying model API keys configured for the agent.

Tags: ai agent, cli, code assistant, coding agent, terminal

Visit Open Codex

Key features

  • CLI-Based Execution — Runs agentic code modifications and repository interactions directly from the terminal via the codex-cli package. - Configurable Approval Modes — Supports fine-grained user confirmation workflows persistent across sessions via ~/.codex/config.json or ~/.codex/config.yaml. - Flag Overrides — Allows users to dynamically override default persistent approval and execution settings using CLI runtime flags. - TypeScript Implementation — Built on a modular TypeScript architecture that developers can inspect, extend, and rebuild locally. - Open-Source Fork — Independent community fork derived from openai/codex without upstream CLA requirements.

Use cases

Use Case: Automated Refactoring with Safety Controls Developers can run refactoring tasks across project files while enforcing strict approval prompts via approvalMode in ~/.codex/config.json. This ensures code modifications and shell commands require explicit approval before applying changes to disk.

Use Case: Scripted Shell Development Engineers working purely in terminal environments can leverage codex-cli to generate boilerplate, write helper scripts, and inspect error outputs without context switching to a browser or separate IDE plugin.

Use Case: Customizing Agent Workflows Teams wanting an open-source codebase derived from OpenAI's CLI architecture can fork and modify Open Codex to inject internal tooling, alter approval logic, or integrate custom endpoints directly in TypeScript.

Who it is for

Open Codex is targeted at developers who prefer terminal-native AI coding tools and want an open-source, configurable codebase rather than closed-source proprietary assistants. It is less suitable for users looking for turnkey desktop IDE extensions with full GUI integration or official enterprise vendor support.

Install guide

Installation Clone the repository and install the dependencies from the codex-cli package directory using Node.js/npm: bash git clone https://github.com/ymichael/open-codex.git cd open-codex/codex-cli npm install npm run build npm link

First Run Set your API key and configure your global options in ~/.codex/config.json (or ~/.codex/config.yaml): json { "approvalMode": "manual" } Export your API credentials in your environment: bash export OPENAI_API_KEY="your-api-key-here"

Example Session Run codex against your current repository: bash codex "Add unit tests for user authentication in auth.ts and run test suite"

Part of CLI Coding Agents

Categories: AI Coding Agents, Code Assistants, Developer Tools

Related CLI agents

  • Claude Code — Claude Code is an official terminal-based agentic coding tool developed by Anthropic. Executed via the `claude` CLI command, it provides…
  • Cursor CLI — Cursor CLI is a terminal-based autonomous coding agent developed by Anysphere, the team behind the Cursor editor. It brings Cursor's…
  • ZAP — ZAP is an open-source, terminal-based AI coding agent implemented in Rust by the zap-coding-agent project. It provides an autonomous command-line…
  • Junie — Junie is an autonomous terminal-based AI coding agent developed by JetBrains. Built on top of the IntelliJ IDEA engine, it…
  • FetchCoder — FetchCoder is a terminal-based AI coding assistant developed under the Fetch.ai organization. Built specifically for command-line workflows, the tool provides…
  • Kolega Code — Kolega Code (kolega-code) is an open-source Python-based terminal coding agent developed by the Kolega AI team. It is built to…
  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories