codex  by openai

Coding agent CLI tool for terminal-based chat-driven development

created 3 months ago
31,596 stars

Top 1.1% on sourcepulse

GitHubView on GitHub
Project Summary

Codex CLI is a terminal-based AI coding assistant designed for developers who want to integrate ChatGPT-level reasoning directly into their workflow. It allows users to interact with AI models to generate, refactor, test, and document code, operating directly within their project's directory and version control system.

How It Works

Codex CLI leverages large language models via API calls to understand natural language prompts and translate them into code or shell commands. It operates within a sandboxed environment, with macOS using Apple Seatbelt and Linux recommending Docker for isolation. This approach ensures that AI-generated actions are contained, with network access restricted by default, enhancing security and predictability. The tool supports multimodal inputs, allowing users to provide screenshots or diagrams for context.

Quick Start & Requirements

  • Install: npm install -g @openai/codex
  • Prerequisites: Node.js 22+, Git (optional), macOS 12+, Ubuntu 20.04+/Debian 10+, or Windows 11 via WSL2. Minimum 4GB RAM (8GB recommended).
  • Configuration: Set OPENAI_API_KEY environment variable or use a .env file.
  • Usage: Run interactively with codex or provide a prompt like codex "explain this codebase".
  • Docs: Quickstart, CLI Reference

Highlighted Details

  • Supports multiple AI providers beyond OpenAI (e.g., OpenRouter, Gemini, Ollama, Mistral).
  • Offers configurable approvalMode (Suggest, Auto Edit, Full Auto) for controlling AI autonomy.
  • Integrates project-specific instructions via codex.md files.
  • Includes non-interactive/CI mode for automated workflows.
  • Provides detailed tracing and verbose logging via DEBUG=true.

Maintenance & Community

The project is under active development with community contributions welcomed. It utilizes Husky for Git hooks and Vitest for testing. Discussions and help are available via GitHub Discussions.

Licensing & Compatibility

  • License: Apache-2.0 License.
  • Compatibility: Compatible with commercial use. Supports OpenAI organizations with Zero Data Retention (ZDR).

Limitations & Caveats

Codex CLI is an experimental technology and may contain bugs or undergo breaking changes. Linux sandboxing is not enabled by default and requires Docker for comparable security to macOS.

Health Check
Last commit

17 hours ago

Responsiveness

1 day

Pull Requests (30d)
260
Issues (30d)
73
Star History
10,970 stars in the last 90 days

Explore Similar Projects

Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), John Resig John Resig(Author of jQuery; Chief Software Architect at Khan Academy), and
12 more.

opencode by sst

7.8%
16k
CLI tool for AI-assisted coding in the terminal
created 3 months ago
updated 20 hours ago
Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Anil Dash Anil Dash(Former CEO of Glitch), and
13 more.

cline by cline

0.8%
48k
VS Code extension for autonomous coding agent
created 1 year ago
updated 21 hours ago
Feedback? Help us improve.