# codex | OpenAI | Knowledge Base | Instagit

Lightweight coding agent that runs in your terminal

GitHub Stars: 63.5k

Repository: https://github.com/openai/codex

---

## Articles

### [How to Configure Custom Prompts in the Codex CLI: A Complete Guide](/openai/codex/codex-cli-configure-custom-prompts)

Master the Codex CLI: Learn to configure custom prompts using YAML or JSON files for efficient command-line interactions. Boost your productivity today.

- Tags: how-to-guide
- Published: 2026-03-06

### [Where to Find Codex CLI Configuration Documentation: The Complete Guide](/openai/codex/codex-cli-documentation-configuration)

Find Codex CLI configuration documentation in three official locations including a basic guide, advanced guide, and auto-generated JSON schema. Get the complete guide here.

- Tags: documentation
- Published: 2026-03-06

### [How to Use Slash Commands Within Codex CLI: A Developer Guide](/openai/codex/codex-cli-slash-commands-usage)

Learn how developers use slash commands in Codex CLI. Trigger handler functions via the TypeScript SDK with simple forward-slash inputs. This guide details the five-stage detection pipeline.

- Tags: how-to-guide
- Published: 2026-03-06

### [Codex CLI Skills System: Architecture, Features, and Implementation Guide](/openai/codex/codex-cli-skills-system-features)

Explore the Codex CLI skills system's features. This plugin framework offers automatic tool invocation, caching, and UI controls for a seamless developer experience.

- Tags: architecture
- Published: 2026-03-06

### [Codex CLI Authentication: How the Device-Code Flow Works with ChatGPT](/openai/codex/codex-cli-authentication-methods)

Learn how Codex CLI uses Rust and OAuth 2.0 device code flow for secure authentication with ChatGPT. Get a one-time code, verify in your browser, and store tokens locally.

- Tags: how-to-guide
- Published: 2026-03-06

### [How the Codex CLI Configuration System Works: Complete config.toml Guide](/openai/codex/codex-cli-configuration-system-config-toml)

Explore the Codex CLI configuration system and understand how config.toml works. Learn about layered sources, strict precedence, and atomic edits.

- Tags: internals
- Published: 2026-03-06

### [How MCP Server Support is Implemented in OpenAI Codex](/openai/codex/codex-mcp-server-support-implementation)

Explore how MCP server support is implemented in OpenAI Codex. Discover its Rust architecture, JSON-RPC connections, and TUI integration for seamless tool management.

- Tags: internals
- Published: 2026-03-06

### [Sandbox Implementations Supported by Codex CLI: macOS, Linux, and Windows](/openai/codex/codex-cli-supported-sandbox-implementations)

Discover Codex CLI sandbox implementations for macOS Seatbelt, Linux Landlock seccomp, and Windows restricted-token. Secure your code execution across platforms.

- Tags: how-to-guide
- Published: 2026-03-06

### [Where Are the Application Server Protocol Definitions in OpenAI Codex?](/openai/codex/codex-app-server-protocol-definitions-location)

Find application server protocol definitions in OpenAI Codex within the codex-rsapp-server-protocol crate at srcprotocolv2rs and commonrs. Explore the JSON-RPC wire format.

- Tags: deep-dive
- Published: 2026-03-06

### [What Is the app-server Component in OpenAI Codex?](/openai/codex/codex-app-server-component-purpose)

Discover the app-server component in OpenAI Codex. Learn how this JSON-RPC 2.0 gateway enables conversation management, model generation, and tool execution for Codex clients.

- Tags: internals
- Published: 2026-03-06

### [What Is the CLI Directory in the OpenAI Codex Project?](/openai/codex/codex-cli-directory-function)

Explore the CLI directory in the OpenAI Codex project. Discover how it implements the command-line interface for legacy TypeScript and modern Rust binaries, handling parsing, loading, and sandboxed execution.

- Tags: internals
- Published: 2026-03-06

### [What Is the exec Directory in Codex? The Engine Behind Scriptable AI Execution](/openai/codex/codex-exec-directory-purpose)

Discover the exec directory in Codex and understand its role as an event-driven execution engine for scriptable AI. Learn about JSON output, sandbox policies, and automated approvals.

- Tags: internals
- Published: 2026-03-06

### [What UI Toolkit Powers the Codex Fullscreen TUI? A Deep Dive into Ratatui](/openai/codex/codex-tui-ui-toolkit)

Discover the Ratatui UI toolkit powering the OpenAI Codex fullscreen TUI. Explore its Rust-based widgets, layout, and styling for rich terminal applications.

- Tags: deep-dive
- Published: 2026-03-06

### [What Is the Role of the core/ Directory in the OpenAI Codex Codebase?](/openai/codex/codex-codebase-core-directory-role)

Explore the openai/codex core directory's role in powering autonomous agent interactions, handling state management, tool execution, plugins, and secure sandboxing.

- Tags: internals
- Published: 2026-03-06

### [Where Is the TypeScript SDK Located in the OpenAI Codex Repository?](/openai/codex/codex-repository-typescript-sdk-location)

Find the TypeScript SDK in the openai/codex repository within the sdk/typescript directory. Access public API, client classes, and build tools for Codex services.

- Tags: api-reference
- Published: 2026-03-06

### [What Is the Codex CLI Implementation Language? Inside OpenAI's Rust Architecture](/openai/codex/codex-cli-implementation-language)

Discover the primary implementation language for the Codex CLI. Explore OpenAI's Rust architecture and understand its Cargo-compiled binary entry point.

- Tags: internals
- Published: 2026-03-06

### [How to Start Codex CLI as an MCP Server: A Complete Configuration Guide](/openai/codex/codex-cli-start-mcp-server)

Learn to start Codex CLI as an MCP server. Configure the Model Context Protocol server for programmatic integration via JSON-RPC API over stdin/stdout. Get the complete guide.

- Tags: how-to-guide
- Published: 2026-03-06

### [Codex MCP Subcommand: Configure and Manage Model Context Protocol Servers in OpenAI Codex CLI](/openai/codex/codex-cli-mcp-subcommand-purpose)

Learn how to use the codex mcp subcommand to configure and manage Model Context Protocol servers for local and remote tools in OpenAI Codex CLI.

- Tags: deep-dive
- Published: 2026-03-06

### [How to Log Out from Codex CLI: Complete Authentication Guide](/openai/codex/codex-cli-logout)

Learn how to log out from Codex CLI with this guide. Run codex logout to remove your token and secure your account. Essential for managing authentication.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Manage Login Credentials for Codex CLI: OAuth and API Key Authentication](/openai/codex/codex-cli-manage-login)

Learn to manage Codex CLI login credentials using OAuth device flow and API keys. Securely authenticate with codex login and remove tokens with codex logout.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Use the `review` Command for Non-Interactive Code Reviews with Codex CLI](/openai/codex/codex-cli-review-command-non-interactive)

Automate code reviews with the codex review non-interactive command. Stream JSON or text output directly to stdout for CI pipelines and pre-commit hooks.

- Tags: how-to-guide
- Published: 2026-03-06

### [How the OpenAI Codex CLI exec Command Works for Non-Interactive Execution](/openai/codex/codex-cli-exec-command-non-interactive)

Learn how the codex exec command enables non-interactive execution by parsing arguments, initializing sandboxed environments, and processing AI responses.

- Tags: internals
- Published: 2026-03-06

### [Codex CLI Subcommands: Complete Guide to the OpenAI Codex Command-Line Interface](/openai/codex/codex-cli-subcommands)

Explore over 25 Codex CLI subcommands like exec review and mcp to execute code manage servers and restore sessions. Master the OpenAI Codex Command-Line Interface with this guide.

- Tags: api-reference
- Published: 2026-03-06

### [How to Install the OpenAI Codex CLI: 4 Methods from npm to Source](/openai/codex/how-to-install-openai-codex-cli)

Install the OpenAI Codex CLI with four methods: npm, Homebrew, direct download, or build from Rust source. Get started quickly with our comprehensive guide.

- Tags: how-to-guide
- Published: 2026-03-06

